+
Preferences
statusMsg;
echo $this->form;
diff --git a/application/views/scripts/preference/update.phtml b/application/views/scripts/preference/update.phtml
deleted file mode 100644
index 3c48814f4..000000000
--- a/application/views/scripts/preference/update.phtml
+++ /dev/null
@@ -1 +0,0 @@
-Left empty on purpose
diff --git a/build/schema.xml b/build/schema.xml
index d08f9387f..ac1151636 100644
--- a/build/schema.xml
+++ b/build/schema.xml
@@ -118,6 +118,7 @@
+
diff --git a/build/sql/schema.sql b/build/sql/schema.sql
index 6bdc5351d..6231f20e5 100644
--- a/build/sql/schema.sql
+++ b/build/sql/schema.sql
@@ -142,6 +142,7 @@ CREATE TABLE "cc_show"
"id" serial NOT NULL,
"name" VARCHAR(255) default '' NOT NULL,
"url" VARCHAR(255) default '',
+ "genre" VARCHAR(255) default '',
"description" VARCHAR(512),
"color" VARCHAR(6),
"background_color" VARCHAR(6),
diff --git a/install/DoctrineMigrations/Version20110402164819.php b/install/DoctrineMigrations/Version20110402164819.php
new file mode 100644
index 000000000..d4e84145c
--- /dev/null
+++ b/install/DoctrineMigrations/Version20110402164819.php
@@ -0,0 +1,28 @@
+getTable('cc_show');
+
+ $show_table->addColumn('genre', 'string', array('notnull' => 0, 'length' => 255, 'default' => ""));
+ //end cc_show modifications
+
+ }
+
+ public function down(Schema $schema)
+ {
+ //start cc_show modifications
+ $show_table = $schema->getTable('cc_show');
+
+ $show_table->dropColumn('genre');
+ //end cc_show modifications
+ }
+}
diff --git a/public/css/images/upload-icon.gif b/public/css/images/upload-icon.gif
new file mode 100644
index 000000000..45b4f81a9
Binary files /dev/null and b/public/css/images/upload-icon.gif differ
diff --git a/public/css/redmond/jquery-ui-1.8.8.custom.css b/public/css/redmond/jquery-ui-1.8.8.custom.css
index 64086d9c2..1de938884 100644
--- a/public/css/redmond/jquery-ui-1.8.8.custom.css
+++ b/public/css/redmond/jquery-ui-1.8.8.custom.css
@@ -1085,7 +1085,7 @@ button.ui-button-icons-only {
padding-right: 2.1em;
}
/* no icon support for input elements, provide padding by default */
-input.ui-button, button.ui-button {
+input.ui-button {
padding: .4em 1em;
}
/*button icon element(s) */
@@ -1093,6 +1093,7 @@ input.ui-button, button.ui-button {
position: absolute;
top: 50%;
margin-top: -8px;
+ left: 0.2em;
}
.ui-button-icon-only .ui-icon {
left: 50%;
@@ -1117,10 +1118,12 @@ input.ui-button, button.ui-button {
}
/* workarounds */
-/*button.ui-button::-moz-focus-inner {
-border: 0;
-padding: 0;
-}*/
+
+button.ui-button.::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
/* reset extra padding in Firefox */
/*
* jQuery UI Dialog 1.8.6
@@ -1514,4 +1517,4 @@ padding: 0;
.ui-datepicker {
display:none;
-}
+}
\ No newline at end of file
diff --git a/public/css/styles.css b/public/css/styles.css
index 4b05fb512..4f53d7415 100644
--- a/public/css/styles.css
+++ b/public/css/styles.css
@@ -1269,9 +1269,8 @@ div.success{
margin: 0 0 8px 0;
}
#schedule-add-show .button-bar.bottom {
- margin: 16px 0 0 0;
+ margin: 16px 0 0;
}
-
.schedule {
text-align:left;
height:38px;
@@ -1512,6 +1511,11 @@ div.success{
background:url(images/icon_soundcloud.png) no-repeat 0 0;
width:21px;
}
+.small-icon.progress {
+ background:url(images/upload-icon.gif) no-repeat;
+ background-color:black;
+ background-position:center;
+}
.medium-icon {
display:block;
width:25px;
@@ -1541,3 +1545,52 @@ div.success{
.medium-icon.finishedplaying {
background:url(images/icon_finishedplaying_m.png) no-repeat 0 0;
}
+.preferences {
+ width: 500px;
+}
+
+dt.block-display, dd.block-display {
+ display: block;
+ float: none;
+ margin-left: 0;
+ padding-left: 0;
+}
+.preferences dt.block-display, .preferences dd.block-display {
+ padding: 0 0 5px 0;
+}
+.preferences dd.block-display {
+ margin-bottom:4px;
+}
+.preferences dd.block-display:last-child {
+ margin-bottom:0;
+}
+.simple-formblock dd.block-display {
+ width: 100%;
+}
+.preferences input[type="radio"] {
+ margin:0;
+}
+.preferences label input[type="radio"] {
+ margin:0 1px 0 0;
+}
+.preferences label input[type="checkbox"] {
+ margin:0 5px 0 0;
+}
+dd.radio-inline-list, .preferences dd.radio-inline-list {
+ margin-bottom:6px;
+}
+.radio-inline-list label {
+ margin-right:12px;
+}
+.preferences.simple-formblock dd.block-display {
+ width: 100%;
+}
+.preferences dd.block-display .input_select {
+ width: 100%;
+}
+.preferences dd.block-display .input_text_area, .preferences dd.block-display .input_text {
+ width: 99.5%;
+}
+.preferences dd#SoundCloudTags-element.block-display .input_text_area {
+ height: 120px;
+}
\ No newline at end of file
diff --git a/public/js/airtime/preferences/preferences.js b/public/js/airtime/preferences/preferences.js
new file mode 100644
index 000000000..a6fa7448e
--- /dev/null
+++ b/public/js/airtime/preferences/preferences.js
@@ -0,0 +1,17 @@
+$(document).ready(function() {
+
+ var form = $("form");
+
+ form.find("h3").click(function(){
+ var h3 = $(this);
+ h3.next().toggle();
+
+ if(h3.hasClass("close")) {
+ h3.removeClass("close");
+ }
+ else {
+ h3.addClass("close");
+ }
+ });
+});
+
diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js
index ab8eb34c9..86fc03b78 100644
--- a/public/js/airtime/schedule/full-calendar-functions.js
+++ b/public/js/airtime/schedule/full-calendar-functions.js
@@ -148,8 +148,8 @@ function viewDisplay( view ) {
function eventRender(event, element, view) {
- //only put progress bar on shows that aren't being recorded and are not a rebroadcast.
- if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 0 /* && event.rebroadcast === 0 */) {
+ //only put progress bar on shows that aren't being recorded.
+ if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 0) {
var div = $('
');
div
.height('5px')
@@ -168,15 +168,17 @@ function eventRender(event, element, view) {
}
//add the record/rebroadcast icons if needed.
- if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1) {
+
+ //record icon (only if not on soundcloud, will always be true for future events)
+ if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 1 && event.soundcloud_id === -1) {
$(element).find(".fc-event-time").after('
');
}
- if(view.name === 'month' && event.record === 1) {
+ if(view.name === 'month' && event.record === 1 && event.soundcloud_id === -1) {
$(element).find(".fc-event-title").after('
');
}
-
+ //rebroadcast icon
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) {
$(element).find(".fc-event-time").after('
');
@@ -185,12 +187,12 @@ function eventRender(event, element, view) {
$(element).find(".fc-event-title").after('
');
}
-
- if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.soundcloud_id != -1 && event.record === 1) {
+ //soundcloud icon
+ if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.soundcloud_id !== -1 && event.record === 1) {
$(element).find(".fc-event-time").after('
');
}
- if(view.name === 'month' && event.soundcloud_id != -1 && event.record === 1) {
+ if(view.name === 'month' && event.soundcloud_id !== -1 && event.record === 1) {
$(element).find(".fc-event-title").after('
');
}
diff --git a/public/js/airtime/schedule/schedule.js b/public/js/airtime/schedule/schedule.js
index 79c364e4c..24c889439 100644
--- a/public/js/airtime/schedule/schedule.js
+++ b/public/js/airtime/schedule/schedule.js
@@ -165,6 +165,29 @@ function confirmCancelShow(show_instance_id){
}
}
+function uploadToSoundCloud(show_instance_id){
+
+ var url = "/Schedule/upload-to-sound-cloud";
+ var span = $(window.triggerElement).find(".recording");
+
+ span.removeClass("recording")
+ .addClass("progress");
+
+ $.post(url,
+ {id: show_instance_id, format: "json"},
+ function(data){
+ if(data.error) {
+ span.removeClass("progress")
+ .addClass("recording");
+
+ alert(data.error);
+ return;
+ }
+ scheduleRefetchEvents();
+ });
+
+}
+
function buildContentDialog(json){
var dialog = $(json.dialog);
diff --git a/python_apps/show-recorder/testrecordscript.py b/python_apps/show-recorder/testrecordscript.py
index f76211a1c..7e1f7ef7a 100644
--- a/python_apps/show-recorder/testrecordscript.py
+++ b/python_apps/show-recorder/testrecordscript.py
@@ -47,18 +47,20 @@ def getDateTimeObj(time):
class ShowRecorder(Thread):
- def __init__ (self, show_instance, filelength, filename, filetype):
+ def __init__ (self, show_instance, filelength, show_name, start_time, filetype):
Thread.__init__(self)
self.api_client = api_client.api_client_factory(config)
self.filelength = filelength
- self.filename = filename
+ self.show_name = show_name
+ self.start_time = start_time
self.filetype = filetype
self.show_instance = show_instance
def record_show(self):
length = str(self.filelength)+".0"
- filename = self.filename.replace(" ", "-")
+ filename = self.show_name+" "+self.start_time
+ filename = filename.replace(" ", "-")
filepath = "%s%s.%s" % (config["base_recorded_files"], filename, self.filetype)
command = "ecasound -i alsa -o %s -t:%s" % (filepath, length)
@@ -134,9 +136,8 @@ class Record():
show_length = self.shows_to_record[start_time][0]
show_instance = self.shows_to_record[start_time][1]
show_name = self.shows_to_record[start_time][2]
- filename = show_name+"-"+start_time
-
- show = ShowRecorder(show_instance, show_length.seconds, filename, filetype="mp3")
+
+ show = ShowRecorder(show_instance, show_length.seconds, show_name, start_time, filetype="mp3", )
show.start()
#remove show from shows to record.