Skip to content

Commit

Permalink
podcast demo pretty much done
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwbradw committed Jan 10, 2015
1 parent 4e5eacb commit 25e0f42
Show file tree
Hide file tree
Showing 7 changed files with 6,120 additions and 15 deletions.
2 changes: 1 addition & 1 deletion headers/menu_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function print_menu2(){

<?php
if($enabled['podcast_tools'] && is_member("dj")) :?>
<li class=nodrop><a href="podcasting.php"> Podcasts </a></li>
<li class=nodrop><a href="podcasting.php?channel=124"> Podcast Editor Demo </a></li>
<?php endif;?>
</ul>

Expand Down
Binary file added images/speaker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion js/soundmanager2
Submodule soundmanager2 deleted from d62192
6,070 changes: 6,070 additions & 0 deletions js/soundmanager2.js

Large diffs are not rendered by default.

54 changes: 45 additions & 9 deletions podcasting.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

if (!isset($_GET['channel'])){
echo 'please append podcasting.php with ?channel=CHANNEL# after migrating your database. (For example, <a href="/podcasting.php?channel=12">click here for channel 12</a>) <br/><br/>see <a href="/podcasting/NOTES.txt"> notes.txt </a> for more info about migration</a></a>';
echo 'please append podcasting.php with ?channel=CHANNEL# after migrating your database. (For example, <a href="./podcasting.php?channel=12">click here for channel 12</a>) <br/><br/>see <a href="./podcasting/NOTES.txt"> notes.txt </a> for more info about migration</a></a>';
} else {
$channel_id = $_GET['channel'];
date_default_timezone_set('America/Vancouver');
Expand Down Expand Up @@ -41,30 +41,33 @@


<body ng-app='podcastEditor'>
<h2>podcast editor demo</h2>



<div ng-controller='channelCtrl as channel'>

{{status}}
<div loading-indicator></div>


<div ng-controller='episodeCtrl' ng-repeat="episode in episodes" class=episode >
<ng-include src="'podcasting/podcast-episode.html'">

</ng-include>
<!--
duration: {{episode.duration}}<br/>

episode start obj: {{episode.start_obj | date: 'medium'}}<br/>
episode end obj: {{episode.end_obj | date: 'medium'}}<br/>
episode duration: {{episode.duration | date: 'medium'}}<br/><br/><br/>
-->
</div>

<h3 ng-hide="edit_all">
<a ng-href="/podcasting.php?channel={{channel_id}}&editall=true">edit all episodes </a></h3>

</div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

<script type='text/javascript' src='js/soundmanager2/script/soundmanager2.js'></script>
<script type='text/javascript' src='js/soundmanager2.js'></script>

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js"></script>
<script type='text/javascript' src='js/bootstrap/bootstrap.js'></script>
Expand Down Expand Up @@ -145,7 +148,7 @@


$scope.makeEpisodes = function() {
$http.get('/podcasting/list.php?channel='+channel_id)
$http.get('./podcasting/list.php?channel='+channel_id)
.success(function(data, status, headers, config){
$scope.status = '';

Expand Down Expand Up @@ -220,7 +223,7 @@
};

$http({
url:'/podcasting/episode.php',
url:'./podcasting/episode.php',
method:'POST',
data:$.param(data_to_post)
})
Expand Down Expand Up @@ -341,7 +344,40 @@

}
}
})
}).config(function($httpProvider) {

$httpProvider.interceptors.push(function($q, $rootScope) {
return {
'request': function(config) {
$rootScope.$broadcast('loading-started');
return config || $q.when(config);
},
'response': function(response) {
$rootScope.$broadcast('loading-complete');
return response || $q.when(response);
}
};
});

})


.directive("loadingIndicator", function() {
return {
restrict : "A",
template: "<div>Loading...</div>",
link : function(scope, element, attrs) {
scope.$on("loading-started", function(e) {
element.css({"display" : ""});
});

scope.$on("loading-complete", function(e) {
element.css({"display" : "none"});
});

}
};
});

</script>

Expand Down
2 changes: 1 addition & 1 deletion podcasting/new-podcast-episode.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

.summary{
width:80%;
min-height:200px;
min-height:100px;
margin-top:5px;
margin-bottom:5px;
overflow: auto;
Expand Down
6 changes: 3 additions & 3 deletions podcasting/podcast-episode.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

.summary{
width:80%;
min-height:200px;
min-height:100px;
margin-top:5px;
margin-bottom:5px;
overflow: auto;
Expand Down Expand Up @@ -107,8 +107,8 @@ <h4>edit duration:</h4>
<span class="previews">
<button class='play_start' ng-click="preview_start()" ng-hide="!editing">play beginning</button>
<button class='play_end' ng-click="preview_end()" ng-hide="!editing">play end</button>
<span ng-class="{playing: playing}"><image src='images/speaker.png'></span>
<br/>status: {{sound_status}}
<span ng-class="{playing: playing}"><image src='./images/speaker.png'></span>
<br/>
</span>
</div>
<!--
Expand Down

0 comments on commit 25e0f42

Please sign in to comment.