From c90aa2f7db3995fbd84b29f4b863492027662403 Mon Sep 17 00:00:00 2001 From: "Silvio M." Date: Sat, 15 Jun 2013 19:48:10 +0200 Subject: [PATCH 001/164] update de_DE .po file merged and revised version (de_DE, de_AT) --- .../locale/de_DE/LC_MESSAGES/airtime.mo | Bin 64776 -> 65602 bytes .../locale/de_DE/LC_MESSAGES/airtime.po | 1198 ++++++++++------- 2 files changed, 721 insertions(+), 477 deletions(-) diff --git a/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.mo index f644c43c28542b520ef415d900090e8f67b46957..cd04e17146bcef34c32ae6816a2a62e1d5fbf9a1 100644 GIT binary patch delta 20064 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 U?fBl9eS&2>lK6jncRTFA0R!6mx&QzG diff --git a/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po b/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po index 42257b99f..94d8b61fc 100644 --- a/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po +++ b/airtime_mvc/locale/de_DE/LC_MESSAGES/airtime.po @@ -1,44 +1,44 @@ # GERMAN (de_DE) translation for Airtime. # Copyright (C) 2012 Sourcefabric # This file is distributed under the same license as the Airtime package. -# Sourcefabric , 2012. +# Sourcefabric , 2013. # msgid "" msgid "" msgstr "" "Project-Id-Version: Airtime 2.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-05-30 11:13-0400\n" -"PO-Revision-Date: 2013-05-31 09:27-0500\n" +"PO-Revision-Date: 2013-06-11 18:04+0100\n" "Last-Translator: Denise Rigato \n" "Language-Team: German Localization \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.5\n" +"X-Generator: Poedit 1.5.4\n" #: airtime_mvc/application/services/CalendarService.php:50 msgid "View Recorded File Metadata" -msgstr "Metadaten der aufgenommenen Datei sehen" +msgstr "Metadaten der aufgezeichneten Datei anzeigen" #: airtime_mvc/application/services/CalendarService.php:60 #: airtime_mvc/application/controllers/LibraryController.php:284 msgid "View on Soundcloud" -msgstr "Blick auf Soundcloud" +msgstr "Auf SoundCloud ansehen" #: airtime_mvc/application/services/CalendarService.php:65 #: airtime_mvc/application/controllers/LibraryController.php:290 msgid "Upload to SoundCloud" -msgstr "Upload auf SoundCloud" +msgstr "Auf SoundCloud hochladen" #: airtime_mvc/application/services/CalendarService.php:65 #: airtime_mvc/application/controllers/LibraryController.php:288 msgid "Re-upload to SoundCloud" -msgstr "Re-Upload auf SoundCloud" +msgstr "Erneut auf SoundCloud hochladen" #: airtime_mvc/application/services/CalendarService.php:72 #: airtime_mvc/application/services/CalendarService.php:100 msgid "Show Content" -msgstr "Inhalt anzeigen" +msgstr "Sendungsinhalt" #: airtime_mvc/application/services/CalendarService.php:85 #: airtime_mvc/application/controllers/LocaleController.php:311 @@ -48,7 +48,7 @@ msgstr "Inhalt hinzufügen / entfernen" #: airtime_mvc/application/services/CalendarService.php:90 msgid "Remove All Content" -msgstr "Inhalt vollständig entfernen" +msgstr "Gesamten Inhalt entfernen" #: airtime_mvc/application/services/CalendarService.php:110 #: airtime_mvc/application/services/CalendarService.php:114 @@ -59,16 +59,16 @@ msgstr "Aktuelle Sendung abbrechen" #: airtime_mvc/application/controllers/LibraryController.php:243 #: airtime_mvc/application/controllers/LibraryController.php:265 msgid "Edit" -msgstr "Bearbeiten" +msgstr "Ändern" #: airtime_mvc/application/services/CalendarService.php:128 #: airtime_mvc/application/services/CalendarService.php:138 msgid "Edit Show" -msgstr "Sendung bearbeiten" +msgstr "Sendung ändern" #: airtime_mvc/application/services/CalendarService.php:133 msgid "Edit This Instance" -msgstr "Diese Instanz Bearbeiten" +msgstr "Diese Folge bearbeiten" #: airtime_mvc/application/services/CalendarService.php:151 #: airtime_mvc/application/services/CalendarService.php:166 @@ -84,11 +84,11 @@ msgstr "Löschen" #: airtime_mvc/application/services/CalendarService.php:156 msgid "Delete This Instance" -msgstr "Diese Instanz löschen" +msgstr "Diese Folge löschen" #: airtime_mvc/application/services/CalendarService.php:161 msgid "Delete This Instance and All Following" -msgstr "Diese Instanz und alle folgenden löschen" +msgstr "Diese Folge und alle folgenden löschen" #: airtime_mvc/application/services/CalendarService.php:210 msgid "Permission denied" @@ -97,12 +97,14 @@ msgstr "Zugriff verweigert" #: airtime_mvc/application/services/CalendarService.php:214 #: airtime_mvc/application/models/ShowInstance.php:245 msgid "Can't drag and drop repeating shows" -msgstr "Wiederholte Sendungen können nicht per Drag & Drop bewegt werden." +msgstr "" +"Wiederkehrende Sendungen können nicht per Drag'n'Drop verschoben werden." #: airtime_mvc/application/services/CalendarService.php:223 #: airtime_mvc/application/models/ShowInstance.php:253 msgid "Can't move a past show" -msgstr "Eine vergangene Sendung kann nicht verschoben werden." +msgstr "" +"Eine in der Vergangenheit liegende Sendung kann nicht verschoben werden." #: airtime_mvc/application/services/CalendarService.php:241 #: airtime_mvc/application/models/ShowInstance.php:270 @@ -117,26 +119,30 @@ msgstr "Eine Sendung kann nicht in die Vergangenheit verschoben werden." #: airtime_mvc/application/forms/AddShowWhen.php:308 #: airtime_mvc/application/forms/AddShowWhen.php:313 msgid "Cannot schedule overlapping shows" -msgstr "Man kann keine sich überschneidenden Sendungen planen." +msgstr "Sendungen können nicht überlappend geplant werden." #: airtime_mvc/application/services/CalendarService.php:261 #: airtime_mvc/application/models/ShowInstance.php:290 msgid "Can't move a recorded show less than 1 hour before its rebroadcasts." -msgstr "Eine aufgezeichnete Sendung kann nicht weniger als 1 Stunde vor Wiederholungstermin geschoben werden." +msgstr "" +"Eine aufgezeichnete Sendung kann nicht verschoben werden, wenn der Zeitpunkt " +"der Wiederholung weniger als eine Stunde bevor liegt." #: airtime_mvc/application/services/CalendarService.php:270 #: airtime_mvc/application/models/ShowInstance.php:303 msgid "Show was deleted because recorded show does not exist!" -msgstr "Die Sendung wurde gelöscht, da die aufgezeichnete Sendung nicht existiert!" +msgstr "" +"Die Sendung wurde gelöscht, weil die aufgezeichnete Sendung nicht existiert!" #: airtime_mvc/application/services/CalendarService.php:277 #: airtime_mvc/application/models/ShowInstance.php:310 msgid "Must wait 1 hour to rebroadcast." -msgstr "1 Stunde warten, bevor man eine Sendung wiederholt." +msgstr "" +"Das Wiederholen einer Sendung ist erst nach einer Stunde Wartezeit möglich." #: airtime_mvc/application/configs/navigation.php:12 msgid "Now Playing" -msgstr "Aktuelle Wiedergabe" +msgstr "Jetzt" #: airtime_mvc/application/configs/navigation.php:19 msgid "Add Media" @@ -161,7 +167,7 @@ msgstr "Einstellungen" #: airtime_mvc/application/configs/navigation.php:50 msgid "Users" -msgstr "Nutzer" +msgstr "Benutzer" #: airtime_mvc/application/configs/navigation.php:57 msgid "Media Folders" @@ -174,7 +180,7 @@ msgstr "Streams" #: airtime_mvc/application/configs/navigation.php:70 #: airtime_mvc/application/controllers/PreferenceController.php:137 msgid "Support Feedback" -msgstr "Hilfe Feedback" +msgstr "Support Feedback" #: airtime_mvc/application/configs/navigation.php:76 #: airtime_mvc/application/controllers/LocaleController.php:371 @@ -186,11 +192,11 @@ msgstr "Status" #: airtime_mvc/application/configs/navigation.php:83 msgid "Playout History" -msgstr "Playout Log" +msgstr "Playout Historie" #: airtime_mvc/application/configs/navigation.php:90 msgid "Listener Stats" -msgstr "User-Statistik" +msgstr "Hörerstatistiken" #: airtime_mvc/application/configs/navigation.php:99 #: airtime_mvc/application/views/scripts/error/error.phtml:13 @@ -199,11 +205,11 @@ msgstr "Hilfe" #: airtime_mvc/application/configs/navigation.php:104 msgid "Getting Started" -msgstr "Erste Schritte" +msgstr "Kurzanleitung" #: airtime_mvc/application/configs/navigation.php:111 msgid "User Manual" -msgstr "Bedienungsanleitung" +msgstr "Benutzerhandbuch" #: airtime_mvc/application/configs/navigation.php:116 #: airtime_mvc/application/views/scripts/dashboard/about.phtml:2 @@ -213,7 +219,7 @@ msgstr "Über" #: airtime_mvc/application/layouts/scripts/bare.phtml:5 #: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:2 msgid "Live stream" -msgstr "Live Sendung" +msgstr "Live Stream" #: airtime_mvc/application/layouts/scripts/audio-player.phtml:5 #: airtime_mvc/application/controllers/LocaleController.php:30 @@ -272,29 +278,46 @@ msgstr "Fade Out" #: airtime_mvc/application/layouts/scripts/login.phtml:16 #, php-format -msgid "Airtime Copyright ©Sourcefabric o.p.s. All rights reserved.%sMaintained and distributed under GNU GPL v.3 by %sSourcefabric o.p.s%s" -msgstr "Airtime Copyright © Sourcefabric o.p.s. Alle Rechte vorbehalten.%sVerwaltet und vertrieben unter der GNU GPL v3 by %s Sourcefabric o.p.s.%s" +msgid "" +"Airtime Copyright ©Sourcefabric o.p.s. All rights reserved.%sMaintained " +"and distributed under GNU GPL v.3 by %sSourcefabric o.p.s%s" +msgstr "" +"Airtime Copyright ©Sourcefabric o.p.s. Alle Rechte vorbehalten." +"%sGepflegt und vertrieben unter GNU GPL v.3 von %sSourcefabric o.p.s%s" #: airtime_mvc/application/models/StoredFile.php:953 msgid "Failed to create 'organize' directory." -msgstr "Das Verzeichnis 'Organisieren' konnte nicht erstellt werden." +msgstr "Fehler beim Erstellen des Ordners 'organize'" #: airtime_mvc/application/models/StoredFile.php:967 #, php-format -msgid "The file was not uploaded, there is %s MB of disk space left and the file you are uploading has a size of %s MB." -msgstr "Die Datei wurde nicht hochgeladen, es sind %s MB Speicherplatz auf der Festplatte übrig und die hochgeladene Datei hat eine Größe von %s MB." +msgid "" +"The file was not uploaded, there is %s MB of disk space left and the file " +"you are uploading has a size of %s MB." +msgstr "" +"Die Datei konnte nicht hochgeladen werden. Es sind %s MB Speicherplatz frei " +"und die Datei, die sie hochladen wollen, hat eine Größe von %s MB." #: airtime_mvc/application/models/StoredFile.php:976 -msgid "This file appears to be corrupted and will not be added to media library." -msgstr "Diese Datei scheint beschädigt zu sein und wird nicht zur Medien-Bibliothek hinzugefügt." +msgid "" +"This file appears to be corrupted and will not be added to media library." +msgstr "" +"Die Datei scheint fehlerhaft zu sein und wird der Bibliothek nicht " +"hinzugefügt." #: airtime_mvc/application/models/StoredFile.php:1015 -msgid "The file was not uploaded, this error can occur if the computer hard drive does not have enough disk space or the stor directory does not have correct write permissions." -msgstr "Die Datei wurde nicht hochgeladen, dieser Fehler kann auftreten, wenn die Festplatte des Computers nicht über genügend Speicherplatz verfügt oder das Ablageverzeichnis nicht die passenden Schreibrechte hat." +msgid "" +"The file was not uploaded, this error can occur if the computer hard drive " +"does not have enough disk space or the stor directory does not have correct " +"write permissions." +msgstr "" +"Die Datei konnte nicht hochgeladen werden. Dieser Fehler kann auftreten, " +"wenn die Festplatte des Computers nicht über genügend freien Speicherplatz " +"verfügt oder das Ablageverzeichnis 'stor' keine Schreibrechte hat." #: airtime_mvc/application/models/Preference.php:620 msgid "Select Country" -msgstr "Land auswählen" +msgstr "Land wählen" #: airtime_mvc/application/models/MusicDir.php:160 #, php-format @@ -304,12 +327,13 @@ msgstr "%s wird bereits überwacht." #: airtime_mvc/application/models/MusicDir.php:164 #, php-format msgid "%s contains nested watched directory: %s" -msgstr "%s enthält ein verschachteltes überwachtes Verzeichnis: %s" +msgstr "%s enthält andere bereits überwachte Verzeichnisse: %s " #: airtime_mvc/application/models/MusicDir.php:168 #, php-format msgid "%s is nested within existing watched directory: %s" -msgstr "%s : ist innerhalb des bestehenden überwachten Verzeichnis verschachtelt %s" +msgstr "" +"%s ist ein Unterverzeichnis eines bereits überwachten Verzeichnisses: %s" #: airtime_mvc/application/models/MusicDir.php:189 #: airtime_mvc/application/models/MusicDir.php:368 @@ -319,99 +343,107 @@ msgstr "%s ist kein gültiges Verzeichnis." #: airtime_mvc/application/models/MusicDir.php:232 #, php-format -msgid "%s is already set as the current storage dir or in the watched folders list" -msgstr "%s ist bereits als aktuelles Speicherverzeichnis oder in der Liste der überwachten Ordner enthalten" +msgid "" +"%s is already set as the current storage dir or in the watched folders list" +msgstr "" +"%s ist bereits als aktuelles Speicherverzeichnis bestimmt oder in der Liste " +"überwachter Verzeichnisse" #: airtime_mvc/application/models/MusicDir.php:386 #, php-format -msgid "%s is already set as the current storage dir or in the watched folders list." -msgstr "%s ist bereits als aktuelles Speicherverzeichnis oder in der Liste der überwachten Ordner enthalten." +msgid "" +"%s is already set as the current storage dir or in the watched folders list." +msgstr "" +"%s ist bereits als aktuelles Speicherverzeichnis bestimmt oder in der Liste " +"überwachter Verzeichnisse." #: airtime_mvc/application/models/MusicDir.php:429 #, php-format msgid "%s doesn't exist in the watched list." -msgstr "%s existiert nicht in der überwachten Liste." +msgstr "%s existiert nicht in der Liste überwachter Verzeichnisse." #: airtime_mvc/application/models/Playlist.php:802 #: airtime_mvc/application/models/Block.php:833 msgid "Cue in and cue out are null." -msgstr "Cue-in und Cue-out sind null." +msgstr "Cue In und Cue Out sind Null." #: airtime_mvc/application/models/Playlist.php:833 #: airtime_mvc/application/models/Playlist.php:858 #: airtime_mvc/application/models/Block.php:879 #: airtime_mvc/application/models/Block.php:900 msgid "Can't set cue in to be larger than cue out." -msgstr "Kann Cue-in nicht größer setzen als Cue-out." +msgstr "Cue In darf nicht größer als Cue Out sein." #: airtime_mvc/application/models/Playlist.php:841 #: airtime_mvc/application/models/Playlist.php:885 #: airtime_mvc/application/models/Block.php:868 #: airtime_mvc/application/models/Block.php:924 msgid "Can't set cue out to be greater than file length." -msgstr "Kann Cue-out nicht größer setzen als Dateilänge." +msgstr "Cue In darf nicht größer als die Gesamtlänge der Datei sein." #: airtime_mvc/application/models/Playlist.php:877 #: airtime_mvc/application/models/Block.php:935 msgid "Can't set cue out to be smaller than cue in." -msgstr "Kann Cue-out nicht kleiner setzen als Cue-in." +msgstr "Cue Out darf nicht kleiner als Cue In sein." #: airtime_mvc/application/models/Show.php:180 msgid "Shows can have a max length of 24 hours." -msgstr "Sendungen können eine maximale Länge von 24 Stunden haben." +msgstr "Die Maximaldauer einer Sendung beträgt 24 Stunden." #: airtime_mvc/application/models/Show.php:211 #: airtime_mvc/application/forms/AddShowWhen.php:130 msgid "End date/time cannot be in the past" -msgstr "Datum/Uhrzeit des Endes kann nicht in der Vergangenheit liegen" +msgstr "Datum/Uhrzeit des Endes darf nicht in der Vergangenheit liegen" #: airtime_mvc/application/models/Show.php:222 msgid "" "Cannot schedule overlapping shows.\n" "Note: Resizing a repeating show affects all of its repeats." msgstr "" -"Es können keine sich überschneidenen Sendungen geplant werden.\n" -"Hinweis:. Änderungen an einer wiederholenden Sendung wirken sich auf alle ihre Wiederholungen aus." +"Sendungen können nicht überlappend geplant werden.\n" +"Beachte: Wird die Dauer einer wiederkehrenden Sendung verändert, wirkt sich " +"das auch auf alle Wiederholungen aus." #: airtime_mvc/application/models/Webstream.php:157 msgid "Length needs to be greater than 0 minutes" -msgstr "Länge muss größer als 0 Minuten sein" +msgstr "Dauer muß länger als 0 Minuten sein." #: airtime_mvc/application/models/Webstream.php:162 msgid "Length should be of form \"00h 00m\"" -msgstr "Länge sollte die Form \"00h 00m\" haben" +msgstr "Dauer im Format \"00h 00m\" eingeben." #: airtime_mvc/application/models/Webstream.php:175 msgid "URL should be of form \"http://domain\"" -msgstr "URL sollte die Form \"http://domain\" haben" +msgstr "URL im Format \"http://domain\" eingeben." #: airtime_mvc/application/models/Webstream.php:178 msgid "URL should be 512 characters or less" -msgstr "URL sollte 512 Zeichen oder weniger haben" +msgstr "URL darf aus höchstens 512 Zeichen bestehen." #: airtime_mvc/application/models/Webstream.php:184 msgid "No MIME type found for webstream." -msgstr "Für Webstream wurde kein MIME-Typ gefunden." +msgstr "Es konnte kein MIME-Typ für den Webstream gefunden werden." #: airtime_mvc/application/models/Webstream.php:200 msgid "Webstream name cannot be empty" -msgstr "Der Webstream Name darf nicht leer sein" +msgstr "Die Bezeichnung eines Webstreams darf nicht leer sein." #: airtime_mvc/application/models/Webstream.php:269 msgid "Could not parse XSPF playlist" -msgstr "Die XSPF Playlist konnte nicht geparst werden" +msgstr "Die XSPF Playlist konnte nicht eingelesen werden" #: airtime_mvc/application/models/Webstream.php:281 msgid "Could not parse PLS playlist" -msgstr "Die PLS Playlist konnte nicht geparst werden" +msgstr "Die PLS Playlist konnte nicht eingelesen werden" #: airtime_mvc/application/models/Webstream.php:300 msgid "Could not parse M3U playlist" -msgstr "Die M3U Playlist konnte nicht geparst werden" +msgstr "Die M3U Playlist konnte nicht eingelesen werden" #: airtime_mvc/application/models/Webstream.php:314 msgid "Invalid webstream - This appears to be a file download." -msgstr "Ungültiger Webstream - Dies scheint ein Datendownload zu sein." +msgstr "" +"Ungültiger Webstream - Die eingegebene URL scheint ein Dateidownload zu sein." #: airtime_mvc/application/models/Webstream.php:318 #, php-format @@ -424,7 +456,7 @@ msgstr "Die Länge einer vergangenen Sendung kann nicht verändert werden." #: airtime_mvc/application/models/ShowInstance.php:364 msgid "Should not overlap shows" -msgstr "Sendungen sollen sich nicht überschneiden" +msgstr "Sendungen sollten nicht überlappen" #: airtime_mvc/application/models/Auth.php:33 #, php-format @@ -435,7 +467,7 @@ msgid "" msgstr "" "Hallo %s , \n" "\n" -"Klicken Sie diesen Link, um Ihr Passwort zurückzusetzen: " +"Klicke auf diesen Link um dein Passwort zurückzusetzen: " #: airtime_mvc/application/models/Auth.php:36 msgid "Airtime Password Reset" @@ -443,49 +475,59 @@ msgstr "Airtime Passwort zurücksetzen" #: airtime_mvc/application/models/Scheduler.php:72 msgid "Cannot move items out of linked shows" -msgstr "Kann Inhalte aus verknüpften Sendungen nicht verschieben" +msgstr "Inhalte aus verknüpften Sendungen können nicht verschoben werden" #: airtime_mvc/application/models/Scheduler.php:118 msgid "The schedule you're viewing is out of date! (sched mismatch)" -msgstr "Der Zeitplan, den Sie betrachten ist nicht mehr aktuell! (Zeitplan falsch zugeordnet)" +msgstr "" +"Der Kalender den sie sehen ist nicht mehr aktuell!(Kalender falsch " +"zugeordnet)" #: airtime_mvc/application/models/Scheduler.php:123 msgid "The schedule you're viewing is out of date! (instance mismatch)" -msgstr "Der Zeitplan, den Sie betrachten ist nicht mehr aktuell! (Instanz falsch zugeordnet)" +msgstr "" +"Der Kalender den sie sehen ist nicht mehr aktuell! (Instanz falsch " +"zugeordnet)" #: airtime_mvc/application/models/Scheduler.php:131 #: airtime_mvc/application/models/Scheduler.php:440 #: airtime_mvc/application/models/Scheduler.php:478 msgid "The schedule you're viewing is out of date!" -msgstr "Der Zeitplan, den Sie betrachten ist nicht mehr aktuell!" +msgstr "Der Kalender den sie sehen ist nicht mehr aktuell!" #: airtime_mvc/application/models/Scheduler.php:141 #, php-format msgid "You are not allowed to schedule show %s." -msgstr "Sie sind nicht berechtigt, Sendung %s zu planen." +msgstr "" +"Sie haben nicht die erforderliche Berechtigung einen Termin für die Sendung " +"%s zu festzulegen." #: airtime_mvc/application/models/Scheduler.php:145 msgid "You cannot add files to recording shows." -msgstr "Sie können aufgenommenen Sendungen keine Dateien hinzufügen." +msgstr "Einer Sendungsaufzeichnung können keine Dateien hinzugefügt werden." #: airtime_mvc/application/models/Scheduler.php:151 #, php-format msgid "The show %s is over and cannot be scheduled." -msgstr "Die Sendung %s ist vorbei und kann nicht verändert werden." +msgstr "Die Sendung %s ist beendet und kann daher nicht verändert werden." #: airtime_mvc/application/models/Scheduler.php:158 #, php-format msgid "The show %s has been previously updated!" -msgstr "Die Sendung %s wurde bereits vorher aktualisiert!" +msgstr "Die Sendung %s wurde bereits aktualisiert!" #: airtime_mvc/application/models/Scheduler.php:177 -msgid "Content in linked shows must be scheduled before or after any one is broadcasted" -msgstr "Inhalte in verknüpften Sendungen können nicht während der Sendung geändert werden" +msgid "" +"Content in linked shows must be scheduled before or after any one is " +"broadcasted" +msgstr "" +"Inhalte in verknüpften Sendungen können nicht während der Sendung geändert " +"werden" #: airtime_mvc/application/models/Scheduler.php:200 #: airtime_mvc/application/models/Scheduler.php:286 msgid "A selected File does not exist!" -msgstr "Eine ausgewählte Datei existiert nicht!" +msgstr "Eine der gewählten Dateien existiert nicht!" #: airtime_mvc/application/models/ShowBuilder.php:212 #, php-format @@ -541,13 +583,13 @@ msgstr "Copyright" #: airtime_mvc/application/controllers/LocaleController.php:153 #: airtime_mvc/application/views/scripts/schedule/show-content-dialog.phtml:7 msgid "Creator" -msgstr "Urheber" +msgstr "Interpret" #: airtime_mvc/application/models/Block.php:1337 #: airtime_mvc/application/forms/SmartBlockCriteria.php:58 #: airtime_mvc/application/controllers/LocaleController.php:74 msgid "Encoded By" -msgstr "Kodiert durch" +msgstr "Encoded By" #: airtime_mvc/application/models/Block.php:1338 #: airtime_mvc/application/forms/StreamSettingSubForm.php:132 @@ -579,7 +621,7 @@ msgstr "Sprache" #: airtime_mvc/application/forms/SmartBlockCriteria.php:63 #: airtime_mvc/application/controllers/LocaleController.php:79 msgid "Last Modified" -msgstr "aktualisiert am" +msgstr "geändert am" #: airtime_mvc/application/models/Block.php:1343 #: airtime_mvc/application/forms/SmartBlockCriteria.php:64 @@ -611,7 +653,7 @@ msgstr "Stimmung" #: airtime_mvc/application/forms/SmartBlockCriteria.php:68 #: airtime_mvc/application/controllers/LocaleController.php:84 msgid "Owner" -msgstr "Eigentümer" +msgstr "Besitzer" #: airtime_mvc/application/models/Block.php:1348 #: airtime_mvc/application/forms/SmartBlockCriteria.php:69 @@ -659,7 +701,7 @@ msgstr "Jahr" #: airtime_mvc/application/common/DateHelper.php:331 #, php-format msgid "The year %s must be within the range of 1753 - 9999" -msgstr "Das Jahr %s muss im Bereich zwischen 1753 und 9999 sein" +msgstr "Das Jahr %s muß im Bereich zwischen 1753 und 9999 sein" #: airtime_mvc/application/common/DateHelper.php:334 #, php-format @@ -669,15 +711,15 @@ msgstr "%s-%s-%s ist kein gültiges Datum" #: airtime_mvc/application/common/DateHelper.php:358 #, php-format msgid "%s:%s:%s is not a valid time" -msgstr "%s:%s:%s ist keine gültige Zeit" +msgstr "%s-%s-%s ist kein gültiger Zeitpunkt." #: airtime_mvc/application/forms/EmailServerPreferences.php:17 msgid "Enable System Emails (Password Reset)" -msgstr "Ermögliche System E-Mails (Passwort zurücksetzen)" +msgstr "System E-Mails aktivieren (ermöglicht Passwort zurücksetzen)" #: airtime_mvc/application/forms/EmailServerPreferences.php:27 msgid "Reset Password 'From' Email" -msgstr "Passwort zurücksetzen 'Von' Email" +msgstr "'Von' Email (Passwort zurücksetzen Absender)" #: airtime_mvc/application/forms/EmailServerPreferences.php:34 msgid "Configure Mail Server" @@ -722,12 +764,12 @@ msgstr "Telefon:" #: airtime_mvc/application/forms/SupportSettings.php:46 #: airtime_mvc/application/forms/EditUser.php:75 msgid "Email:" -msgstr "Email-Adresse:" +msgstr "E-Mail:" #: airtime_mvc/application/forms/RegisterAirtime.php:62 #: airtime_mvc/application/forms/SupportSettings.php:57 msgid "Station Web Site:" -msgstr "Webseite des Senders:" +msgstr "Sender-Webseite:" #: airtime_mvc/application/forms/RegisterAirtime.php:73 #: airtime_mvc/application/forms/SupportSettings.php:68 @@ -742,12 +784,12 @@ msgstr "Stadt:" #: airtime_mvc/application/forms/RegisterAirtime.php:96 #: airtime_mvc/application/forms/SupportSettings.php:91 msgid "Station Description:" -msgstr "Beschreibung des Senders:" +msgstr "Sender Beschreibung:" #: airtime_mvc/application/forms/RegisterAirtime.php:106 #: airtime_mvc/application/forms/SupportSettings.php:101 msgid "Station Logo:" -msgstr "Logo des Senders:" +msgstr "Sender Logo:" #: airtime_mvc/application/forms/RegisterAirtime.php:116 #: airtime_mvc/application/forms/SupportSettings.php:112 @@ -764,12 +806,13 @@ msgstr "Sender auf Sourcefabric.org veröffentlichen" #: airtime_mvc/application/forms/SupportSettings.php:148 #, php-format msgid "By checking this box, I agree to Sourcefabric's %sprivacy policy%s." -msgstr "Ich stimme den %sDatenschutzrichtlinien%s von Sourcefabric zu." +msgstr "" +"Hiermit akzeptiere ich die %sDatenschutzrichtlinien%s von Sourcefabric." #: airtime_mvc/application/forms/RegisterAirtime.php:166 #: airtime_mvc/application/forms/SupportSettings.php:171 msgid "You have to agree to privacy policy." -msgstr "Sie müssen den Datenschutzrichtlinien zustimmen." +msgstr "Sie müssen die Datenschutzrichtlinien akzeptieren." #: airtime_mvc/application/forms/PasswordChange.php:28 msgid "Confirm new password" @@ -781,12 +824,12 @@ msgstr "Passwortbestätigung stimmt nicht mit Passwort überein." #: airtime_mvc/application/forms/PasswordChange.php:43 msgid "Get new password" -msgstr "Ein neues Passwort bekommen" +msgstr "Neues Passwort erhalten" #: airtime_mvc/application/forms/DateRange.php:16 #: airtime_mvc/application/forms/ShowBuilder.php:18 msgid "Date Start:" -msgstr "Datum Beginn:" +msgstr "Zeitpunkt Beginn:" #: airtime_mvc/application/forms/DateRange.php:35 #: airtime_mvc/application/forms/DateRange.php:63 @@ -810,7 +853,7 @@ msgstr "Ungültiges Zeichen eingegeben" #: airtime_mvc/application/forms/AddShowRepeats.php:54 #: airtime_mvc/application/forms/ShowBuilder.php:46 msgid "Date End:" -msgstr "Datum Ende:" +msgstr "Zeitpunkt Ende:" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:8 #: airtime_mvc/application/forms/customvalidators/ConditionalNotEmpty.php:26 @@ -818,24 +861,26 @@ msgid "Value is required and can't be empty" msgstr "Wert ist erforderlich und darf nicht leer sein" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:19 -msgid "'%value%' is no valid email address in the basic format local-part@hostname" -msgstr "'%value%' ist keine gültige E-Mail-Adresse im grundlegenden Format local-part@hostname" +msgid "" +"'%value%' is no valid email address in the basic format local-part@hostname" +msgstr "" +"'%value%' ist keine gültige E-Mail-Adresse im Format local-part@hostname" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:33 msgid "'%value%' does not fit the date format '%format%'" -msgstr "'%value%' entspricht nicht dem Format '%format%' für Datum" +msgstr "'%value%' entspricht nicht dem erforderlichen Datumsformat '%format%'" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:59 msgid "'%value%' is less than %min% characters long" -msgstr "'%value%' hat weniger als %min% Zeichen" +msgstr "'%value%' ist kürzer als %min% Zeichen lang" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:64 msgid "'%value%' is more than %max% characters long" -msgstr "'%value%' hat mehr als %max% Zeichen" +msgstr "'%value%' ist mehr als %max% Zeichen lang" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:76 msgid "'%value%' is not between '%min%' and '%max%', inclusively" -msgstr "'%value%' liegt nicht zwischen einschließlich '%min%' und '%max%'" +msgstr "'%value%' liegt nicht zwischen '%min%' und '%max%'" #: airtime_mvc/application/forms/helpers/ValidationTypes.php:89 msgid "Passwords do not match" @@ -849,25 +894,26 @@ msgstr "Tage" #: airtime_mvc/application/forms/AddShowRebroadcastDates.php:71 #: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:66 msgid "Day must be specified" -msgstr "Tag muss angegeben werden" +msgstr "Tag muß angegeben werden" #: airtime_mvc/application/forms/AddShowRebroadcastDates.php:76 #: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:71 msgid "Time must be specified" -msgstr "Zeit muss angegeben werden" +msgstr "Zeit muß angegeben werden" #: airtime_mvc/application/forms/AddShowRebroadcastDates.php:103 #: airtime_mvc/application/forms/AddShowAbsoluteRebroadcastDates.php:94 msgid "Must wait at least 1 hour to rebroadcast" -msgstr "Bis zur Wiederholung mindestens 1 Stunde warten" +msgstr "" +"Das Wiederholen einer Sendung ist erst nach einer Stunde Wartezeit möglich." #: airtime_mvc/application/forms/AddShowRR.php:10 msgid "Record from Line In?" -msgstr "Von Line-In aufnehmen?" +msgstr "Aufzeichnen von Line-In?" #: airtime_mvc/application/forms/AddShowRR.php:16 msgid "Rebroadcast?" -msgstr "Wiederholung?" +msgstr "Wiederholen?" #: airtime_mvc/application/forms/AddShowStyle.php:10 msgid "Background Colour:" @@ -879,19 +925,19 @@ msgstr "Textfarbe:" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:19 msgid "Auto Switch Off" -msgstr "Automatisches Abschalten" +msgstr "Automatisch abschalten" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:26 msgid "Auto Switch On" -msgstr "Automatisches Anschalten" +msgstr "Automatisch anschalten" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:33 msgid "Switch Transition Fade (s)" -msgstr "Überblendung(en) wechseln" +msgstr "Übergang beim Umschalten (Fade in Sekunden)" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:36 msgid "enter a time in seconds 00{.000000}" -msgstr "Geben Sie eine Zeit in Sekunden ein 00{.000000}" +msgstr "Eingabe der Zeit in Sekunden 00{.000000}" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:45 msgid "Master Username" @@ -907,7 +953,7 @@ msgstr "Master Source Connection-URL" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:78 msgid "Show Source Connection URL" -msgstr "Source Connection-URL anzeigen" +msgstr "Show Source Connection URL" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:87 msgid "Master Source Port" @@ -917,7 +963,7 @@ msgstr "Master Source Port" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:109 #: airtime_mvc/application/forms/StreamSettingSubForm.php:112 msgid "Only numbers are allowed." -msgstr "Nur Zahlen sind erlaubt." +msgstr "Es sind nur Zahlen erlaubt" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:96 msgid "Master Source Mount Point" @@ -925,15 +971,15 @@ msgstr "Master Source Mount Point" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:106 msgid "Show Source Port" -msgstr "Port für die Source der Sendung" +msgstr "Show Source Port" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:115 msgid "Show Source Mount Point" -msgstr "Mount Point für die Source der Sendung" +msgstr "Show Source Mount Point" #: airtime_mvc/application/forms/LiveStreamingPreferences.php:153 msgid "You cannot use same port as Master DJ port." -msgstr "Sie können nicht denselben Port als Master DJ-Port nutzen." +msgstr "Sie können nicht denselben Port als \"Master Source Port\" nutzen." #: airtime_mvc/application/forms/LiveStreamingPreferences.php:164 #: airtime_mvc/application/forms/LiveStreamingPreferences.php:182 @@ -943,11 +989,11 @@ msgstr "Port %s ist nicht verfügbar" #: airtime_mvc/application/forms/WatchedDirPreferences.php:14 msgid "Import Folder:" -msgstr "Import Ordner:" +msgstr "Import Verzeichnis:" #: airtime_mvc/application/forms/WatchedDirPreferences.php:25 msgid "Watched Folders:" -msgstr "Überwachte Ordner:" +msgstr "Überwachte Verzeichnisse:" #: airtime_mvc/application/forms/WatchedDirPreferences.php:40 msgid "Not a valid Directory" @@ -957,7 +1003,7 @@ msgstr "Kein gültiges Verzeichnis" #: airtime_mvc/application/forms/Login.php:19 #: airtime_mvc/application/forms/EditUser.php:30 msgid "Username:" -msgstr "Nutzername:" +msgstr "Benutzername:" #: airtime_mvc/application/forms/AddUser.php:32 #: airtime_mvc/application/forms/Login.php:34 @@ -983,7 +1029,7 @@ msgstr "Nachname:" #: airtime_mvc/application/forms/AddUser.php:69 #: airtime_mvc/application/forms/EditUser.php:86 msgid "Mobile Phone:" -msgstr "Handy:" +msgstr "Mobiltelefon:" #: airtime_mvc/application/forms/AddUser.php:75 #: airtime_mvc/application/forms/EditUser.php:94 @@ -997,12 +1043,12 @@ msgstr "Jabber:" #: airtime_mvc/application/forms/AddUser.php:88 msgid "User Type:" -msgstr "Benutzertyp" +msgstr "Benutzertyp:" #: airtime_mvc/application/forms/AddUser.php:92 #: airtime_mvc/application/controllers/LocaleController.php:323 msgid "Guest" -msgstr "Gast:" +msgstr "Gast" #: airtime_mvc/application/forms/AddUser.php:93 #: airtime_mvc/application/controllers/LocaleController.php:321 @@ -1037,7 +1083,7 @@ msgstr "Speichern" #: airtime_mvc/application/forms/AddUser.php:113 #: airtime_mvc/application/forms/EditUser.php:132 msgid "Login name is not unique." -msgstr "Login-Name ist nicht eindeutig." +msgstr "Benutzername ist bereits vorhanden." #: airtime_mvc/application/forms/StreamSettingSubForm.php:48 msgid "Enabled:" @@ -1045,7 +1091,7 @@ msgstr "Aktiviert:" #: airtime_mvc/application/forms/StreamSettingSubForm.php:57 msgid "Stream Type:" -msgstr "Stream Art:" +msgstr "Stream Typ:" #: airtime_mvc/application/forms/StreamSettingSubForm.php:67 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:15 @@ -1054,11 +1100,11 @@ msgstr "Bitrate:" #: airtime_mvc/application/forms/StreamSettingSubForm.php:77 msgid "Service Type:" -msgstr "Art des Service:" +msgstr "Service Typ:" #: airtime_mvc/application/forms/StreamSettingSubForm.php:87 msgid "Channels:" -msgstr "Kanäle" +msgstr "Kanäle:" #: airtime_mvc/application/forms/StreamSettingSubForm.php:88 msgid "1 - Mono" @@ -1095,11 +1141,11 @@ msgstr "Mount Point" #: airtime_mvc/application/forms/PasswordRestore.php:25 #: airtime_mvc/application/views/scripts/user/add-user.phtml:18 msgid "Username" -msgstr "Nutzername" +msgstr "Benutzername" #: airtime_mvc/application/forms/StreamSettingSubForm.php:195 msgid "Admin User" -msgstr "Admin Nutzer" +msgstr "Admin Benutzer" #: airtime_mvc/application/forms/StreamSettingSubForm.php:207 msgid "Admin Password" @@ -1108,7 +1154,7 @@ msgstr "Admin Passwort" #: airtime_mvc/application/forms/StreamSettingSubForm.php:218 #: airtime_mvc/application/controllers/LocaleController.php:173 msgid "Getting information from the server..." -msgstr "Informationen vom Server erhalten..." +msgstr "Erhalte Information vom Server..." #: airtime_mvc/application/forms/StreamSettingSubForm.php:232 msgid "Server cannot be empty." @@ -1120,15 +1166,15 @@ msgstr "Port darf nicht leer sein." #: airtime_mvc/application/forms/StreamSettingSubForm.php:243 msgid "Mount cannot be empty with Icecast server." -msgstr "Mount Point darf nicht leer sein mit Icecast Server." +msgstr "Mount darf nicht leer sein, wenn Icecast-Server verwendet wird." #: airtime_mvc/application/forms/AddShowRepeats.php:10 msgid "Link:" -msgstr "Link:" +msgstr "Verknüpfen:" #: airtime_mvc/application/forms/AddShowRepeats.php:16 msgid "Repeat Type:" -msgstr "Art der Wiederholung:" +msgstr "Wiederholungstyp:" #: airtime_mvc/application/forms/AddShowRepeats.php:19 msgid "weekly" @@ -1136,7 +1182,7 @@ msgstr "wöchentlich" #: airtime_mvc/application/forms/AddShowRepeats.php:20 msgid "bi-weekly" -msgstr "Alle zwei Wochen" +msgstr "zweiwöchentlich" #: airtime_mvc/application/forms/AddShowRepeats.php:21 msgid "monthly" @@ -1144,7 +1190,7 @@ msgstr "monatlich" #: airtime_mvc/application/forms/AddShowRepeats.php:30 msgid "Select Days:" -msgstr "Tage auswählen:" +msgstr "Tage wählen:" #: airtime_mvc/application/forms/AddShowRepeats.php:33 #: airtime_mvc/application/controllers/LocaleController.php:255 @@ -1195,11 +1241,11 @@ msgstr "Tag der Woche" #: airtime_mvc/application/forms/AddShowRepeats.php:67 msgid "No End?" -msgstr "Kein Ende?" +msgstr "Kein Enddatum?" #: airtime_mvc/application/forms/AddShowRepeats.php:101 msgid "End date must be after start date" -msgstr "Enddatum muss nach dem Startdatum liegen" +msgstr "Enddatum muß nach dem Startdatum liegen" #: airtime_mvc/application/forms/AddShowWhat.php:26 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:33 @@ -1209,7 +1255,7 @@ msgstr "Name:" #: airtime_mvc/application/forms/AddShowWhat.php:30 msgid "Untitled Show" -msgstr "Sendung ohne Titel" +msgstr "Unbenannte Sendung" #: airtime_mvc/application/forms/AddShowWhat.php:36 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:150 @@ -1230,7 +1276,7 @@ msgstr "Beschreibung:" #: airtime_mvc/application/forms/AddShowWho.php:10 msgid "Search Users:" -msgstr "Suche Nutzer:" +msgstr "Suche Benutzer:" #: airtime_mvc/application/forms/AddShowWho.php:24 msgid "DJs:" @@ -1238,11 +1284,11 @@ msgstr "DJs:" #: airtime_mvc/application/forms/StreamSetting.php:22 msgid "Hardware Audio Output" -msgstr "Hardware Audio-Ausgang" +msgstr "Hardware Audioausgabe" #: airtime_mvc/application/forms/StreamSetting.php:33 msgid "Output Type" -msgstr "Art der Ausgabe" +msgstr "Ausgabetyp" #: airtime_mvc/application/forms/StreamSetting.php:44 msgid "Icecast Vorbis Metadata" @@ -1250,19 +1296,19 @@ msgstr "Icecast Vorbis Metadata" #: airtime_mvc/application/forms/StreamSetting.php:54 msgid "Stream Label:" -msgstr "Stream Label:" +msgstr "Streambezeichnung:" #: airtime_mvc/application/forms/StreamSetting.php:55 msgid "Artist - Title" -msgstr "Künstler - Titel" +msgstr "Artist - Titel" #: airtime_mvc/application/forms/StreamSetting.php:56 msgid "Show - Artist - Title" -msgstr "Sendung - Interpret - Titel" +msgstr "Sendung - Artist - Titel" #: airtime_mvc/application/forms/StreamSetting.php:57 msgid "Station name - Show name" -msgstr "Name des Senders - Namen der Sendung" +msgstr "Sender - Sendung" #: airtime_mvc/application/forms/StreamSetting.php:63 msgid "Off Air Metadata" @@ -1270,11 +1316,11 @@ msgstr "Off Air Metadaten" #: airtime_mvc/application/forms/StreamSetting.php:69 msgid "Enable Replay Gain" -msgstr "Replay Gain ermöglichen" +msgstr "Replay Gain aktivieren" #: airtime_mvc/application/forms/StreamSetting.php:75 msgid "Replay Gain Modifier" -msgstr "Replay Gain Modifier" +msgstr "Replay Gain Modifikator" #: airtime_mvc/application/forms/PasswordRestore.php:14 msgid "E-mail" @@ -1282,7 +1328,7 @@ msgstr "E-Mail" #: airtime_mvc/application/forms/PasswordRestore.php:36 msgid "Restore password" -msgstr "Passwort zurücksetzen" +msgstr "Passwort wiederherstellen" #: airtime_mvc/application/forms/PasswordRestore.php:46 #: airtime_mvc/application/forms/EditAudioMD.php:144 @@ -1293,7 +1339,7 @@ msgstr "Abbrechen" #: airtime_mvc/application/forms/AddShowWhen.php:16 msgid "'%value%' does not fit the time format 'HH:mm'" -msgstr "'%value%' passt nicht in das Zeit-Format 'HH:mm'" +msgstr "'%value%' ist nicht im Format 'HH:mm'" #: airtime_mvc/application/forms/AddShowWhen.php:22 msgid "Date/Time Start:" @@ -1313,23 +1359,25 @@ msgstr "Wiederholungen?" #: airtime_mvc/application/forms/AddShowWhen.php:113 msgid "Cannot create show in the past" -msgstr "Es können keine Sendungen in der Vergangenheit erstellt werden." +msgstr "Es kann keine Sendung für einen vergangenen Zeitpunkt geplant werden" #: airtime_mvc/application/forms/AddShowWhen.php:121 msgid "Cannot modify start date/time of the show that is already started" -msgstr "Startdatum/Zeit können nicht geändert werden, wenn die Sendung bereits begonnen hat." +msgstr "" +"Startdatum/Zeit können nicht geändert werden, wenn die Sendung bereits " +"begonnen hat." #: airtime_mvc/application/forms/AddShowWhen.php:140 msgid "Cannot have duration 00h 00m" -msgstr "Die Dauer kann nicht 00h00m sein" +msgstr "Die Dauer einer Sendung kann nicht 00h 00m sein" #: airtime_mvc/application/forms/AddShowWhen.php:144 msgid "Cannot have duration greater than 24h" -msgstr "Die Dauer kann nicht länger als 24 Stunden sein" +msgstr "Die Dauer einer Sendung kann nicht länger als 24h sein" #: airtime_mvc/application/forms/AddShowWhen.php:148 msgid "Cannot have duration < 0m" -msgstr "Die Dauer kann nicht <0m sein" +msgstr "Die Dauer einer Sendung kann nicht kürzer als 0 Minuten sein." #: airtime_mvc/application/forms/EditAudioMD.php:19 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:9 @@ -1351,7 +1399,7 @@ msgstr "Album:" #: airtime_mvc/application/forms/EditAudioMD.php:40 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:12 msgid "Track:" -msgstr "Titel:" +msgstr "Titel-Nr.:" #: airtime_mvc/application/forms/EditAudioMD.php:54 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:18 @@ -1395,7 +1443,7 @@ msgstr "ISRC-Nr.:" #: airtime_mvc/application/forms/EditAudioMD.php:118 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:25 msgid "Website:" -msgstr "Website:" +msgstr "Webseite:" #: airtime_mvc/application/forms/EditAudioMD.php:125 #: airtime_mvc/application/forms/Login.php:48 @@ -1407,11 +1455,11 @@ msgstr "Sprache:" #: airtime_mvc/application/forms/Login.php:65 #: airtime_mvc/application/views/scripts/login/index.phtml:3 msgid "Login" -msgstr "Login" +msgstr "Anmeldung" #: airtime_mvc/application/forms/Login.php:83 msgid "Type the characters you see in the picture below." -msgstr "Geben Sie die Zeichen aus dem Bild unten ein." +msgstr "Geben sie die Zeichen aus dem Bild unten ein." #: airtime_mvc/application/forms/SmartBlockCriteria.php:87 #: airtime_mvc/application/forms/SmartBlockCriteria.php:103 @@ -1447,7 +1495,7 @@ msgstr "ist nicht" #: airtime_mvc/application/forms/SmartBlockCriteria.php:92 #: airtime_mvc/application/controllers/LocaleController.php:146 msgid "starts with" -msgstr "fängt an mit" +msgstr "beginnt mit" #: airtime_mvc/application/forms/SmartBlockCriteria.php:93 #: airtime_mvc/application/controllers/LocaleController.php:147 @@ -1467,7 +1515,7 @@ msgstr "ist kleiner als" #: airtime_mvc/application/forms/SmartBlockCriteria.php:108 #: airtime_mvc/application/controllers/LocaleController.php:150 msgid "is in the range" -msgstr "liegt im Bereich" +msgstr "ist im Bereich" #: airtime_mvc/application/forms/SmartBlockCriteria.php:118 msgid "hours" @@ -1483,7 +1531,7 @@ msgstr "Titel" #: airtime_mvc/application/forms/SmartBlockCriteria.php:142 msgid "Set smart block type:" -msgstr "Smart Block Art:" +msgstr "Smart Block Typ:" #: airtime_mvc/application/forms/SmartBlockCriteria.php:145 msgid "Static" @@ -1503,15 +1551,15 @@ msgstr "Beschränke auf" #: airtime_mvc/application/forms/SmartBlockCriteria.php:296 msgid "Generate playlist content and save criteria" -msgstr "Generiere Inhalt von Wiedergabelisten und speichere Kriterien" +msgstr "Playlist-Inhalt erstellen und Kriterien speichern" #: airtime_mvc/application/forms/SmartBlockCriteria.php:298 msgid "Generate" -msgstr "Generiere" +msgstr "Erstellen" #: airtime_mvc/application/forms/SmartBlockCriteria.php:304 msgid "Shuffle playlist content" -msgstr "Inhalte der Playlist Mischen" +msgstr "Inhalt der Playlist Mischen" #: airtime_mvc/application/forms/SmartBlockCriteria.php:306 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:24 @@ -1521,45 +1569,49 @@ msgstr "Mischen" #: airtime_mvc/application/forms/SmartBlockCriteria.php:472 #: airtime_mvc/application/forms/SmartBlockCriteria.php:484 msgid "Limit cannot be empty or smaller than 0" -msgstr "Limit darf nicht leer oder kleiner als 0 sein" +msgstr "Beschränkung kann nicht leer oder kleiner als 0 sein" #: airtime_mvc/application/forms/SmartBlockCriteria.php:477 msgid "Limit cannot be more than 24 hrs" -msgstr "Limit darf nicht mehr als 24 Stunden sein" +msgstr "Beschränkung kann nicht größer als 24 Stunden sein" #: airtime_mvc/application/forms/SmartBlockCriteria.php:487 msgid "The value should be an integer" -msgstr "Der Wert sollte eine ganze Zahl sein" +msgstr "Der Wert muß eine ganze Zahl sein" #: airtime_mvc/application/forms/SmartBlockCriteria.php:490 msgid "500 is the max item limit value you can set" -msgstr "500 ist der maximale Höchstwert eines Artikels" +msgstr "Die Anzahl der Objekte ist auf 500 beschränkt" #: airtime_mvc/application/forms/SmartBlockCriteria.php:501 msgid "You must select Criteria and Modifier" -msgstr "Sie müssen Kriterien und Modifier auswählen" +msgstr "Sie müssen Kriterium und Modifikator bestimmen" #: airtime_mvc/application/forms/SmartBlockCriteria.php:508 msgid "'Length' should be in '00:00:00' format" -msgstr "'Länge' sollte im 00:00:00-Format sein" +msgstr "Die 'Dauer' muß im Format '00:00:00' eingegeben werden" #: airtime_mvc/application/forms/SmartBlockCriteria.php:513 #: airtime_mvc/application/forms/SmartBlockCriteria.php:526 -msgid "The value should be in timestamp format (e.g. 0000-00-00 or 0000-00-00 00:00:00)" -msgstr "Der Wert muß im Timestamp-Format eingegeben werden (zB. 0000-00-00 oder 0000-00-00 00:00:00)" +msgid "" +"The value should be in timestamp format (e.g. 0000-00-00 or 0000-00-00 " +"00:00:00)" +msgstr "" +"Der Wert muß im Timestamp-Format eingegeben werden (zB. 0000-00-00 oder " +"0000-00-00 00:00:00)" #: airtime_mvc/application/forms/SmartBlockCriteria.php:540 msgid "The value has to be numeric" -msgstr "Der Wert muss numerisch sein" +msgstr "Der eingegebene Wert muß aus Ziffern bestehen" #: airtime_mvc/application/forms/SmartBlockCriteria.php:545 msgid "The value should be less then 2147483648" -msgstr "Der Wert sollte geringer sein als 2147483648" +msgstr "Der eingegebene Wert muß kleiner sein als 2147483648" #: airtime_mvc/application/forms/SmartBlockCriteria.php:550 #, php-format msgid "The value should be less than %s characters" -msgstr "Der Wert sollte kleiner sein als %s Zeichen" +msgstr "Der eingegebene Wert muß aus weniger als %s Zeichen bestehen." #: airtime_mvc/application/forms/SmartBlockCriteria.php:557 msgid "Value cannot be empty" @@ -1567,7 +1619,7 @@ msgstr "Der Wert darf nicht leer sein" #: airtime_mvc/application/forms/ShowBuilder.php:72 msgid "Show:" -msgstr "Sendung" +msgstr "Sendung:" #: airtime_mvc/application/forms/ShowBuilder.php:80 msgid "All My Shows:" @@ -1609,7 +1661,7 @@ msgstr "Standard Crossfade Dauer (s):" #: airtime_mvc/application/forms/GeneralPreferences.php:59 #: airtime_mvc/application/forms/GeneralPreferences.php:78 msgid "enter a time in seconds 0{.0}" -msgstr "Geben Sie eine Zeit in Sekunden 0 {0,0} ein" +msgstr "Geben sie eine Zeit in Sekunden ein 0{.0}" #: airtime_mvc/application/forms/GeneralPreferences.php:52 msgid "Default Fade In (s):" @@ -1621,8 +1673,12 @@ msgstr "Standard Fade Out (s):" #: airtime_mvc/application/forms/GeneralPreferences.php:89 #, php-format -msgid "Allow Remote Websites To Access \"Schedule\" Info?%s (Enable this to make front-end widgets work.)" -msgstr "Fremden Webseiten den Zugang zu \"Programmplan\" Informationen?%s erlauben. (Aktivieren Sie diese Option, damit Frontend-Widgets funktionieren.)" +msgid "" +"Allow Remote Websites To Access \"Schedule\" Info?%s (Enable this to make " +"front-end widgets work.)" +msgstr "" +"Anderen Webseiten den Zugriff auf \"Kalender\" Info?%s erlauben. (Aktivieren " +"Sie diese Option, damit Frontend-Widgets funktionieren.)" #: airtime_mvc/application/forms/GeneralPreferences.php:90 msgid "Disabled" @@ -1634,11 +1690,11 @@ msgstr "Aktiviert" #: airtime_mvc/application/forms/GeneralPreferences.php:97 msgid "Default Interface Language" -msgstr "Standard Sprache" +msgstr "Standardsprache" #: airtime_mvc/application/forms/GeneralPreferences.php:105 msgid "Default Interface Timezone" -msgstr "Standard Zeitzone" +msgstr "Standard-Zeitzone" #: airtime_mvc/application/forms/GeneralPreferences.php:113 msgid "Week Starts On" @@ -1685,11 +1741,11 @@ msgstr "Automatisches Hochladen aufgezeichneter Sendungen" #: airtime_mvc/application/forms/SoundcloudPreferences.php:26 msgid "Enable SoundCloud Upload" -msgstr "SoundCloud Uploads ermöglichen" +msgstr "Aktiviere SoundCloud Upload" #: airtime_mvc/application/forms/SoundcloudPreferences.php:36 msgid "Automatically Mark Files \"Downloadable\" on SoundCloud" -msgstr "Dateien auf SoundCloud als \"Downloadbar\" markieren" +msgstr "Markiere Dateien auf SoundCloud automatisch als \"herunterladbar\"" #: airtime_mvc/application/forms/SoundcloudPreferences.php:47 msgid "SoundCloud Email" @@ -1701,7 +1757,7 @@ msgstr "SoundCloud Passwort" #: airtime_mvc/application/forms/SoundcloudPreferences.php:87 msgid "SoundCloud Tags: (separate tags with spaces)" -msgstr "SoundCloud Tags: (Tags mit Leerzeichen trennen)" +msgstr "SoundCloud Tags: (mehrere Tags mit Leerzeichen trennen)" #: airtime_mvc/application/forms/SoundcloudPreferences.php:99 msgid "Default Genre:" @@ -1709,7 +1765,7 @@ msgstr "Standard Genre:" #: airtime_mvc/application/forms/SoundcloudPreferences.php:109 msgid "Default Track Type:" -msgstr "Standard Track Typen:" +msgstr "Standard Titel Typ:" #: airtime_mvc/application/forms/SoundcloudPreferences.php:113 msgid "Original" @@ -1729,7 +1785,7 @@ msgstr "Aufnahme" #: airtime_mvc/application/forms/SoundcloudPreferences.php:117 msgid "Spoken" -msgstr "Gesprochen" +msgstr "Talk" #: airtime_mvc/application/forms/SoundcloudPreferences.php:118 msgid "Podcast" @@ -1741,11 +1797,11 @@ msgstr "Demo" #: airtime_mvc/application/forms/SoundcloudPreferences.php:120 msgid "Work in progress" -msgstr "Noch in Arbeit" +msgstr "In Bearbeitung" #: airtime_mvc/application/forms/SoundcloudPreferences.php:121 msgid "Stem" -msgstr "Stamm" +msgstr "Stem" #: airtime_mvc/application/forms/SoundcloudPreferences.php:122 msgid "Loop" @@ -1753,7 +1809,7 @@ msgstr "Loop" #: airtime_mvc/application/forms/SoundcloudPreferences.php:123 msgid "Sound Effect" -msgstr "Soundeffekte" +msgstr "Sound Effekt" #: airtime_mvc/application/forms/SoundcloudPreferences.php:124 msgid "One Shot Sample" @@ -1761,11 +1817,11 @@ msgstr "One Shot Sample" #: airtime_mvc/application/forms/SoundcloudPreferences.php:125 msgid "Other" -msgstr "Andere" +msgstr "Sonstige" #: airtime_mvc/application/forms/SoundcloudPreferences.php:133 msgid "Default License:" -msgstr "Standardlizenz:" +msgstr "Standard Lizenz:" #: airtime_mvc/application/forms/SoundcloudPreferences.php:137 msgid "The work is in the public domain" @@ -1777,32 +1833,40 @@ msgstr "Alle Rechte vorbehalten" #: airtime_mvc/application/forms/SoundcloudPreferences.php:139 msgid "Creative Commons Attribution" -msgstr "Creative Commons Namensnennung" +msgstr "[CC-BY] Creative Commons Namensnennung" #: airtime_mvc/application/forms/SoundcloudPreferences.php:140 msgid "Creative Commons Attribution Noncommercial" -msgstr "Creative Commons Namensnennung, keine kommerzielle Nutzung" +msgstr "[CC-BY-NC] Creative Commons Namensnennung, keine kommerzielle Nutzung" #: airtime_mvc/application/forms/SoundcloudPreferences.php:141 msgid "Creative Commons Attribution No Derivative Works" -msgstr "Creative Commons Namensnennung, keine Bearbeitung" +msgstr "[CC-BY-ND] Creative Commons Namensnennung, keine Bearbeitung" #: airtime_mvc/application/forms/SoundcloudPreferences.php:142 msgid "Creative Commons Attribution Share Alike" -msgstr "Creative Commons Namensnennung, Weitergabe unter gleichen Bedingungen" +msgstr "" +"[CC-BY-SA] Creative Commons Namensnennung, Weitergabe unter gleichen " +"Bedingungen" #: airtime_mvc/application/forms/SoundcloudPreferences.php:143 msgid "Creative Commons Attribution Noncommercial Non Derivate Works" -msgstr "Creative Commons Namensnennung, keine kommerzielle Nutzung, keine Bearbeitung" +msgstr "" +"[CC-BY-NC-ND] Creative Commons Namensnennung, keine kommerzielle Nutzung, " +"keine Bearbeitung" #: airtime_mvc/application/forms/SoundcloudPreferences.php:144 msgid "Creative Commons Attribution Noncommercial Share Alike" -msgstr "Creative Commons Namensnennung, keine kommerzielle Nutzung, Weitergabe unter gleichen Bedingungen" +msgstr "" +"[CC-BY-NC-SA] Creative Commons Namensnennung, keine kommerzielle Nutzung, " +"Weitergabe unter gleichen Bedingungen" #: airtime_mvc/application/controllers/DashboardController.php:36 #: airtime_mvc/application/controllers/DashboardController.php:85 msgid "You don't have permission to disconnect source." -msgstr "Sie haben nicht die Berechtigung, das Eingangssignal zu trennen." +msgstr "" +"Sie haben nicht die erforderliche Berechtigung, das Eingangssignal zu " +"trennen." #: airtime_mvc/application/controllers/DashboardController.php:38 #: airtime_mvc/application/controllers/DashboardController.php:87 @@ -1811,23 +1875,29 @@ msgstr "Mit diesem Eingang ist kein Signal verbunden." #: airtime_mvc/application/controllers/DashboardController.php:82 msgid "You don't have permission to switch source." -msgstr "Sie haben keine Berechtigung, um das Signal umzuschalten." +msgstr "" +"Sie haben nicht die erforderliche Berechtigung, das Signal umzuschalten." #: airtime_mvc/application/controllers/LoginController.php:34 msgid "Please enter your user name and password" -msgstr "Bitte geben Sie Ihren Benutzernamen und Ihr Passwort ein" +msgstr "Bitte geben sie Benutzernamen und Passwort ein" #: airtime_mvc/application/controllers/LoginController.php:77 msgid "Wrong username or password provided. Please try again." -msgstr "Falscher Benutzername oder Passwort. Bitte versuchen Sie es erneut." +msgstr "Falscher Benutzername oder Passwort. Bitte versuchen sie es erneut." #: airtime_mvc/application/controllers/LoginController.php:142 -msgid "Email could not be sent. Check your mail server settings and ensure it has been configured properly." -msgstr "E-Mail konnte nicht gesendet werden. Überprüfen Sie Ihre E-Mail-Server-Einstellungen und stellen Sie sicher, dass diese richtig konfiguriert wurden." +msgid "" +"Email could not be sent. Check your mail server settings and ensure it has " +"been configured properly." +msgstr "" +"E-Mail konnte nicht gesendet werden. Überprüfen sie die Einstellungen des E-" +"Mail-Servers und vergwissern sie sich, dass dieser richtig konfiguriert " +"wurde." #: airtime_mvc/application/controllers/LoginController.php:145 msgid "Given email not found." -msgstr "Angegebene E-Mail nicht gefunden." +msgstr "Angegebene E-Mail-Adresse konnte nicht gefunden." #: airtime_mvc/application/controllers/PreferenceController.php:74 msgid "Preferences updated." @@ -1843,7 +1913,7 @@ msgstr "Stream-Einstellungen aktualisiert." #: airtime_mvc/application/controllers/PreferenceController.php:364 msgid "path should be specified" -msgstr "Pfad sollte spezifiziert sein" +msgstr "Pfad muß angegeben werden" #: airtime_mvc/application/controllers/PreferenceController.php:459 msgid "Problem with Liquidsoap..." @@ -1855,7 +1925,7 @@ msgstr "Seite nicht gefunden" #: airtime_mvc/application/controllers/ErrorController.php:22 msgid "Application error" -msgstr "Anwendungsfehler:" +msgstr "Anwendungsfehler" #: airtime_mvc/application/controllers/UserController.php:82 msgid "User added successfully!" @@ -1871,7 +1941,7 @@ msgstr "Einstellungen erfolgreich aktualisiert!" #: airtime_mvc/application/controllers/LocaleController.php:32 msgid "Recording:" -msgstr "Aufnahme" +msgstr "Aufnahme:" #: airtime_mvc/application/controllers/LocaleController.php:33 msgid "Master Stream" @@ -1895,7 +1965,7 @@ msgstr "Jezt" #: airtime_mvc/application/controllers/LocaleController.php:39 msgid "You are running the latest version" -msgstr "Sie arbeiten mit der neuesten Version" +msgstr "Sie verwenden die neueste Version" #: airtime_mvc/application/controllers/LocaleController.php:40 msgid "New version available: " @@ -1903,50 +1973,51 @@ msgstr "Neue Version verfügbar: " #: airtime_mvc/application/controllers/LocaleController.php:41 msgid "This version will soon be obsolete." -msgstr "Diese Version wird bald überholt sein." +msgstr "Diese Version wird in Kürze veraltet sein." #: airtime_mvc/application/controllers/LocaleController.php:42 msgid "This version is no longer supported." -msgstr "Diese Version wird nicht mehr unterstützt." +msgstr "Diese Version wird technisch nicht mehr unterstützt." #: airtime_mvc/application/controllers/LocaleController.php:43 msgid "Please upgrade to " -msgstr "Bitte aktualisieren Sie auf " +msgstr "Bitte aktualisieren sie auf " #: airtime_mvc/application/controllers/LocaleController.php:45 msgid "Add to current playlist" -msgstr "Zur aktuellen Wiedergabeliste hinzufügen" +msgstr "Zu aktueller Playlist hinzufügen" #: airtime_mvc/application/controllers/LocaleController.php:46 msgid "Add to current smart block" -msgstr "Zum aktuellen Smart-Block hinzufügen" +msgstr "Zu aktuellem Smart Block hinzufügen" #: airtime_mvc/application/controllers/LocaleController.php:47 msgid "Adding 1 Item" -msgstr "1 Artikel hinzufügen" +msgstr "1 Objekt hinzufügen" #: airtime_mvc/application/controllers/LocaleController.php:48 #, php-format msgid "Adding %s Items" -msgstr "%s Artikel hinzufügen" +msgstr "%s Objekte hinzufügen" #: airtime_mvc/application/controllers/LocaleController.php:49 msgid "You can only add tracks to smart blocks." -msgstr "Sie können zu Smart Blocks nur Titel hinzufügen." +msgstr "Sie können einem Smart Block nur Titel hinzufügen (keine Playlist oa.)" #: airtime_mvc/application/controllers/LocaleController.php:50 #: airtime_mvc/application/controllers/PlaylistController.php:163 msgid "You can only add tracks, smart blocks, and webstreams to playlists." -msgstr "Sie können zu Playlisten nur Titel, Smart Blocks und Webstreams hinzufügen." +msgstr "" +"Sie können einer Playlist nur Titel, Smart Blocks und Webstreams hinzufügen." #: airtime_mvc/application/controllers/LocaleController.php:53 msgid "Please select a cursor position on timeline." -msgstr "Positionieren Sie bitte den Mauszeiger auf der Timeline" +msgstr "Bitte wählen sie eine Cursor-Position auf der Zeitleiste." #: airtime_mvc/application/controllers/LocaleController.php:57 #: airtime_mvc/application/controllers/LibraryController.php:220 msgid "Edit Metadata" -msgstr "Metadaten bearbeiten" +msgstr "Metadaten ändern" #: airtime_mvc/application/controllers/LocaleController.php:58 msgid "Add to selected show" @@ -1958,19 +2029,19 @@ msgstr "Auswählen" #: airtime_mvc/application/controllers/LocaleController.php:60 msgid "Select this page" -msgstr "Wählen Sie diese Seite" +msgstr "Wählen sie diese Seite" #: airtime_mvc/application/controllers/LocaleController.php:61 msgid "Deselect this page" -msgstr "Deaktivieren Sie diese Seite" +msgstr "Wählen sie diese Seite ab" #: airtime_mvc/application/controllers/LocaleController.php:62 msgid "Deselect all" -msgstr "Auswahl für alle aufheben" +msgstr "Alle Abwählen" #: airtime_mvc/application/controllers/LocaleController.php:63 msgid "Are you sure you want to delete the selected item(s)?" -msgstr "Sind Sie sicher, dass Sie die ausgewählten Punkte löschen möchten?" +msgstr "Wollen sie die gewählten Objekte wirklich löschen?" #: airtime_mvc/application/controllers/LocaleController.php:64 msgid "Scheduled" @@ -1982,15 +2053,15 @@ msgstr "Playlist" #: airtime_mvc/application/controllers/LocaleController.php:69 msgid "Bit Rate" -msgstr "Bitrate:" +msgstr "Bitrate" #: airtime_mvc/application/controllers/LocaleController.php:86 msgid "Sample Rate" -msgstr "Sample Rate" +msgstr "Samplerate" #: airtime_mvc/application/controllers/LocaleController.php:91 msgid "Loading..." -msgstr "Wird geladen..." +msgstr "wird geladen..." #: airtime_mvc/application/controllers/LocaleController.php:92 #: airtime_mvc/application/controllers/LocaleController.php:158 @@ -2007,7 +2078,7 @@ msgstr "Playlisten" #: airtime_mvc/application/controllers/LocaleController.php:95 msgid "Smart Blocks" -msgstr "Smart Blocks" +msgstr "Smart Blöcke" #: airtime_mvc/application/controllers/LocaleController.php:96 msgid "Web Streams" @@ -2019,24 +2090,24 @@ msgstr "Unbekannter Typ: " #: airtime_mvc/application/controllers/LocaleController.php:98 msgid "Are you sure you want to delete the selected item?" -msgstr "Sind Sie sicher, dass Sie die ausgewählten Kontakte löschen möchten?" +msgstr "Wollen sie das gewählte Objekt wirklich löschen?" #: airtime_mvc/application/controllers/LocaleController.php:99 #: airtime_mvc/application/controllers/LocaleController.php:208 msgid "Uploading in progress..." -msgstr "Upload findet statt..." +msgstr "Upload wird durchgeführt..." #: airtime_mvc/application/controllers/LocaleController.php:100 msgid "Retrieving data from the server..." -msgstr "Abrufen von Daten vom Server ..." +msgstr "Daten werden vom Server abgerufen..." #: airtime_mvc/application/controllers/LocaleController.php:101 msgid "The soundcloud id for this file is: " -msgstr "Die Soundcloud ID für diese Datei ist: " +msgstr "Die SoundCloud ID für diese Datei ist: " #: airtime_mvc/application/controllers/LocaleController.php:102 msgid "There was an error while uploading to soundcloud." -msgstr "Es gab einen Fehler beim Hochladen auf Soundcloud." +msgstr "Während dem Hochladen auf SoundCloud ist ein Fehler aufgetreten." #: airtime_mvc/application/controllers/LocaleController.php:103 msgid "Error code: " @@ -2044,28 +2115,32 @@ msgstr "Fehlercode: " #: airtime_mvc/application/controllers/LocaleController.php:104 msgid "Error msg: " -msgstr "Fehler Nachricht: " +msgstr "Fehlermeldung: " #: airtime_mvc/application/controllers/LocaleController.php:105 msgid "Input must be a positive number" -msgstr "Die Eingabe muss eine positive Zahl sein" +msgstr "Der eingegeben Wert muß eine positive Zahl sein" #: airtime_mvc/application/controllers/LocaleController.php:106 msgid "Input must be a number" -msgstr "Die Eingabe muss eine Zahl sein" +msgstr "Der eingegebene Wert muß eine Zahl sein" #: airtime_mvc/application/controllers/LocaleController.php:107 msgid "Input must be in the format: yyyy-mm-dd" -msgstr "Die Eingabe muss im Format yyyy-mm-dd sein" +msgstr "Der Wert muß in folgendem Format eingegeben werden: yyyy-mm-dd" #: airtime_mvc/application/controllers/LocaleController.php:108 msgid "Input must be in the format: hh:mm:ss.t" -msgstr "Eingabe muss im Format hh:mm:ss.t sein" +msgstr "Der Wert muß in folgendem Format eingegeben werden: hh:mm:ss.t" #: airtime_mvc/application/controllers/LocaleController.php:111 #, php-format -msgid "You are currently uploading files. %sGoing to another screen will cancel the upload process. %sAre you sure you want to leave the page?" -msgstr "Sie laden momentan Dateien hoch. %s bei Wechsel zu einem anderen Bildschirm wird der Upload-Vorgang abgebrochen. %s Sind Sie sicher, dass Sie die Seite verlassen wollen?" +msgid "" +"You are currently uploading files. %sGoing to another screen will cancel the " +"upload process. %sAre you sure you want to leave the page?" +msgstr "" +"Sie laden momentan Dateien hoch. %s Beim wechseln der Seite wird der Upload-" +"Vorgang abgebrochen. %s Sind sie sicher, dass sie die Seite verlassen wollen?" #: airtime_mvc/application/controllers/LocaleController.php:113 msgid "Open Media Builder" @@ -2073,19 +2148,21 @@ msgstr "Medienordner" #: airtime_mvc/application/controllers/LocaleController.php:114 msgid "please put in a time '00:00:00 (.0)'" -msgstr "Geben Sie bitte eine Zeit '00: 00:00 (0,0)' ein" +msgstr "Bitte geben sie eine Zeit an '00:00:00 (.0)'" #: airtime_mvc/application/controllers/LocaleController.php:115 msgid "please put in a time in seconds '00 (.0)'" -msgstr "Bitte geben Sie eine Zeit in Sekunden '00 (.0)' ein" +msgstr "Bitte geben sie eine Zeit in Sekunden ein '00 (.0)'" #: airtime_mvc/application/controllers/LocaleController.php:116 msgid "Your browser does not support playing this file type: " -msgstr "Ihr Browser unterstützt keine Wiedergabe dieses Dateityps: " +msgstr "" +"Das Abspielen des folgenden Dateityps wird von ihrem Browser nicht " +"unterstützt: " #: airtime_mvc/application/controllers/LocaleController.php:117 msgid "Dynamic block is not previewable" -msgstr "Keine Vorschau für dynamischen Block" +msgstr "Bei einem Dynamischen Block ist keine Vorschau möglich" #: airtime_mvc/application/controllers/LocaleController.php:118 msgid "Limit to: " @@ -2100,21 +2177,27 @@ msgid "Playlist shuffled" msgstr "Playliste gemischt" #: airtime_mvc/application/controllers/LocaleController.php:122 -msgid "Airtime is unsure about the status of this file. This can happen when the file is on a remote drive that is unaccessible or the file is in a directory that isn't 'watched' anymore." -msgstr "Airtime kennt den Status dieser Datei nicht. Das kann passieren, wenn die Datei auf einem Laufwerk liegt, auf das kein Zugriff besteht oder die Datei in einem Verzeichnis liegt, das nicht mehr 'gesehen' wird." +msgid "" +"Airtime is unsure about the status of this file. This can happen when the " +"file is on a remote drive that is unaccessible or the file is in a directory " +"that isn't 'watched' anymore." +msgstr "" +"Airtime kann den Status dieser Datei nicht bestimmen.\n" +"Das kann passieren, wenn die Datei auf einem nicht erreichbaren Netzlaufwerk " +"liegt oder in einem Verzeichnis liegt, das nicht mehr überwacht wird." #: airtime_mvc/application/controllers/LocaleController.php:124 #, php-format msgid "Listener Count on %s: %s" -msgstr "Hörerzählung auf %s: %s" +msgstr "Hörerzahl %s: %s" #: airtime_mvc/application/controllers/LocaleController.php:126 msgid "Remind me in 1 week" -msgstr "In 1 Woche noch mal erinnern" +msgstr "In einer Woche erinnern" #: airtime_mvc/application/controllers/LocaleController.php:127 msgid "Remind me never" -msgstr "Nie mehr erinnern" +msgstr "Niemals erinnern" #: airtime_mvc/application/controllers/LocaleController.php:128 msgid "Yes, help Airtime" @@ -2123,19 +2206,40 @@ msgstr "Ja, Airtime helfen" #: airtime_mvc/application/controllers/LocaleController.php:129 #: airtime_mvc/application/controllers/LocaleController.php:188 msgid "Image must be one of jpg, jpeg, png, or gif" -msgstr "Nur folgende Bildformate möglich: jpg, jpeg, png, gif" +msgstr "Ein Bild muß jpg, jpeg, png, oder gif sein" #: airtime_mvc/application/controllers/LocaleController.php:132 -msgid "A static smart block will save the criteria and generate the block content immediately. This allows you to edit and view it in the Library before adding it to a show." -msgstr "Ein statischer Smart Block speichert die Kriterien und erzeugt umgehend den Blockinhalt. Dies ermöglicht es Ihnen, den Inhalt zu bearbeiten und in der Bibliothek anzusehen, bevor er zu einer Sendung hinzugefügt wird." +msgid "" +"A static smart block will save the criteria and generate the block content " +"immediately. This allows you to edit and view it in the Library before " +"adding it to a show." +msgstr "" +"Ein Statischer Smart Block speichert die Kriterien und erstellt den Block " +"sofort.\n" +"Dadurch kann der Inhalt in der Bibliothek eingesehen und verändert werden " +"bevor der Smart Block einer Sendung hinzugefügt wird." #: airtime_mvc/application/controllers/LocaleController.php:134 -msgid "A dynamic smart block will only save the criteria. The block content will get generated upon adding it to a show. You will not be able to view and edit the content in the Library." -msgstr "Ein dynamischer Smart Block speichert nur die Kriterien. Der Block-Inhalt wird erst generiert, wenn der Block zu einer Sendung hinzugefügt wird. In der Bibliothek können Sie den Inhalt nicht ansehen oder bearbeiten." +msgid "" +"A dynamic smart block will only save the criteria. The block content will " +"get generated upon adding it to a show. You will not be able to view and " +"edit the content in the Library." +msgstr "" +"Ein Dynamischer Smart Block speichert nur die Kriterien.\n" +"Dabei wird der Inhalt erst erstellt, wenn der Smart Block einer Sendung " +"hinzugefügt wird. Der Inhalt des Smart Blocks kann daher nicht in der " +"Bibliothek angezeigt oder bearbeitetet werden." #: airtime_mvc/application/controllers/LocaleController.php:136 -msgid "The desired block length will not be reached if Airtime cannot find enough unique tracks to match your criteria. Enable this option if you wish to allow tracks to be added multiple times to the smart block." -msgstr "Die gewünschte Blocklänge wird nicht erreicht, wenn Airtime nicht genug eindeutige Tracks findet, die Ihren Kriterien entsprechen. Wenn Sie möchten, dass Tracks mehrere Mal zum Smart Block hinzugefügt werden können, aktivieren Sie diese Option." +msgid "" +"The desired block length will not be reached if Airtime cannot find enough " +"unique tracks to match your criteria. Enable this option if you wish to " +"allow tracks to be added multiple times to the smart block." +msgstr "" +"Wenn Airtime nicht genug einzigartige Titel findet, die Ihren Kriterien " +"entsprechen, kann die gewünschte Länge des Smart Blocks nicht erreicht " +"werden. Wenn sie möchten, dass Titel mehrfach zum Smart Block hinzugefügt " +"werden können, aktivieren sie diese Option." #: airtime_mvc/application/controllers/LocaleController.php:137 msgid "Smart block shuffled" @@ -2143,7 +2247,7 @@ msgstr "Smart Block gemischt" #: airtime_mvc/application/controllers/LocaleController.php:138 msgid "Smart block generated and criteria saved" -msgstr "Smart Block generiert und Kriterien gespeichert" +msgstr "Smart Block erstellt und Kriterien gespeichert" #: airtime_mvc/application/controllers/LocaleController.php:139 msgid "Smart block saved" @@ -2151,59 +2255,68 @@ msgstr "Smart Block gespeichert" #: airtime_mvc/application/controllers/LocaleController.php:140 msgid "Processing..." -msgstr "Wird bearbeitet..." +msgstr "In Bearbeitung..." #: airtime_mvc/application/controllers/LocaleController.php:154 msgid "Played" -msgstr "Wiedergegeben" +msgstr "Abgespielt" #: airtime_mvc/application/controllers/LocaleController.php:159 #, php-format msgid "Copied %s row%s to the clipboard" -msgstr " %s Reihe%s zum Clipboard kopiert" +msgstr "%s Reihen%s in die Zwischenablage kopiert" #: airtime_mvc/application/controllers/LocaleController.php:160 #, php-format -msgid "%sPrint view%sPlease use your browser's print function to print this table. Press escape when finished." -msgstr "%sDruckansicht%sBenutzen Sie bitte die Druckfunktion des Browsers, um diese Tabelle auszudrucken. Wenn Sie fertig sind, drücken Sie die Escape-Taste." +msgid "" +"%sPrint view%sPlease use your browser's print function to print this table. " +"Press escape when finished." +msgstr "" +"%sDruckansicht%sBenutzen sie bitte die Druckfunktion des Browsers, um diese " +"Tabelle auszudrucken. Wenn sie fertig sind, drücken sie die Escape-Taste." #: airtime_mvc/application/controllers/LocaleController.php:162 msgid "Choose Storage Folder" -msgstr "Wählen Sie den Speicherordner" +msgstr "Wähle Speicher-Verzeichnis" #: airtime_mvc/application/controllers/LocaleController.php:163 msgid "Choose Folder to Watch" -msgstr "Wählen Sie den Beobachtungsordner" +msgstr "Wähle zu überwachendes Verzeichnis" #: airtime_mvc/application/controllers/LocaleController.php:165 msgid "" "Are you sure you want to change the storage folder?\n" "This will remove the files from your Airtime library!" msgstr "" -"Sind Sie sicher, dass Sie den Speicherordner?\n" -"Diese die Dateien von Ihrem Airtime Bibliothek entfernen ändern!" +"Sind sie sicher, dass sie den Speicher-Verzeichnis ändern wollen?\n" +"Dieser Vorgang entfernt alle Dateien der Airtime-Bibliothek!" #: airtime_mvc/application/controllers/LocaleController.php:166 #: airtime_mvc/application/views/scripts/preference/directory-config.phtml:2 msgid "Manage Media Folders" -msgstr "Medienordner verwalten" +msgstr "Medienverzeichnisse verwalten" #: airtime_mvc/application/controllers/LocaleController.php:167 msgid "Are you sure you want to remove the watched folder?" -msgstr "Sind Sie sicher, dass Sie den beobachteten Ordner entfernen wollen?" +msgstr "Sind sie sicher, dass sie das überwachte Verzeichnis entfernen wollen?" #: airtime_mvc/application/controllers/LocaleController.php:168 msgid "This path is currently not accessible." -msgstr "Zu diesem Pfad besteht momentan kein Zugang." +msgstr "Dieser Pfad ist derzeit nicht erreichbar." #: airtime_mvc/application/controllers/LocaleController.php:170 #, php-format -msgid "Some stream types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided." -msgstr "Manche Stream-Typen erfordern zusätzliche Konfiguration.Details zum Aktivieren von %sAAC+ Support%s oder %sOpus Support%s sind bereitgestellt." +msgid "" +"Some stream types require extra configuration. Details about enabling %sAAC+ " +"Support%s or %sOpus Support%s are provided." +msgstr "" +"Manche Stream-Typen erfordern zusätzliche Konfiguration. Details zum " +"Aktivieren von %sAAC+ Support%s oder %sOpus Support%s sind in der WIKI " +"bereitgestellt." #: airtime_mvc/application/controllers/LocaleController.php:171 msgid "Connected to the streaming server" -msgstr "Mit dem Streaming Server verbunden" +msgstr "Mit dem Streaming-Server verbunden" #: airtime_mvc/application/controllers/LocaleController.php:172 msgid "The stream is disabled" @@ -2211,69 +2324,139 @@ msgstr "Der Stream ist deaktiviert" #: airtime_mvc/application/controllers/LocaleController.php:174 msgid "Can not connect to the streaming server" -msgstr "Es kann nicht mit dem Streaming Server verbunden werden" +msgstr "Verbindung mit Streaming-Server kann nicht hergestellt werden." #: airtime_mvc/application/controllers/LocaleController.php:176 -msgid "If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151." -msgstr "Wenn Sie Airtime hinter einem Router oder einer Firewall betreiben, müssen Sie gegebenen Falls das 'Port-Forwarding' Einrichten. In diesem Fall müssen Sie die URL manuell eintragen, damit Ihren DJs der richtige Host/Port/Mount zur verbindung anzeigt wird. Der zulässige Bereich liegt zwischen 1024 und 49151." +msgid "" +"If Airtime is behind a router or firewall, you may need to configure port " +"forwarding and this field information will be incorrect. In this case you " +"will need to manually update this field so it shows the correct host/port/" +"mount that your DJ's need to connect to. The allowed range is between 1024 " +"and 49151." +msgstr "" +"Falls sich Airtime hinter einem Router oder einer Firewall befindet, müssen " +"sie gegebenenfalls eine Portweiterleitung konfigurieren. \n" +"In diesem Fall müssen sie die URL manuell eintragen, damit Ihren DJs der " +"richtige Host/Port/Mount zur verbindung anzeigt wird. Der erlaubte Port-" +"Bereich liegt zwischen 1024 und 49151." #: airtime_mvc/application/controllers/LocaleController.php:177 #, php-format msgid "For more details, please read the %sAirtime Manual%s" -msgstr "Für weitere Details lesen Sie bitte im %sAirtime Handbuch%s nach" +msgstr "" +"Für weitere Information lesen sie bitte das %sAirtime Benutzerhandbuch%s" #: airtime_mvc/application/controllers/LocaleController.php:179 -msgid "Check this option to enable metadata for OGG streams (stream metadata is the track title, artist, and show name that is displayed in an audio player). VLC and mplayer have a serious bug when playing an OGG/VORBIS stream that has metadata information enabled: they will disconnect from the stream after every song. If you are using an OGG stream and your listeners do not require support for these audio players, then feel free to enable this option." -msgstr "Aktivieren Sie diese Option, um Metadaten für OGG-Streams (Stream-Metadaten sind Trackname, Interpret sowie der Name der Sendung, der in einem Audio-Player angezeigt wird) zu ermöglichen. VLC und mplayer haben einen schwerwiegenden Fehler beim Abspielen eines OGG/Vorbis-Streams, bei dem Metadaten-Information aktiviert ist: sie unterbrechen nach jedem Lied die Verbindung. Wenn Sie einen OGG-Stream benutzen und Ihre Zuhörer keine Unterstützung für diese Audio-Player benötigen, dann können Sie diese Option aktivieren." +msgid "" +"Check this option to enable metadata for OGG streams (stream metadata is the " +"track title, artist, and show name that is displayed in an audio player). " +"VLC and mplayer have a serious bug when playing an OGG/VORBIS stream that " +"has metadata information enabled: they will disconnect from the stream after " +"every song. If you are using an OGG stream and your listeners do not require " +"support for these audio players, then feel free to enable this option." +msgstr "" +"Diese Option aktiviert Metadaten für Ogg-Streams.\n" +"(Stream-Metadaten wie Titel, Interpret und Sendungsname können von " +"Audioplayern angezeigt werden.)\n" +"VLC und mplayer haben ernsthafte Probleme beim Abspielen von Ogg/Vorbis-" +"Streams mit aktivierten Metadaten: Beide Anwendungen werden die Verbindung " +"zum Stream nach jedem Titel verlieren. Sollten sie einen Ogg-Stream " +"verwenden und ihre Hörer keine Unterstützung für diese Audioplayer erwarten, " +"können sie diese Option aktivieren." #: airtime_mvc/application/controllers/LocaleController.php:180 -msgid "Check this box to automatically switch off Master/Show source upon source disconnection." -msgstr "Aktivieren Sie dieses Kästchen, um automatisch bei Verbindungstrennung die Streameingabe umzuschalten." +msgid "" +"Check this box to automatically switch off Master/Show source upon source " +"disconnection." +msgstr "" +"Aktivieren sie dieses Kästchen, um die Master/Show-Source bei Unterbrechung " +"der Leitung automatisch abzuschalten." #: airtime_mvc/application/controllers/LocaleController.php:181 -msgid "Check this box to automatically switch on Master/Show source upon source connection." -msgstr "Aktivieren Sie dieses Kästchen, um automatisch bei Verbindung einer Streameingabe umzuschalten." +msgid "" +"Check this box to automatically switch on Master/Show source upon source " +"connection." +msgstr "" +"Aktivieren sie dieses Kästchen, um automatisch bei Verbindung einer " +"Streameingabe umzuschalten." #: airtime_mvc/application/controllers/LocaleController.php:182 -msgid "If your Icecast server expects a username of 'source', this field can be left blank." -msgstr "Wenn Ihr Icecast Server den Benutzernamen 'source' erwartet, kann dieses Feld leer bleiben." +msgid "" +"If your Icecast server expects a username of 'source', this field can be " +"left blank." +msgstr "" +"Wenn Ihr Icecast Server den Benutzernamen 'source' erwartet, kann dieses " +"Feld leer bleiben." #: airtime_mvc/application/controllers/LocaleController.php:183 #: airtime_mvc/application/controllers/LocaleController.php:193 -msgid "If your live streaming client does not ask for a username, this field should be 'source'." -msgstr "Wenn Ihr Live-Streaming-Client nicht nach einem Benutzernamen fragt, sollten Sie hier 'source' eintragen." +msgid "" +"If your live streaming client does not ask for a username, this field should " +"be 'source'." +msgstr "" +"Wenn Ihr Live-Streaming-Client nicht nach einem Benutzernamen fragt, sollten " +"Sie hier 'source' eintragen." #: airtime_mvc/application/controllers/LocaleController.php:185 -msgid "If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted." -msgstr "Wenn Sie den Benutzernamen oder das Passwort für einen aktivierten Stream ändern, wird die Playout Engine neu gestartet und Ihre Zuhörer für 5-10 Sekunden Stille hören. Wenn Sie die folgenden Felder ändern, gibt es KEINEN Neustart: Stream Label (Allgemeine Einstellungen) und Switch Transition Überblendung(en), Master Benutzername und Master-Passwort (Input Stream Einstellungen). Wenn Airtime aufnimmt und wenn die Änderung eine Playout Engine Neustart bewirkt, wird die Aufnahme unterbrochen werden." +msgid "" +"If you change the username or password values for an enabled stream the " +"playout engine will be rebooted and your listeners will hear silence for " +"5-10 seconds. Changing the following fields will NOT cause a reboot: Stream " +"Label (Global Settings), and Switch Transition Fade(s), Master Username, and " +"Master Password (Input Stream Settings). If Airtime is recording, and if the " +"change causes a playout engine restart, the recording will be interrupted." +msgstr "" +"Wenn sie den Benutzernamen oder das Passwort für einen aktivierten Stream " +"ändern, wird die Playout Engine neu gestartet und Ihre Zuhörer werden für " +"5-10 Sekunden Stille hören. \n" +"Wenn sie die folgenden Felder ändern, gibt es KEINEN Neustart: Stream Label " +"(Allgemeine Einstellungen) und Master Übergang beim Umschalten (Fade in " +"Sekunden), Master Benutzername Passwort (Input Stream Einstellungen). Wenn " +"Airtime aufnimmt und wenn die Änderung eine Playout Engine Neustart bewirkt, " +"wird die Aufnahme unterbrochen." #: airtime_mvc/application/controllers/LocaleController.php:186 -msgid "This is the admin username and password for Icecast/SHOUTcast to get listener statistics." -msgstr "[OPTIONAL] für Icecast/SHOUTcast - Wird benötigt um die Hörerstatistiken zu erhalten." +msgid "" +"This is the admin username and password for Icecast/SHOUTcast to get " +"listener statistics." +msgstr "" +"Admin Benutzer und Passwort, wird zur Abfrage der Zuhörerdaten in Icecast/" +"SHOUTcast verwendet." #: airtime_mvc/application/controllers/LocaleController.php:190 msgid "No result found" msgstr "Kein Ergebnis gefunden" #: airtime_mvc/application/controllers/LocaleController.php:191 -msgid "This follows the same security pattern for the shows: only users assigned to the show can connect." -msgstr "Dies folgt den gleichen Sicherheitsmustern für die Sendung: nur der Sendung zugeordnete Benutzer können sich verbinden." +msgid "" +"This follows the same security pattern for the shows: only users assigned to " +"the show can connect." +msgstr "" +"Diese Einstellung folgt den gleichen Sicherheitsvorlagen für Sendung: Nur " +"Benutzer denen diese Sendung zugewiesen wurde, können sich verbinden." #: airtime_mvc/application/controllers/LocaleController.php:192 msgid "Specify custom authentication which will work only for this show." -msgstr "Hier können Sie eine benutzerdefinierte Anmeldung eintragen, welche nur für diese Sendung gilt." +msgstr "" +"Bestimmen einer benutzerdefinierten Anmeldung eintragen, welche nur für " +"diese Sendung funktionieren wird." #: airtime_mvc/application/controllers/LocaleController.php:194 msgid "The show instance doesn't exist anymore!" -msgstr "Diese Instanz der Sendung existiert nicht mehr!" +msgstr "Die Sendungsinstanz existiert nicht mehr!" #: airtime_mvc/application/controllers/LocaleController.php:195 msgid "Warning: Shows cannot be re-linked" -msgstr "Warnung: Sendungen können nicht neu verknüpft werden" +msgstr "Warnung: Verknüpfte Sendungen können nicht erneut verknüpft werden" #: airtime_mvc/application/controllers/LocaleController.php:196 -msgid "By linking your repeating shows any media items scheduled in any repeat show will also get scheduled in the other repeat shows" -msgstr "Beim Verknüpfen von Sendungswiederholungen werden jegliche Medien, die in einer wiederholten Sendung geplant sind, auch in den anderen Sendungen geplant." +msgid "" +"By linking your repeating shows any media items scheduled in any repeat show " +"will also get scheduled in the other repeat shows" +msgstr "" +"Beim Verknüpfen von wiederkehrenden Sendungen werden jegliche Medien, die in " +"einer wiederkehrenden Sendung geplant sind, auch in den anderen Sendungen " +"geplant." #: airtime_mvc/application/controllers/LocaleController.php:200 msgid "Show" @@ -2309,15 +2492,15 @@ msgstr "60m" #: airtime_mvc/application/controllers/LocaleController.php:209 msgid "Retreiving data from the server..." -msgstr "Daten vom Server wiederherstellen..." +msgstr "Daten werden vom Server abgerufen..." #: airtime_mvc/application/controllers/LocaleController.php:215 msgid "This show has no scheduled content." -msgstr "Für diese Sendung sind noch keine Inhalte geplant." +msgstr "Diese Sendung hat keinen festgelegten Inhalt." #: airtime_mvc/application/controllers/LocaleController.php:216 msgid "This show is not completely filled with content." -msgstr "Die Sendung ist vollständig mit Inhalt gefüllt." +msgstr "Diese Sendung ist noch nicht vollständig mit Inhalten gefüllt." #: airtime_mvc/application/controllers/LocaleController.php:220 msgid "January" @@ -2429,8 +2612,11 @@ msgid "month" msgstr "Monat" #: airtime_mvc/application/controllers/LocaleController.php:262 -msgid "Shows longer than their scheduled time will be cut off by a following show." -msgstr "Wenn Sendungen länger dauern als geplant, werden sie durch die nachfolgende Sendung beendet." +msgid "" +"Shows longer than their scheduled time will be cut off by a following show." +msgstr "" +"Wenn der Inhalt einer Sendung länger ist als im Kalender festgelegt ist, " +"wird das Ende durch eine nachfolgende Sendung abgschnitten." #: airtime_mvc/application/controllers/LocaleController.php:263 msgid "Cancel Current Show?" @@ -2447,15 +2633,15 @@ msgstr "Speichern" #: airtime_mvc/application/controllers/LocaleController.php:266 msgid "Contents of Show" -msgstr "Inhalt der Sendung" +msgstr "Sendungsinhalt" #: airtime_mvc/application/controllers/LocaleController.php:269 msgid "Remove all content?" -msgstr "Alle Inhalte entfernen?" +msgstr "Gesamten Inhalt entfernen?" #: airtime_mvc/application/controllers/LocaleController.php:271 msgid "Delete selected item(s)?" -msgstr "Ausgewählte(s) Objekt(e) löschen?" +msgstr "Gewählte Objekte löschen?" #: airtime_mvc/application/controllers/LocaleController.php:272 #: airtime_mvc/application/views/scripts/schedule/show-content-dialog.phtml:5 @@ -2472,7 +2658,7 @@ msgstr "Dauer" #: airtime_mvc/application/controllers/LocaleController.php:284 msgid "Show Empty" -msgstr "Sendung leer" +msgstr "Sendung ist leer" #: airtime_mvc/application/controllers/LocaleController.php:285 msgid "Recording From Line In" @@ -2484,16 +2670,16 @@ msgstr "Titel Vorschau" #: airtime_mvc/application/controllers/LocaleController.php:290 msgid "Cannot schedule outside a show." -msgstr "Kann nicht außerhalb einer Sendung planen." +msgstr "Es ist keine Planung außerhalb einer Sendung möglich." #: airtime_mvc/application/controllers/LocaleController.php:291 msgid "Moving 1 Item" -msgstr "1 Artikel verschieben" +msgstr "Verschiebe 1 Objekt" #: airtime_mvc/application/controllers/LocaleController.php:292 #, php-format msgid "Moving %s Items" -msgstr "%s Artikel verschieben" +msgstr "Verschiebe %s Objekte" #: airtime_mvc/application/controllers/LocaleController.php:295 msgid "Fade Editor" @@ -2504,8 +2690,11 @@ msgid "Cue Editor" msgstr "Cue Editor" #: airtime_mvc/application/controllers/LocaleController.php:297 -msgid "Waveform features are available in a browser supporting the Web Audio API" -msgstr "Wellenform-Ansicht ist nur mit einem 'Web Audio API' fähigen Browser verfügbar" +msgid "" +"Waveform features are available in a browser supporting the Web Audio API" +msgstr "" +"Wellenform-Funktionen ist nur in Browsern möglich, welche die Web Audio API " +"unterstützen" #: airtime_mvc/application/controllers/LocaleController.php:300 msgid "Select all" @@ -2517,7 +2706,7 @@ msgstr "Nichts auswählen" #: airtime_mvc/application/controllers/LocaleController.php:302 msgid "Remove overbooked tracks" -msgstr "Überbuchte Tracks entfernen" +msgstr "Überbuchte Titel entfernen" #: airtime_mvc/application/controllers/LocaleController.php:303 msgid "Remove selected scheduled items" @@ -2525,7 +2714,7 @@ msgstr "Ausgewählte Elemente aus dem Programm entfernen" #: airtime_mvc/application/controllers/LocaleController.php:304 msgid "Jump to the current playing track" -msgstr "Gehe zum aktuell gespielten Track" +msgstr "Springe zu aktuellem Titel" #: airtime_mvc/application/controllers/LocaleController.php:305 msgid "Cancel current show" @@ -2533,7 +2722,8 @@ msgstr "Aktuelle Sendung abbrechen" #: airtime_mvc/application/controllers/LocaleController.php:310 msgid "Open library to add or remove content" -msgstr "Bibliothek öffnen, um Inhalt hinzuzufügen oder zu entfernen" +msgstr "" +"Um Inhalte hinzuzufügen oder zu entfernen muß die Bibliothek geöffnet werden" #: airtime_mvc/application/controllers/LocaleController.php:313 msgid "in use" @@ -2545,7 +2735,7 @@ msgstr "Disk" #: airtime_mvc/application/controllers/LocaleController.php:316 msgid "Look in" -msgstr "Suchen in:" +msgstr "Suchen in" #: airtime_mvc/application/controllers/LocaleController.php:318 msgid "Open" @@ -2557,11 +2747,11 @@ msgstr "Gäste können folgendes tun:" #: airtime_mvc/application/controllers/LocaleController.php:325 msgid "View schedule" -msgstr "Zeitplan ansehen" +msgstr "Kalender betrachten" #: airtime_mvc/application/controllers/LocaleController.php:326 msgid "View show content" -msgstr "Inhalt der Sendung ansehen" +msgstr "Sendungsinhalt betrachten" #: airtime_mvc/application/controllers/LocaleController.php:327 msgid "DJs can do the following:" @@ -2569,35 +2759,35 @@ msgstr "DJs können folgendes tun:" #: airtime_mvc/application/controllers/LocaleController.php:328 msgid "Manage assigned show content" -msgstr "Zugeordneten Inhalt der Sendung verwalten" +msgstr "Verwalten zugewiesener Sendungsinhalte" #: airtime_mvc/application/controllers/LocaleController.php:329 msgid "Import media files" -msgstr "Mediadateien importieren" +msgstr "Mediendateien importieren" #: airtime_mvc/application/controllers/LocaleController.php:330 msgid "Create playlists, smart blocks, and webstreams" -msgstr "Playlisten, Smart Blocks und Webstreams anlegen" +msgstr "Erstellen von Playlisten, Smart Blöcken und Webstreams" #: airtime_mvc/application/controllers/LocaleController.php:331 msgid "Manage their own library content" -msgstr "Inhalt der eigenen Library verwalten" +msgstr "Verwalten eigener Bibliotheksinhalte" #: airtime_mvc/application/controllers/LocaleController.php:332 msgid "Progam Managers can do the following:" -msgstr "Programm-Manager können folgendes tun:" +msgstr "Programm Manager können folgendes tun:" #: airtime_mvc/application/controllers/LocaleController.php:333 msgid "View and manage show content" -msgstr "Inhalt einer Sendung sehen und verwalten" +msgstr "Sendungsinhalte betrachten und verwalten" #: airtime_mvc/application/controllers/LocaleController.php:334 msgid "Schedule shows" -msgstr "Sendungen planen" +msgstr "Sendungen festlegen" #: airtime_mvc/application/controllers/LocaleController.php:335 msgid "Manage all library content" -msgstr "Gesamten Inhalt der Library verwalten" +msgstr "Verwalten der gesamten Bibliothek" #: airtime_mvc/application/controllers/LocaleController.php:336 msgid "Admins can do the following:" @@ -2609,23 +2799,23 @@ msgstr "Einstellungen verwalten" #: airtime_mvc/application/controllers/LocaleController.php:338 msgid "Manage users" -msgstr "Nutzer verwalten" +msgstr "Benutzer verwalten" #: airtime_mvc/application/controllers/LocaleController.php:339 msgid "Manage watched folders" -msgstr "Gesehene Ordner verwalten" +msgstr "Verwalten überwachter Verzeichnisse" #: airtime_mvc/application/controllers/LocaleController.php:341 msgid "View system status" -msgstr "Systemstatus sehen" +msgstr "System Status betrachten" #: airtime_mvc/application/controllers/LocaleController.php:342 msgid "Access playout history" -msgstr "Auf Playout History zugreifen" +msgstr "Zugriff auf Playlist Historie" #: airtime_mvc/application/controllers/LocaleController.php:343 msgid "View listener stats" -msgstr "Hörerstatistiken sehen" +msgstr "Hörerstatistiken betrachten" #: airtime_mvc/application/controllers/LocaleController.php:345 msgid "Show / hide columns" @@ -2637,7 +2827,7 @@ msgstr "Von {from} bis {to}" #: airtime_mvc/application/controllers/LocaleController.php:348 msgid "kbps" -msgstr "Kbit/s" +msgstr "kbps" #: airtime_mvc/application/controllers/LocaleController.php:349 msgid "yyyy-mm-dd" @@ -2649,35 +2839,35 @@ msgstr "hh:mm:ss.t" #: airtime_mvc/application/controllers/LocaleController.php:351 msgid "kHz" -msgstr "(kHz)" +msgstr "kHz" #: airtime_mvc/application/controllers/LocaleController.php:354 msgid "Su" -msgstr "So." +msgstr "So" #: airtime_mvc/application/controllers/LocaleController.php:355 msgid "Mo" -msgstr "Mo." +msgstr "Mo" #: airtime_mvc/application/controllers/LocaleController.php:356 msgid "Tu" -msgstr "Di." +msgstr "Di" #: airtime_mvc/application/controllers/LocaleController.php:357 msgid "We" -msgstr "Mi." +msgstr "Mi" #: airtime_mvc/application/controllers/LocaleController.php:358 msgid "Th" -msgstr "Do." +msgstr "Do" #: airtime_mvc/application/controllers/LocaleController.php:359 msgid "Fr" -msgstr "Fr." +msgstr "Fr" #: airtime_mvc/application/controllers/LocaleController.php:360 msgid "Sa" -msgstr "Sa." +msgstr "Sa" #: airtime_mvc/application/controllers/LocaleController.php:361 #: airtime_mvc/application/controllers/LocaleController.php:389 @@ -2745,7 +2935,7 @@ msgstr "Fehler in der Dateigröße." #: airtime_mvc/application/controllers/LocaleController.php:382 msgid "File count error." -msgstr "Fehler in der Dateizählung" +msgstr "Fehler in der Dateianzahl" #: airtime_mvc/application/controllers/LocaleController.php:383 msgid "Init error." @@ -2761,7 +2951,7 @@ msgstr "Sicherheitsfehler." #: airtime_mvc/application/controllers/LocaleController.php:386 msgid "Generic error." -msgstr "Generischer Fehler." +msgstr "Allgemeiner Fehler." #: airtime_mvc/application/controllers/LocaleController.php:387 msgid "IO error." @@ -2775,15 +2965,15 @@ msgstr "Datei: %s" #: airtime_mvc/application/controllers/LocaleController.php:390 #, php-format msgid "%d files queued" -msgstr "%d Dateien aufgereiht" +msgstr "%d Dateien in der Warteschlange" #: airtime_mvc/application/controllers/LocaleController.php:391 msgid "File: %f, size: %s, max file size: %m" -msgstr "Datei: %f, Größe: %s, max. Dateigröße: %m" +msgstr "Datei: %f, Größe: %s, Maximale Dateigröße: %m" #: airtime_mvc/application/controllers/LocaleController.php:392 msgid "Upload URL might be wrong or doesn't exist" -msgstr "Die Upload-URL ist falsch oder existiert nicht" +msgstr "Upload-URL scheint falsch zu sein oder existiert nicht" #: airtime_mvc/application/controllers/LocaleController.php:393 msgid "Error: File too large: " @@ -2800,49 +2990,52 @@ msgstr "Vorschau" #: airtime_mvc/application/controllers/ShowbuilderController.php:192 msgid "Select cursor" -msgstr "Wählen Sie den Cursor" +msgstr "Cursor wählen" #: airtime_mvc/application/controllers/ShowbuilderController.php:193 msgid "Remove cursor" -msgstr "Entfernen Sie den Cursor" +msgstr "Cursor entfernen" #: airtime_mvc/application/controllers/ShowbuilderController.php:212 msgid "show does not exist" msgstr "Sendung existiert nicht" #: airtime_mvc/application/controllers/ListenerstatController.php:56 -msgid "Please make sure admin user/password is correct on System->Streams page." -msgstr "Bitte prüfen Sie, ob Admin Nutzer/Password auf System->Stream Seite korrekt ist." +msgid "" +"Please make sure admin user/password is correct on System->Streams page." +msgstr "" +"Bitte prüfen sie, ob der Admin Nutzer/Password unter System->Stream korrekt " +"eingetragen ist." #: airtime_mvc/application/controllers/ApiController.php:60 #: airtime_mvc/application/controllers/ApiController.php:79 msgid "You are not allowed to access this resource." -msgstr "Sie sind nicht berechtigt, auf diese Source zuzugreifen" +msgstr "Sie sind nicht berechtigt, auf diese Resource zuzugreifen" #: airtime_mvc/application/controllers/ApiController.php:297 #: airtime_mvc/application/controllers/ApiController.php:344 msgid "You are not allowed to access this resource. " -msgstr "Sie sind nicht berechtigt, auf diese Source zuzugreifen. " +msgstr "Sie sind nicht berechtigt, auf diese Resource zuzugreifen. " #: airtime_mvc/application/controllers/ApiController.php:522 msgid "File does not exist in Airtime." -msgstr "Datei existiert in Airtime nicht." +msgstr "Datei existiert nicht in Airtime." #: airtime_mvc/application/controllers/ApiController.php:533 msgid "File does not exist in Airtime" -msgstr "Datei existiert in Airtime nicht" +msgstr "Datei existiert nicht in Airtime" #: airtime_mvc/application/controllers/ApiController.php:545 msgid "File doesn't exist in Airtime." -msgstr "Datei existiert in Airtime nicht" +msgstr "Datei existiert nicht in Airtime." #: airtime_mvc/application/controllers/ApiController.php:596 msgid "Bad request. no 'mode' parameter passed." -msgstr "Falsche Anfrage. Es wurde kein 'mode' Parameter übergeben." +msgstr "Fehlerhafte Anfrage. Es wurde kein 'mode' Parameter übergeben." #: airtime_mvc/application/controllers/ApiController.php:606 msgid "Bad request. 'mode' parameter is invalid" -msgstr "Falsche Anfrage. 'Mode' Parameter ist ungültig" +msgstr "Fehlerhafte Anfrage. 'Mode' Parameter ist ungültig" #: airtime_mvc/application/controllers/LibraryController.php:125 #: airtime_mvc/application/controllers/PlaylistController.php:130 @@ -2853,7 +3046,7 @@ msgstr "%s nicht gefunden" #: airtime_mvc/application/controllers/LibraryController.php:134 #: airtime_mvc/application/controllers/PlaylistController.php:151 msgid "Something went wrong." -msgstr "Es gab ein Problem" +msgstr "Etwas ist falsch gelaufen." #: airtime_mvc/application/controllers/LibraryController.php:212 #: airtime_mvc/application/controllers/LibraryController.php:236 @@ -2863,7 +3056,7 @@ msgstr "Zur Playlist hinzufügen" #: airtime_mvc/application/controllers/LibraryController.php:214 msgid "Add to Smart Block" -msgstr "Zu Smart Block hinzufügen" +msgstr "Zum Smart Block hinzufügen" #: airtime_mvc/application/controllers/LibraryController.php:224 #: airtime_mvc/application/controllers/ScheduleController.php:605 @@ -2884,11 +3077,14 @@ msgstr "Keine Aktion verfügbar" #: airtime_mvc/application/controllers/LibraryController.php:317 msgid "You don't have permission to delete selected items." -msgstr "Sie haben keine Berechtigung, um ausgewählte Elemente zu löschen." +msgstr "" +"Sie haben nicht die erforderliche Berechtigung die gewählten Objekte zu " +"löschen." #: airtime_mvc/application/controllers/LibraryController.php:366 msgid "Could not delete some scheduled files." -msgstr "Einige im Programmplan enthaltene Dateien konnten nicht gelöscht werden." +msgstr "" +"Einige im Programmplan enthaltene Dateien konnten nicht gelöscht werden." #: airtime_mvc/application/controllers/LibraryController.php:405 #, php-format @@ -2898,28 +3094,30 @@ msgstr "Kopie von %s" #: airtime_mvc/application/controllers/PlaylistController.php:48 #, php-format msgid "You are viewing an older version of %s" -msgstr "Sie sehen eine ältere Version von %s" +msgstr "Sie betrachten eine ältere Version von %s" #: airtime_mvc/application/controllers/PlaylistController.php:123 msgid "You cannot add tracks to dynamic blocks." -msgstr "Sie können zu dynamischen Blocks keine Titel hinzufügen." +msgstr "Sie können einem Dynamischen Smart Block keine Titel hinzufügen." #: airtime_mvc/application/controllers/PlaylistController.php:144 #, php-format msgid "You don't have permission to delete selected %s(s)." -msgstr "Sie haben keine Berechtigung, ausgewählte %s (s) zu löschen." +msgstr "" +"Sie haben zum Löschen der gewählten %s (s) nicht die erforderliche " +"Berechtigung." #: airtime_mvc/application/controllers/PlaylistController.php:157 msgid "You can only add tracks to smart block." -msgstr "Sie können zu Smart Block nur Titel hinzufügen." +msgstr "Sie können einem Smart Block nur Titel hinzufügen." #: airtime_mvc/application/controllers/PlaylistController.php:175 msgid "Untitled Playlist" -msgstr "Playlist ohne Titel" +msgstr "Unbenannte Playlist" #: airtime_mvc/application/controllers/PlaylistController.php:177 msgid "Untitled Smart Block" -msgstr "Smart Block ohne Titel" +msgstr "Unbenannter Smart Block" #: airtime_mvc/application/controllers/PlaylistController.php:495 msgid "Unknown Playlist" @@ -2933,7 +3131,7 @@ msgstr "Wiederholung der Sendung %s vom %s um %s" #: airtime_mvc/application/controllers/WebstreamController.php:29 #: airtime_mvc/application/controllers/WebstreamController.php:33 msgid "Untitled Webstream" -msgstr "Webstream ohne Titel" +msgstr "Unbenannter Webstream" #: airtime_mvc/application/controllers/WebstreamController.php:138 msgid "Webstream saved." @@ -2945,7 +3143,7 @@ msgstr "Ungültige Formularwerte." #: airtime_mvc/application/views/scripts/listenerstat/index.phtml:2 msgid "Listener Count Over Time" -msgstr "Hörerzählung während Zeitraum" +msgstr "Hörerzahlen im Zeitraum" #: airtime_mvc/application/views/scripts/partialviews/header.phtml:3 msgid "Previous:" @@ -2969,7 +3167,7 @@ msgstr "Show Source" #: airtime_mvc/application/views/scripts/partialviews/header.phtml:45 msgid "Scheduled Play" -msgstr "geplanter Inhalt" +msgstr "geplante Wiederg." #: airtime_mvc/application/views/scripts/partialviews/header.phtml:54 msgid "ON AIR" @@ -2989,7 +3187,7 @@ msgstr "Ihre Testperiode endet in" #: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:9 msgid "Purchase your copy of Airtime" -msgstr "Kaufen Sie Airtime" +msgstr "Kaufen sie eine Kopie von Airtime" #: airtime_mvc/application/views/scripts/partialviews/trialBox.phtml:9 msgid "My Account" @@ -3021,13 +3219,18 @@ msgstr "Benutzertyp" #: airtime_mvc/application/views/scripts/dashboard/about.phtml:5 #, php-format -msgid "%sAirtime%s %s, the open radio software for scheduling and remote station management. %s" -msgstr "%sAirtime%s %s, die Open Source Radio Software für Programplanung und Remote Radioverwaltung. %s" +msgid "" +"%sAirtime%s %s, the open radio software for scheduling and remote station " +"management. %s" +msgstr "" +"%sAirtime%s %s, die Open Source Radio Software für Programplanung und Remote " +"Radioverwaltung. %s" #: airtime_mvc/application/views/scripts/dashboard/about.phtml:13 #, php-format -msgid "%sSourcefabric%s o.p.s. Airtime is distributed under the %sGNU GPL v.3%s" -msgstr "%sSourcefabric%s o.p.s. Airtime wird vertrieben unter %s GNU GPL v.3 %s." +msgid "" +"%sSourcefabric%s o.p.s. Airtime is distributed under the %sGNU GPL v.3%s" +msgstr "%sSourcefabric%s o.p.s. Airtime wird vertrieben unter %s GNU GPL v.3%s" #: airtime_mvc/application/views/scripts/dashboard/stream-player.phtml:3 msgid "Share" @@ -3052,33 +3255,58 @@ msgid "Welcome to Airtime!" msgstr "Willkommen bei Airtime!" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:4 -msgid "Here's how you can get started using Airtime to automate your broadcasts: " -msgstr "Hier erfahren Sie, wie Sie mit Airtime loslegen können, um ihr Programm automatisch senden zu können: " +msgid "" +"Here's how you can get started using Airtime to automate your broadcasts: " +msgstr "" +"Starten sie hier, um die ersten Schritte für die Automation ihrer Radio " +"Station zu erfahren." #: airtime_mvc/application/views/scripts/dashboard/help.phtml:7 -msgid "Begin by adding your files to the library using the 'Add Media' menu button. You can drag and drop your files to this window too." -msgstr "Beginnen Sie, indem Sie Ihre Dateien mit dem 'Add Media' Menü-Button in ihre Bibliothek hinzufügen. Sie können Ihre Dateien auch per Drag & Drop in dieses Fenster bewegen." +msgid "" +"Begin by adding your files to the library using the 'Add Media' menu button. " +"You can drag and drop your files to this window too." +msgstr "" +"Beginnen sie damit, Dateien ihrer Bibliothek hinzuzufügen. Verwenden sie " +"dazu die Schaltfläche 'Medien Hinzufügen'. Dateien können auch via " +"Drag'n'Drop hinzugefügt werden." #: airtime_mvc/application/views/scripts/dashboard/help.phtml:8 -msgid "Create a show by going to 'Calendar' in the menu bar, and then clicking the '+ Show' icon. This can be either a one-time or repeating show. Only admins and program managers can add shows." -msgstr "Erstellen Sie eine Sendung, indem Sie in der Menüleiste auf 'Kalender' und dann auf das '+ Sendungen'-Symbol klicken. Dies kann entweder eine einmalige oder eine sich wiederholende Sendung. (Nur Administratoren und Programm-Manager können Sendungen hinzufügen)" +msgid "" +"Create a show by going to 'Calendar' in the menu bar, and then clicking the " +"'+ Show' icon. This can be either a one-time or repeating show. Only admins " +"and program managers can add shows." +msgstr "" +"Erstellen sie eine Sendung, indem sie die Schaltfläche 'Kalender' betätigen " +"und anschließend auf die Schaltfläche '+ Sendung' klicken. Dies kann eine " +"einmalige oder sich wiederholende Sendung sein. Nur Administratoren und " +"Programm Manager können Sendungen hinzufügen." #: airtime_mvc/application/views/scripts/dashboard/help.phtml:9 -msgid "Add media to the show by going to your show in the Schedule calendar, left-clicking on it and selecting 'Add / Remove Content'" -msgstr "Fügen Sie zu ihrer Sendung Medien hinzu, indem Sie im Programm-Kalender mit der linken Maustaste auf Ihre Sendung klicken und 'Inhalt hinzufügen/entfernen' wählen." +msgid "" +"Add media to the show by going to your show in the Schedule calendar, left-" +"clicking on it and selecting 'Add / Remove Content'" +msgstr "" +"Fügen sie Mediendateien einer Show hinzu.\n" +"Öffnen sie dazu die gewünschte Sendung durch einen Links-Klick im Kalender " +"und wählen sie 'Inhalt hinzufügen / entfernen'" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:10 -msgid "Select your media from the left pane and drag them to your show in the right pane." -msgstr "Wählen Sie Ihre Medien aus dem linken Fenster und ziehen Sie sie in Ihre Sendung im rechten Fensterbereich." +msgid "" +"Select your media from the left pane and drag them to your show in the right " +"pane." +msgstr "" +"Wählen sie Medien vom linken Feld und ziehen sie es in ihre Sendung im " +"rechten Feld." #: airtime_mvc/application/views/scripts/dashboard/help.phtml:12 msgid "Then you're good to go!" -msgstr "Jetzt können Sie loslegen!" +msgstr "Dann kann es auch schon los gehen!" #: airtime_mvc/application/views/scripts/dashboard/help.phtml:13 #, php-format msgid "For more detailed help, read the %suser manual%s." -msgstr "Für weitere ausführliche Hilfe, lesen Sie bitte die %s Bedienungsanleitung %s." +msgstr "" +"Für weitere ausführliche Hilfe, lesen sie bitte das %sBenutzerhandbuch%s." #: airtime_mvc/application/views/scripts/playlist/update.phtml:50 msgid "Expand Static Block" @@ -3094,18 +3322,18 @@ msgstr "Smart Block leeren" #: airtime_mvc/application/views/scripts/playlist/update.phtml:133 msgid "Empty playlist" -msgstr "Wiedergabeliste leeren" +msgstr "Playlist leeren" #: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:3 #: airtime_mvc/application/views/scripts/playlist/set-cue.phtml:3 msgid "Show Waveform" -msgstr "zeige Wellenform" +msgstr "Wellenform anzeigen" #: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:6 #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:70 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:75 msgid "Fade out: " -msgstr "Fade out: " +msgstr "Fade Out: " #: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:6 #: airtime_mvc/application/views/scripts/playlist/set-fade.phtml:19 @@ -3118,7 +3346,7 @@ msgstr "(ss.t)" #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:67 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:72 msgid "Fade in: " -msgstr "Fade in: " +msgstr "Fade In: " #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:11 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:11 @@ -3146,12 +3374,12 @@ msgstr "Neuer Webstream" #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:21 msgid "Empty playlist content" -msgstr "Leerer Playlist Inhalt" +msgstr "Playlist leeren" #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:21 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:21 msgid "Clear" -msgstr "löschen" +msgstr "Leeren" #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:24 msgid "Shuffle playlist" @@ -3164,17 +3392,17 @@ msgstr "Playlist speichern" #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:34 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:31 msgid "Playlist crossfade" -msgstr "Playlist überblenden" +msgstr "Playlist Crossfade" #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:53 #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:55 #: airtime_mvc/application/views/scripts/webstream/webstream.phtml:39 msgid "View / edit description" -msgstr "Beschreibung anzeigen/bearbeiten" +msgstr "Beschreibung ansehen/ändern" #: airtime_mvc/application/views/scripts/playlist/playlist.phtml:85 msgid "No open playlist" -msgstr "Keine offene Wiedergabeliste" +msgstr "Keine Playlist geöffnet" #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:21 msgid "Empty smart block content" @@ -3182,7 +3410,7 @@ msgstr "Leerer Smart Block Inhalt" #: airtime_mvc/application/views/scripts/playlist/smart-block.phtml:90 msgid "No open smart block" -msgstr "Kein offener Smart Block" +msgstr "Kein Smart Block geöffnet" #: airtime_mvc/application/views/scripts/playlist/set-cue.phtml:5 msgid "Cue In: " @@ -3217,7 +3445,7 @@ msgstr "Was" #: airtime_mvc/application/views/scripts/schedule/add-show-form.phtml:14 msgid "When" -msgstr "Wenn" +msgstr "Wann" #: airtime_mvc/application/views/scripts/schedule/add-show-form.phtml:19 msgid "Live Stream Input" @@ -3237,19 +3465,24 @@ msgstr "Farbe" #: airtime_mvc/application/views/scripts/login/password-restore-after.phtml:3 msgid "Email sent" -msgstr "E-Mail gesendet." +msgstr "E-Mail gesendet" #: airtime_mvc/application/views/scripts/login/password-restore-after.phtml:6 msgid "An email has been sent" -msgstr "Eine E-Mail wurde versendet." +msgstr "Ein E-Mail wurder gesendet" #: airtime_mvc/application/views/scripts/login/password-restore-after.phtml:7 msgid "Back to login screen" -msgstr "Zurück zum Login Screen" +msgstr "Zurück zum Anmeldebildschirm" #: airtime_mvc/application/views/scripts/login/index.phtml:7 -msgid "Welcome to the online Airtime demo! You can log in using the username 'admin' and the password 'admin'." -msgstr "Willkommen in der Testversion von Online-Airtime! Sie können sich mit dem Benutzernamen 'admin' und dem Passwort 'admin' anmelden." +msgid "" +"Welcome to the online Airtime demo! You can log in using the username " +"'admin' and the password 'admin'." +msgstr "" +"Willkommen zur Online Artime Demo!\n" +"Sie können sich mit dem Benutzernamen 'admin' und dem Passwort 'admin' " +"anmelden." #: airtime_mvc/application/views/scripts/login/password-restore.phtml:3 #: airtime_mvc/application/views/scripts/form/login.phtml:34 @@ -3257,8 +3490,13 @@ msgid "Reset password" msgstr "Passwort zurücksetzen" #: airtime_mvc/application/views/scripts/login/password-restore.phtml:7 -msgid "Please enter your account e-mail address. You will receive a link to create a new password via e-mail." -msgstr "Bitte geben Sie die E-Mail-Adresse Ihres Kontos ein. Sie erhalten per E-Mail einen Link, um ein neues Passwort zu erstellen." +msgid "" +"Please enter your account e-mail address. You will receive a link to create " +"a new password via e-mail." +msgstr "" +"Bitte geben sie die E-Mail-Adresse ein, die in ihrem Benutzerkonto " +"eingetragen ist. sie erhalten einen Link um ein neues Passwort via E-Mail zu " +"erstellen." #: airtime_mvc/application/views/scripts/login/password-change.phtml:3 msgid "New password" @@ -3266,11 +3504,12 @@ msgstr "Neues Passwort" #: airtime_mvc/application/views/scripts/login/password-change.phtml:6 msgid "Please enter and confirm your new password in the fields below." -msgstr "Bitte geben Sie Ihr neues Passwort ein und bestätigen es im folgenden Feld." +msgstr "" +"Bitte geben sie Ihr neues Passwort ein und bestätigen es im folgenden Feld." #: airtime_mvc/application/views/scripts/systemstatus/index.phtml:4 msgid "Service" -msgstr "Service" +msgstr "Dienst" #: airtime_mvc/application/views/scripts/systemstatus/index.phtml:6 msgid "Uptime" @@ -3290,7 +3529,7 @@ msgstr "Airtime Version" #: airtime_mvc/application/views/scripts/systemstatus/index.phtml:30 msgid "Disk Space" -msgstr "Festplattenspeicher" +msgstr "Speicherplatz" #: airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml:22 msgid "previous" @@ -3322,8 +3561,12 @@ msgstr "Update erforderlich" #: airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml:70 #, php-format -msgid "To play the media you will need to either update your browser to a recent version or update your %sFlash plugin%s." -msgstr "Um die Medien zu spielen, müssen Sie entweder Ihren Browser oder Ihr %s Flash-Plugin %s aktualisieren." +msgid "" +"To play the media you will need to either update your browser to a recent " +"version or update your %sFlash plugin%s." +msgstr "" +"Um die Medien zu spielen, müssen sie entweder Ihren Browser oder Ihr %s " +"Flash-Plugin %s aktualisieren." #: airtime_mvc/application/views/scripts/webstream/webstream.phtml:52 msgid "Stream URL:" @@ -3331,7 +3574,7 @@ msgstr "Stream URL:" #: airtime_mvc/application/views/scripts/webstream/webstream.phtml:57 msgid "Default Length:" -msgstr "Standardlänge:" +msgstr "Standard Dauer:" #: airtime_mvc/application/views/scripts/webstream/webstream.phtml:64 msgid "No webstream" @@ -3339,15 +3582,15 @@ msgstr "Kein Webstream" #: airtime_mvc/application/views/scripts/error/error.phtml:6 msgid "Zend Framework Default Application" -msgstr "Zend Framework Standardanwendung" +msgstr "Zend Framework Default Application" #: airtime_mvc/application/views/scripts/error/error.phtml:10 msgid "Page not found!" -msgstr "Seite nicht gefunden" +msgstr "Seite nicht gefunden!" #: airtime_mvc/application/views/scripts/error/error.phtml:11 msgid "Looks like the page you were looking for doesn't exist!" -msgstr "Die Seite nach der Sie gesucht haben, existiert nicht!" +msgstr "Scheinbar existiert die Seite die sie suchen nicht!" #: airtime_mvc/application/views/scripts/form/stream-setting-form.phtml:4 msgid "Stream " @@ -3368,11 +3611,13 @@ msgstr "(Erforderlich)" #: airtime_mvc/application/views/scripts/form/stream-setting-form.phtml:77 msgid "Additional Options" -msgstr "Weitere Optionen" +msgstr "Erweiterte Optionen" #: airtime_mvc/application/views/scripts/form/stream-setting-form.phtml:137 -msgid "The following info will be displayed to listeners in their media player:" -msgstr "Die folgenden Informationen werden den Zuhörern in ihren Media-Playern angezeigt:" +msgid "" +"The following info will be displayed to listeners in their media player:" +msgstr "" +"Die folgenden Informationen werden den Zuhörern in ihren Playern angezeigt:" #: airtime_mvc/application/views/scripts/form/stream-setting-form.phtml:170 msgid "(Your radio station website)" @@ -3402,16 +3647,21 @@ msgid "Add" msgstr "Hinzufüg." #: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:43 -msgid "Rescan watched directory (This is useful if it is network mount and may be out of sync with Airtime)" -msgstr "Beobachtetes Verzeichnis rescannen (Dies ist nützlich, wenn es sich um einen Netzwerkordner handelt, der möglicherweise nicht mit Airtime synchron läuft)" +msgid "" +"Rescan watched directory (This is useful if it is network mount and may be " +"out of sync with Airtime)" +msgstr "" +"Überwachte Verzeichnisse nochmals durchsuchen\n" +"(Dies könnte nützlich sein, wenn Airtime beim Synchronisieren mit " +"Netzlaufwerken Schwierigkeiten hat)" #: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:44 msgid "Remove watched directory" -msgstr "Entfernen Sie beobachtetes Verzeichnis" +msgstr "Überwachten Ordner entfernen" #: airtime_mvc/application/views/scripts/form/preferences_watched_dirs.phtml:50 msgid "You are not watching any media folders." -msgstr "Sie beobachten keine Medienordner." +msgstr "Sie überwachen keine Medienordner." #: airtime_mvc/application/views/scripts/form/add-show-rebroadcast-absolute.phtml:4 msgid "Choose Days:" @@ -3428,20 +3678,34 @@ msgstr "Airtime registrieren" #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:6 #, php-format -msgid "Help Airtime improve by letting us know how you are using it. This info will be collected regularly in order to enhance your user experience.%sClick 'Yes, help Airtime' and we'll make sure the features you use are constantly improving." -msgstr "Helfen Sie Airtime, indem Sie uns wissen lassen, wie Sie es verwenden. Diese Informationen werden regelmäßig gesammelt, um Ihre Nutzererfahrung zu verbessern.%sKlicken Sie auf 'Ja, Airtime helfen' und wir bemühen uns, die von Ihnen regelmäßig genutzten Funktionen zu verbessern." +msgid "" +"Help Airtime improve by letting us know how you are using it. This info will " +"be collected regularly in order to enhance your user experience.%sClick " +"'Yes, help Airtime' and we'll make sure the features you use are constantly " +"improving." +msgstr "" +"Helfen sie Airtime, indem sie uns wissen lassen, wie sie es verwenden. Diese " +"Informationen werden regelmäßig gesammelt, um Ihre Nutzererfahrung zu " +"verbessern.%sDrücken sie auf 'Ja, Airtime helfen' und wir versichern, die " +"von ihnen verwendeten Features laufend zu verbessern. " #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:25 #, php-format -msgid "Click the box below to advertise your station on %sSourcefabric.org%s. In order to promote your station, 'Send support feedback' must be enabled. This data will be collected in addition to the support feedback." -msgstr "Klicken Sie auf die unten stehende Box, um Ihre Station auf %sSourcefabric.org%s zu bewerben. Hierzu muss die Option 'Senden Unterstützung feedback' aktiviert sein. Diese Daten werden zusätzlich zum Support Feedback gesammelt." +msgid "" +"Click the box below to advertise your station on %sSourcefabric.org%s. In " +"order to promote your station, 'Send support feedback' must be enabled. This " +"data will be collected in addition to the support feedback." +msgstr "" +"Mit Aktivierung des unteren Kästchens werben sie für ihre Radiostation auf " +"%sSourcefabric.org%s. Dazu muss die Option 'Support Feedback senden' " +"aktiviert sein. Diese Daten werden zusätzlich zum Support Feedback gesammelt." #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:65 #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:79 #: airtime_mvc/application/views/scripts/form/support-setting.phtml:61 #: airtime_mvc/application/views/scripts/form/support-setting.phtml:76 msgid "(for verification purposes only, will not be published)" -msgstr "(Nur für die Zwecke der Überprüfung, wird nicht veröffentlicht)" +msgstr "(Ausschließlich zu Kontrollzwecken, wird nicht veröffentlicht)" #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:150 #: airtime_mvc/application/views/scripts/form/support-setting.phtml:151 @@ -3451,19 +3715,19 @@ msgstr "Hinweis: Grafiken, die größer als 600x600 sind, werden verkleinert." #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:164 #: airtime_mvc/application/views/scripts/form/support-setting.phtml:164 msgid "Show me what I am sending " -msgstr "Zeige mir, was ich sende " +msgstr "Zeige mir was ich sende " #: airtime_mvc/application/views/scripts/form/register-dialog.phtml:178 msgid "Terms and Conditions" -msgstr "Nutzungsbedingungen" +msgstr "Allgemeine Geschäftsbedingungen" #: airtime_mvc/application/views/scripts/form/showbuilder.phtml:7 msgid "Find Shows" -msgstr "Sendungen finden" +msgstr "Suche Sendungen" #: airtime_mvc/application/views/scripts/form/showbuilder.phtml:12 msgid "Filter By Show:" -msgstr "Nach Sendungen filtern:" +msgstr "Filter nach Sendung:" #: airtime_mvc/application/views/scripts/form/preferences_livestream.phtml:2 msgid "Input Stream Settings" @@ -3503,7 +3767,7 @@ msgstr "Wiederholen Tage:" #: airtime_mvc/application/views/scripts/form/daterange.phtml:6 msgid "Filter History" -msgstr "Filter Verlauf" +msgstr "Filter Historie" #: airtime_mvc/application/views/scripts/form/preferences.phtml:5 msgid "Email / Mail Server Settings" @@ -3515,25 +3779,40 @@ msgstr "SoundCloud Einstellungen" #: airtime_mvc/application/views/scripts/form/support-setting.phtml:5 #, php-format -msgid "Help Airtime improve by letting Sourcefabric know how you are using it. This information will be collected regularly in order to enhance your user experience.%sClick the 'Send support feedback' box and we'll make sure the features you use are constantly improving." -msgstr "Helfen Sie uns Airtime zu verbessern, indem Sie Sourcefabric wissen lassen, wie Sie es verwenden. Diese Informationen werden regelmäßig gesammelt, um Ihren Workflow zu verbessern.%sKlicken Sie auf das Feld 'Support Feedback senden' und wir bemühen uns darum, die von Ihnen genutzten Funktionen ständig zu verbessern." +msgid "" +"Help Airtime improve by letting Sourcefabric know how you are using it. This " +"information will be collected regularly in order to enhance your user " +"experience.%sClick the 'Send support feedback' box and we'll make sure the " +"features you use are constantly improving." +msgstr "" +"Helfen sie Airtime, indem sie uns erzählen, wie sie damit arbeiten. Diese " +"Informationen werden regelmäßig gesammelt, um die Erfahrungswerte der " +"Benutzer zu fördern.%sAktivieren sie die Option 'Support Feedback senden' " +"und wir versichern, die von ihnen verwendeten Funktionen laufend zu " +"verbessern." #: airtime_mvc/application/views/scripts/form/support-setting.phtml:23 #, php-format msgid "Click the box below to promote your station on %sSourcefabric.org%s." -msgstr "Klicken Sie auf das unten stehende Feld, damit Ihr Sender auf %sSourcefabric.org%s veröffentlicht wird." +msgstr "" +"Mit Aktivierung des unteren Kästchens werben sie für ihre Radiostation auf " +"%sSourcefabric.org%s. Dazu muss die Option 'Support Feedback senden' " +"aktiviert sein. Diese Daten werden zusätzlich zum Support Feedback gesammelt." #: airtime_mvc/application/views/scripts/form/support-setting.phtml:41 -msgid "(In order to promote your station, 'Send support feedback' must be enabled)." -msgstr "(Um Ihre Station zu veröffentlichen muss 'Support Feedback Senden' aktiviert sein)." +msgid "" +"(In order to promote your station, 'Send support feedback' must be enabled)." +msgstr "" +"(Um ihre Radiostation bewerben zu können, muß 'Support Feedback senden' " +"aktiviert sein)" #: airtime_mvc/application/views/scripts/form/support-setting.phtml:186 msgid "Sourcefabric Privacy Policy" -msgstr "Sourcefabric Datenschutz " +msgstr "Sourcefabric Datenschutzrichtlinie" #: airtime_mvc/application/views/scripts/form/add-show-live-stream.phtml:53 msgid "Connection URL: " -msgstr "Verbindungs-URL: " +msgstr "Verbindung URL:" #: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:3 msgid "Smart Block Options" @@ -3549,16 +3828,16 @@ msgstr "und" #: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:63 msgid " to " -msgstr " auf " +msgstr " bis " #: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:120 #: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:133 msgid "files meet the criteria" -msgstr "Dateien erfüllen die Kriterien" +msgstr "Dateien entsprechen den Kriterien" #: airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml:127 msgid "file meet the criteria" -msgstr "Datei erfüllt die Kriterien" +msgstr "entspricht den Kriterien" #: airtime_mvc/application/views/scripts/showbuilder/builderDialog.phtml:3 #: airtime_mvc/application/views/scripts/library/library.phtml:3 @@ -3584,7 +3863,7 @@ msgstr "dB" #: airtime_mvc/application/views/scripts/preference/stream-setting.phtml:106 msgid "Output Stream Settings" -msgstr "Output Stream Einstellungen" +msgstr "Stream-Ausgabe Einstellungen" #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:13 #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:36 @@ -3595,7 +3874,7 @@ msgstr "Länge:" #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:14 msgid "Sample Rate:" -msgstr "Sample Rate:" +msgstr "Samplerate:" #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:24 msgid "Isrc Number:" @@ -3619,19 +3898,19 @@ msgstr "Statischer Smart Block" #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:48 msgid "Audio Track" -msgstr "Audio Track" +msgstr "Titel-Nr." #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:63 msgid "Playlist Contents: " -msgstr "Inhalte Playlist: " +msgstr "Playlist Inhalt: " #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:65 msgid "Static Smart Block Contents: " -msgstr "Inhalte statischer Smart Block: " +msgstr "Statischer Smart Block Inhalt: " #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:104 msgid "Dynamic Smart Block Criteria: " -msgstr "Kriterien dynamischer Smart Block: " +msgstr "Dynamische Smart Block Kriterien: " #: airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml:137 msgid "Limit to " @@ -3639,43 +3918,8 @@ msgstr "Beschränken auf " #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:512 msgid "Please selection an option" -msgstr "Wählen Sie eine Option aus." +msgstr "Bitte eine Option wählen" #: airtime_mvc/library/propel/contrib/pear/HTML_QuickForm_Propel/Propel.php:531 msgid "No Records" -msgstr "Keine Datensätze" - -#~ msgid "" -#~ "The value should be in timestamp format(eg. 0000-00-00 or 00-00-00 " -#~ "00:00:00)" -#~ msgstr "" -#~ "Der Wert sollte in Zeitstempel-Format vorliegen (z.B. 0000-00-00 oder " -#~ "00-00-00 00:00:00)" - -#, fuzzy -#~ msgid "Playlist" -#~ msgstr "Playlisten" - -#~ msgid "Default Fade (s):" -#~ msgstr "Standard Überblendung(en):" - -#~ msgid "Playlist preview" -#~ msgstr "Playlist Preview" - -#~ msgid "Webstream preview" -#~ msgstr "Webstream Preview" - -#~ msgid "Smart Block" -#~ msgstr "Smart Block" - -#~ msgid "Specific action is not allowed in demo version!" -#~ msgstr "Spezifische Aktion ist in der Demo-Version nicht erlaubt!" - -#~ msgid "Timezone" -#~ msgstr "Zeitzone" - -#~ msgid "File" -#~ msgstr "Datei" - -#~ msgid "Path:" -#~ msgstr "Pfad" +msgstr "Keine Aufzeichnungen" From b95a0d7c4aa2087d013054e2daadf72f5ee781d3 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 18 Jun 2013 16:56:16 -0400 Subject: [PATCH 002/164] CC-5241: deleting a linked show, show comes back in the schedule --- .../application/services/ShowService.php | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 6e20f8729..85de4b543 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -618,29 +618,44 @@ SQL; ->filterByDbShowId($showId) ->filterByDbModifiedInstance(false) ->filterByDbRebroadcast(0) + ->orderByDbStarts() ->find(); if ($ccShowInstances->isEmpty()) { return true; } - //only 1 show instance left of the show, make it non repeating. - else if (count($ccShowInstances) === 1) { - $ccShowInstance = $ccShowInstances[0]; + /* We need to update the last_show in cc_show_days so the instances + * don't get recreated as the user moves forward in the calendar + */ + else if (count($ccShowInstances) >= 1) { + $lastShowDays = array(); + /* Creates an array where the key is the day of the week (monday, + * tuesday, etc.) and the value is the last show date for each + * day of the week. We will use this array to update the last_show + * for each cc_show_days entry of a cc_show + */ + foreach ($ccShowInstances as $instance) { + $instanceStartDT = new DateTime($instance->getDbStarts(), + new DateTimeZone("UTC")); + $lastShowDays[$instanceStartDT->format("w")] = $instanceStartDT; + } - $ccShowDay = CcShowDaysQuery::create() - ->filterByDbShowId($showId) - ->findOne(); - $tz = $ccShowDay->getDbTimezone(); + foreach ($lastShowDays as $dayOfWeek => $lastShowStartDT) { + $ccShowDay = CcShowDaysQuery::create() + ->filterByDbShowId($showId) + ->filterByDbDay($dayOfWeek) + ->findOne(); - $startDate = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC")); - $startDate->setTimeZone(new DateTimeZone($tz)); - $endDate = Application_Service_CalendarService::addDeltas($startDate, 1, 0); + $lastShowStartDT->setTimeZone(new DateTimeZone( + $ccShowDay->getDbTimezone())); + $lastShowEndDT = Application_Service_CalendarService::addDeltas( + $lastShowStartDT, 1, 0); - $ccShowDay->setDbFirstShow($startDate->format("Y-m-d")); - $ccShowDay->setDbLastShow($endDate->format("Y-m-d")); - $ccShowDay->setDbStartTime($startDate->format("H:i:s")); - $ccShowDay->setDbRepeatType(-1); - $ccShowDay->save(); + $ccShowDay + ->setDbLastShow($lastShowEndDT->format("Y-m-d")) + ->save(); + + } //remove the old repeating deleted instances. CcShowInstancesQuery::create() From 28d73264daac4c2669f6564555e26884c67a7bd8 Mon Sep 17 00:00:00 2001 From: drigato Date: Wed, 19 Jun 2013 01:17:32 -0400 Subject: [PATCH 003/164] CC-5240: Overnight Linked Shows, newly generated not getting content --- .../application/services/ShowService.php | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 85de4b543..3efe45e0f 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -179,9 +179,6 @@ class Application_Service_ShowService if (is_null($this->ccShow)) { $ccShowDays = $this->getShowDaysInRange($populateUntil, $end); - if (count($ccShowDays) > 0) { - $this->ccShow = $ccShowDays[0]->getCcShow(); - } } else { $ccShowDays = $this->ccShow->getCcShowDays(); } @@ -190,7 +187,18 @@ class Application_Service_ShowService $populateUntil = $end; } + /* In case the user is moving forward in the calendar and there are + * linked shows in the schedule we need to keep track of each cc_show + * so we know which shows need to be filled with content + */ + $ccShows = array(); + foreach ($ccShowDays as $day) { + $this->ccShow = $day->getCcShow(); + if (!isset($ccShows[$day->getDbShowId()])) { + $ccShows[$day->getDbShowId()] = $day->getccShow(); + } + switch ($day->getDbRepeatType()) { case NO_REPEAT: $this->createNonRepeatingInstance($day, $populateUntil); @@ -212,9 +220,10 @@ class Application_Service_ShowService } } - if (isset($this->ccShow) && ($this->isUpdate || $fillInstances) && - $this->ccShow->isLinked()) { - Application_Service_SchedulerService::fillNewLinkedInstances($this->ccShow); + foreach ($ccShows as $ccShow) { + if (($this->isUpdate || $fillInstances) && $ccShow->isLinked()) { + Application_Service_SchedulerService::fillNewLinkedInstances($ccShow); + } } if (isset($this->linkedShowContent)) { @@ -1499,4 +1508,4 @@ SQL; $repeatInfo->setDbNextPopDate($nextInfo[0]) ->save(); } -} \ No newline at end of file +} From bc16ac079375a274a5950632b90618e3ed200d5b Mon Sep 17 00:00:00 2001 From: drigato Date: Wed, 19 Jun 2013 10:46:28 -0400 Subject: [PATCH 004/164] Updated ko_KR po file. Thanks James Moon! --- .../locale/ko_KR/LC_MESSAGES/airtime.mo | Bin 58929 -> 61175 bytes .../locale/ko_KR/LC_MESSAGES/airtime.po | 62 +++++++++--------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/airtime_mvc/locale/ko_KR/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/ko_KR/LC_MESSAGES/airtime.mo index cafa5aa00c350534f0cfd924e9e2a30436e6871f..55fb6bc86a29c93ebd02dfd6fa06b305e69273a0 100644 GIT binary patch delta 18288 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 delta 16226 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 ZZTcmr`{~b>z1$TZG|l8*k Date: Thu, 20 Jun 2013 15:48:47 +0100 Subject: [PATCH 005/164] Updated dependency versions --- LICENSE_3RD_PARTY | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/LICENSE_3RD_PARTY b/LICENSE_3RD_PARTY index e48f0b314..7096a6f55 100644 --- a/LICENSE_3RD_PARTY +++ b/LICENSE_3RD_PARTY @@ -8,7 +8,7 @@ Common Non-linked Code - Web site: https://github.com/torvalds/linux - License: GPLv2 - * RabbitMQ (works with version 1.7.2 and above) + * RabbitMQ - What is it: Interprocess Message Passing with Queuing - Web site: http://www.rabbitmq.com/ - License: Mozilla Public License (http://www.rabbitmq.com/mpl.html) @@ -63,11 +63,11 @@ Non-linked code: - Web site: http://httpd.apache.org/ - License: Apache 2.0. See http://httpd.apache.org/docs/2.2/license.html - * PostgreSQL 8.4 + * PostgreSQL 9.1 - Web site: http://www.postgresql.org/ - License: The PostgreSQL License. See http://www.postgresql.org/about/licence - * PHP 5.3 + * PHP 5.3 - Web site: http://www.php.net/ - License: The PHP License. See http://www.php.net/license/3_01.txt @@ -137,7 +137,7 @@ Linked code: - License: MIT Non-linked code: - * Python 2.6 + * Python 2.7 - Web site: http://www.python.org/ - License: PSF License. See http://docs.python.org/license.html @@ -158,11 +158,11 @@ Linked code: - Compatible with GPLv3? Yes. Non-linked code: - * Python 2.6 + * Python 2.7 - Web site: http://www.python.org/ - License: PSF License. See http://docs.python.org/license.html - * ecasound 2.7.2 + * ecasound 2.8.1 - What is it: Records audio from line-in - Web site: http://www.eca.cx/ecasound/ - License: GPLv2 @@ -177,10 +177,10 @@ Linked code: - Compatible with GPLv3? Yes. Non-linked code: - * Python 2.6 + * Python 2.7 - Web site: http://www.python.org/ - License: PSF License. See http://docs.python.org/license.html - * Liquidsoap 1.0.1 + * Liquidsoap 1.1.1 - Web site: http://savonet.sourceforge.net/ - License: GPLv2 From 3f9e756912241d76194f21793f4027f8b0739617 Mon Sep 17 00:00:00 2001 From: drigato Date: Thu, 20 Jun 2013 12:56:05 -0400 Subject: [PATCH 006/164] CC-5245: It's able to edit contents for current ON AIR linked show --- airtime_mvc/public/js/airtime/showbuilder/builder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index af532dea3..e3b18b19f 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -485,7 +485,7 @@ var AIRTIME = (function(AIRTIME){ $image, $div, headerIcon; - + fnPrepareSeparatorRow = function fnPrepareSeparatorRow(sRowContent, sClass, iNodeIndex) { $node = $(nRow.children[iNodeIndex]); $node.html(sRowContent); @@ -620,7 +620,7 @@ var AIRTIME = (function(AIRTIME){ } $node = $(nRow.children[0]); - if (aData.allowed === true && aData.scheduled >= 1) { + if (aData.allowed === true && aData.scheduled >= 1 && aData.linked_allowed) { $node.html(''); } else { @@ -841,7 +841,7 @@ var AIRTIME = (function(AIRTIME){ }); $sbTable.find("tbody").on("click", "input:checkbox", function(ev) { - + var $cb = $(this), $tr = $cb.parents("tr"), $prev; From 6b0ab535e51601ec4b8cbb34a2e73d12a1b28a91 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 20 Jun 2013 14:03:13 -0400 Subject: [PATCH 007/164] CC-5244 : Exception when creating Smartblock --- .../application/forms/SmartBlockCriteria.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/forms/SmartBlockCriteria.php b/airtime_mvc/application/forms/SmartBlockCriteria.php index cd588a215..52ea8d86d 100644 --- a/airtime_mvc/application/forms/SmartBlockCriteria.php +++ b/airtime_mvc/application/forms/SmartBlockCriteria.php @@ -5,7 +5,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm private $stringCriteriaOptions; private $numericCriteriaOptions; private $limitOptions; - + /* We need to know if the criteria value will be a string * or numeric value in order to populate the modifier * select list @@ -40,7 +40,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm "info_url" => "s", "year" => "n" ); - + private function getCriteriaOptions($option = null) { if (!isset($this->criteriaOptions)) { @@ -75,7 +75,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm "year" => _("Year") ); } - + if (is_null($option)) return $this->criteriaOptions; else return $this->criteriaOptions[$option]; } @@ -122,7 +122,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm } return $this->limitOptions; } - + public function init() { @@ -259,7 +259,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm $repeatTracks->setChecked($storedCrit["repeat_tracks"]["value"] == 1?true:false); } $this->addElement($repeatTracks); - + $limit = new Zend_Form_Element_Select('sp_limit_options'); $limit->setAttrib('class', 'sp_input_select') ->setDecorators(array('viewHelper')) @@ -268,7 +268,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm $limit->setValue($storedCrit["limit"]["modifier"]); } $this->addElement($limit); - + $limitValue = new Zend_Form_Element_Text('sp_limit_value'); $limitValue->setAttrib('class', 'sp_input_text_limit') ->setLabel(_('Limit to')) @@ -541,7 +541,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm $isValid = false; } // length check - if (intval($d['sp_criteria_value']) >= pow(2,31)) { + if ($d['sp_criteria_value'] >= pow(2,31)) { $element->addError(_("The value should be less then 2147483648")); $isValid = false; } From f82cb364c1c9d3a641b9011fb2ab9f0a31722b8c Mon Sep 17 00:00:00 2001 From: drigato Date: Thu, 20 Jun 2013 15:21:33 -0400 Subject: [PATCH 008/164] CC-5246: Calendar: ON AIR show has an incorrect context menu --- airtime_mvc/application/services/CalendarService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/services/CalendarService.php b/airtime_mvc/application/services/CalendarService.php index b0a98174f..d0091d589 100644 --- a/airtime_mvc/application/services/CalendarService.php +++ b/airtime_mvc/application/services/CalendarService.php @@ -75,10 +75,10 @@ class Application_Service_CalendarService } } else { //Show content can be modified from the calendar if: - // the show has not ended, + // the show has not started, // the user is admin or hosting the show, // the show is not recorded - if ($now < $end && ($isAdminOrPM || $isHostOfShow) && + if ($now < $start && ($isAdminOrPM || $isHostOfShow) && !$this->ccShowInstance->isRecorded() ) { $menu["schedule"] = array( @@ -328,4 +328,4 @@ class Application_Service_CalendarService } } -} \ No newline at end of file +} From 436c74124da839fd89fbaed57593eabd8d68ae81 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 24 Jun 2013 10:34:03 +0100 Subject: [PATCH 009/164] [CC-5248] Configure PHP during airtime-full-install on Apache server --- install_full/php5/airtime.ini | 5 +++++ install_full/ubuntu/airtime-full-install | 20 +++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 install_full/php5/airtime.ini diff --git a/install_full/php5/airtime.ini b/install_full/php5/airtime.ini new file mode 100644 index 000000000..e35f600b0 --- /dev/null +++ b/install_full/php5/airtime.ini @@ -0,0 +1,5 @@ +[PHP] +memory_limit = 512M +magic_quotes_gpc = Off +file_uploads = On +upload_tmp_dir = /tmp diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install index a27cb8a2d..e86151882 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -121,21 +121,31 @@ else apt-get -y --force-yes install apache2 libapache2-mod-php5 # Apache Config File echo "----------------------------------------------------" - echo "2. Apache Config File" + echo "2.1 Apache Config File" echo "----------------------------------------------------" if [ ! -f /etc/apache2/sites-available/airtime ]; then cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime a2dissite default a2ensite airtime - a2enmod rewrite php5 - service apache2 restart else echo "Apache config for Airtime already exists..." fi + + # PHP Config File for Apache + echo "----------------------------------------------------" + echo "2.2 PHP Config File for Apache" + echo "----------------------------------------------------" + if [ ! -f /etc/php5/apache2/airtime.ini ]; then + cp $SCRIPTPATH/../php5/airtime.ini /etc/php5/apache2/airtime.ini + else + echo "Airtime PHP config for Apache already exists..." + fi + + # Enable modules and restart Apache to enable any configuration changes + a2enmod rewrite php5 + service apache2 restart fi - - # Enable Icecast echo "----------------------------------------------------" echo "3. Enable Icecast" From cd90fec258358eb4e23db6c29244933cdac72954 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 24 Jun 2013 11:26:45 +0100 Subject: [PATCH 010/164] Correct php5 config directory and create web root to avoid Apache error --- install_full/ubuntu/airtime-full-install | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install index e86151882..989cb42f3 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -131,12 +131,18 @@ else echo "Apache config for Airtime already exists..." fi + if [ ! -d /usr/share/airtime/public ]; then + mkdir -p /usr/share/airtime/public/ + else + echo "Airtime web root already exists..." + fi + # PHP Config File for Apache echo "----------------------------------------------------" echo "2.2 PHP Config File for Apache" echo "----------------------------------------------------" if [ ! -f /etc/php5/apache2/airtime.ini ]; then - cp $SCRIPTPATH/../php5/airtime.ini /etc/php5/apache2/airtime.ini + cp $SCRIPTPATH/../php5/airtime.ini /etc/php5/apache2/conf.d/airtime.ini else echo "Airtime PHP config for Apache already exists..." fi From d4ee1ef4c67df4d6140dfe680835614d7c7381a6 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 24 Jun 2013 11:35:29 +0100 Subject: [PATCH 011/164] More verbose log messages for airtime-full-install --- install_full/ubuntu/airtime-full-install | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install index 989cb42f3..cb24c5404 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -124,6 +124,7 @@ else echo "2.1 Apache Config File" echo "----------------------------------------------------" if [ ! -f /etc/apache2/sites-available/airtime ]; then + echo "Creating Apache config for Airtime..." cp $SCRIPTPATH/../apache/airtime-vhost /etc/apache2/sites-available/airtime a2dissite default a2ensite airtime @@ -132,9 +133,10 @@ else fi if [ ! -d /usr/share/airtime/public ]; then + echo "Creating Apache web root directory..." mkdir -p /usr/share/airtime/public/ else - echo "Airtime web root already exists..." + echo "Airtime web root directory already exists..." fi # PHP Config File for Apache @@ -142,12 +144,16 @@ else echo "2.2 PHP Config File for Apache" echo "----------------------------------------------------" if [ ! -f /etc/php5/apache2/airtime.ini ]; then + echo "Creating Airtime PHP config for Apache..." cp $SCRIPTPATH/../php5/airtime.ini /etc/php5/apache2/conf.d/airtime.ini else echo "Airtime PHP config for Apache already exists..." fi # Enable modules and restart Apache to enable any configuration changes + echo "----------------------------------------------------" + echo "2.3 Enable Apache Modules and Restart Apache" + echo "----------------------------------------------------" a2enmod rewrite php5 service apache2 restart fi From bec56e5f4b1729fcdea81ecca42343589fcb104d Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 24 Jun 2013 10:19:10 -0400 Subject: [PATCH 012/164] CC-5247 : Single file audition pop-up has non-functional forward and reverse buttons --- .../views/scripts/audiopreview/audio-preview.phtml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml b/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml index e8196913f..fcade27d9 100644 --- a/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml +++ b/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml @@ -18,18 +18,26 @@ '; + var $tp = $(html); + + // if we only want time picker... + if (o.timeOnly === true) { + $tp.prepend('
' + '
' + o.timeOnlyTitle + '
' + '
'); + $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); + } + + // add sliders, adjust grids, add events + for(i=0,l=tp_inst.units.length; i 0) { + size = 100 * gridSize[litem] * o[litem+'Grid'] / (max[litem] - o[litem+'Min']); + $tp.find('.ui_tpicker_'+litem+' table').css({ + width: size + "%", + marginLeft: o.isRTL? '0' : ((size / (-2 * gridSize[litem])) + "%"), + marginRight: o.isRTL? ((size / (-2 * gridSize[litem])) + "%") : '0', + borderCollapse: 'collapse' + }).find("td").click(function(e){ + var $t = $(this), + h = $t.html(), + n = parseInt(h.replace(/[^0-9]/g),10), + ap = h.replace(/[^apm]/ig), + f = $t.data('for'); // loses scope, so we use data-for + + if(f == 'hour'){ + if(ap.indexOf('p') !== -1 && n < 12){ + n += 12; + } + else{ + if(ap.indexOf('a') !== -1 && n === 12){ + n = 0; + } + } + } + + tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], litem, n); + + tp_inst._onTimeChange(); + tp_inst._onSelectHandler(); + }).css({ + cursor: 'pointer', + width: (100 / gridSize[litem]) + '%', + textAlign: 'center', + overflow: 'hidden' + }); + } // end if grid > 0 + } // end for loop + + // Add timezone options + this.timezone_select = $tp.find('.ui_tpicker_timezone').append('').find("select"); + $.fn.append.apply(this.timezone_select, + $.map(o.timezoneList, function(val, idx) { + return $("
+
render('playouthistory/template-contents.phtml'); ?>
\ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index 3979bd3b6..e899d8651 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -7,7 +7,6 @@
  • -
    diff --git a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml index 20f1fb75f..8400933df 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml @@ -1,57 +1,70 @@ -
    - template_id, $this->configured)): ?> - - - -
    +template_type == Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?> +

    Creating File Summary Template

    + +

    Creating Log Sheet Template

    + -
    +
    + +
      template_fields as $field): ?> - -
    • " - data-id="" + +
    • " + data-id="" data-name="" - data-label="" - data-type="" + data-label="" + data-type="" data-filemd=""> required_fields)): ?> - Remove + + +
    • - +
    +

    Add more elements:

    +
      fileMD as $md): ?> - -
    • " - data-name="" + +
    • " + data-name="" data-type="" data-label=""> +
    template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?>
    -
    Add New Field
    -
    - - - -
    + + + +
    + +
    + template_id, $this->configured)): ?> + + +
    \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/template.phtml b/airtime_mvc/application/views/scripts/playouthistory/template.phtml index 44dd48bae..aa23f0162 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/template.phtml @@ -1,7 +1,7 @@ -
    +
    -
    Edit Log Sheet Template
    +

    Log Sheet Templates

    +
    +

    -
    Edit File Summary Template
    +

    File Summary Templates

    +
    - -
    \ No newline at end of file diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css new file mode 100644 index 000000000..b833ff94e --- /dev/null +++ b/airtime_mvc/public/css/history_styles.css @@ -0,0 +1,120 @@ +#history_template h4, #configure_item_template h4 { font-size: 14px; margin-top: 0px; } + +#history_template ul, #configure_item_template ul { list-style: none; padding-left: 0px; } + +#history_template li, #configure_item_template li { + clear: both; + background: #AAAAAA; + margin: 2px 0 4px 0; + padding: 4px 8px 4px 8px; + position: relative; + border-radius: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border: 1px solid #9F9F9F; + min-height: 15px; +} + +#history_template li a, #configure_item_template li a { + text-decoration: none; +} + +#history_template li a:hover, #configure_item_template li a:hover { + text-decoration: underline; +} + +#history_template li .template_name { + float: left; +} + +#history_template li.template_configured { + background: #9A9A9A; + border: 1px solid #858585; +} + +#history_template .template_remove, #history_template .template_default { + float: right; + margin-left: 10px; +} + +#history_template .template_default { + margin-left: 20px; +} + +#history_template .icon-ok { + right: 10px; + margin-left: 10px; + position: absolute; +} + +#configure_item_template li span { + cursor: move; + padding-left: 6px; +} + +#configure_item_template li .template_item_remove, #configure_item_template li .field_add { + cursor: pointer; + float: right; + margin-left: 20px; +} + +#configure_item_template li .template_item_remove:hover, #configure_item_template li .field_add:hover { + opacity:0.7; + filter:alpha(opacity=70); +} + +#configure_item_template #template_name { + min-width: 230px; + float: right; +} + +#configure_item_template .template_name_wrap { + display: inline-block; +} + +#configure_item_template label { + vertical-align: middle; +} + +#configure_item_template .template_item_add { + margin-bottom: 10px; +} + +#configure_item_template .template_item_add .btn { + padding: 2px 14px 1px; +} + +#configure_item_template .template_item_list li { + background-image: url('../css/images/drag.png'); + background-repeat: no-repeat; + background-position: 4px 5px; +} + +/* Bootstrap calendar + +.bootstrap-datetimepicker-widget ul { + padding-left: 0px !important; +} + +.bootstrap-datetimepicker-widget td, .bootstrap-datetimepicker-widget th { + -webkit-border-radius: 2px !important; + -moz-border-radius: 2px !important; + border-radius: 2px !important; +} + +*/ + +/* Edit History Record */ + +.ui-dialog form.ui-widget-content dd { + margin-left: 0px; + margin-bottom: 10px; +} + +.ui-dialog form.ui-widget-content dt { + margin-bottom: 2px; +} + +.ui-dialog form.ui-widget-content dd input { + width: 190px; +} \ No newline at end of file diff --git a/airtime_mvc/public/css/images/drag.png b/airtime_mvc/public/css/images/drag.png new file mode 100644 index 0000000000000000000000000000000000000000..435c5e5515d50539056c8a44ee625538cbf53482 GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)J!3HGPO;3=*#Y$WwN}P*Q6H7Al^Atidb5j`%Ec6Y{^bL)-YVV%_R3QUW5uBe^ zQl40p%HWuipOmWLmRXcqo?nz*tl%7MTDbMG8Bm?2r;B5V#MGxf8#xa+2po2~_T!t` zzC@dO`-)ER8LkjuT0F^RYLI&8bD8q%ZB|;mOaC#P;km!}-{jlen;6zD;P3eM3}^_0 Mr>mdKI;Vst0D%5SRR910 literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index f755c47b7..8f54c9879 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -32,7 +32,7 @@ var AIRTIME = (function(AIRTIME) { ">" + "<%= label %>" + "<%= type %>" + - "Remove" + + "" + ""; var template = (config.required) === true ? templateRequired : templateOptional; @@ -65,9 +65,9 @@ var AIRTIME = (function(AIRTIME) { $templateList = $(".template_item_list"); $fileMDList = $(".template_file_md"); - $fileMDList.on("dblclick", "li", function(){ + $fileMDList.on("click", "i.icon-plus", function(){ - var $li = $(this); + var $li = $(this).parents("li"); var config = { name: $li.data("name"), type: $li.data("type"), diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index d988cdafb..f5e0c3687 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -93,6 +93,36 @@ var AIRTIME = (function(AIRTIME) { } ); } + function createToolbarButtons ($el) { + var $menu = $("
    "); + + $menu.append("
    " + + "" + + "" + + "
    "); + + $menu.append("
    " + + "" + + "
    "); + + $menu.append("
    " + + "" + + "
    "); + + $el.append($menu); + } + function aggregateHistoryTable() { var oTable, $historyTableDiv = $historyContentDiv.find("#history_table_aggregate"), @@ -134,6 +164,7 @@ var AIRTIME = (function(AIRTIME) { function itemHistoryTable() { var oTable, $historyTableDiv = $historyContentDiv.find("#history_table_list"), + $toolbar, columns, fnRowCallback, booleans = {}, @@ -157,9 +188,13 @@ var AIRTIME = (function(AIRTIME) { b, text, $nRow = $(nRow); + + // add checkbox + $nRow.find('td.his_checkbox').html(""); - nRow.setAttribute('url-edit', editUrl); - nRow.setAttribute('url-delete', deleteUrl); + nRow.setAttribute('his-id', aData.history_id); + //nRow.setAttribute('url-edit', editUrl); + //nRow.setAttribute('url-delete', deleteUrl); for (b in booleans) { @@ -189,6 +224,9 @@ var AIRTIME = (function(AIRTIME) { "oTableTools": oTableTools }); oTable.fnSetFilteringDelay(350); + + $toolbar = $historyTableDiv.parents(".dataTables_wrapper").find(".fg-toolbar:first"); + createToolbarButtons($toolbar); return oTable; } @@ -313,6 +351,7 @@ var AIRTIME = (function(AIRTIME) { } } + /* $historyContentDiv.on("click", "#history_table_list tr", function(ev) { openRow(oTableItem, this); }); @@ -320,6 +359,7 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.on("click", "#history_table_aggregate tr", function(ev) { openRow(oTableAgg, this); }); + */ $("#his_create").click(function(e) { var url = baseUrl+"playouthistory/edit-list-item/format/json" ; @@ -434,6 +474,72 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.find("#his-tabs").tabs(); + // begin context menu initialization. + $.contextMenu({ + selector: '#history_table_list td:not(.library_checkbox)', + trigger: "left", + ignoreRightClick: true, + + build: function($el, e) { + var items, + callback, + $tr, + id; + + $tr = $el.parents("tr"); + id = $tr.get(0).getAttribute("his-id"); + + function processMenuItems(oItems) { + + // define an edit callback. + if (oItems.edit !== undefined) { + + callback = function() { + $.post(oItems.edit.url, {format: "json"}, function(json) { + + makeHistoryDialog(json.dialog); + + }, "json"); + }; + + oItems.edit.callback = callback; + } + + // define a delete callback. + if (oItems.del !== undefined) { + + callback = function() { + var c = confirm("Delete this entry?"); + + if (c) { + $.post(oItems.del.url, {format: "json"}, function(json) { + oTableItem.fnDraw(); + }); + } + }; + + oItems.del.callback = callback; + } + + items = oItems; + } + + request = $.ajax({ + url: baseUrl+"playouthistory/context-menu", + type: "GET", + data: {id : id, format: "json"}, + dataType: "json", + async: false, + success: function(json){ + processMenuItems(json.items); + } + }); + + return { + items: items + }; + } + }); }; return AIRTIME; From 3ea2b920a61508fee4efc163f3e605d44c4261cc Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 19 Aug 2013 23:20:26 -0400 Subject: [PATCH 088/164] crlf --- .../controllers/PlayouthistoryController.php | 14 +- .../application/services/HistoryService.php | 2 +- airtime_mvc/public/css/history_styles.css | 238 +++++++++--------- 3 files changed, 127 insertions(+), 127 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 05d8d841d..0c04481f2 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -83,24 +83,24 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendScript($script); } - public function contextMenuAction() + public function contextMenuAction() { - $baseUrl = Application_Common_OsPath::getBaseDir(); + $baseUrl = Application_Common_OsPath::getBaseDir(); $id = $this->_getParam('id'); $menu = array(); - $menu["edit"] = array( - "name"=> _("Edit"), - "icon" => "edit", - "url" => $baseUrl."playouthistory/edit-list-item/id/{$id}" + $menu["edit"] = array( + "name"=> _("Edit"), + "icon" => "edit", + "url" => $baseUrl."playouthistory/edit-list-item/id/{$id}" ); $menu["del"] = array( "name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."playouthistory/delete-list-item/id/{$id}" - ); + ); $this->view->items = $menu; } diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 4890053e3..a2ae5b6b6 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -1054,7 +1054,7 @@ class Application_Service_HistoryService try { $template = $this->getConfiguredItemTemplate(); - $fields = $template["fields"]; + $fields = $template["fields"]; $columns = $this->datatablesColumns($fields); array_unshift($columns, $checkbox); diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index b833ff94e..4e6a5ede8 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -1,120 +1,120 @@ -#history_template h4, #configure_item_template h4 { font-size: 14px; margin-top: 0px; } - -#history_template ul, #configure_item_template ul { list-style: none; padding-left: 0px; } - -#history_template li, #configure_item_template li { - clear: both; - background: #AAAAAA; - margin: 2px 0 4px 0; - padding: 4px 8px 4px 8px; - position: relative; - border-radius: 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border: 1px solid #9F9F9F; - min-height: 15px; -} - -#history_template li a, #configure_item_template li a { - text-decoration: none; -} - -#history_template li a:hover, #configure_item_template li a:hover { - text-decoration: underline; -} - -#history_template li .template_name { - float: left; -} - -#history_template li.template_configured { - background: #9A9A9A; - border: 1px solid #858585; -} - -#history_template .template_remove, #history_template .template_default { - float: right; - margin-left: 10px; -} - -#history_template .template_default { - margin-left: 20px; -} - -#history_template .icon-ok { - right: 10px; - margin-left: 10px; - position: absolute; -} - -#configure_item_template li span { - cursor: move; - padding-left: 6px; -} - -#configure_item_template li .template_item_remove, #configure_item_template li .field_add { - cursor: pointer; - float: right; - margin-left: 20px; -} - -#configure_item_template li .template_item_remove:hover, #configure_item_template li .field_add:hover { - opacity:0.7; - filter:alpha(opacity=70); -} - -#configure_item_template #template_name { - min-width: 230px; - float: right; -} - -#configure_item_template .template_name_wrap { - display: inline-block; -} - -#configure_item_template label { - vertical-align: middle; -} - -#configure_item_template .template_item_add { - margin-bottom: 10px; -} - -#configure_item_template .template_item_add .btn { - padding: 2px 14px 1px; -} - -#configure_item_template .template_item_list li { - background-image: url('../css/images/drag.png'); - background-repeat: no-repeat; - background-position: 4px 5px; -} - -/* Bootstrap calendar - -.bootstrap-datetimepicker-widget ul { - padding-left: 0px !important; -} - -.bootstrap-datetimepicker-widget td, .bootstrap-datetimepicker-widget th { - -webkit-border-radius: 2px !important; - -moz-border-radius: 2px !important; - border-radius: 2px !important; -} - -*/ - -/* Edit History Record */ - -.ui-dialog form.ui-widget-content dd { - margin-left: 0px; - margin-bottom: 10px; -} - -.ui-dialog form.ui-widget-content dt { - margin-bottom: 2px; -} - -.ui-dialog form.ui-widget-content dd input { - width: 190px; +#history_template h4, #configure_item_template h4 { font-size: 14px; margin-top: 0px; } + +#history_template ul, #configure_item_template ul { list-style: none; padding-left: 0px; } + +#history_template li, #configure_item_template li { + clear: both; + background: #AAAAAA; + margin: 2px 0 4px 0; + padding: 4px 8px 4px 8px; + position: relative; + border-radius: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border: 1px solid #9F9F9F; + min-height: 15px; +} + +#history_template li a, #configure_item_template li a { + text-decoration: none; +} + +#history_template li a:hover, #configure_item_template li a:hover { + text-decoration: underline; +} + +#history_template li .template_name { + float: left; +} + +#history_template li.template_configured { + background: #9A9A9A; + border: 1px solid #858585; +} + +#history_template .template_remove, #history_template .template_default { + float: right; + margin-left: 10px; +} + +#history_template .template_default { + margin-left: 20px; +} + +#history_template .icon-ok { + right: 10px; + margin-left: 10px; + position: absolute; +} + +#configure_item_template li span { + cursor: move; + padding-left: 6px; +} + +#configure_item_template li .template_item_remove, #configure_item_template li .field_add { + cursor: pointer; + float: right; + margin-left: 20px; +} + +#configure_item_template li .template_item_remove:hover, #configure_item_template li .field_add:hover { + opacity:0.7; + filter:alpha(opacity=70); +} + +#configure_item_template #template_name { + min-width: 230px; + float: right; +} + +#configure_item_template .template_name_wrap { + display: inline-block; +} + +#configure_item_template label { + vertical-align: middle; +} + +#configure_item_template .template_item_add { + margin-bottom: 10px; +} + +#configure_item_template .template_item_add .btn { + padding: 2px 14px 1px; +} + +#configure_item_template .template_item_list li { + background-image: url('../css/images/drag.png'); + background-repeat: no-repeat; + background-position: 4px 5px; +} + +/* Bootstrap calendar + +.bootstrap-datetimepicker-widget ul { + padding-left: 0px !important; +} + +.bootstrap-datetimepicker-widget td, .bootstrap-datetimepicker-widget th { + -webkit-border-radius: 2px !important; + -moz-border-radius: 2px !important; + border-radius: 2px !important; +} + +*/ + +/* Edit History Record */ + +.ui-dialog form.ui-widget-content dd { + margin-left: 0px; + margin-bottom: 10px; +} + +.ui-dialog form.ui-widget-content dt { + margin-bottom: 2px; +} + +.ui-dialog form.ui-widget-content dd input { + width: 190px; } \ No newline at end of file From 10ef55b08368f1ac494c1019f67d9145f21a1197 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 14:58:22 -0400 Subject: [PATCH 089/164] context menu just in the client now. works for both tables. --- .../controllers/PlayouthistoryController.php | 23 ---- .../js/airtime/playouthistory/historytable.js | 105 ++++++++---------- 2 files changed, 49 insertions(+), 79 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 0c04481f2..7f3bc0f6d 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -8,7 +8,6 @@ class PlayouthistoryController extends Zend_Controller_Action $ajaxContext ->addActionContext('file-history-feed', 'json') ->addActionContext('item-history-feed', 'json') - ->addActionContext('context-menu', 'json') ->addActionContext('edit-file-item', 'json') ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') @@ -83,28 +82,6 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendScript($script); } - public function contextMenuAction() - { - $baseUrl = Application_Common_OsPath::getBaseDir(); - $id = $this->_getParam('id'); - - $menu = array(); - - $menu["edit"] = array( - "name"=> _("Edit"), - "icon" => "edit", - "url" => $baseUrl."playouthistory/edit-list-item/id/{$id}" - ); - - $menu["del"] = array( - "name"=> _("Delete"), - "icon" => "delete", - "url" => $baseUrl."playouthistory/delete-list-item/id/{$id}" - ); - - $this->view->items = $menu; - } - public function fileHistoryFeedAction() { try { diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index f5e0c3687..f8bf2cb9b 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -130,9 +130,10 @@ var AIRTIME = (function(AIRTIME) { fnRowCallback; fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - var editUrl = baseUrl+"Playouthistory/edit-file-item/format/json/id/"+aData.file_id; + var editUrl = baseUrl+"playouthistory/edit-file-item/id/"+aData.file_id, + $nRow = $(nRow); - nRow.setAttribute('url-edit', editUrl); + $nRow.data('url-edit', editUrl); }; columns = JSON.parse(localStorage.getItem('datatables-historyfile-aoColumns')); @@ -181,8 +182,8 @@ var AIRTIME = (function(AIRTIME) { } fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { - var editUrl = baseUrl+"playouthistory/edit-list-item/format/json/id/"+aData.history_id, - deleteUrl = baseUrl+"playouthistory/delete-list-item/format/json/id/"+aData.history_id, + var editUrl = baseUrl+"playouthistory/edit-list-item/id/"+aData.history_id, + deleteUrl = baseUrl+"playouthistory/delete-list-item/id/"+aData.history_id, emptyCheckBox = String.fromCharCode(parseInt(2610, 16)), checkedCheckBox = String.fromCharCode(parseInt(2612, 16)), b, @@ -192,9 +193,9 @@ var AIRTIME = (function(AIRTIME) { // add checkbox $nRow.find('td.his_checkbox').html(""); - nRow.setAttribute('his-id', aData.history_id); - //nRow.setAttribute('url-edit', editUrl); - //nRow.setAttribute('url-delete', deleteUrl); + $nRow.data('his-id', aData.history_id); + $nRow.data('url-edit', editUrl); + $nRow.data('url-delete', deleteUrl); for (b in booleans) { @@ -355,6 +356,7 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.on("click", "#history_table_list tr", function(ev) { openRow(oTableItem, this); }); + $historyContentDiv.on("click", "#history_table_aggregate tr", function(ev) { openRow(oTableAgg, this); @@ -476,65 +478,56 @@ var AIRTIME = (function(AIRTIME) { // begin context menu initialization. $.contextMenu({ - selector: '#history_table_list td:not(.library_checkbox)', + selector: '#history_content td:not(.his_checkbox)', trigger: "left", ignoreRightClick: true, build: function($el, e) { - var items, + var items = {}, callback, - $tr, - id; + $tr; $tr = $el.parents("tr"); - id = $tr.get(0).getAttribute("his-id"); - - function processMenuItems(oItems) { + + var editUrl = $tr.data("url-edit"); + var deleteUrl = $tr.data("url-delete"); + + if (editUrl !== undefined) { + + callback = function() { + $.post(editUrl, {format: "json"}, function(json) { + + makeHistoryDialog(json.dialog); + + }, "json"); + }; - // define an edit callback. - if (oItems.edit !== undefined) { - - callback = function() { - $.post(oItems.edit.url, {format: "json"}, function(json) { - - makeHistoryDialog(json.dialog); - - }, "json"); - }; - - oItems.edit.callback = callback; - } - - // define a delete callback. - if (oItems.del !== undefined) { - - callback = function() { - var c = confirm("Delete this entry?"); - - if (c) { - $.post(oItems.del.url, {format: "json"}, function(json) { - oTableItem.fnDraw(); - }); - } - }; - - oItems.del.callback = callback; - } - - items = oItems; + items["edit"] = { + "name": $.i18n._("Edit"), + "icon": "edit", + "callback": callback + }; + } + + if (deleteUrl !== undefined) { + + callback = function() { + var c = confirm("Delete this entry?"); + + if (c) { + $.post(deleteUrl, {format: "json"}, function(json) { + oTableItem.fnDraw(); + }); + } + }; + + items["del"] = { + "name": $.i18n._("Delete"), + "icon": "delete", + "callback": callback + }; } - request = $.ajax({ - url: baseUrl+"playouthistory/context-menu", - type: "GET", - data: {id : id, format: "json"}, - dataType: "json", - async: false, - success: function(json){ - processMenuItems(json.items); - } - }); - return { items: items }; From 6d5febe4f708df836513d9feadd198b173e9398c Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 15:18:05 -0400 Subject: [PATCH 090/164] getting rid of characters from a field name that may cause problems. --- .../application/controllers/PlayouthistoryController.php | 1 - .../js/airtime/playouthistory/configuretemplate.js | 3 +-- .../public/js/airtime/playouthistory/historytable.js | 9 +++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 7f3bc0f6d..6427b9acc 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -125,7 +125,6 @@ class PlayouthistoryController extends Zend_Controller_Action $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); $historyService = new Application_Service_HistoryService(); - //$r = $historyService->getListView($startsDT, $endsDT, $params); $r = $historyService->getPlayedItemData($startsDT, $endsDT, $params); $this->view->sEcho = $r["sEcho"]; diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 8f54c9879..50223732f 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -90,8 +90,7 @@ var AIRTIME = (function(AIRTIME) { label = $div.find("input").val(), name; - name = label.replace(" ", ""); - name = name.toLowerCase(); + name = label.toLowerCase().replace(/[^a-z0-9]+/g, ""); var config = { name: name, diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index f8bf2cb9b..ea209976e 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -485,12 +485,13 @@ var AIRTIME = (function(AIRTIME) { build: function($el, e) { var items = {}, callback, - $tr; + $tr, + editUrl, + deleteUrl; $tr = $el.parents("tr"); - - var editUrl = $tr.data("url-edit"); - var deleteUrl = $tr.data("url-delete"); + editUrl = $tr.data("url-edit"); + deleteUrl = $tr.data("url-delete"); if (editUrl !== undefined) { From 2e572c652c7c3439f8e9d3a7499c9213b134435c Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 15:31:13 -0400 Subject: [PATCH 091/164] creating a random string for field names to work for all languages. --- airtime_mvc/application/services/HistoryService.php | 1 + .../public/js/airtime/playouthistory/configuretemplate.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index a2ae5b6b6..c55a2c5df 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -498,6 +498,7 @@ class Application_Service_HistoryService foreach($template["fields"] as $index => $field) { $key = $field["name"]; + $value = ""; if (in_array($key, $required)) { diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 50223732f..26fad4a30 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -90,7 +90,8 @@ var AIRTIME = (function(AIRTIME) { label = $div.find("input").val(), name; - name = label.toLowerCase().replace(/[^a-z0-9]+/g, ""); + //create a string name that will work for all languages. + name = Math.random().toString(36).substring(7); var config = { name: name, From 007a7ee7efc3341647a208f76e356402ff54f441 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 17:23:15 -0400 Subject: [PATCH 092/164] casting non mandatory types from "", to avoid database query problems. --- .../controllers/PlayouthistoryController.php | 9 ++ .../application/services/HistoryService.php | 41 +++++- .../js/airtime/playouthistory/historytable.js | 135 +++++++----------- 3 files changed, 100 insertions(+), 85 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 6427b9acc..e331db127 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -12,6 +12,7 @@ class PlayouthistoryController extends Zend_Controller_Action ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') ->addActionContext('delete-list-item', 'json') + ->addActionContext('delete-list-items', 'json') ->addActionContext('update-list-item', 'json') ->addActionContext('update-file-item', 'json') ->addActionContext('create-template', 'json') @@ -192,6 +193,14 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $historyService->deletePlayedItem($history_id); } + + public function deleteListItemsAction() + { + $history_ids = $this->_getParam('ids'); + + $historyService = new Application_Service_HistoryService(); + $historyService->deletePlayedItems($history_ids); + } public function updateListItemAction() { diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index c55a2c5df..3eb3ca6a8 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -638,6 +638,7 @@ class Application_Service_HistoryService $metadata = array(); $fields = $template["fields"]; $required = $this->mandatoryItemFields(); + $phpCasts = $this->getPhpCasts(); for ($i = 0, $len = count($fields); $i < $len; $i++) { @@ -650,14 +651,14 @@ class Application_Service_HistoryService } $isFileMd = $field["isFileMd"]; - $entry = $templateValues[$prefix.$key]; + $entry = $phpCasts[$field["type"]]($templateValues[$prefix.$key]); if ($isFileMd && isset($file)) { - Logging::info("adding metadata associated to a file for {$key}"); + Logging::info("adding metadata associated to a file for {$key} = {$entry}"); $md[$key] = $entry; } else { - Logging::info("adding metadata for {$key}"); + Logging::info("adding metadata for {$key} = {$entry}"); $metadata[$key] = $entry; } } @@ -824,6 +825,25 @@ class Application_Service_HistoryService throw $e; } } + + /* id is an id in cc_playout_history */ + public function deletePlayedItems($ids) { + + $this->con->beginTransaction(); + + try { + + $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); + $records->delete($this->con); + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + Logging::info($e); + throw $e; + } + } //---------------- Following code is for History Templates --------------------------// @@ -842,6 +862,21 @@ class Application_Service_HistoryService return $fields; } + + private function getPhpCasts() { + + $fields = array( + TEMPLATE_DATE => "strval", + TEMPLATE_TIME => "strval", + TEMPLATE_DATETIME => "strval", + TEMPLATE_STRING => "strval", + TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? + TEMPLATE_INT => "intval", + TEMPLATE_FLOAT => "floatval", + ); + + return $fields; + } private function getSqlTypes() { diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index ea209976e..86daa7abe 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -39,6 +39,26 @@ var AIRTIME = (function(AIRTIME) { var sDom = 'l<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>'; + var selectedLogItems = {}; + + function getSelectedLogItems() { + var items = Object.keys(selectedLogItems); + + return items; + } + + function addSelectedLogItem(id) { + selectedLogItems[id] = ""; + } + + function removeSelectedLogItem(id) { + delete selectedLogItems[id]; + } + + function emptySelectedLogItems() { + selectedLogItems = {}; + } + function getFileName(ext){ var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"; filename = filename.replace(/:/g,"h"); @@ -249,6 +269,11 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv = $("#history_content"); + function redrawTables() { + oTableAgg.fnDraw(); + oTableItem.fnDraw(); + } + function removeHistoryDialog() { $hisDialogEl.dialog("destroy"); $hisDialogEl.remove(); @@ -315,54 +340,6 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings); $historyContentDiv.find(timeEndId).timepicker(oBaseTimePickerSettings); - // 'open' an information row when a row is clicked on - //for create/edit/delete - function openRow(oTable, tr) { - var links = ['url-edit', 'url-delete'], - i, len, - attr, - name, - $link, - $div; - - $div = $("
    "); - - for (i = 0, len = links.length; i < len; i++) { - - attr = links[i]; - - if (tr.hasAttribute(attr)) { - name = attr.split("-")[1]; - - $link = $("", { - "href": tr.getAttribute(attr), - "text": $.i18n._(name), - "class": "his_"+name - }); - - $div.append($link); - } - } - - if (oTable.fnIsOpen(tr)) { - oTable.fnClose(tr); - } - else { - oTable.fnOpen(tr, $div, "his_update"); - } - } - - /* - $historyContentDiv.on("click", "#history_table_list tr", function(ev) { - openRow(oTableItem, this); - }); - - - $historyContentDiv.on("click", "#history_table_aggregate tr", function(ev) { - openRow(oTableAgg, this); - }); - */ - $("#his_create").click(function(e) { var url = baseUrl+"playouthistory/edit-list-item/format/json" ; @@ -374,35 +351,6 @@ var AIRTIME = (function(AIRTIME) { }, "json"); }); - - $historyContentDiv.on("click", "a.his_edit", function(e) { - var url = e.target.href; - - e.preventDefault(); - - $.get(url, function(json) { - - makeHistoryDialog(json.dialog); - - }, "json"); - }); - - $historyContentDiv.on("click", "a.his_delete", function(e) { - var url = e.target.href, - doDelete; - - e.preventDefault(); - - doDelete = confirm($.i18n._("Delete this history record?")); - - if (doDelete) { - $.post(url, function(json) { - oTableAgg.fnDraw(); - oTableItem.fnDraw(); - - }, "json"); - } - }); $('body').on("click", ".his_file_cancel, .his_item_cancel", function(e) { removeHistoryDialog(); @@ -425,7 +373,7 @@ var AIRTIME = (function(AIRTIME) { } else { removeHistoryDialog(); - oTableAgg.fnDraw(); + redrawTables(); } }, "json"); @@ -453,12 +401,26 @@ var AIRTIME = (function(AIRTIME) { } else { removeHistoryDialog(); - oTableItem.fnDraw(); + redrawTables(); } }, "json"); - }); + }); + + + $historyContentDiv.on("click", ".his_checkbox input", function(e) { + var checked = e.currentTarget.checked, + $tr = $(e.currentTarget).parents("tr"), + id = $tr.data("his-id"); + + if (checked) { + addSelectedLogItem(id); + } + else { + removeSelectedLogItem(id); + } + }); $historyContentDiv.find("#his_submit").click(function(ev){ var fn, @@ -470,8 +432,16 @@ var AIRTIME = (function(AIRTIME) { fn.start = oRange.start; fn.end = oRange.end; - oTableAgg.fnDraw(); - oTableItem.fnDraw(); + redrawTables(); + }); + + $historyContentDiv.find("#his_trash").click(function(ev){ + var items = getSelectedLogItems(), + url = baseUrl+"playouthistory/delete-list-items"; + + $.post(url, {ids: items, format: "json"}, function(){ + redrawTables(); + }); }); $historyContentDiv.find("#his-tabs").tabs(); @@ -518,6 +488,7 @@ var AIRTIME = (function(AIRTIME) { if (c) { $.post(deleteUrl, {format: "json"}, function(json) { oTableItem.fnDraw(); + oTableAgg.fnDraw(); }); } }; From 84efdfd64a45c92d64d8cea891792d5c7950b82c Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 20 Aug 2013 17:23:48 -0400 Subject: [PATCH 093/164] crlf --- .../controllers/PlayouthistoryController.php | 12 ++-- .../application/services/HistoryService.php | 60 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index e331db127..7bf911837 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -194,12 +194,12 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService->deletePlayedItem($history_id); } - public function deleteListItemsAction() - { - $history_ids = $this->_getParam('ids'); - - $historyService = new Application_Service_HistoryService(); - $historyService->deletePlayedItems($history_ids); + public function deleteListItemsAction() + { + $history_ids = $this->_getParam('ids'); + + $historyService = new Application_Service_HistoryService(); + $historyService->deletePlayedItems($history_ids); } public function updateListItemAction() diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 3eb3ca6a8..db36b2856 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -826,23 +826,23 @@ class Application_Service_HistoryService } } - /* id is an id in cc_playout_history */ - public function deletePlayedItems($ids) { - - $this->con->beginTransaction(); - - try { - - $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); - $records->delete($this->con); - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - Logging::info($e); - throw $e; - } + /* id is an id in cc_playout_history */ + public function deletePlayedItems($ids) { + + $this->con->beginTransaction(); + + try { + + $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); + $records->delete($this->con); + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + Logging::info($e); + throw $e; + } } @@ -863,19 +863,19 @@ class Application_Service_HistoryService return $fields; } - private function getPhpCasts() { - - $fields = array( - TEMPLATE_DATE => "strval", - TEMPLATE_TIME => "strval", - TEMPLATE_DATETIME => "strval", - TEMPLATE_STRING => "strval", - TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? - TEMPLATE_INT => "intval", - TEMPLATE_FLOAT => "floatval", - ); - - return $fields; + private function getPhpCasts() { + + $fields = array( + TEMPLATE_DATE => "strval", + TEMPLATE_TIME => "strval", + TEMPLATE_DATETIME => "strval", + TEMPLATE_STRING => "strval", + TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? + TEMPLATE_INT => "intval", + TEMPLATE_FLOAT => "floatval", + ); + + return $fields; } private function getSqlTypes() { From 17abb4ad9a7421c6a8ea9b01a17d542c0bbe8bd8 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Wed, 21 Aug 2013 21:44:52 -0400 Subject: [PATCH 094/164] need a better random field name generator to avoid problems --- .../airtime/playouthistory/configuretemplate.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 26fad4a30..0fc00acd9 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -43,6 +43,19 @@ var AIRTIME = (function(AIRTIME) { return $li; } + //taken from + //http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript + function randomString(len, charSet) { + //can only use small letters to avoid DB query problems. + charSet = charSet || 'abcdefghijklmnopqrstuvwxyz'; + var randomString = ''; + for (var i = 0; i < len; i++) { + var randomPoz = Math.floor(Math.random() * charSet.length); + randomString += charSet.substring(randomPoz,randomPoz+1); + } + return randomString; + } + function addField(config) { $templateList.append(createTemplateLi(config)); @@ -91,7 +104,7 @@ var AIRTIME = (function(AIRTIME) { name; //create a string name that will work for all languages. - name = Math.random().toString(36).substring(7); + name = randomString(10); var config = { name: name, From fa6de28bcf8a77c1c1ef6b71261bcff8a6fd62b7 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 22 Aug 2013 14:15:40 -0400 Subject: [PATCH 095/164] not allowing double file metadata to be added to avoid query problems. --- .../scripts/playouthistory/template-contents.phtml | 12 +++++++++++- .../js/airtime/playouthistory/configuretemplate.js | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml index 8400933df..3beb495dd 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml @@ -11,11 +11,17 @@
    - +
    "}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
    '+''+DPGlobal.headTemplate+""+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    ";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
    '+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
    "+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+(showSeconds?'
    '+''+"
    "+"
    ":"")}})(window.jQuery); \ No newline at end of file From dd0115f573d47875a1e18342e7edebe795ff2396 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 11:53:31 -0400 Subject: [PATCH 107/164] proper showTimeFirst file --- .../bootstrap-datetimepicker.js | 1281 ++++++++++++++++- 1 file changed, 1280 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js index a30f77645..7e600784a 100644 --- a/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js +++ b/airtime_mvc/public/js/bootstrap-datetime/bootstrap-datetimepicker.js @@ -23,4 +23,1283 @@ * limitations under the License. * ========================================================= */ -(function($){var smartPhone=window.orientation!=undefined;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};var dateToDate=function(dt){if(typeof dt==="string"){return new Date(dt)}return dt};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.find(".input-append")||this.$element.find(".input-prepend"))this.component=this.$element.find(".add-on");this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}this.widget=$(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat,options.pickSeconds,options.collapse)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(options.startDate||this.$element.data("date-startdate"));this.setEndDate(options.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var collapse=this.widget.find(".collapse");for(var i=0;i");while(dowCnt'+dates[this.language].daysMin[dowCnt++%7]+"")}this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i=0;while(i<12){html+=''+dates[this.language].monthsShort[i++]+""}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var startYear=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var startMonth=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var endYear=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var endMonth=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);if(year==startYear&&month<=startMonth||year=endMonth||year>endYear){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var row;var clsName;while(prevMonth.valueOf()");html.push(row)}clsName="";if(prevMonth.getUTCFullYear()year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}if(prevMonth.valueOf()+864e5<=this.startDate){clsName+=" disabled"}if(prevMonth.valueOf()>this.endDate){clsName+=" disabled"}row.append(''+prevMonth.getUTCDate()+"");prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html);var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}if(currentYear-1endYear){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var i=0;i<12;i++){if(year==startYear&&startMonth>i||yearendYear){$(months[i]).addClass("disabled")}}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(startYear>year){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(endYearendYear?" disabled":"")+'">'+year+"";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i=0;i<3;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}else{var current=0;for(var i=0;i<6;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e){e.stopPropagation();e.preventDefault();this._unset=false;var target=$(e.target).closest("span, td, th");if(target.length===1){if(!target.is(".disabled")){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e){e.stopPropagation();e.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$(e.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(e){var self=this,k=e.which,input=$(e.target);if(k==8||k==46){setTimeout(function(){self._resetMaskPos(input)})}},keypress:function(e){var k=e.which;if(k==8||k==46){return}var input=$(e.target);var c=String.fromCharCode(k);var val=input.val()||"";val+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val.length){return}if(!mask.pattern.test(val.slice(mask.start))){val=val.slice(0,val.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val+=mask.character;this._maskPos++}val+=c;if(mask.end!=val.length){input.val(val);return false}else{if(!mask.pattern.test(val.slice(mask.start))){input.val(val.slice(0,mask.start));return false}else{input.val(val);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e){var input=$(e.target);var val=input.val();if(this._formatPattern.test(val)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val&&val.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i=1;ival.length){this._maskPos=i;break}else if(this._mask[i].end===val.length){this._maskPos=i+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i++;propertiesByIndex[i]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self=this;this.widget.on("click",".datepicker *",$.proxy(this.click,this));this.widget.on("click","[data-action]",$.proxy(this.doAction,this));this.widget.on("mousedown",$.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e){e.stopPropagation();var $this=$(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self.timeIcon+" "+self.dateIcon);self.$element.find(".add-on i").toggleClass(self.timeIcon+" "+self.dateIcon)}})}if(this.isInput){this.$element.on({focus:$.proxy(this.show,this),change:$.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)})}}else{this.$element.on({change:$.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$.proxy(this.show,this))}else{this.$element.on("click",$.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$(window).on("resize.datetimepicker"+this.id,$.proxy(this.place,this));if(!this.isInput){$(document).on("mousedown.datetimepicker"+this.id,$.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$(document).off("mousedown.datetimepicker"+this.id)}},_isInFixed:function(){if(this.$element){var parents=this.$element.parents();var inFixed=false;for(var i=0;i'+"
      "+""+'
      '+DPGlobal.template+"
      "+""+'
    • '+""+'
      '+TPGlobal.getTemplate(is12Hours,showSeconds)+"
      "+""+"
    "+"
    "}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
    '+''+DPGlobal.headTemplate+""+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    ";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
    '+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
    "+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+(showSeconds?'
    '+''+"
    "+"
    ":"")}})(window.jQuery); \ No newline at end of file + +(function($) { + + // Picker object + var smartPhone = (window.orientation != undefined); + var DateTimePicker = function(element, options) { + this.id = dpgId++; + this.init(element, options); + }; + + var dateToDate = function(dt) { + if (typeof dt === 'string') { + return new Date(dt); + } + return dt; + }; + + DateTimePicker.prototype = { + constructor: DateTimePicker, + + init: function(element, options) { + var icon; + if (!(options.pickTime || options.pickDate)) + throw new Error('Must choose at least one picker'); + this.options = options; + this.$element = $(element); + this.language = options.language in dates ? options.language : 'en' + this.pickDate = options.pickDate; + this.pickTime = options.pickTime; + this.isInput = this.$element.is('input'); + this.component = false; + this.showTimeFirst = options.showTimeFirst; + if (this.$element.find('.input-append') || this.$element.find('.input-prepend')) + this.component = this.$element.find('.add-on'); + this.format = options.format; + if (!this.format) { + if (this.isInput) this.format = this.$element.data('format'); + else this.format = this.$element.find('input').data('format'); + if (!this.format) this.format = 'MM/dd/yyyy'; + } + this._compileFormat(); + if (this.component) { + icon = this.component.find('i'); + } + if (this.pickTime) { + if (icon && icon.length) this.timeIcon = icon.data('time-icon'); + if (!this.timeIcon) this.timeIcon = 'icon-time'; + if (!this.dateIcon) this.dateIcon = 'icon-calendar'; + icon.addClass(this.timeIcon); + } + if (this.pickDate && (!this.showTimeFirst)) { + if (icon && icon.length) this.dateIcon = icon.data('date-icon'); + if (!this.dateIcon) this.dateIcon = 'icon-calendar'; + icon.removeClass(this.timeIcon); + icon.addClass(this.dateIcon); + } + this.widget = $(getTemplate(this.timeIcon, this.dateIcon, options.pickDate, options.pickTime, options.pick12HourFormat, options.pickSeconds, options.collapse, options.showTimeFirst)).appendTo('body'); + this.minViewMode = options.minViewMode||this.$element.data('date-minviewmode')||0; + if (typeof this.minViewMode === 'string') { + switch (this.minViewMode) { + case 'months': + this.minViewMode = 1; + break; + case 'years': + this.minViewMode = 2; + break; + default: + this.minViewMode = 0; + break; + } + } + this.viewMode = options.viewMode||this.$element.data('date-viewmode')||0; + if (typeof this.viewMode === 'string') { + switch (this.viewMode) { + case 'months': + this.viewMode = 1; + break; + case 'years': + this.viewMode = 2; + break; + default: + this.viewMode = 0; + break; + } + } + this.startViewMode = this.viewMode; + this.weekStart = options.weekStart||this.$element.data('date-weekstart')||0; + this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1; + this.setStartDate(options.startDate || this.$element.data('date-startdate')); + this.setEndDate(options.endDate || this.$element.data('date-enddate')); + this.fillDow(); + this.fillMonths(); + this.fillHours(); + this.fillMinutes(); + this.fillSeconds(); + this.update(); + this.showMode(); + this._attachDatePickerEvents(); + }, + + show: function(e) { + this.widget.show(); + this.height = this.component ? this.component.outerHeight() : this.$element.outerHeight(); + this.place(); + this.$element.trigger({ + type: 'show', + date: this._date + }); + this._attachDatePickerGlobalEvents(); + if (e) { + e.stopPropagation(); + e.preventDefault(); + } + }, + + disable: function(){ + this.$element.find('input').prop('disabled',true); + this._detachDatePickerEvents(); + }, + enable: function(){ + this.$element.find('input').prop('disabled',false); + this._attachDatePickerEvents(); + }, + + hide: function() { + // Ignore event if in the middle of a picker transition + var collapse = this.widget.find('.collapse') + for (var i = 0; i < collapse.length; i++) { + var collapseData = collapse.eq(i).data('collapse'); + if (collapseData && collapseData.transitioning) + return; + } + this.widget.hide(); + this.viewMode = this.startViewMode; + this.showMode(); + this.set(); + this.$element.trigger({ + type: 'hide', + date: this._date + }); + this._detachDatePickerGlobalEvents(); + }, + + set: function() { + var formatted = ''; + if (!this._unset) formatted = this.formatDate(this._date); + if (!this.isInput) { + if (this.component){ + var input = this.$element.find('input'); + input.val(formatted); + this._resetMaskPos(input); + } + this.$element.data('date', formatted); + } else { + this.$element.val(formatted); + this._resetMaskPos(this.$element); + } + }, + + setValue: function(newDate) { + if (!newDate) { + this._unset = true; + } else { + this._unset = false; + } + if (typeof newDate === 'string') { + this._date = this.parseDate(newDate); + } else if(newDate) { + this._date = new Date(newDate); + } + this.set(); + this.viewDate = UTCDate(this._date.getUTCFullYear(), this._date.getUTCMonth(), 1, 0, 0, 0, 0); + this.fillDate(); + this.fillTime(); + }, + + getDate: function() { + if (this._unset) return null; + return new Date(this._date.valueOf()); + }, + + setDate: function(date) { + if (!date) this.setValue(null); + else this.setValue(date.valueOf()); + }, + + setStartDate: function(date) { + if (date instanceof Date) { + this.startDate = date; + } else if (typeof date === 'string') { + this.startDate = new UTCDate(date); + if (! this.startDate.getUTCFullYear()) { + this.startDate = -Infinity; + } + } else { + this.startDate = -Infinity; + } + if (this.viewDate) { + this.update(); + } + }, + + setEndDate: function(date) { + if (date instanceof Date) { + this.endDate = date; + } else if (typeof date === 'string') { + this.endDate = new UTCDate(date); + if (! this.endDate.getUTCFullYear()) { + this.endDate = Infinity; + } + } else { + this.endDate = Infinity; + } + if (this.viewDate) { + this.update(); + } + }, + + getLocalDate: function() { + if (this._unset) return null; + var d = this._date; + return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds()); + }, + + setLocalDate: function(localDate) { + if (!localDate) this.setValue(null); + else + this.setValue(Date.UTC( + localDate.getFullYear(), + localDate.getMonth(), + localDate.getDate(), + localDate.getHours(), + localDate.getMinutes(), + localDate.getSeconds(), + localDate.getMilliseconds())); + }, + + place: function(){ + var position = 'absolute'; + var offset = this.component ? this.component.offset() : this.$element.offset(); + this.width = this.component ? this.component.outerWidth() : this.$element.outerWidth(); + offset.top = offset.top + this.height; + + var $window = $(window); + + if ( this.options.width != undefined ) { + this.widget.width( this.options.width ); + } + + if ( this.options.orientation == 'left' ) { + this.widget.addClass( 'left-oriented' ); + offset.left = offset.left - this.widget.width() + 20; + } + + if (this._isInFixed()) { + position = 'fixed'; + offset.top -= $window.scrollTop(); + offset.left -= $window.scrollLeft(); + } + + if ($window.width() < offset.left + this.widget.outerWidth()) { + offset.right = $window.width() - offset.left - this.width; + offset.left = 'auto'; + this.widget.addClass('pull-right'); + } else { + offset.right = 'auto'; + this.widget.removeClass('pull-right'); + } + + this.widget.css({ + position: position, + top: offset.top, + left: offset.left, + right: offset.right + }); + }, + + notifyChange: function(){ + this.$element.trigger({ + type: 'changeDate', + date: this.getDate(), + localDate: this.getLocalDate() + }); + }, + + update: function(newDate){ + var dateStr = newDate; + if (!dateStr) { + if (this.isInput) { + dateStr = this.$element.val(); + } else { + dateStr = this.$element.find('input').val(); + } + if (dateStr) { + this._date = this.parseDate(dateStr); + } + if (!this._date) { + var tmp = new Date() + this._date = UTCDate(tmp.getFullYear(), + tmp.getMonth(), + tmp.getDate(), + tmp.getHours(), + tmp.getMinutes(), + tmp.getSeconds(), + tmp.getMilliseconds()) + } + } + this.viewDate = UTCDate(this._date.getUTCFullYear(), this._date.getUTCMonth(), 1, 0, 0, 0, 0); + this.fillDate(); + this.fillTime(); + }, + + fillDow: function() { + var dowCnt = this.weekStart; + var html = $(''); + while (dowCnt < this.weekStart + 7) { + html.append('' + dates[this.language].daysMin[(dowCnt++) % 7] + ''); + } + this.widget.find('.datepicker-days thead').append(html); + }, + + fillMonths: function() { + var html = ''; + var i = 0 + while (i < 12) { + html += '' + dates[this.language].monthsShort[i++] + ''; + } + this.widget.find('.datepicker-months td').append(html); + }, + + fillDate: function() { + var year = this.viewDate.getUTCFullYear(); + var month = this.viewDate.getUTCMonth(); + var currentDate = UTCDate( + this._date.getUTCFullYear(), + this._date.getUTCMonth(), + this._date.getUTCDate(), + 0, 0, 0, 0 + ); + var startYear = typeof this.startDate === 'object' ? this.startDate.getUTCFullYear() : -Infinity; + var startMonth = typeof this.startDate === 'object' ? this.startDate.getUTCMonth() : -1; + var endYear = typeof this.endDate === 'object' ? this.endDate.getUTCFullYear() : Infinity; + var endMonth = typeof this.endDate === 'object' ? this.endDate.getUTCMonth() : 12; + + this.widget.find('.datepicker-days').find('.disabled').removeClass('disabled'); + this.widget.find('.datepicker-months').find('.disabled').removeClass('disabled'); + this.widget.find('.datepicker-years').find('.disabled').removeClass('disabled'); + + this.widget.find('.datepicker-days th:eq(1)').text( + dates[this.language].months[month] + ' ' + year); + + var prevMonth = UTCDate(year, month-1, 28, 0, 0, 0, 0); + var day = DPGlobal.getDaysInMonth( + prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); + prevMonth.setUTCDate(day); + prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.weekStart + 7) % 7); + if ((year == startYear && month <= startMonth) || year < startYear) { + this.widget.find('.datepicker-days th:eq(0)').addClass('disabled'); + } + if ((year == endYear && month >= endMonth) || year > endYear) { + this.widget.find('.datepicker-days th:eq(2)').addClass('disabled'); + } + + var nextMonth = new Date(prevMonth.valueOf()); + nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); + nextMonth = nextMonth.valueOf(); + var html = []; + var row; + var clsName; + while (prevMonth.valueOf() < nextMonth) { + if (prevMonth.getUTCDay() === this.weekStart) { + row = $(''); + html.push(row); + } + clsName = ''; + if (prevMonth.getUTCFullYear() < year || + (prevMonth.getUTCFullYear() == year && + prevMonth.getUTCMonth() < month)) { + clsName += ' old'; + } else if (prevMonth.getUTCFullYear() > year || + (prevMonth.getUTCFullYear() == year && + prevMonth.getUTCMonth() > month)) { + clsName += ' new'; + } + if (prevMonth.valueOf() === currentDate.valueOf()) { + clsName += ' active'; + } + if ((prevMonth.valueOf() + 86400000) <= this.startDate) { + clsName += ' disabled'; + } + if (prevMonth.valueOf() > this.endDate) { + clsName += ' disabled'; + } + row.append('' + prevMonth.getUTCDate() + ''); + prevMonth.setUTCDate(prevMonth.getUTCDate() + 1); + } + this.widget.find('.datepicker-days tbody').empty().append(html); + var currentYear = this._date.getUTCFullYear(); + + var months = this.widget.find('.datepicker-months').find( + 'th:eq(1)').text(year).end().find('span').removeClass('active'); + if (currentYear === year) { + months.eq(this._date.getUTCMonth()).addClass('active'); + } + if (currentYear - 1 < startYear) { + this.widget.find('.datepicker-months th:eq(0)').addClass('disabled'); + } + if (currentYear + 1 > endYear) { + this.widget.find('.datepicker-months th:eq(2)').addClass('disabled'); + } + for (var i = 0; i < 12; i++) { + if ((year == startYear && startMonth > i) || (year < startYear)) { + $(months[i]).addClass('disabled'); + } else if ((year == endYear && endMonth < i) || (year > endYear)) { + $(months[i]).addClass('disabled'); + } + } + + html = ''; + year = parseInt(year/10, 10) * 10; + var yearCont = this.widget.find('.datepicker-years').find( + 'th:eq(1)').text(year + '-' + (year + 9)).end().find('td'); + this.widget.find('.datepicker-years').find('th').removeClass('disabled'); + if (startYear > year) { + this.widget.find('.datepicker-years').find('th:eq(0)').addClass('disabled'); + } + if (endYear < year+9) { + this.widget.find('.datepicker-years').find('th:eq(2)').addClass('disabled'); + } + year -= 1; + for (var i = -1; i < 11; i++) { + html += '' + year + ''; + year += 1; + } + yearCont.html(html); + }, + + fillHours: function() { + var table = this.widget.find( + '.timepicker .timepicker-hours table'); + table.parent().hide(); + var html = ''; + if (this.options.pick12HourFormat) { + var current = 1; + for (var i = 0; i < 3; i += 1) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current++; + } + html += '' + } + } else { + var current = 0; + for (var i = 0; i < 6; i += 1) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current++; + } + html += '' + } + } + table.html(html); + }, + + fillMinutes: function() { + var table = this.widget.find( + '.timepicker .timepicker-minutes table'); + table.parent().hide(); + var html = ''; + var current = 0; + for (var i = 0; i < 5; i++) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current += 3; + } + html += ''; + } + table.html(html); + }, + + fillSeconds: function() { + var table = this.widget.find( + '.timepicker .timepicker-seconds table'); + table.parent().hide(); + var html = ''; + var current = 0; + for (var i = 0; i < 5; i++) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current += 3; + } + html += ''; + } + table.html(html); + }, + + fillTime: function() { + if (!this._date) + return; + var timeComponents = this.widget.find('.timepicker span[data-time-component]'); + var table = timeComponents.closest('table'); + var is12HourFormat = this.options.pick12HourFormat; + var hour = this._date.getUTCHours(); + var period = 'AM'; + if (is12HourFormat) { + if (hour >= 12) period = 'PM'; + if (hour === 0) hour = 12; + else if (hour != 12) hour = hour % 12; + this.widget.find( + '.timepicker [data-action=togglePeriod]').text(period); + } + hour = padLeft(hour.toString(), 2, '0'); + var minute = padLeft(this._date.getUTCMinutes().toString(), 2, '0'); + var second = padLeft(this._date.getUTCSeconds().toString(), 2, '0'); + timeComponents.filter('[data-time-component=hours]').text(hour); + timeComponents.filter('[data-time-component=minutes]').text(minute); + timeComponents.filter('[data-time-component=seconds]').text(second); + }, + + click: function(e) { + e.stopPropagation(); + e.preventDefault(); + this._unset = false; + var target = $(e.target).closest('span, td, th'); + if (target.length === 1) { + if (! target.is('.disabled')) { + switch(target[0].nodeName.toLowerCase()) { + case 'th': + switch(target[0].className) { + case 'switch': + this.showMode(1); + break; + case 'prev': + case 'next': + var vd = this.viewDate; + var navFnc = DPGlobal.modes[this.viewMode].navFnc; + var step = DPGlobal.modes[this.viewMode].navStep; + if (target[0].className === 'prev') step = step * -1; + vd['set' + navFnc](vd['get' + navFnc]() + step); + this.fillDate(); + this.set(); + break; + } + break; + case 'span': + if (target.is('.month')) { + var month = target.parent().find('span').index(target); + this.viewDate.setUTCMonth(month); + } else { + var year = parseInt(target.text(), 10) || 0; + this.viewDate.setUTCFullYear(year); + } + if (this.viewMode !== 0) { + this._date = UTCDate( + this.viewDate.getUTCFullYear(), + this.viewDate.getUTCMonth(), + this.viewDate.getUTCDate(), + this._date.getUTCHours(), + this._date.getUTCMinutes(), + this._date.getUTCSeconds(), + this._date.getUTCMilliseconds() + ); + this.notifyChange(); + } + this.showMode(-1); + this.fillDate(); + this.set(); + break; + case 'td': + if (target.is('.day')) { + var day = parseInt(target.text(), 10) || 1; + var month = this.viewDate.getUTCMonth(); + var year = this.viewDate.getUTCFullYear(); + if (target.is('.old')) { + if (month === 0) { + month = 11; + year -= 1; + } else { + month -= 1; + } + } else if (target.is('.new')) { + if (month == 11) { + month = 0; + year += 1; + } else { + month += 1; + } + } + this._date = UTCDate( + year, month, day, + this._date.getUTCHours(), + this._date.getUTCMinutes(), + this._date.getUTCSeconds(), + this._date.getUTCMilliseconds() + ); + this.viewDate = UTCDate( + year, month, Math.min(28, day) , 0, 0, 0, 0); + this.fillDate(); + this.set(); + this.notifyChange(); + } + break; + } + } + } + }, + + actions: { + incrementHours: function(e) { + this._date.setUTCHours(this._date.getUTCHours() + 1); + }, + + incrementMinutes: function(e) { + this._date.setUTCMinutes(this._date.getUTCMinutes() + 1); + }, + + incrementSeconds: function(e) { + this._date.setUTCSeconds(this._date.getUTCSeconds() + 1); + }, + + decrementHours: function(e) { + this._date.setUTCHours(this._date.getUTCHours() - 1); + }, + + decrementMinutes: function(e) { + this._date.setUTCMinutes(this._date.getUTCMinutes() - 1); + }, + + decrementSeconds: function(e) { + this._date.setUTCSeconds(this._date.getUTCSeconds() - 1); + }, + + togglePeriod: function(e) { + var hour = this._date.getUTCHours(); + if (hour >= 12) hour -= 12; + else hour += 12; + this._date.setUTCHours(hour); + }, + + showPicker: function() { + this.widget.find('.timepicker > div:not(.timepicker-picker)').hide(); + this.widget.find('.timepicker .timepicker-picker').show(); + }, + + showHours: function() { + this.widget.find('.timepicker .timepicker-picker').hide(); + this.widget.find('.timepicker .timepicker-hours').show(); + }, + + showMinutes: function() { + this.widget.find('.timepicker .timepicker-picker').hide(); + this.widget.find('.timepicker .timepicker-minutes').show(); + }, + + showSeconds: function() { + this.widget.find('.timepicker .timepicker-picker').hide(); + this.widget.find('.timepicker .timepicker-seconds').show(); + }, + + selectHour: function(e) { + var tgt = $(e.target); + var value = parseInt(tgt.text(), 10); + if (this.options.pick12HourFormat) { + var current = this._date.getUTCHours(); + if (current >= 12) { + if (value != 12) value = (value + 12) % 24; + } else { + if (value === 12) value = 0; + else value = value % 12; + } + } + this._date.setUTCHours(value); + this.actions.showPicker.call(this); + }, + + selectMinute: function(e) { + var tgt = $(e.target); + var value = parseInt(tgt.text(), 10); + this._date.setUTCMinutes(value); + this.actions.showPicker.call(this); + }, + + selectSecond: function(e) { + var tgt = $(e.target); + var value = parseInt(tgt.text(), 10); + this._date.setUTCSeconds(value); + this.actions.showPicker.call(this); + } + }, + + doAction: function(e) { + e.stopPropagation(); + e.preventDefault(); + if (!this._date) this._date = UTCDate(1970, 0, 0, 0, 0, 0, 0); + var action = $(e.currentTarget).data('action'); + var rv = this.actions[action].apply(this, arguments); + this.set(); + this.fillTime(); + this.notifyChange(); + return rv; + }, + + stopEvent: function(e) { + e.stopPropagation(); + e.preventDefault(); + }, + + // part of the following code was taken from + // http://cloud.github.com/downloads/digitalBush/jquery.maskedinput/jquery.maskedinput-1.3.js + keydown: function(e) { + var self = this, k = e.which, input = $(e.target); + if (k == 8 || k == 46) { + // backspace and delete cause the maskPosition + // to be recalculated + setTimeout(function() { + self._resetMaskPos(input); + }); + } + }, + + keypress: function(e) { + var k = e.which; + if (k == 8 || k == 46) { + // For those browsers which will trigger + // keypress on backspace/delete + return; + } + var input = $(e.target); + var c = String.fromCharCode(k); + var val = input.val() || ''; + val += c; + var mask = this._mask[this._maskPos]; + if (!mask) { + return false; + } + if (mask.end != val.length) { + return; + } + if (!mask.pattern.test(val.slice(mask.start))) { + val = val.slice(0, val.length - 1); + while ((mask = this._mask[this._maskPos]) && mask.character) { + val += mask.character; + // advance mask position past static + // part + this._maskPos++; + } + val += c; + if (mask.end != val.length) { + input.val(val); + return false; + } else { + if (!mask.pattern.test(val.slice(mask.start))) { + input.val(val.slice(0, mask.start)); + return false; + } else { + input.val(val); + this._maskPos++; + return false; + } + } + } else { + this._maskPos++; + } + }, + + change: function(e) { + var input = $(e.target); + var val = input.val(); + if (this._formatPattern.test(val)) { + this.update(); + this.setValue(this._date.getTime()); + this.notifyChange(); + this.set(); + } else if (val && val.trim()) { + this.setValue(this._date.getTime()); + if (this._date) this.set(); + else input.val(''); + } else { + if (this._date) { + this.setValue(null); + // unset the date when the input is + // erased + this.notifyChange(); + this._unset = true; + } + } + this._resetMaskPos(input); + }, + + showMode: function(dir) { + if (dir) { + this.viewMode = Math.max(this.minViewMode, Math.min( + 2, this.viewMode + dir)); + } + this.widget.find('.datepicker > div').hide().filter( + '.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); + }, + + destroy: function() { + this._detachDatePickerEvents(); + this._detachDatePickerGlobalEvents(); + this.widget.remove(); + this.$element.removeData('datetimepicker'); + this.component.removeData('datetimepicker'); + }, + + formatDate: function(d) { + return this.format.replace(formatReplacer, function(match) { + var methodName, property, rv, len = match.length; + if (match === 'ms') + len = 1; + property = dateFormatComponents[match].property + if (property === 'Hours12') { + rv = d.getUTCHours(); + if (rv === 0) rv = 12; + else if (rv !== 12) rv = rv % 12; + } else if (property === 'Period12') { + if (d.getUTCHours() >= 12) return 'PM'; + else return 'AM'; + } else { + methodName = 'get' + property; + rv = d[methodName](); + } + if (methodName === 'getUTCMonth') rv = rv + 1; + if (methodName === 'getUTCYear') rv = rv + 1900 - 2000; + return padLeft(rv.toString(), len, '0'); + }); + }, + + parseDate: function(str) { + var match, i, property, methodName, value, parsed = {}; + if (!(match = this._formatPattern.exec(str))) + return null; + for (i = 1; i < match.length; i++) { + property = this._propertiesByIndex[i]; + if (!property) + continue; + value = match[i]; + if (/^\d+$/.test(value)) + value = parseInt(value, 10); + parsed[property] = value; + } + return this._finishParsingDate(parsed); + }, + + _resetMaskPos: function(input) { + var val = input.val(); + for (var i = 0; i < this._mask.length; i++) { + if (this._mask[i].end > val.length) { + // If the mask has ended then jump to + // the next + this._maskPos = i; + break; + } else if (this._mask[i].end === val.length) { + this._maskPos = i + 1; + break; + } + } + }, + + _finishParsingDate: function(parsed) { + var year, month, date, hours, minutes, seconds, milliseconds; + year = parsed.UTCFullYear; + if (parsed.UTCYear) year = 2000 + parsed.UTCYear; + if (!year) year = 1970; + if (parsed.UTCMonth) month = parsed.UTCMonth - 1; + else month = 0; + date = parsed.UTCDate || 1; + hours = parsed.UTCHours || 0; + minutes = parsed.UTCMinutes || 0; + seconds = parsed.UTCSeconds || 0; + milliseconds = parsed.UTCMilliseconds || 0; + if (parsed.Hours12) { + hours = parsed.Hours12; + } + if (parsed.Period12) { + if (/pm/i.test(parsed.Period12)) { + if (hours != 12) hours = (hours + 12) % 24; + } else { + hours = hours % 12; + } + } + return UTCDate(year, month, date, hours, minutes, seconds, milliseconds); + }, + + _compileFormat: function () { + var match, component, components = [], mask = [], + str = this.format, propertiesByIndex = {}, i = 0, pos = 0; + while (match = formatComponent.exec(str)) { + component = match[0]; + if (component in dateFormatComponents) { + i++; + propertiesByIndex[i] = dateFormatComponents[component].property; + components.push('\\s*' + dateFormatComponents[component].getPattern( + this) + '\\s*'); + mask.push({ + pattern: new RegExp(dateFormatComponents[component].getPattern( + this)), + property: dateFormatComponents[component].property, + start: pos, + end: pos += component.length + }); + } + else { + components.push(escapeRegExp(component)); + mask.push({ + pattern: new RegExp(escapeRegExp(component)), + character: component, + start: pos, + end: ++pos + }); + } + str = str.slice(component.length); + } + this._mask = mask; + this._maskPos = 0; + this._formatPattern = new RegExp( + '^\\s*' + components.join('') + '\\s*$'); + this._propertiesByIndex = propertiesByIndex; + }, + + _attachDatePickerEvents: function() { + var self = this; + // this handles date picker clicks + this.widget.on('click', '.datepicker *', $.proxy(this.click, this)); + // this handles time picker clicks + this.widget.on('click', '[data-action]', $.proxy(this.doAction, this)); + this.widget.on('mousedown', $.proxy(this.stopEvent, this)); + if (this.pickDate && this.pickTime) { + this.widget.on('click.togglePicker', '.accordion-toggle', function(e) { + e.stopPropagation(); + var $this = $(this); + var $parent = $this.closest('ul'); + var expanded = $parent.find('.collapse.in'); + var closed = $parent.find('.collapse:not(.in)'); + + if (expanded && expanded.length) { + var collapseData = expanded.data('collapse'); + if (collapseData && collapseData.transitioning) return; + expanded.collapse('hide'); + closed.collapse('show') + $this.find('i').toggleClass(self.timeIcon + ' ' + self.dateIcon); + self.$element.find('.add-on i').toggleClass(self.timeIcon + ' ' + self.dateIcon); + } + }); + } + if (this.isInput) { + this.$element.on({ + 'focus': $.proxy(this.show, this), + 'change': $.proxy(this.change, this) + }); + if (this.options.maskInput) { + this.$element.on({ + 'keydown': $.proxy(this.keydown, this), + 'keypress': $.proxy(this.keypress, this) + }); + } + } else { + this.$element.on({ + 'change': $.proxy(this.change, this) + }, 'input'); + if (this.options.maskInput) { + this.$element.on({ + 'keydown': $.proxy(this.keydown, this), + 'keypress': $.proxy(this.keypress, this) + }, 'input'); + } + if (this.component){ + this.component.on('click', $.proxy(this.show, this)); + } else { + this.$element.on('click', $.proxy(this.show, this)); + } + } + }, + + _attachDatePickerGlobalEvents: function() { + $(window).on( + 'resize.datetimepicker' + this.id, $.proxy(this.place, this)); + if (!this.isInput) { + $(document).on( + 'mousedown.datetimepicker' + this.id, $.proxy(this.hide, this)); + } + }, + + _detachDatePickerEvents: function() { + this.widget.off('click', '.datepicker *', this.click); + this.widget.off('click', '[data-action]'); + this.widget.off('mousedown', this.stopEvent); + if (this.pickDate && this.pickTime) { + this.widget.off('click.togglePicker'); + } + if (this.isInput) { + this.$element.off({ + 'focus': this.show, + 'change': this.change + }); + if (this.options.maskInput) { + this.$element.off({ + 'keydown': this.keydown, + 'keypress': this.keypress + }); + } + } else { + this.$element.off({ + 'change': this.change + }, 'input'); + if (this.options.maskInput) { + this.$element.off({ + 'keydown': this.keydown, + 'keypress': this.keypress + }, 'input'); + } + if (this.component){ + this.component.off('click', this.show); + } else { + this.$element.off('click', this.show); + } + } + }, + + _detachDatePickerGlobalEvents: function () { + $(window).off('resize.datetimepicker' + this.id); + if (!this.isInput) { + $(document).off('mousedown.datetimepicker' + this.id); + } + }, + + _isInFixed: function() { + if (this.$element) { + var parents = this.$element.parents(); + var inFixed = false; + for (var i=0; i' + + '
      ' + + '' + + '
      ' + + DPGlobal.template + + '
      ' + + '' + + '
    • ' + + '' + + '
      ' + + TPGlobal.getTemplate(is12Hours, showSeconds) + + '
      ' + + '' + + '
    ' + + '
    ' + ); + } else if (pickTime) { + return ( + '' + ); + } else { + return ( + '' + ); + } + } + + function UTCDate() { + return new Date(Date.UTC.apply(Date, arguments)); + } + + var DPGlobal = { + modes: [ + { + clsName: 'days', + navFnc: 'UTCMonth', + navStep: 1 + }, + { + clsName: 'months', + navFnc: 'UTCFullYear', + navStep: 1 + }, + { + clsName: 'years', + navFnc: 'UTCFullYear', + navStep: 10 + }], + isLeapYear: function (year) { + return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)) + }, + getDaysInMonth: function (year, month) { + return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] + }, + headTemplate: + '' + + '' + + '‹' + + '' + + '›' + + '' + + '', + contTemplate: '' + }; + DPGlobal.template = + '
    ' + + '' + + DPGlobal.headTemplate + + '' + + '
    ' + + '
    ' + + '
    ' + + '' + + DPGlobal.headTemplate + + DPGlobal.contTemplate+ + '
    '+ + '
    '+ + '
    '+ + ''+ + DPGlobal.headTemplate+ + DPGlobal.contTemplate+ + '
    '+ + '
    '; + var TPGlobal = { + hourTemplate: '', + minuteTemplate: '', + secondTemplate: '' + }; + TPGlobal.getTemplate = function(is12Hours, showSeconds) { + return ( + '
    ' + + '' + + '' + + '' + + '' + + '' + + (showSeconds ? + '' + + '': '')+ + (is12Hours ? '' : '') + + '' + + '' + + ' ' + + '' + + ' ' + + (showSeconds ? + '' + + '' : '') + + (is12Hours ? + '' + + '' : '') + + '' + + '' + + '' + + '' + + '' + + (showSeconds ? + '' + + '': '') + + (is12Hours ? '' : '') + + '' + + '
    ' + TPGlobal.hourTemplate + ':' + TPGlobal.minuteTemplate + ':' + TPGlobal.secondTemplate + '' + + '' + + '
    ' + + '
    ' + + '
    ' + + '' + + '
    '+ + '
    '+ + '
    ' + + '' + + '
    '+ + '
    '+ + (showSeconds ? + '
    ' + + '' + + '
    '+ + '
    ': '') + ); + } + + +})(window.jQuery) \ No newline at end of file From 63ce35b38dc9a6858af89a7329b4b9525f7e2755 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 12:28:37 -0400 Subject: [PATCH 108/164] initializing only when viewed. fixes flash buttons, saves load time. --- .../js/airtime/playouthistory/historytable.js | 41 ++++++++++++++----- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 978750ea0..4004d4e13 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -270,13 +270,29 @@ var AIRTIME = (function(AIRTIME) { timeStartId = "#his_time_start", dateEndId = "#his_date_end", timeEndId = "#his_time_end", - $hisDialogEl; + $hisDialogEl, + + tabsInit = [ + { + initialized: false, + initialize: function() { + oTableItem = itemHistoryTable(); + } + }, + { + initialized: false, + initialize: function() { + oTableAgg = aggregateHistoryTable(); + } + } + ]; + $historyContentDiv = $("#history_content"); function redrawTables() { - oTableAgg.fnDraw(); - oTableItem.fnDraw(); + oTableAgg && oTableAgg.fnDraw(); + oTableItem && oTableItem.fnDraw(); } function removeHistoryDialog() { @@ -340,10 +356,7 @@ var AIRTIME = (function(AIRTIME) { hourText: $.i18n._("Hour"), minuteText: $.i18n._("Minute") }; - - oTableItem = itemHistoryTable(); - oTableAgg = aggregateHistoryTable(); - + $historyContentDiv.find(dateStartId).datepicker(oBaseDatePickerSettings); $historyContentDiv.find(timeStartId).timepicker(oBaseTimePickerSettings); $historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings); @@ -453,7 +466,16 @@ var AIRTIME = (function(AIRTIME) { }); }); - $historyContentDiv.find("#his-tabs").tabs(); + $historyContentDiv.find("#his-tabs").tabs({ + show: function( event, ui ) { + var tab = tabsInit[ui.index]; + + if (!tab.initialized) { + tab.initialize(); + tab.initialized = true; + } + } + }); // begin context menu initialization. $.contextMenu({ @@ -496,8 +518,7 @@ var AIRTIME = (function(AIRTIME) { if (c) { $.post(deleteUrl, {format: "json"}, function(json) { - oTableItem.fnDraw(); - oTableAgg.fnDraw(); + redrawTables(); }); } }; From 59ba938334fceca287981223811fa0cd1fca5e2d Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 13:18:17 -0400 Subject: [PATCH 109/164] implementing select all/none etc --- .../js/airtime/playouthistory/historytable.js | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 4004d4e13..72687a9de 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -65,9 +65,42 @@ var AIRTIME = (function(AIRTIME) { } function emptySelectedLogItems() { + var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + id, $tr, $input; + + $.each($inputs, function(index, input) { + $input = $(input); + $input.prop('checked', false); + }); selectedLogItems = {}; } + function selectCurrentPage() { + var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + id, $tr, $input; + + $.each($inputs, function(index, input) { + $input = $(input); + $input.prop('checked', true); + $tr = $input.parents("tr"); + id = $tr.data("his-id"); + addSelectedLogItem(id); + }); + } + + function deselectCurrentPage() { + var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + id, $tr, $input; + + $.each($inputs, function(index, input) { + $input = $(input); + $input.prop('checked', false); + $tr = $input.parents("tr"); + id = $tr.data("his-id"); + removeSelectedLogItem(id); + }); + } + function getFileName(ext){ var filename = $("#his_date_start").val()+"_"+$("#his_time_start").val()+"m--"+$("#his_date_end").val()+"_"+$("#his_time_end").val()+"m"; filename = filename.replace(/:/g,"h"); @@ -129,9 +162,9 @@ var AIRTIME = (function(AIRTIME) { $.i18n._("Select")+" " + "" + "" + "
    "); @@ -256,7 +289,11 @@ var AIRTIME = (function(AIRTIME) { $toolbar = $historyTableDiv.parents(".dataTables_wrapper").find(".fg-toolbar:first"); createToolbarButtons($toolbar); - + + $("#his-select-page").click(selectCurrentPage); + $("#his-dselect-page").click(deselectCurrentPage); + $("#his-dselect-all").click(emptySelectedLogItems); + return oTable; } @@ -457,7 +494,7 @@ var AIRTIME = (function(AIRTIME) { redrawTables(); }); - $historyContentDiv.find("#his_trash").click(function(ev){ + $historyContentDiv.on("click", "#his_trash", function(ev){ var items = getSelectedLogItems(), url = baseUrl+"playouthistory/delete-list-items"; From f1b1352077d839f6938a4c05f4dfd7033694157f Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 13:31:37 -0400 Subject: [PATCH 110/164] matching selected row colours to the library table. --- airtime_mvc/public/css/playouthistory.css | 7 ++++ .../js/airtime/playouthistory/historytable.js | 32 +++++++++++-------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/airtime_mvc/public/css/playouthistory.css b/airtime_mvc/public/css/playouthistory.css index 5156add35..8082d97ba 100644 --- a/airtime_mvc/public/css/playouthistory.css +++ b/airtime_mvc/public/css/playouthistory.css @@ -34,3 +34,10 @@ div.his-timerange div { table.dataTable tbody tr { cursor: auto; } + +.his-selected.even { + background-color: rgba(240, 109, 53, 1); +} +.his-selected.odd { + background-color: rgba(255, 136, 56, 1); +} diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 72687a9de..edc35c3d2 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -56,22 +56,29 @@ var AIRTIME = (function(AIRTIME) { return items; } - function addSelectedLogItem(id) { + function addSelectedLogItem($el) { + var id; + + $el.addClass("his-selected"); + id = $el.data("his-id"); selectedLogItems[id] = ""; } - function removeSelectedLogItem(id) { + function removeSelectedLogItem($el) { + var id; + + $el.removeClass("his-selected"); + id = $el.data("his-id"); delete selectedLogItems[id]; } function emptySelectedLogItems() { var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), id, $tr, $input; + + $inputs.prop('checked', false); + $inputs.parents("tr").removeClass("his-selected"); - $.each($inputs, function(index, input) { - $input = $(input); - $input.prop('checked', false); - }); selectedLogItems = {}; } @@ -83,8 +90,7 @@ var AIRTIME = (function(AIRTIME) { $input = $(input); $input.prop('checked', true); $tr = $input.parents("tr"); - id = $tr.data("his-id"); - addSelectedLogItem(id); + addSelectedLogItem($tr); }); } @@ -96,8 +102,7 @@ var AIRTIME = (function(AIRTIME) { $input = $(input); $input.prop('checked', false); $tr = $input.parents("tr"); - id = $tr.data("his-id"); - removeSelectedLogItem(id); + removeSelectedLogItem($tr); }); } @@ -470,14 +475,13 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.on("click", ".his_checkbox input", function(e) { var checked = e.currentTarget.checked, - $tr = $(e.currentTarget).parents("tr"), - id = $tr.data("his-id"); + $tr = $(e.currentTarget).parents("tr"); if (checked) { - addSelectedLogItem(id); + addSelectedLogItem($tr); } else { - removeSelectedLogItem(id); + removeSelectedLogItem($tr); } }); From b2828d466dfc8d8cd4064abb6d4c1af20040e067 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 13:38:20 -0400 Subject: [PATCH 111/164] need delegation with delayed initialization. --- airtime_mvc/public/js/airtime/playouthistory/historytable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index edc35c3d2..26be956f6 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -404,7 +404,7 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.find(dateEndId).datepicker(oBaseDatePickerSettings); $historyContentDiv.find(timeEndId).timepicker(oBaseTimePickerSettings); - $("#his_create").click(function(e) { + $historyContentDiv.on("click", "#his_create", function(e) { var url = baseUrl+"playouthistory/edit-list-item/format/json" ; e.preventDefault(); From 12a62a38279bfaf4020daf7345ae07812b28c80a Mon Sep 17 00:00:00 2001 From: "cliff.wang" Date: Fri, 23 Aug 2013 14:23:47 -0400 Subject: [PATCH 112/164] CC-5309:Calendar-> Recording Show: Fail to open context menu Better error msg, also add more information in show-record.log --- .../application/services/CalendarService.php | 15 ++++++++++----- airtime_mvc/public/css/jquery.contextMenu.css | 1 + python_apps/pypo/recorder.py | 10 ++++++++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/services/CalendarService.php b/airtime_mvc/application/services/CalendarService.php index d0091d589..b0e1ad865 100644 --- a/airtime_mvc/application/services/CalendarService.php +++ b/airtime_mvc/application/services/CalendarService.php @@ -45,11 +45,16 @@ class Application_Service_CalendarService if ($this->ccShowInstance->isRecorded()) { $ccFile = $this->ccShowInstance->getCcFiles(); - - $menu["view_recorded"] = array( - "name" => _("View Recorded File Metadata"), - "icon" => "overview", - "url" => $baseUrl."library/edit-file-md/id/".$ccFile->getDbId()); + if (!isset($ccFile)) { + $menu["error when recording"] = array ( + "name" => _("Record file doesn't exist"), + "icon" => "error"); + }else { + $menu["view_recorded"] = array( + "name" => _("View Recorded File Metadata"), + "icon" => "overview", + "url" => $baseUrl."library/edit-file-md/id/".$ccFile->getDbId()); + } //recorded show can be uploaded to soundcloud if (Application_Model_Preference::GetUploadToSoundcloudOption()) { diff --git a/airtime_mvc/public/css/jquery.contextMenu.css b/airtime_mvc/public/css/jquery.contextMenu.css index 1119feb8f..61634b34d 100644 --- a/airtime_mvc/public/css/jquery.contextMenu.css +++ b/airtime_mvc/public/css/jquery.contextMenu.css @@ -108,6 +108,7 @@ .context-menu-item.icon-add-playlist { background-image: url(images/icon_add_playlist_cm.png); } .context-menu-item.icon-add-remove-content { background-image: url(images/icon_add_content_cm.png); } .context-menu-item.icon-remove-all-content { background-image: url(images/icon_remove_all_content_cm.png); } +.context-menu-item.icon-error { background-image: url(images/icon_alert_cal_alt.png); } /* vertically align inside labels */ .context-menu-input > label > * { vertical-align: top; } diff --git a/python_apps/pypo/recorder.py b/python_apps/pypo/recorder.py index b3818f32d..e61083738 100644 --- a/python_apps/pypo/recorder.py +++ b/python_apps/pypo/recorder.py @@ -10,6 +10,7 @@ import pytz import signal import math import traceback +import re from configobj import ConfigObj @@ -17,6 +18,7 @@ from poster.encode import multipart_encode from poster.streaminghttp import register_openers from subprocess import Popen +from subprocess import PIPE from threading import Thread import mutagen @@ -93,12 +95,16 @@ class ShowRecorder(Thread): self.logger.info("starting record") self.logger.info("command " + command) - self.p = Popen(args) + self.p = Popen(args,stdout=PIPE) #blocks at the following line until the child process #quits self.p.wait() - + outmsgs = self.p.stdout.readlines() + for msg in outmsgs: + m = re.search('^ERROR',msg) + if not m == None: + self.logger.info('Recording error is found: %s', msg) self.logger.info("finishing record, return code %s", self.p.returncode) code = self.p.returncode From dbe160c5d9cf8e2298239deea1094065c6fd9e74 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 15:52:49 -0400 Subject: [PATCH 113/164] beginning of displaying form errors, need to keep working on this. --- .../controllers/PlayouthistoryController.php | 14 ++++++++++++++ .../application/services/HistoryService.php | 2 ++ .../js/airtime/playouthistory/historytable.js | 5 +++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 83bedc3dd..39dbebd98 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -163,6 +163,13 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->createPlayedItem($params); + + if (isset($json["form"])) { + $this->view->form = $json["form"]; + $json["form"] = $this->view->render('playouthistory/dialog.phtml'); + + unset($this->view->form); + } $this->_helper->json->sendJson($json); } @@ -213,6 +220,13 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->editPlayedItem($params); + + if (isset($json["form"])) { + $this->view->form = $json["form"]; + $json["form"] = $this->view->render('playouthistory/dialog.phtml'); + + unset($this->view->form); + } $this->_helper->json->sendJson($json); } diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index db36b2856..6a8d3bda5 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -719,6 +719,7 @@ class Application_Service_HistoryService $msgs = $form->getMessages(); Logging::info($msgs); + $json["form"] = $form; $json["error"] = $msgs; } @@ -756,6 +757,7 @@ class Application_Service_HistoryService $msgs = $form->getMessages(); Logging::info($msgs); + $json["form"] = $form; $json["error"] = $msgs; } diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 26be956f6..1d2ed7384 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -460,8 +460,9 @@ var AIRTIME = (function(AIRTIME) { $.post(url, data, function(json) { //TODO put errors on form. - if (json.error !== undefined) { - + if (json.form !== undefined) { + var $newForm = $(json.form); + $hisDialogEl.html($newForm.html()); } else { removeHistoryDialog(); From c2b9bb01ac1692d9b0f8b0d0b6e7a8b79b535a3f Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 23 Aug 2013 15:53:18 -0400 Subject: [PATCH 114/164] crlf --- .../controllers/PlayouthistoryController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 39dbebd98..f5becc485 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -164,11 +164,11 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->createPlayedItem($params); - if (isset($json["form"])) { - $this->view->form = $json["form"]; - $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - - unset($this->view->form); + if (isset($json["form"])) { + $this->view->form = $json["form"]; + $json["form"] = $this->view->render('playouthistory/dialog.phtml'); + + unset($this->view->form); } $this->_helper->json->sendJson($json); @@ -222,9 +222,9 @@ class PlayouthistoryController extends Zend_Controller_Action $json = $historyService->editPlayedItem($params); if (isset($json["form"])) { - $this->view->form = $json["form"]; - $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - + $this->view->form = $json["form"]; + $json["form"] = $this->view->render('playouthistory/dialog.phtml'); + unset($this->view->form); } From 6d5531f341cc53e9c85997fb6b0b228a02b8a09c Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 27 Aug 2013 19:30:17 -0400 Subject: [PATCH 115/164] CC-5310 : Playlist -> Crash happens on draging a song after a webstream into a playlist --- .../views/scripts/playlist/update.phtml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playlist/update.phtml b/airtime_mvc/application/views/scripts/playlist/update.phtml index e1c11f406..0171efafa 100644 --- a/airtime_mvc/application/views/scripts/playlist/update.phtml +++ b/airtime_mvc/application/views/scripts/playlist/update.phtml @@ -10,6 +10,9 @@ if ($item['type'] == 2) { $staticBlock = $bl->isStatic(); $fileUrl = null; } +else if ($item['type'] == 1) { + $fileUrl = null; +} else if ($item['type'] == 0) { $audiofile = Application_Model_StoredFile::RecallById($item['item_id']); $fileUrl = $audiofile->getFileUrl(); @@ -17,12 +20,12 @@ else if ($item['type'] == 0) { if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) { $nextAudiofile = Application_Model_StoredFile::RecallById($items[$i+1]['item_id']); - $nextFileUrl = $nextAudiofile->getFileUrl(); + $nextFileUrl = $nextAudiofile->getFileUrl(); } ?>
  • " unqid="">
    - +
    " data-mime-type=""> @@ -89,8 +92,8 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) { if(($i < count($items) -1) && !($items[$i]['type'] == 2 && $items[$i+1]['type'])): ?> From 186e438ccb061cee8f9b7d573a067d0d19344c92 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 11:54:34 -0400 Subject: [PATCH 116/164] adding upgrades to 2.4.1 for version. --- CREDITS | 4 +--- VERSION | 2 +- changelog | 7 ++++++ install_minimal/include/airtime-constants.php | 2 +- .../upgrades/airtime-2.4.1/DbUpgrade.php | 24 +++++++++++++++++++ .../airtime-2.4.1/airtime-upgrade.php | 8 +++++++ .../upgrades/airtime-2.4.1/data/upgrade.sql | 3 +++ python_apps/api_clients/api_client.py | 2 +- 8 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 install_minimal/upgrades/airtime-2.4.1/DbUpgrade.php create mode 100644 install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php create mode 100644 install_minimal/upgrades/airtime-2.4.1/data/upgrade.sql diff --git a/CREDITS b/CREDITS index 83b80fcc6..4f377ea52 100644 --- a/CREDITS +++ b/CREDITS @@ -2,10 +2,8 @@ CREDITS ======= -Version 2.4.0 +Version 2.4.1 ------------- -Martin Konecny (martin.konecny@sourcefabric.org) - Role: Developer Team Lead Denise Rigato (denise.rigato@sourcefabric.org) Role: Software Developer diff --git a/VERSION b/VERSION index 42fde3a5e..e7467e459 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ PRODUCT_ID=Airtime -PRODUCT_RELEASE=2.4.0 +PRODUCT_RELEASE=2.4.1 diff --git a/changelog b/changelog index 7945e9b98..d5eb9175c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,10 @@ +2.4.1 - August 28th, 2013 + * Bug Fixes + * Playout Engine locking issue + * Liquidsoap input harbor blocking scheduled contents + * Mono file playout problems + * Adding watched folder sometimes causes an exception based on length format + 2.4.0 - June 18th, 2013 * New features * Show linking diff --git a/install_minimal/include/airtime-constants.php b/install_minimal/include/airtime-constants.php index c3f6aaaaa..74af70dff 100644 --- a/install_minimal/include/airtime-constants.php +++ b/install_minimal/include/airtime-constants.php @@ -1,3 +1,3 @@ &1 | grep -v \"will create implicit index\""); + } +} diff --git a/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php new file mode 100644 index 000000000..042b92d05 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.4.1/airtime-upgrade.php @@ -0,0 +1,8 @@ + Date: Wed, 28 Aug 2013 12:13:24 -0400 Subject: [PATCH 117/164] need to actually call this function --- install_minimal/include/airtime-upgrade.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php index 07db3f1e9..25204f16e 100644 --- a/install_minimal/include/airtime-upgrade.php +++ b/install_minimal/include/airtime-upgrade.php @@ -84,4 +84,8 @@ if (strcmp($version, "2.4.0") < 0) { passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.0/airtime-upgrade.php"); pause(); } +if (strcmp($version, "2.4.1") < 0) { + passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.1/airtime-upgrade.php"); + pause(); +} echo "******************************* Upgrade Complete *******************************".PHP_EOL; From 465da24ce0bc7cfb56feff2de4d8bca466a322a0 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 12:14:27 -0400 Subject: [PATCH 118/164] crlf --- install_minimal/include/airtime-upgrade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php index 25204f16e..66ba70838 100644 --- a/install_minimal/include/airtime-upgrade.php +++ b/install_minimal/include/airtime-upgrade.php @@ -84,8 +84,8 @@ if (strcmp($version, "2.4.0") < 0) { passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.0/airtime-upgrade.php"); pause(); } -if (strcmp($version, "2.4.1") < 0) { - passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.1/airtime-upgrade.php"); - pause(); +if (strcmp($version, "2.4.1") < 0) { + passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.1/airtime-upgrade.php"); + pause(); } echo "******************************* Upgrade Complete *******************************".PHP_EOL; From 969889859b78795cb852ef824c26da0ea82dc34d Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 13:07:55 -0400 Subject: [PATCH 119/164] improper naming of propel tables in php caused cc_mount_name to not get any generated files, double declaration of some variables for cc_timestamp. --- .../configs/classmap-airtime-conf.php | 7 + .../models/airtime/CcMountName.php | 18 + .../models/airtime/CcMountNamePeer.php | 18 + .../models/airtime/CcMountNameQuery.php | 18 + .../airtime/map/CcListenerCountTableMap.php | 2 +- .../airtime/map/CcMountNameTableMap.php | 54 ++ .../models/airtime/om/BaseCcListenerCount.php | 58 +- .../airtime/om/BaseCcListenerCountPeer.php | 104 +- .../airtime/om/BaseCcListenerCountQuery.php | 32 +- .../models/airtime/om/BaseCcMountName.php | 893 ++++++++++++++++++ .../models/airtime/om/BaseCcMountNamePeer.php | 742 +++++++++++++++ .../airtime/om/BaseCcMountNameQuery.php | 259 +++++ .../models/airtime/om/BaseCcTimestamp.php | 25 + airtime_mvc/build/schema.xml | 2 +- 14 files changed, 2159 insertions(+), 73 deletions(-) create mode 100644 airtime_mvc/application/models/airtime/CcMountName.php create mode 100644 airtime_mvc/application/models/airtime/CcMountNamePeer.php create mode 100644 airtime_mvc/application/models/airtime/CcMountNameQuery.php create mode 100644 airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountName.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php create mode 100644 airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php diff --git a/airtime_mvc/application/configs/classmap-airtime-conf.php b/airtime_mvc/application/configs/classmap-airtime-conf.php index ef0357425..9311a8ff0 100644 --- a/airtime_mvc/application/configs/classmap-airtime-conf.php +++ b/airtime_mvc/application/configs/classmap-airtime-conf.php @@ -183,6 +183,13 @@ return array ( 'BaseCcWebstreamMetadataPeer' => 'airtime/om/BaseCcWebstreamMetadataPeer.php', 'BaseCcWebstreamMetadata' => 'airtime/om/BaseCcWebstreamMetadata.php', 'BaseCcWebstreamMetadataQuery' => 'airtime/om/BaseCcWebstreamMetadataQuery.php', + 'CcMountNameTableMap' => 'airtime/map/CcMountNameTableMap.php', + 'CcMountNamePeer' => 'airtime/CcMountNamePeer.php', + 'CcMountName' => 'airtime/CcMountName.php', + 'CcMountNameQuery' => 'airtime/CcMountNameQuery.php', + 'BaseCcMountNamePeer' => 'airtime/om/BaseCcMountNamePeer.php', + 'BaseCcMountName' => 'airtime/om/BaseCcMountName.php', + 'BaseCcMountNameQuery' => 'airtime/om/BaseCcMountNameQuery.php', 'CcTimestampTableMap' => 'airtime/map/CcTimestampTableMap.php', 'CcTimestampPeer' => 'airtime/CcTimestampPeer.php', 'CcTimestamp' => 'airtime/CcTimestamp.php', diff --git a/airtime_mvc/application/models/airtime/CcMountName.php b/airtime_mvc/application/models/airtime/CcMountName.php new file mode 100644 index 000000000..3036dbdcd --- /dev/null +++ b/airtime_mvc/application/models/airtime/CcMountName.php @@ -0,0 +1,18 @@ +addRelation('CcTimestamp', 'CcTimestamp', RelationMap::MANY_TO_ONE, array('timestamp_id' => 'id', ), 'CASCADE', null); - $this->addRelation('CcTimestamp', 'CcTimestamp', RelationMap::MANY_TO_ONE, array('mount_name_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcMountName', 'CcMountName', RelationMap::MANY_TO_ONE, array('mount_name_id' => 'id', ), 'CASCADE', null); } // buildRelations() } // CcListenerCountTableMap diff --git a/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php b/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php new file mode 100644 index 000000000..f07bc5403 --- /dev/null +++ b/airtime_mvc/application/models/airtime/map/CcMountNameTableMap.php @@ -0,0 +1,54 @@ +setName('cc_mount_name'); + $this->setPhpName('CcMountName'); + $this->setClassname('CcMountName'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('cc_mount_name_id_seq'); + // columns + $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); + $this->addColumn('MOUNT_NAME', 'DbMountName', 'VARCHAR', true, 255, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcListenerCount', 'CcListenerCount', RelationMap::ONE_TO_MANY, array('id' => 'mount_name_id', ), 'CASCADE', null); + } // buildRelations() + +} // CcMountNameTableMap diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php index 04d4b60f3..42c435123 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCount.php @@ -54,9 +54,9 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent protected $aCcTimestamp; /** - * @var CcTimestamp + * @var CcMountName */ - protected $aCcTimestamp; + protected $aCcMountName; /** * Flag to prevent endless save loop, if this object is referenced @@ -173,8 +173,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->modifiedColumns[] = CcListenerCountPeer::MOUNT_NAME_ID; } - if ($this->aCcTimestamp !== null && $this->aCcTimestamp->getDbId() !== $v) { - $this->aCcTimestamp = null; + if ($this->aCcMountName !== null && $this->aCcMountName->getDbId() !== $v) { + $this->aCcMountName = null; } return $this; @@ -270,8 +270,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if ($this->aCcTimestamp !== null && $this->timestamp_id !== $this->aCcTimestamp->getDbId()) { $this->aCcTimestamp = null; } - if ($this->aCcTimestamp !== null && $this->mount_name_id !== $this->aCcTimestamp->getDbId()) { - $this->aCcTimestamp = null; + if ($this->aCcMountName !== null && $this->mount_name_id !== $this->aCcMountName->getDbId()) { + $this->aCcMountName = null; } } // ensureConsistency @@ -313,7 +313,7 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if ($deep) { // also de-associate any related objects? $this->aCcTimestamp = null; - $this->aCcTimestamp = null; + $this->aCcMountName = null; } // if (deep) } @@ -436,11 +436,11 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->setCcTimestamp($this->aCcTimestamp); } - if ($this->aCcTimestamp !== null) { - if ($this->aCcTimestamp->isModified() || $this->aCcTimestamp->isNew()) { - $affectedRows += $this->aCcTimestamp->save($con); + if ($this->aCcMountName !== null) { + if ($this->aCcMountName->isModified() || $this->aCcMountName->isNew()) { + $affectedRows += $this->aCcMountName->save($con); } - $this->setCcTimestamp($this->aCcTimestamp); + $this->setCcMountName($this->aCcMountName); } if ($this->isNew() ) { @@ -543,9 +543,9 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } } - if ($this->aCcTimestamp !== null) { - if (!$this->aCcTimestamp->validate($columns)) { - $failureMap = array_merge($failureMap, $this->aCcTimestamp->getValidationFailures()); + if ($this->aCcMountName !== null) { + if (!$this->aCcMountName->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcMountName->getValidationFailures()); } } @@ -633,8 +633,8 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent if (null !== $this->aCcTimestamp) { $result['CcTimestamp'] = $this->aCcTimestamp->toArray($keyType, $includeLazyLoadColumns, true); } - if (null !== $this->aCcTimestamp) { - $result['CcTimestamp'] = $this->aCcTimestamp->toArray($keyType, $includeLazyLoadColumns, true); + if (null !== $this->aCcMountName) { + $result['CcMountName'] = $this->aCcMountName->toArray($keyType, $includeLazyLoadColumns, true); } } return $result; @@ -879,13 +879,13 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } /** - * Declares an association between this object and a CcTimestamp object. + * Declares an association between this object and a CcMountName object. * - * @param CcTimestamp $v + * @param CcMountName $v * @return CcListenerCount The current object (for fluent API support) * @throws PropelException */ - public function setCcTimestamp(CcTimestamp $v = null) + public function setCcMountName(CcMountName $v = null) { if ($v === null) { $this->setDbMountNameId(NULL); @@ -893,10 +893,10 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent $this->setDbMountNameId($v->getDbId()); } - $this->aCcTimestamp = $v; + $this->aCcMountName = $v; // Add binding for other direction of this n:n relationship. - // If this object has already been added to the CcTimestamp object, it will not be re-added. + // If this object has already been added to the CcMountName object, it will not be re-added. if ($v !== null) { $v->addCcListenerCount($this); } @@ -906,25 +906,25 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent /** - * Get the associated CcTimestamp object + * Get the associated CcMountName object * * @param PropelPDO Optional Connection object. - * @return CcTimestamp The associated CcTimestamp object. + * @return CcMountName The associated CcMountName object. * @throws PropelException */ - public function getCcTimestamp(PropelPDO $con = null) + public function getCcMountName(PropelPDO $con = null) { - if ($this->aCcTimestamp === null && ($this->mount_name_id !== null)) { - $this->aCcTimestamp = CcTimestampQuery::create()->findPk($this->mount_name_id, $con); + if ($this->aCcMountName === null && ($this->mount_name_id !== null)) { + $this->aCcMountName = CcMountNameQuery::create()->findPk($this->mount_name_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. - $this->aCcTimestamp->addCcListenerCounts($this); + $this->aCcMountName->addCcListenerCounts($this); */ } - return $this->aCcTimestamp; + return $this->aCcMountName; } /** @@ -959,7 +959,7 @@ abstract class BaseCcListenerCount extends BaseObject implements Persistent } // if ($deep) $this->aCcTimestamp = null; - $this->aCcTimestamp = null; + $this->aCcMountName = null; } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php index 9e3a7cb87..dad3a53b9 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountPeer.php @@ -496,7 +496,7 @@ abstract class BaseCcListenerCountPeer { /** - * Returns the number of rows matching criteria, joining the related CcTimestamp table + * Returns the number of rows matching criteria, joining the related CcMountName table * * @param Criteria $criteria * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. @@ -504,7 +504,7 @@ abstract class BaseCcListenerCountPeer { * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return int Number of matching rows. */ - public static function doCountJoinCcTimestamp(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doCountJoinCcMountName(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; @@ -531,7 +531,7 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -612,7 +612,7 @@ abstract class BaseCcListenerCountPeer { /** - * Selects a collection of CcListenerCount objects pre-filled with their CcTimestamp objects. + * Selects a collection of CcListenerCount objects pre-filled with their CcMountName objects. * @param Criteria $criteria * @param PropelPDO $con * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN @@ -620,7 +620,7 @@ abstract class BaseCcListenerCountPeer { * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - public static function doSelectJoinCcTimestamp(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doSelectJoinCcMountName(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; @@ -631,9 +631,9 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); - CcTimestampPeer::addSelectColumns($criteria); + CcMountNamePeer::addSelectColumns($criteria); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -653,19 +653,19 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if $obj1 already loaded - $key2 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol); + $key2 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol); if ($key2 !== null) { - $obj2 = CcTimestampPeer::getInstanceFromPool($key2); + $obj2 = CcMountNamePeer::getInstanceFromPool($key2); if (!$obj2) { - $cls = CcTimestampPeer::getOMClass(false); + $cls = CcMountNamePeer::getOMClass(false); $obj2 = new $cls(); $obj2->hydrate($row, $startcol); - CcTimestampPeer::addInstanceToPool($obj2, $key2); + CcMountNamePeer::addInstanceToPool($obj2, $key2); } // if obj2 already loaded - // Add the $obj1 (CcListenerCount) to $obj2 (CcTimestamp) + // Add the $obj1 (CcListenerCount) to $obj2 (CcMountName) $obj2->addCcListenerCount($obj1); } // if joined row was not null @@ -715,7 +715,7 @@ abstract class BaseCcListenerCountPeer { $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -753,12 +753,12 @@ abstract class BaseCcListenerCountPeer { CcTimestampPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); - CcTimestampPeer::addSelectColumns($criteria); - $startcol4 = $startcol3 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); + CcMountNamePeer::addSelectColumns($criteria); + $startcol4 = $startcol3 + (CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS); $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); - $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcTimestampPeer::ID, $join_behavior); + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -795,21 +795,21 @@ abstract class BaseCcListenerCountPeer { $obj2->addCcListenerCount($obj1); } // if joined row not null - // Add objects for joined CcTimestamp rows + // Add objects for joined CcMountName rows - $key3 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol3); + $key3 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol3); if ($key3 !== null) { - $obj3 = CcTimestampPeer::getInstanceFromPool($key3); + $obj3 = CcMountNamePeer::getInstanceFromPool($key3); if (!$obj3) { - $cls = CcTimestampPeer::getOMClass(false); + $cls = CcMountNamePeer::getOMClass(false); $obj3 = new $cls(); $obj3->hydrate($row, $startcol3); - CcTimestampPeer::addInstanceToPool($obj3, $key3); + CcMountNamePeer::addInstanceToPool($obj3, $key3); } // if obj3 loaded - // Add the $obj1 (CcListenerCount) to the collection in $obj3 (CcTimestamp) + // Add the $obj1 (CcListenerCount) to the collection in $obj3 (CcMountName) $obj3->addCcListenerCount($obj1); } // if joined row not null @@ -856,6 +856,8 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); + $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -869,7 +871,7 @@ abstract class BaseCcListenerCountPeer { /** - * Returns the number of rows matching criteria, joining the related CcTimestamp table + * Returns the number of rows matching criteria, joining the related CcMountName table * * @param Criteria $criteria * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. @@ -877,7 +879,7 @@ abstract class BaseCcListenerCountPeer { * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return int Number of matching rows. */ - public static function doCountJoinAllExceptCcTimestamp(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doCountJoinAllExceptCcMountName(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) { // we're going to modify criteria, so copy it first $criteria = clone $criteria; @@ -904,6 +906,8 @@ abstract class BaseCcListenerCountPeer { $con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ); } + $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); + $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -940,6 +944,11 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol2 = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); + CcMountNamePeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcListenerCountPeer::MOUNT_NAME_ID, CcMountNamePeer::ID, $join_behavior); + $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -958,6 +967,25 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded + // Add objects for joined CcMountName rows + + $key2 = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcMountNamePeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcMountNamePeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcMountNamePeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcListenerCount) to the collection in $obj2 (CcMountName) + $obj2->addCcListenerCount($obj1); + + } // if joined row is not null + $results[] = $obj1; } $stmt->closeCursor(); @@ -966,7 +994,7 @@ abstract class BaseCcListenerCountPeer { /** - * Selects a collection of CcListenerCount objects pre-filled with all related objects except CcTimestamp. + * Selects a collection of CcListenerCount objects pre-filled with all related objects except CcMountName. * * @param Criteria $criteria * @param PropelPDO $con @@ -975,7 +1003,7 @@ abstract class BaseCcListenerCountPeer { * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - public static function doSelectJoinAllExceptCcTimestamp(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + public static function doSelectJoinAllExceptCcMountName(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $criteria = clone $criteria; @@ -989,6 +1017,11 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addSelectColumns($criteria); $startcol2 = (CcListenerCountPeer::NUM_COLUMNS - CcListenerCountPeer::NUM_LAZY_LOAD_COLUMNS); + CcTimestampPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcTimestampPeer::NUM_COLUMNS - CcTimestampPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcListenerCountPeer::TIMESTAMP_ID, CcTimestampPeer::ID, $join_behavior); + $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -1007,6 +1040,25 @@ abstract class BaseCcListenerCountPeer { CcListenerCountPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded + // Add objects for joined CcTimestamp rows + + $key2 = CcTimestampPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcTimestampPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcTimestampPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcTimestampPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcListenerCount) to the collection in $obj2 (CcTimestamp) + $obj2->addCcListenerCount($obj1); + + } // if joined row is not null + $results[] = $obj1; } $stmt->closeCursor(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php index ed04cd146..30c702e6e 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcListenerCountQuery.php @@ -24,9 +24,9 @@ * @method CcListenerCountQuery rightJoinCcTimestamp($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTimestamp relation * @method CcListenerCountQuery innerJoinCcTimestamp($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTimestamp relation * - * @method CcListenerCountQuery leftJoinCcTimestamp($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcTimestamp relation - * @method CcListenerCountQuery rightJoinCcTimestamp($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTimestamp relation - * @method CcListenerCountQuery innerJoinCcTimestamp($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTimestamp relation + * @method CcListenerCountQuery leftJoinCcMountName($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcMountName relation + * @method CcListenerCountQuery rightJoinCcMountName($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcMountName relation + * @method CcListenerCountQuery innerJoinCcMountName($relationAlias = '') Adds a INNER JOIN clause to the query using the CcMountName relation * * @method CcListenerCount findOne(PropelPDO $con = null) Return the first CcListenerCount matching the query * @method CcListenerCount findOneOrCreate(PropelPDO $con = null) Return the first CcListenerCount matching the query, or a new CcListenerCount object populated from the query conditions when no match is found @@ -324,31 +324,31 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria } /** - * Filter the query by a related CcTimestamp object + * Filter the query by a related CcMountName object * - * @param CcTimestamp $ccTimestamp the related object to use as filter + * @param CcMountName $ccMountName the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcListenerCountQuery The current query, for fluid interface */ - public function filterByCcTimestamp($ccTimestamp, $comparison = null) + public function filterByCcMountName($ccMountName, $comparison = null) { return $this - ->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccTimestamp->getDbId(), $comparison); + ->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccMountName->getDbId(), $comparison); } /** - * Adds a JOIN clause to the query using the CcTimestamp relation + * Adds a JOIN clause to the query using the CcMountName relation * * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return CcListenerCountQuery The current query, for fluid interface */ - public function joinCcTimestamp($relationAlias = '', $joinType = Criteria::INNER_JOIN) + public function joinCcMountName($relationAlias = '', $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('CcTimestamp'); + $relationMap = $tableMap->getRelation('CcMountName'); // create a ModelJoin object for this join $join = new ModelJoin(); @@ -363,14 +363,14 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { - $this->addJoinObject($join, 'CcTimestamp'); + $this->addJoinObject($join, 'CcMountName'); } return $this; } /** - * Use the CcTimestamp relation CcTimestamp object + * Use the CcMountName relation CcMountName object * * @see useQuery() * @@ -378,13 +378,13 @@ abstract class BaseCcListenerCountQuery extends ModelCriteria * to be used as main alias in the secondary query * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return CcTimestampQuery A secondary query class using the current class as primary query + * @return CcMountNameQuery A secondary query class using the current class as primary query */ - public function useCcTimestampQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + public function useCcMountNameQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) { return $this - ->joinCcTimestamp($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'CcTimestamp', 'CcTimestampQuery'); + ->joinCcMountName($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcMountName', 'CcMountNameQuery'); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountName.php b/airtime_mvc/application/models/airtime/om/BaseCcMountName.php new file mode 100644 index 000000000..b476f05a8 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcMountName.php @@ -0,0 +1,893 @@ +id; + } + + /** + * Get the [mount_name] column value. + * + * @return string + */ + public function getDbMountName() + { + return $this->mount_name; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return CcMountName The current object (for fluent API support) + */ + public function setDbId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[] = CcMountNamePeer::ID; + } + + return $this; + } // setDbId() + + /** + * Set the value of [mount_name] column. + * + * @param string $v new value + * @return CcMountName The current object (for fluent API support) + */ + public function setDbMountName($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->mount_name !== $v) { + $this->mount_name = $v; + $this->modifiedColumns[] = CcMountNamePeer::MOUNT_NAME; + } + + return $this; + } // setDbMountName() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM) + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false) + { + try { + + $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; + $this->mount_name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 2; // 2 = CcMountNamePeer::NUM_COLUMNS - CcMountNamePeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating CcMountName object", $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param PropelPDO $con (optional) The PropelPDO connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $stmt = CcMountNamePeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $row = $stmt->fetch(PDO::FETCH_NUM); + $stmt->closeCursor(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->collCcListenerCounts = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param PropelPDO $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + try { + $ret = $this->preDelete($con); + if ($ret) { + CcMountNameQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()) + ->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(PropelPDO $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CcMountNamePeer::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param PropelPDO $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(PropelPDO $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + if ($this->isNew() ) { + $this->modifiedColumns[] = CcMountNamePeer::ID; + } + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $criteria = $this->buildCriteria(); + if ($criteria->keyContainsValue(CcMountNamePeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcMountNamePeer::ID.')'); + } + + $pk = BasePeer::doInsert($criteria, $con); + $affectedRows = 1; + $this->setDbId($pk); //[IMV] update autoincrement primary key + $this->setNew(false); + } else { + $affectedRows = CcMountNamePeer::doUpdate($this, $con); + } + + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + if ($this->collCcListenerCounts !== null) { + foreach ($this->collCcListenerCounts as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; array of ValidationFailed objets otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + if (($retval = CcMountNamePeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + if ($this->collCcListenerCounts !== null) { + foreach ($this->collCcListenerCounts as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcMountNamePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $field = $this->getByPosition($pos); + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getDbId(); + break; + case 1: + return $this->getDbMountName(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * Defaults to BasePeer::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true) + { + $keys = CcMountNamePeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getDbId(), + $keys[1] => $this->getDbMountName(), + ); + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = CcMountNamePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setDbId($value); + break; + case 1: + $this->setDbMountName($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. + * The default key type is the column's phpname (e.g. 'AuthorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = CcMountNamePeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setDbMountName($arr[$keys[1]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); + + if ($this->isColumnModified(CcMountNamePeer::ID)) $criteria->add(CcMountNamePeer::ID, $this->id); + if ($this->isColumnModified(CcMountNamePeer::MOUNT_NAME)) $criteria->add(CcMountNamePeer::MOUNT_NAME, $this->mount_name); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); + $criteria->add(CcMountNamePeer::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getDbId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setDbId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + return null === $this->getDbId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of CcMountName (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + $copyObj->setDbMountName($this->mount_name); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCcListenerCounts() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcListenerCount($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + + $copyObj->setNew(true); + $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return CcMountName Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return CcMountNamePeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new CcMountNamePeer(); + } + return self::$peer; + } + + /** + * Clears out the collCcListenerCounts collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcListenerCounts() + */ + public function clearCcListenerCounts() + { + $this->collCcListenerCounts = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcListenerCounts collection. + * + * By default this just sets the collCcListenerCounts collection to an empty array (like clearcollCcListenerCounts()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcListenerCounts() + { + $this->collCcListenerCounts = new PropelObjectCollection(); + $this->collCcListenerCounts->setModel('CcListenerCount'); + } + + /** + * Gets an array of CcListenerCount objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcMountName is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects + * @throws PropelException + */ + public function getCcListenerCounts($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcListenerCounts || null !== $criteria) { + if ($this->isNew() && null === $this->collCcListenerCounts) { + // return empty collection + $this->initCcListenerCounts(); + } else { + $collCcListenerCounts = CcListenerCountQuery::create(null, $criteria) + ->filterByCcMountName($this) + ->find($con); + if (null !== $criteria) { + return $collCcListenerCounts; + } + $this->collCcListenerCounts = $collCcListenerCounts; + } + } + return $this->collCcListenerCounts; + } + + /** + * Returns the number of related CcListenerCount objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcListenerCount objects. + * @throws PropelException + */ + public function countCcListenerCounts(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcListenerCounts || null !== $criteria) { + if ($this->isNew() && null === $this->collCcListenerCounts) { + return 0; + } else { + $query = CcListenerCountQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcMountName($this) + ->count($con); + } + } else { + return count($this->collCcListenerCounts); + } + } + + /** + * Method called to associate a CcListenerCount object to this object + * through the CcListenerCount foreign key attribute. + * + * @param CcListenerCount $l CcListenerCount + * @return void + * @throws PropelException + */ + public function addCcListenerCount(CcListenerCount $l) + { + if ($this->collCcListenerCounts === null) { + $this->initCcListenerCounts(); + } + if (!$this->collCcListenerCounts->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcListenerCounts[]= $l; + $l->setCcMountName($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcMountName is new, it will return + * an empty collection; or if this CcMountName has previously + * been saved, it will retrieve related CcListenerCounts from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcMountName. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects + */ + public function getCcListenerCountsJoinCcTimestamp($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcListenerCountQuery::create(null, $criteria); + $query->joinWith('CcTimestamp', $join_behavior); + + return $this->getCcListenerCounts($query, $con); + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->mount_name = null; + $this->alreadyInSave = false; + $this->alreadyInValidation = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all collections of referencing foreign keys. + * + * This method is a user-space workaround for PHP's inability to garbage collect objects + * with circular references. This is currently necessary when using Propel in certain + * daemon or large-volumne/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all associated objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCcListenerCounts) { + foreach ((array) $this->collCcListenerCounts as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + $this->collCcListenerCounts = null; + } + + /** + * Catches calls to virtual methods + */ + public function __call($name, $params) + { + if (preg_match('/get(\w+)/', $name, $matches)) { + $virtualColumn = $matches[1]; + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + // no lcfirst in php<5.3... + $virtualColumn[0] = strtolower($virtualColumn[0]); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + throw new PropelException('Call to undefined method: ' . $name); + } + +} // BaseCcMountName diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php b/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php new file mode 100644 index 000000000..af2e416b1 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcMountNamePeer.php @@ -0,0 +1,742 @@ + array ('DbId', 'DbMountName', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbMountName', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::MOUNT_NAME, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'MOUNT_NAME', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'mount_name', ), + BasePeer::TYPE_NUM => array (0, 1, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbMountName' => 1, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbMountName' => 1, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::MOUNT_NAME => 1, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'MOUNT_NAME' => 1, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'mount_name' => 1, ), + BasePeer::TYPE_NUM => array (0, 1, ) + ); + + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + * @throws PropelException - if the specified name could not be found in the fieldname mappings. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME + * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. CcMountNamePeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(CcMountNamePeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CcMountNamePeer::ID); + $criteria->addSelectColumn(CcMountNamePeer::MOUNT_NAME); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.MOUNT_NAME'); + } + } + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null) + { + // we may modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcMountNamePeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcMountNamePeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + // BasePeer returns a PDOStatement + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param PropelPDO $con + * @return CcMountName + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, PropelPDO $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = CcMountNamePeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, PropelPDO $con = null) + { + return CcMountNamePeer::populateObjects(CcMountNamePeer::doSelectStmt($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. + * + * Use this method directly if you want to work with an executed statement durirectly (for example + * to perform your own object hydration). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param PropelPDO $con The connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return PDOStatement The executed PDOStatement object. + * @see BasePeer::doSelect() + */ + public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + if (!$criteria->hasSelectClause()) { + $criteria = clone $criteria; + CcMountNamePeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a PDOStatement + return BasePeer::doSelect($criteria, $con); + } + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doSelect*() + * methods in your stub classes -- you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by doSelect*() + * and retrieveByPK*() calls. + * + * @param CcMountName $value A CcMountName object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool(CcMountName $obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if ($key === null) { + $key = (string) $obj->getDbId(); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A CcMountName object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && $value !== null) { + if (is_object($value) && $value instanceof CcMountName) { + $key = (string) $value->getDbId(); + } elseif (is_scalar($value)) { + // assume we've been passed a primary key + $key = (string) $value; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcMountName object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } // removeInstanceFromPool() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param string $key The key (@see getPrimaryKeyHash()) for this instance. + * @return CcMountName Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @see getPrimaryKeyHash() + */ + public static function getInstanceFromPool($key) + { + if (Propel::isInstancePoolingEnabled()) { + if (isset(self::$instances[$key])) { + return self::$instances[$key]; + } + } + return null; // just to be explicit + } + + /** + * Clear the instance pool. + * + * @return void + */ + public static function clearInstancePool() + { + self::$instances = array(); + } + + /** + * Method to invalidate the instance pool of all tables related to cc_mount_name + * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in CcListenerCountPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcListenerCountPeer::clearInstancePool(); + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return string A string version of PK or NULL if the components of primary key in result array are all null. + */ + public static function getPrimaryKeyHashFromRow($row, $startcol = 0) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[$startcol] === null) { + return null; + } + return (string) $row[$startcol]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $startcol = 0) + { + return (int) $row[$startcol]; + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(PDOStatement $stmt) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = CcMountNamePeer::getOMClass(false); + // populate the object(s) + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key = CcMountNamePeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = CcMountNamePeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CcMountNamePeer::addInstanceToPool($obj, $key); + } // if key exists + } + $stmt->closeCursor(); + return $results; + } + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row PropelPDO resultset row. + * @param int $startcol The 0-based offset for reading from the resultset row. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CcMountName object, last column rank) + */ + public static function populateObject($row, $startcol = 0) + { + $key = CcMountNamePeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = CcMountNamePeer::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $startcol, true); // rehydrate + $col = $startcol + CcMountNamePeer::NUM_COLUMNS; + } else { + $cls = CcMountNamePeer::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $startcol); + CcMountNamePeer::addInstanceToPool($obj, $key); + } + return array($obj, $col); + } + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this peer class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getDatabaseMap(BaseCcMountNamePeer::DATABASE_NAME); + if (!$dbMap->hasTable(BaseCcMountNamePeer::TABLE_NAME)) + { + $dbMap->addTableObject(new CcMountNameTableMap()); + } + } + + /** + * The class that the Peer will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CcMountNamePeer::CLASS_DEFAULT : CcMountNamePeer::OM_CLASS; + } + + /** + * Method perform an INSERT on the database, given a CcMountName or Criteria object. + * + * @param mixed $values Criteria or CcMountName object containing data that is used to create the INSERT statement. + * @param PropelPDO $con the PropelPDO connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from CcMountName object + } + + if ($criteria->containsKey(CcMountNamePeer::ID) && $criteria->keyContainsValue(CcMountNamePeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcMountNamePeer::ID.')'); + } + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch(PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a CcMountName or Criteria object. + * + * @param mixed $values Criteria or CcMountName object containing data that is used to create the UPDATE statement. + * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(CcMountNamePeer::ID); + $value = $criteria->remove(CcMountNamePeer::ID); + if ($value) { + $selectCriteria->add(CcMountNamePeer::ID, $value, $comparison); + } else { + $selectCriteria->setPrimaryTableName(CcMountNamePeer::TABLE_NAME); + } + + } else { // $values is CcMountName object + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the cc_mount_name table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += BasePeer::doDeleteAll(CcMountNamePeer::TABLE_NAME, $con, CcMountNamePeer::DATABASE_NAME); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CcMountNamePeer::clearInstancePool(); + CcMountNamePeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a CcMountName or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CcMountName object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param PropelPDO $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + } + + if ($values instanceof Criteria) { + // invalidate the cache for all objects of this type, since we have no + // way of knowing (without running a query) what objects should be invalidated + // from the cache based on this Criteria. + CcMountNamePeer::clearInstancePool(); + // rename for clarity + $criteria = clone $values; + } elseif ($values instanceof CcMountName) { // it's a model object + // invalidate the cache for this single object + CcMountNamePeer::removeInstanceFromPool($values); + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(CcMountNamePeer::ID, (array) $values, Criteria::IN); + // invalidate the cache for this object(s) + foreach ((array) $values as $singleval) { + CcMountNamePeer::removeInstanceFromPool($singleval); + } + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + CcMountNamePeer::clearRelatedInstancePool(); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Validates all modified columns of given CcMountName object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param CcMountName $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(CcMountName $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(CcMountNamePeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(CcMountNamePeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(CcMountNamePeer::DATABASE_NAME, CcMountNamePeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param int $pk the primary key. + * @param PropelPDO $con the connection to use + * @return CcMountName + */ + public static function retrieveByPK($pk, PropelPDO $con = null) + { + + if (null !== ($obj = CcMountNamePeer::getInstanceFromPool((string) $pk))) { + return $obj; + } + + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); + $criteria->add(CcMountNamePeer::ID, $pk); + + $v = CcMountNamePeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param PropelPDO $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, PropelPDO $con = null) + { + if ($con === null) { + $con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(CcMountNamePeer::DATABASE_NAME); + $criteria->add(CcMountNamePeer::ID, $pks, Criteria::IN); + $objs = CcMountNamePeer::doSelect($criteria, $con); + } + return $objs; + } + +} // BaseCcMountNamePeer + +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +BaseCcMountNamePeer::buildTableMap(); + diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php new file mode 100644 index 000000000..52af75f38 --- /dev/null +++ b/airtime_mvc/application/models/airtime/om/BaseCcMountNameQuery.php @@ -0,0 +1,259 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + return $query; + } + + /** + * Find object by primary key + * Use instance pooling to avoid a database query if the object exists + * + * $obj = $c->findPk(12, $con); + * + * @param mixed $key Primary key to use for the query + * @param PropelPDO $con an optional connection object + * + * @return CcMountName|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ((null !== ($obj = CcMountNamePeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) { + // the object is alredy in the instance pool + return $obj; + } else { + // the object has not been requested yet, or the formatter is not an object formatter + $criteria = $this->isKeepQuery() ? clone $this : $this; + $stmt = $criteria + ->filterByPrimaryKey($key) + ->getSelectStatement($con); + return $criteria->getFormatter()->init($criteria)->formatOne($stmt); + } + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param PropelPDO $con an optional connection object + * + * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + $criteria = $this->isKeepQuery() ? clone $this : $this; + return $this + ->filterByPrimaryKeys($keys) + ->find($con); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + return $this->addUsingAlias(CcMountNamePeer::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + return $this->addUsingAlias(CcMountNamePeer::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * @param int|array $dbId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByDbId($dbId = null, $comparison = null) + { + if (is_array($dbId) && null === $comparison) { + $comparison = Criteria::IN; + } + return $this->addUsingAlias(CcMountNamePeer::ID, $dbId, $comparison); + } + + /** + * Filter the query on the mount_name column + * + * @param string $dbMountName The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByDbMountName($dbMountName = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbMountName)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbMountName)) { + $dbMountName = str_replace('*', '%', $dbMountName); + $comparison = Criteria::LIKE; + } + } + return $this->addUsingAlias(CcMountNamePeer::MOUNT_NAME, $dbMountName, $comparison); + } + + /** + * Filter the query by a related CcListenerCount object + * + * @param CcListenerCount $ccListenerCount the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function filterByCcListenerCount($ccListenerCount, $comparison = null) + { + return $this + ->addUsingAlias(CcMountNamePeer::ID, $ccListenerCount->getDbMountNameId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcListenerCount relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function joinCcListenerCount($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcListenerCount'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcListenerCount'); + } + + return $this; + } + + /** + * Use the CcListenerCount relation CcListenerCount object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcListenerCountQuery A secondary query class using the current class as primary query + */ + public function useCcListenerCountQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCcListenerCount($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcListenerCount', 'CcListenerCountQuery'); + } + + /** + * Exclude object from result + * + * @param CcMountName $ccMountName Object to remove from the list of results + * + * @return CcMountNameQuery The current query, for fluid interface + */ + public function prune($ccMountName = null) + { + if ($ccMountName) { + $this->addUsingAlias(CcMountNamePeer::ID, $ccMountName->getDbId(), Criteria::NOT_EQUAL); + } + + return $this; + } + +} // BaseCcMountNameQuery diff --git a/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php b/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php index 5ede5b73c..d61b8e513 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcTimestamp.php @@ -861,6 +861,31 @@ abstract class BaseCcTimestamp extends BaseObject implements Persistent } } + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcTimestamp is new, it will return + * an empty collection; or if this CcTimestamp has previously + * been saved, it will retrieve related CcListenerCounts from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcTimestamp. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcListenerCount[] List of CcListenerCount objects + */ + public function getCcListenerCountsJoinCcMountName($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcListenerCountQuery::create(null, $criteria); + $query->joinWith('CcMountName', $join_behavior); + + return $this->getCcListenerCounts($query, $con); + } + /** * Clears the current object and sets all attributes to their default values */ diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 2c24d3c71..e22662836 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -454,7 +454,7 @@ - +
    From f08a732c11b5dd5a9230276d74b75b30cd3af5ae Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 13:42:33 -0400 Subject: [PATCH 120/164] reinitialize form after error check. --- .../js/airtime/playouthistory/historytable.js | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 1d2ed7384..8a25cc7a3 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -73,8 +73,7 @@ var AIRTIME = (function(AIRTIME) { } function emptySelectedLogItems() { - var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), - id, $tr, $input; + var $inputs = $historyContentDiv.find(".his_checkbox").find("input"); $inputs.prop('checked', false); $inputs.parents("tr").removeClass("his-selected"); @@ -84,7 +83,8 @@ var AIRTIME = (function(AIRTIME) { function selectCurrentPage() { var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), - id, $tr, $input; + $tr, + $input; $.each($inputs, function(index, input) { $input = $(input); @@ -96,7 +96,8 @@ var AIRTIME = (function(AIRTIME) { function deselectCurrentPage() { var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), - id, $tr, $input; + $tr, + $input; $.each($inputs, function(index, input) { $input = $(input); @@ -342,6 +343,21 @@ var AIRTIME = (function(AIRTIME) { $hisDialogEl.remove(); } + function initializeDialog() { + var $startPicker = $hisDialogEl.find('#his_item_starts_datetimepicker'), + $endPicker = $hisDialogEl.find('#his_item_ends_datetimepicker'); + + $startPicker.datetimepicker(); + + $endPicker.datetimepicker({ + showTimeFirst: true + }); + + $startPicker.on('changeDate', function(e) { + $endPicker.data('datetimepicker').setLocalDate(e.localDate); + }); + } + function makeHistoryDialog(html) { $hisDialogEl = $(html); @@ -349,19 +365,7 @@ var AIRTIME = (function(AIRTIME) { title: $.i18n._("Edit History Record"), modal: false, open: function( event, ui ) { - - var $startPicker = $hisDialogEl.find('#his_item_starts_datetimepicker'); - $startPicker.datetimepicker(); - - var $endPicker = $hisDialogEl.find('#his_item_ends_datetimepicker'); - $endPicker.datetimepicker({ - showTimeFirst: true - }); - - $startPicker.on('changeDate', function(e) { - - $endPicker.data('datetimepicker').setLocalDate(e.localDate); - }); + initializeDialog(); }, close: function() { removeHistoryDialog(); @@ -459,10 +463,10 @@ var AIRTIME = (function(AIRTIME) { $.post(url, data, function(json) { - //TODO put errors on form. if (json.form !== undefined) { var $newForm = $(json.form); $hisDialogEl.html($newForm.html()); + initializeDialog(); } else { removeHistoryDialog(); From 05054fa823bb3ccf2448be702f99fd09b4d3813c Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 14:48:35 -0400 Subject: [PATCH 121/164] IM-931 : Icon Overlap --- airtime_mvc/public/css/history_styles.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index 16ab35049..73716addb 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -42,9 +42,8 @@ } #history_template .icon-ok { - right: 10px; + float: right; margin-left: 10px; - position: absolute; } #configure_item_template li span { From 3769f5e5db63a7b9cd8f6e8a76e30f7844a779a8 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 14:54:44 -0400 Subject: [PATCH 122/164] IM-933 : datepicker switch/design --- airtime_mvc/public/css/history_styles.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index 73716addb..e9c43ca18 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -113,3 +113,25 @@ -moz-border-radius: 2px !important; border-radius: 2px !important; } + +.ui-dialog .ui-dialog-content .well .date .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 3px 3px 0px 6px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; + float: left; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.bootstrap-datetimepicker-widget thead tr:first-child th:hover { + background: #5C5C5C !important; +} From e6b09308a525f3bb23860ec9dd048bd73aae183a Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 15:40:10 -0400 Subject: [PATCH 123/164] IM-932 : File Metadata Distinction/Template Design --- .../playouthistory/template-contents.phtml | 123 +++++++++--------- airtime_mvc/public/css/history_styles.css | 46 +++++++ .../playouthistory/configuretemplate.js | 2 + 3 files changed, 111 insertions(+), 60 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml index 3beb495dd..0209e5e06 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml @@ -9,68 +9,71 @@ Name + + + +
      + template_fields as $field): ?> + + + +
    • " + data-id="" + data-name="" + data-label="" + data-type="" + data-filemd="" + class=""> + + + required_fields)): ?> + + + + +
    • + + + +
    +
    - - -
      - template_fields as $field): ?> - - - -
    • " - data-id="" - data-name="" - data-label="" - data-type="" - data-filemd=""> - - - required_fields)): ?> - - - - -
    • - - - -
    - -

    Add more elements:

    - -
      - fileMD as $md): ?> - - - -
    • " - data-name="" - data-type="" - data-label=""> - - -
    • - -
    - - template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?> -
    - - - -
    - +

    Add more elements:

    + +
      + fileMD as $md): ?> + + + +
    • " + data-name="" + data-type="" + data-label=""> + + +
    • + +
    + + template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?> +
    + + + +
    + +
    template_id, $this->configured)): ?> diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index e9c43ca18..01b4293f6 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -135,3 +135,49 @@ .bootstrap-datetimepicker-widget thead tr:first-child th:hover { background: #5C5C5C !important; } + +#configure_item_template { + width: 100%; + max-width: 620px; +} + +.add_more { + float: right; +} + +#configure_item_template #template_name { + margin-bottom: 14px; +} + +#configure_item_template .template_item_list li { + width: 270px; +} + +#configure_item_template li { + width: 270px; +} + +#configure_item_template .template_item_list li.field_other { + background-color: #CACACA; +} + +.ui-widget-content { + background: #C0C0C0 !important; +} + +#history_content .btn-toolbar { + margin: 10px; +} + +#history_content div.DTTT_container { + margin-top: 8px; +} + +#history_content .dataTables_length { + margin-top: 9px; + margin-right: 10px; +} + +.btn [class^="icon-"] { + margin-top: 0; +} diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index e54b7aee7..0d1c631ff 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -18,6 +18,7 @@ var AIRTIME = (function(AIRTIME) { "data-type='<%= type %>' " + "data-filemd='<%= filemd %>'" + "data-label='<%= label %>'" + + "class='<%= (filemd) ? 'field_filemd' : 'field_other' %>'" + ">" + "<%= label %>" + "<%= type %>" + @@ -29,6 +30,7 @@ var AIRTIME = (function(AIRTIME) { "data-type='<%= type %>' " + "data-filemd='<%= filemd %>'" + "data-label='<%= label %>'" + + "class='<%= (filemd) ? 'field_filemd' : 'field_other' %>'" + ">" + "<%= label %>" + "<%= type %>" + From 5fbc3867f86f59c007da55a423ce3607ae917b8e Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 15:57:29 -0400 Subject: [PATCH 124/164] removing default button after pressing. --- .../js/airtime/playouthistory/configuretemplate.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 0d1c631ff..5087805c6 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -149,13 +149,13 @@ var AIRTIME = (function(AIRTIME) { updateTemplate(template_id, false); }); - $templateDiv.on("click", "#template_set_default", function(){ - var template_id = $(this).data("template"); - var url = baseUrl+"Playouthistory/set-template-default/format/json"; + $templateDiv.on("click", "#template_set_default", function() { + var $btn = $(this), + template_id = $btn.data("template"), + url = baseUrl+"Playouthistory/set-template-default/format/json"; - $.post(url, {id: template_id}, function(json) { - var x; - }); + $btn.remove(); + $.post(url, {id: template_id}); }); }; From 5aa983be36a71128c50629bdb8c3fc2966fce688 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 17:15:36 -0400 Subject: [PATCH 125/164] adding an instance id to the playout history table. --- .../airtime/map/CcPlayoutHistoryTableMap.php | 2 + .../airtime/map/CcShowInstancesTableMap.php | 1 + .../models/airtime/om/BaseCcFiles.php | 25 ++ .../airtime/om/BaseCcPlayoutHistory.php | 129 +++++- .../airtime/om/BaseCcPlayoutHistoryPeer.php | 418 +++++++++++++++++- .../airtime/om/BaseCcPlayoutHistoryQuery.php | 103 +++++ .../models/airtime/om/BaseCcShowInstances.php | 169 +++++++ .../airtime/om/BaseCcShowInstancesPeer.php | 3 + .../airtime/om/BaseCcShowInstancesQuery.php | 68 +++ .../application/services/HistoryService.php | 6 + airtime_mvc/build/schema.xml | 4 + airtime_mvc/build/sql/schema.sql | 3 + 12 files changed, 917 insertions(+), 14 deletions(-) diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php index 87a005168..00e9099a8 100644 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php @@ -42,6 +42,7 @@ class CcPlayoutHistoryTableMap extends TableMap { $this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null); $this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null); $this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null); + $this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', false, null, null); // validators } // initialize() @@ -51,6 +52,7 @@ class CcPlayoutHistoryTableMap extends TableMap { public function buildRelations() { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null); $this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', null); } // buildRelations() diff --git a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php index e6a7b87a0..894592f79 100644 --- a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php @@ -63,6 +63,7 @@ class CcShowInstancesTableMap extends TableMap { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); $this->addRelation('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); + $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); } // buildRelations() } // CcShowInstancesTableMap diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php index d3fecbc5f..38d147c07 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php @@ -5292,6 +5292,31 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcFiles is new, it will return + * an empty collection; or if this CcFiles has previously + * been saved, it will retrieve related CcPlayoutHistorys from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcFiles. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects + */ + public function getCcPlayoutHistorysJoinCcShowInstances($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcPlayoutHistoryQuery::create(null, $criteria); + $query->joinWith('CcShowInstances', $join_behavior); + + return $this->getCcPlayoutHistorys($query, $con); + } + /** * Clears the current object and sets all attributes to their default values */ diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php index bdae214d1..2e55a484f 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistory.php @@ -48,11 +48,22 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent */ protected $ends; + /** + * The value for the instance_id field. + * @var int + */ + protected $instance_id; + /** * @var CcFiles */ protected $aCcFiles; + /** + * @var CcShowInstances + */ + protected $aCcShowInstances; + /** * @var array CcPlayoutHistoryMetaData[] Collection to store aggregation of CcPlayoutHistoryMetaData objects. */ @@ -158,6 +169,16 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent } } + /** + * Get the [instance_id] column value. + * + * @return int + */ + public function getDbInstanceId() + { + return $this->instance_id; + } + /** * Set the value of [id] column. * @@ -300,6 +321,30 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent return $this; } // setDbEnds() + /** + * Set the value of [instance_id] column. + * + * @param int $v new value + * @return CcPlayoutHistory The current object (for fluent API support) + */ + public function setDbInstanceId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->instance_id !== $v) { + $this->instance_id = $v; + $this->modifiedColumns[] = CcPlayoutHistoryPeer::INSTANCE_ID; + } + + if ($this->aCcShowInstances !== null && $this->aCcShowInstances->getDbId() !== $v) { + $this->aCcShowInstances = null; + } + + return $this; + } // setDbInstanceId() + /** * Indicates whether the columns in this object are only set to default values. * @@ -336,6 +381,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->file_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; $this->starts = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; $this->ends = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; + $this->instance_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null; $this->resetModified(); $this->setNew(false); @@ -344,7 +390,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->ensureConsistency(); } - return $startcol + 4; // 4 = CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 5; // 5 = CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating CcPlayoutHistory object", $e); @@ -370,6 +416,9 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) { $this->aCcFiles = null; } + if ($this->aCcShowInstances !== null && $this->instance_id !== $this->aCcShowInstances->getDbId()) { + $this->aCcShowInstances = null; + } } // ensureConsistency /** @@ -410,6 +459,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent if ($deep) { // also de-associate any related objects? $this->aCcFiles = null; + $this->aCcShowInstances = null; $this->collCcPlayoutHistoryMetaDatas = null; } // if (deep) @@ -534,6 +584,13 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->setCcFiles($this->aCcFiles); } + if ($this->aCcShowInstances !== null) { + if ($this->aCcShowInstances->isModified() || $this->aCcShowInstances->isNew()) { + $affectedRows += $this->aCcShowInstances->save($con); + } + $this->setCcShowInstances($this->aCcShowInstances); + } + if ($this->isNew() ) { $this->modifiedColumns[] = CcPlayoutHistoryPeer::ID; } @@ -642,6 +699,12 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent } } + if ($this->aCcShowInstances !== null) { + if (!$this->aCcShowInstances->validate($columns)) { + $failureMap = array_merge($failureMap, $this->aCcShowInstances->getValidationFailures()); + } + } + if (($retval = CcPlayoutHistoryPeer::doValidate($this, $columns)) !== true) { $failureMap = array_merge($failureMap, $retval); @@ -701,6 +764,9 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent case 3: return $this->getDbEnds(); break; + case 4: + return $this->getDbInstanceId(); + break; default: return null; break; @@ -729,11 +795,15 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $keys[1] => $this->getDbFileId(), $keys[2] => $this->getDbStarts(), $keys[3] => $this->getDbEnds(), + $keys[4] => $this->getDbInstanceId(), ); if ($includeForeignObjects) { if (null !== $this->aCcFiles) { $result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true); } + if (null !== $this->aCcShowInstances) { + $result['CcShowInstances'] = $this->aCcShowInstances->toArray($keyType, $includeLazyLoadColumns, true); + } } return $result; } @@ -777,6 +847,9 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent case 3: $this->setDbEnds($value); break; + case 4: + $this->setDbInstanceId($value); + break; } // switch() } @@ -805,6 +878,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent if (array_key_exists($keys[1], $arr)) $this->setDbFileId($arr[$keys[1]]); if (array_key_exists($keys[2], $arr)) $this->setDbStarts($arr[$keys[2]]); if (array_key_exists($keys[3], $arr)) $this->setDbEnds($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setDbInstanceId($arr[$keys[4]]); } /** @@ -820,6 +894,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent if ($this->isColumnModified(CcPlayoutHistoryPeer::FILE_ID)) $criteria->add(CcPlayoutHistoryPeer::FILE_ID, $this->file_id); if ($this->isColumnModified(CcPlayoutHistoryPeer::STARTS)) $criteria->add(CcPlayoutHistoryPeer::STARTS, $this->starts); if ($this->isColumnModified(CcPlayoutHistoryPeer::ENDS)) $criteria->add(CcPlayoutHistoryPeer::ENDS, $this->ends); + if ($this->isColumnModified(CcPlayoutHistoryPeer::INSTANCE_ID)) $criteria->add(CcPlayoutHistoryPeer::INSTANCE_ID, $this->instance_id); return $criteria; } @@ -884,6 +959,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $copyObj->setDbFileId($this->file_id); $copyObj->setDbStarts($this->starts); $copyObj->setDbEnds($this->ends); + $copyObj->setDbInstanceId($this->instance_id); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of @@ -990,6 +1066,55 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent return $this->aCcFiles; } + /** + * Declares an association between this object and a CcShowInstances object. + * + * @param CcShowInstances $v + * @return CcPlayoutHistory The current object (for fluent API support) + * @throws PropelException + */ + public function setCcShowInstances(CcShowInstances $v = null) + { + if ($v === null) { + $this->setDbInstanceId(NULL); + } else { + $this->setDbInstanceId($v->getDbId()); + } + + $this->aCcShowInstances = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the CcShowInstances object, it will not be re-added. + if ($v !== null) { + $v->addCcPlayoutHistory($this); + } + + return $this; + } + + + /** + * Get the associated CcShowInstances object + * + * @param PropelPDO Optional Connection object. + * @return CcShowInstances The associated CcShowInstances object. + * @throws PropelException + */ + public function getCcShowInstances(PropelPDO $con = null) + { + if ($this->aCcShowInstances === null && ($this->instance_id !== null)) { + $this->aCcShowInstances = CcShowInstancesQuery::create()->findPk($this->instance_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCcShowInstances->addCcPlayoutHistorys($this); + */ + } + return $this->aCcShowInstances; + } + /** * Clears out the collCcPlayoutHistoryMetaDatas collection * @@ -1108,6 +1233,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->file_id = null; $this->starts = null; $this->ends = null; + $this->instance_id = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->clearAllReferences(); @@ -1137,6 +1263,7 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent $this->collCcPlayoutHistoryMetaDatas = null; $this->aCcFiles = null; + $this->aCcShowInstances = null; } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php index 91fda6a6b..01b944a65 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryPeer.php @@ -26,7 +26,7 @@ abstract class BaseCcPlayoutHistoryPeer { const TM_CLASS = 'CcPlayoutHistoryTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 4; + const NUM_COLUMNS = 5; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -43,6 +43,9 @@ abstract class BaseCcPlayoutHistoryPeer { /** the column name for the ENDS field */ const ENDS = 'cc_playout_history.ENDS'; + /** the column name for the INSTANCE_ID field */ + const INSTANCE_ID = 'cc_playout_history.INSTANCE_ID'; + /** * An identiy map to hold any loaded instances of CcPlayoutHistory objects. * This must be public so that other peer classes can access this when hydrating from JOIN @@ -59,12 +62,12 @@ abstract class BaseCcPlayoutHistoryPeer { * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFileId', 'DbStarts', 'DbEnds', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbStarts', 'dbEnds', ), - BasePeer::TYPE_COLNAME => array (self::ID, self::FILE_ID, self::STARTS, self::ENDS, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'STARTS', 'ENDS', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'starts', 'ends', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFileId', 'DbStarts', 'DbEnds', 'DbInstanceId', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbStarts', 'dbEnds', 'dbInstanceId', ), + BasePeer::TYPE_COLNAME => array (self::ID, self::FILE_ID, self::STARTS, self::ENDS, self::INSTANCE_ID, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'STARTS', 'ENDS', 'INSTANCE_ID', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'starts', 'ends', 'instance_id', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) ); /** @@ -74,12 +77,12 @@ abstract class BaseCcPlayoutHistoryPeer { * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbStarts' => 2, 'DbEnds' => 3, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbStarts' => 2, 'dbEnds' => 3, ), - BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FILE_ID => 1, self::STARTS => 2, self::ENDS => 3, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'STARTS' => 2, 'ENDS' => 3, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'starts' => 2, 'ends' => 3, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbStarts' => 2, 'DbEnds' => 3, 'DbInstanceId' => 4, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbStarts' => 2, 'dbEnds' => 3, 'dbInstanceId' => 4, ), + BasePeer::TYPE_COLNAME => array (self::ID => 0, self::FILE_ID => 1, self::STARTS => 2, self::ENDS => 3, self::INSTANCE_ID => 4, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'STARTS' => 2, 'ENDS' => 3, 'INSTANCE_ID' => 4, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'starts' => 2, 'ends' => 3, 'instance_id' => 4, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) ); /** @@ -155,11 +158,13 @@ abstract class BaseCcPlayoutHistoryPeer { $criteria->addSelectColumn(CcPlayoutHistoryPeer::FILE_ID); $criteria->addSelectColumn(CcPlayoutHistoryPeer::STARTS); $criteria->addSelectColumn(CcPlayoutHistoryPeer::ENDS); + $criteria->addSelectColumn(CcPlayoutHistoryPeer::INSTANCE_ID); } else { $criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.FILE_ID'); $criteria->addSelectColumn($alias . '.STARTS'); $criteria->addSelectColumn($alias . '.ENDS'); + $criteria->addSelectColumn($alias . '.INSTANCE_ID'); } } @@ -498,6 +503,56 @@ abstract class BaseCcPlayoutHistoryPeer { } + /** + * Returns the number of rows matching criteria, joining the related CcShowInstances table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinCcShowInstances(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + /** * Selects a collection of CcPlayoutHistory objects pre-filled with their CcFiles objects. * @param Criteria $criteria @@ -564,6 +619,72 @@ abstract class BaseCcPlayoutHistoryPeer { } + /** + * Selects a collection of CcPlayoutHistory objects pre-filled with their CcShowInstances objects. + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistory objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinCcShowInstances(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + CcShowInstancesPeer::addSelectColumns($criteria); + + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); + } // if $obj1 already loaded + + $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol); + if ($key2 !== null) { + $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcShowInstancesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol); + CcShowInstancesPeer::addInstanceToPool($obj2, $key2); + } // if obj2 already loaded + + // Add the $obj1 (CcPlayoutHistory) to $obj2 (CcShowInstances) + $obj2->addCcPlayoutHistory($obj1); + + } // if joined row was not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + /** * Returns the number of rows matching criteria, joining all related tables * @@ -602,6 +723,8 @@ abstract class BaseCcPlayoutHistoryPeer { $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + $stmt = BasePeer::doCount($criteria, $con); if ($row = $stmt->fetch(PDO::FETCH_NUM)) { @@ -638,8 +761,13 @@ abstract class BaseCcPlayoutHistoryPeer { CcFilesPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); + CcShowInstancesPeer::addSelectColumns($criteria); + $startcol4 = $startcol3 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS); + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + $stmt = BasePeer::doSelect($criteria, $con); $results = array(); @@ -675,6 +803,270 @@ abstract class BaseCcPlayoutHistoryPeer { $obj2->addCcPlayoutHistory($obj1); } // if joined row not null + // Add objects for joined CcShowInstances rows + + $key3 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol3); + if ($key3 !== null) { + $obj3 = CcShowInstancesPeer::getInstanceFromPool($key3); + if (!$obj3) { + + $cls = CcShowInstancesPeer::getOMClass(false); + + $obj3 = new $cls(); + $obj3->hydrate($row, $startcol3); + CcShowInstancesPeer::addInstanceToPool($obj3, $key3); + } // if obj3 loaded + + // Add the $obj1 (CcPlayoutHistory) to the collection in $obj3 (CcShowInstances) + $obj3->addCcPlayoutHistory($obj1); + } // if joined row not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcFiles table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcFiles(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Returns the number of rows matching criteria, joining the related CcShowInstances table + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return int Number of matching rows. + */ + public static function doCountJoinAllExceptCcShowInstances(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // We need to set the primary table name, since in the case that there are no WHERE columns + // it will be impossible for the BasePeer::createSelectSql() method to determine which + // tables go into the FROM clause. + $criteria->setPrimaryTableName(CcPlayoutHistoryPeer::TABLE_NAME); + + if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->setDistinct(); + } + + if (!$criteria->hasSelectClause()) { + CcPlayoutHistoryPeer::addSelectColumns($criteria); + } + + $criteria->clearOrderByColumns(); // ORDER BY should not affect count + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + if ($con === null) { + $con = Propel::getConnection(CcPlayoutHistoryPeer::DATABASE_NAME, Propel::CONNECTION_READ); + } + + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + $stmt = BasePeer::doCount($criteria, $con); + + if ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $count = (int) $row[0]; + } else { + $count = 0; // no rows returned; we infer that means 0 matches. + } + $stmt->closeCursor(); + return $count; + } + + + /** + * Selects a collection of CcPlayoutHistory objects pre-filled with all related objects except CcFiles. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistory objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcFiles(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + + CcShowInstancesPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryPeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcShowInstances rows + + $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcShowInstancesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcShowInstancesPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcPlayoutHistory) to the collection in $obj2 (CcShowInstances) + $obj2->addCcPlayoutHistory($obj1); + + } // if joined row is not null + + $results[] = $obj1; + } + $stmt->closeCursor(); + return $results; + } + + + /** + * Selects a collection of CcPlayoutHistory objects pre-filled with all related objects except CcShowInstances. + * + * @param Criteria $criteria + * @param PropelPDO $con + * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN + * @return array Array of CcPlayoutHistory objects. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectJoinAllExceptCcShowInstances(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $criteria = clone $criteria; + + // Set the correct dbName if it has not been overridden + // $criteria->getDbName() will return the same object if not set to another value + // so == check is okay and faster + if ($criteria->getDbName() == Propel::getDefaultDB()) { + $criteria->setDbName(self::DATABASE_NAME); + } + + CcPlayoutHistoryPeer::addSelectColumns($criteria); + $startcol2 = (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS); + + CcFilesPeer::addSelectColumns($criteria); + $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS); + + $criteria->addJoin(CcPlayoutHistoryPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + + + $stmt = BasePeer::doSelect($criteria, $con); + $results = array(); + + while ($row = $stmt->fetch(PDO::FETCH_NUM)) { + $key1 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = CcPlayoutHistoryPeer::getInstanceFromPool($key1))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj1->hydrate($row, 0, true); // rehydrate + } else { + $cls = CcPlayoutHistoryPeer::getOMClass(false); + + $obj1 = new $cls(); + $obj1->hydrate($row); + CcPlayoutHistoryPeer::addInstanceToPool($obj1, $key1); + } // if obj1 already loaded + + // Add objects for joined CcFiles rows + + $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2); + if ($key2 !== null) { + $obj2 = CcFilesPeer::getInstanceFromPool($key2); + if (!$obj2) { + + $cls = CcFilesPeer::getOMClass(false); + + $obj2 = new $cls(); + $obj2->hydrate($row, $startcol2); + CcFilesPeer::addInstanceToPool($obj2, $key2); + } // if $obj2 already loaded + + // Add the $obj1 (CcPlayoutHistory) to the collection in $obj2 (CcFiles) + $obj2->addCcPlayoutHistory($obj1); + + } // if joined row is not null + $results[] = $obj1; } $stmt->closeCursor(); diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php index 370238102..b772a0d7a 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcPlayoutHistoryQuery.php @@ -10,11 +10,13 @@ * @method CcPlayoutHistoryQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column * @method CcPlayoutHistoryQuery orderByDbStarts($order = Criteria::ASC) Order by the starts column * @method CcPlayoutHistoryQuery orderByDbEnds($order = Criteria::ASC) Order by the ends column + * @method CcPlayoutHistoryQuery orderByDbInstanceId($order = Criteria::ASC) Order by the instance_id column * * @method CcPlayoutHistoryQuery groupByDbId() Group by the id column * @method CcPlayoutHistoryQuery groupByDbFileId() Group by the file_id column * @method CcPlayoutHistoryQuery groupByDbStarts() Group by the starts column * @method CcPlayoutHistoryQuery groupByDbEnds() Group by the ends column + * @method CcPlayoutHistoryQuery groupByDbInstanceId() Group by the instance_id column * * @method CcPlayoutHistoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcPlayoutHistoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query @@ -24,6 +26,10 @@ * @method CcPlayoutHistoryQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation * @method CcPlayoutHistoryQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation * + * @method CcPlayoutHistoryQuery leftJoinCcShowInstances($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShowInstances relation + * @method CcPlayoutHistoryQuery rightJoinCcShowInstances($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowInstances relation + * @method CcPlayoutHistoryQuery innerJoinCcShowInstances($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowInstances relation + * * @method CcPlayoutHistoryQuery leftJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryMetaData relation * @method CcPlayoutHistoryQuery rightJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryMetaData relation * @method CcPlayoutHistoryQuery innerJoinCcPlayoutHistoryMetaData($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistoryMetaData relation @@ -35,11 +41,13 @@ * @method CcPlayoutHistory findOneByDbFileId(int $file_id) Return the first CcPlayoutHistory filtered by the file_id column * @method CcPlayoutHistory findOneByDbStarts(string $starts) Return the first CcPlayoutHistory filtered by the starts column * @method CcPlayoutHistory findOneByDbEnds(string $ends) Return the first CcPlayoutHistory filtered by the ends column + * @method CcPlayoutHistory findOneByDbInstanceId(int $instance_id) Return the first CcPlayoutHistory filtered by the instance_id column * * @method array findByDbId(int $id) Return CcPlayoutHistory objects filtered by the id column * @method array findByDbFileId(int $file_id) Return CcPlayoutHistory objects filtered by the file_id column * @method array findByDbStarts(string $starts) Return CcPlayoutHistory objects filtered by the starts column * @method array findByDbEnds(string $ends) Return CcPlayoutHistory objects filtered by the ends column + * @method array findByDbInstanceId(int $instance_id) Return CcPlayoutHistory objects filtered by the instance_id column * * @package propel.generator.airtime.om */ @@ -259,6 +267,37 @@ abstract class BaseCcPlayoutHistoryQuery extends ModelCriteria return $this->addUsingAlias(CcPlayoutHistoryPeer::ENDS, $dbEnds, $comparison); } + /** + * Filter the query on the instance_id column + * + * @param int|array $dbInstanceId The value to use as filter. + * Accepts an associative array('min' => $minValue, 'max' => $maxValue) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByDbInstanceId($dbInstanceId = null, $comparison = null) + { + if (is_array($dbInstanceId)) { + $useMinMax = false; + if (isset($dbInstanceId['min'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($dbInstanceId['max'])) { + $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + return $this->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $dbInstanceId, $comparison); + } + /** * Filter the query by a related CcFiles object * @@ -323,6 +362,70 @@ abstract class BaseCcPlayoutHistoryQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery'); } + /** + * Filter the query by a related CcShowInstances object + * + * @param CcShowInstances $ccShowInstances the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function filterByCcShowInstances($ccShowInstances, $comparison = null) + { + return $this + ->addUsingAlias(CcPlayoutHistoryPeer::INSTANCE_ID, $ccShowInstances->getDbId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcShowInstances relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryQuery The current query, for fluid interface + */ + public function joinCcShowInstances($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcShowInstances'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcShowInstances'); + } + + return $this; + } + + /** + * Use the CcShowInstances relation CcShowInstances object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcShowInstancesQuery A secondary query class using the current class as primary query + */ + public function useCcShowInstancesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCcShowInstances($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcShowInstances', 'CcShowInstancesQuery'); + } + /** * Filter the query by a related CcPlayoutHistoryMetaData object * diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php index 1caf7df62..a783a8e20 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php @@ -125,6 +125,11 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent */ protected $collCcSchedules; + /** + * @var array CcPlayoutHistory[] Collection to store aggregation of CcPlayoutHistory objects. + */ + protected $collCcPlayoutHistorys; + /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -889,6 +894,8 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent $this->collCcSchedules = null; + $this->collCcPlayoutHistorys = null; + } // if (deep) } @@ -1064,6 +1071,14 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } + if ($this->collCcPlayoutHistorys !== null) { + foreach ($this->collCcPlayoutHistorys as $referrerFK) { + if (!$referrerFK->isDeleted()) { + $affectedRows += $referrerFK->save($con); + } + } + } + $this->alreadyInSave = false; } @@ -1175,6 +1190,14 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } + if ($this->collCcPlayoutHistorys !== null) { + foreach ($this->collCcPlayoutHistorys as $referrerFK) { + if (!$referrerFK->validate($columns)) { + $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); + } + } + } + $this->alreadyInValidation = false; } @@ -1507,6 +1530,12 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent } } + foreach ($this->getCcPlayoutHistorys() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCcPlayoutHistory($relObj->copy($deepCopy)); + } + } + } // if ($deepCopy) @@ -2017,6 +2046,140 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent return $this->getCcSchedules($query, $con); } + /** + * Clears out the collCcPlayoutHistorys collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCcPlayoutHistorys() + */ + public function clearCcPlayoutHistorys() + { + $this->collCcPlayoutHistorys = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Initializes the collCcPlayoutHistorys collection. + * + * By default this just sets the collCcPlayoutHistorys collection to an empty array (like clearcollCcPlayoutHistorys()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @return void + */ + public function initCcPlayoutHistorys() + { + $this->collCcPlayoutHistorys = new PropelObjectCollection(); + $this->collCcPlayoutHistorys->setModel('CcPlayoutHistory'); + } + + /** + * Gets an array of CcPlayoutHistory objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this CcShowInstances is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects + * @throws PropelException + */ + public function getCcPlayoutHistorys($criteria = null, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistorys || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistorys) { + // return empty collection + $this->initCcPlayoutHistorys(); + } else { + $collCcPlayoutHistorys = CcPlayoutHistoryQuery::create(null, $criteria) + ->filterByCcShowInstances($this) + ->find($con); + if (null !== $criteria) { + return $collCcPlayoutHistorys; + } + $this->collCcPlayoutHistorys = $collCcPlayoutHistorys; + } + } + return $this->collCcPlayoutHistorys; + } + + /** + * Returns the number of related CcPlayoutHistory objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param PropelPDO $con + * @return int Count of related CcPlayoutHistory objects. + * @throws PropelException + */ + public function countCcPlayoutHistorys(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + { + if(null === $this->collCcPlayoutHistorys || null !== $criteria) { + if ($this->isNew() && null === $this->collCcPlayoutHistorys) { + return 0; + } else { + $query = CcPlayoutHistoryQuery::create(null, $criteria); + if($distinct) { + $query->distinct(); + } + return $query + ->filterByCcShowInstances($this) + ->count($con); + } + } else { + return count($this->collCcPlayoutHistorys); + } + } + + /** + * Method called to associate a CcPlayoutHistory object to this object + * through the CcPlayoutHistory foreign key attribute. + * + * @param CcPlayoutHistory $l CcPlayoutHistory + * @return void + * @throws PropelException + */ + public function addCcPlayoutHistory(CcPlayoutHistory $l) + { + if ($this->collCcPlayoutHistorys === null) { + $this->initCcPlayoutHistorys(); + } + if (!$this->collCcPlayoutHistorys->contains($l)) { // only add it if the **same** object is not already associated + $this->collCcPlayoutHistorys[]= $l; + $l->setCcShowInstances($this); + } + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CcShowInstances is new, it will return + * an empty collection; or if this CcShowInstances has previously + * been saved, it will retrieve related CcPlayoutHistorys from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CcShowInstances. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param PropelPDO $con optional connection object + * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects + */ + public function getCcPlayoutHistorysJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + { + $query = CcPlayoutHistoryQuery::create(null, $criteria); + $query->joinWith('CcFiles', $join_behavior); + + return $this->getCcPlayoutHistorys($query, $con); + } + /** * Clears the current object and sets all attributes to their default values */ @@ -2065,10 +2228,16 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent $o->clearAllReferences($deep); } } + if ($this->collCcPlayoutHistorys) { + foreach ((array) $this->collCcPlayoutHistorys as $o) { + $o->clearAllReferences($deep); + } + } } // if ($deep) $this->collCcShowInstancessRelatedByDbId = null; $this->collCcSchedules = null; + $this->collCcPlayoutHistorys = null; $this->aCcShow = null; $this->aCcShowInstancesRelatedByDbOriginalShow = null; $this->aCcFiles = null; diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php index 076f2182c..ad91f182c 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesPeer.php @@ -399,6 +399,9 @@ abstract class BaseCcShowInstancesPeer { // Invalidate objects in CcSchedulePeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. CcSchedulePeer::clearInstancePool(); + // Invalidate objects in CcPlayoutHistoryPeer instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CcPlayoutHistoryPeer::clearInstancePool(); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php index 08a245d2e..871b907ae 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstancesQuery.php @@ -56,6 +56,10 @@ * @method CcShowInstancesQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation * @method CcShowInstancesQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation * + * @method CcShowInstancesQuery leftJoinCcPlayoutHistory($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistory relation + * @method CcShowInstancesQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation + * @method CcShowInstancesQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation + * * @method CcShowInstances findOne(PropelPDO $con = null) Return the first CcShowInstances matching the query * @method CcShowInstances findOneOrCreate(PropelPDO $con = null) Return the first CcShowInstances matching the query, or a new CcShowInstances object populated from the query conditions when no match is found * @@ -848,6 +852,70 @@ abstract class BaseCcShowInstancesQuery extends ModelCriteria ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery'); } + /** + * Filter the query by a related CcPlayoutHistory object + * + * @param CcPlayoutHistory $ccPlayoutHistory the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return CcShowInstancesQuery The current query, for fluid interface + */ + public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null) + { + return $this + ->addUsingAlias(CcShowInstancesPeer::ID, $ccPlayoutHistory->getDbInstanceId(), $comparison); + } + + /** + * Adds a JOIN clause to the query using the CcPlayoutHistory relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcShowInstancesQuery The current query, for fluid interface + */ + public function joinCcPlayoutHistory($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CcPlayoutHistory'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CcPlayoutHistory'); + } + + return $this; + } + + /** + * Use the CcPlayoutHistory relation CcPlayoutHistory object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return CcPlayoutHistoryQuery A secondary query class using the current class as primary query + */ + public function useCcPlayoutHistoryQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCcPlayoutHistory($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery'); + } + /** * Exclude object from result * diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 6a8d3bda5..2307c5a67 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -422,6 +422,11 @@ class Application_Service_HistoryService "history" => $rows ); } + + public function getShowList($startDT, $endDT, $opts) + { + + } public function insertPlayedItem($schedId) { @@ -447,6 +452,7 @@ class Application_Service_HistoryService $history->setDbFileId($fileId); $history->setDbStarts($item->getDbStarts(null)); $history->setDbEnds($item->getDbEnds(null)); + $history->setDbInstanceId($item->getDbInstanceId()); foreach ($metadata as $key => $val) { $meta = new CcPlayoutHistoryMetaData(); diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 151795315..bc8944ab0 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -484,9 +484,13 @@ + + + + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index 3baee1847..1ea9dd4f6 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -766,6 +766,7 @@ CREATE TABLE "cc_playout_history" "file_id" INTEGER, "starts" TIMESTAMP NOT NULL, "ends" TIMESTAMP NOT NULL, + "instance_id" INTEGER, PRIMARY KEY ("id") ); @@ -893,6 +894,8 @@ ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_playout_history_file_tag_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; +ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_his_item_inst_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE CASCADE; + ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "cc_playout_history_metadata_entry_fkey" FOREIGN KEY ("history_id") REFERENCES "cc_playout_history" ("id") ON DELETE CASCADE; ALTER TABLE "cc_playout_history_template_field" ADD CONSTRAINT "cc_playout_history_template_template_fkey" FOREIGN KEY ("template_id") REFERENCES "cc_playout_history_template" ("id") ON DELETE CASCADE; From 653a6384b9aaa607e13ed700a49b53a947fc28eb Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 18:25:46 -0400 Subject: [PATCH 126/164] creating a separate controller for playouthistory templates. --- airtime_mvc/application/configs/ACL.php | 4 +- airtime_mvc/application/configs/constants.php | 6 + .../application/configs/navigation.php | 8 +- .../controllers/PlayouthistoryController.php | 162 +++--------------- .../PlayouthistorytemplateController.php | 143 ++++++++++++++++ airtime_mvc/application/models/User.php | 5 - .../application/services/HistoryService.php | 11 +- .../application/views/scripts/menu.phtml | 2 + .../views/scripts/playouthistory/index.phtml | 8 + .../configure-template.phtml | 2 +- .../index.phtml} | 16 +- .../template-contents.phtml | 0 .../playouthistory/configuretemplate.js | 4 +- .../js/airtime/playouthistory/template.js | 8 +- 14 files changed, 217 insertions(+), 162 deletions(-) create mode 100644 airtime_mvc/application/controllers/PlayouthistorytemplateController.php rename airtime_mvc/application/views/scripts/{playouthistory => playouthistorytemplate}/configure-template.phtml (55%) rename airtime_mvc/application/views/scripts/{playouthistory/template.phtml => playouthistorytemplate/index.phtml} (83%) rename airtime_mvc/application/views/scripts/{playouthistory => playouthistorytemplate}/template-contents.phtml (100%) diff --git a/airtime_mvc/application/configs/ACL.php b/airtime_mvc/application/configs/ACL.php index a23846a99..83cba4b08 100644 --- a/airtime_mvc/application/configs/ACL.php +++ b/airtime_mvc/application/configs/ACL.php @@ -23,6 +23,7 @@ $ccAcl->add(new Zend_Acl_Resource('library')) ->add(new Zend_Acl_Resource('preference')) ->add(new Zend_Acl_Resource('showbuilder')) ->add(new Zend_Acl_Resource('playouthistory')) + ->add(new Zend_Acl_Resource('playouthistorytemplate')) ->add(new Zend_Acl_Resource('listenerstat')) ->add(new Zend_Acl_Resource('usersettings')) ->add(new Zend_Acl_Resource('audiopreview')) @@ -46,7 +47,8 @@ $ccAcl->allow('G', 'index') ->allow('H', 'plupload') ->allow('H', 'library') ->allow('H', 'playlist') - ->allow('A', 'playouthistory') + ->allow('H', 'playouthistory') + ->allow('A', 'playouthistorytemplate') ->allow('A', 'listenerstat') ->allow('A', 'user') ->allow('A', 'systemstatus') diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 6020c0983..4b4d9634a 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -38,6 +38,12 @@ define('MDATA_KEY_CUE_OUT' , 'cueout'); define('UI_MDATA_VALUE_FORMAT_FILE' , 'File'); define('UI_MDATA_VALUE_FORMAT_STREAM' , 'live stream'); +//User types +define('UTYPE_HOST' , 'H'); +define('UTYPE_ADMIN' , 'A'); +define('UTYPE_GUEST' , 'G'); +define('UTYPE_PROGRAM_MANAGER' , 'P'); + //Constants for playout history template fields define('TEMPLATE_DATE', 'date'); define('TEMPLATE_TIME', 'time'); diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index ebbe7b12a..f3149f146 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -20,7 +20,7 @@ $pages = array( 'module' => 'default', 'controller' => 'Plupload', 'action' => 'index', - 'resource' => 'plupload' + 'resource' => 'plupload' ), array( 'label' => _('Library'), @@ -103,9 +103,9 @@ $pages = array( array( 'label' => _('History Templates'), 'module' => 'default', - 'controller' => 'playouthistory', - 'action' => 'template', - 'resource' => 'playouthistory' + 'controller' => 'playouthistorytemplate', + 'action' => 'index', + 'resource' => 'playouthistorytemplate' ), ) ), diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index f5becc485..29997e17e 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -8,6 +8,7 @@ class PlayouthistoryController extends Zend_Controller_Action $ajaxContext ->addActionContext('file-history-feed', 'json') ->addActionContext('item-history-feed', 'json') + ->addActionContext('show-history-feed', 'json') ->addActionContext('edit-file-item', 'json') ->addActionContext('create-list-item', 'json') ->addActionContext('edit-list-item', 'json') @@ -15,10 +16,6 @@ class PlayouthistoryController extends Zend_Controller_Action ->addActionContext('delete-list-items', 'json') ->addActionContext('update-list-item', 'json') ->addActionContext('update-file-item', 'json') - ->addActionContext('create-template', 'json') - ->addActionContext('update-template', 'json') - ->addActionContext('delete-template', 'json') - ->addActionContext('set-template-default', 'json') ->initContext(); } @@ -56,13 +53,11 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - //$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery-ui-timepicker-addon.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - + $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - //$this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); @@ -72,7 +67,6 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - //$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery-ui-timepicker-addon.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); //set datatables columns for display of data. @@ -83,6 +77,9 @@ class PlayouthistoryController extends Zend_Controller_Action $columns = json_encode($historyService->getDatatablesFileSummaryColumns()); $script.= "localStorage.setItem( 'datatables-historyfile-aoColumns', JSON.stringify($columns) );"; $this->view->headScript()->appendScript($script); + + $user = Application_Model_User::getCurrentUser(); + $this->view->userType = $user->getType(); } public function fileHistoryFeedAction() @@ -140,6 +137,27 @@ class PlayouthistoryController extends Zend_Controller_Action Logging::info($e->getMessage()); } } + + public function showHistoryFeedAction() + { + try { + $request = $this->getRequest(); + $current_time = time(); + $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); + $ends_epoch = $request->getParam("end", $current_time); + + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); + $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); + + $historyService = new Application_Service_HistoryService(); + $r = $historyService->getShowList($startsDT, $endsDT); + + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } public function editFileItemAction() { @@ -247,132 +265,4 @@ class PlayouthistoryController extends Zend_Controller_Action $this->_helper->json->sendJson($json); } - - public function templateAction() - { - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - $historyService = new Application_Service_HistoryService(); - $this->view->template_list = $historyService->getListItemTemplates(); - $this->view->template_file = $historyService->getFileTemplates(); - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - - public function configureTemplateAction() { - - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - try { - - $templateId = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $template = $historyService->loadTemplate($templateId); - - $templateType = $template["type"]; - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; - $mandatoryFields = $historyService->$getMandatoryFields(); - - $this->view->template_id = $templateId; - $this->view->template_name = $template["name"]; - $this->view->template_fields = $template["fields"]; - $this->view->template_type = $templateType; - $this->view->fileMD = $historyService->getFileMetadataTypes(); - $this->view->fields = $historyService->getFieldTypes(); - $this->view->required_fields = $mandatoryFields; - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - catch (Exception $e) { - Logging::info("Error?"); - Logging::info($e); - Logging::info($e->getMessage()); - - $this->_forward('template', 'playouthistory'); - } - } - - public function createTemplateAction() - { - $templateType = $this->_getParam('type', null); - - $request = $this->getRequest(); - $params = $request->getPost(); - - try { - $historyService = new Application_Service_HistoryService(); - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $id = $historyService->createTemplate($params); - - $this->view->url = $this->view->baseUrl("Playouthistory/configure-template/id/{$id}"); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - - $this->view->error = $e->getMessage(); - } - } - - public function setTemplateDefaultAction() - { - $templateId = $this->_getParam('id', null); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->setConfiguredTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function updateTemplateAction() - { - $templateId = $this->_getParam('id', null); - $name = $this->_getParam('name', null); - $fields = $this->_getParam('fields', array()); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->updateItemTemplate($templateId, $name, $fields); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function deleteTemplateAction() - { - $templateId = $this->_getParam('id'); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->deleteTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } } diff --git a/airtime_mvc/application/controllers/PlayouthistorytemplateController.php b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php new file mode 100644 index 000000000..00f4cbedc --- /dev/null +++ b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php @@ -0,0 +1,143 @@ +_helper->getHelper('AjaxContext'); + $ajaxContext + ->addActionContext('create-template', 'json') + ->addActionContext('update-template', 'json') + ->addActionContext('delete-template', 'json') + ->addActionContext('set-template-default', 'json') + ->initContext(); + } + + public function indexAction() + { + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); + + $historyService = new Application_Service_HistoryService(); + $this->view->template_list = $historyService->getListItemTemplates(); + $this->view->template_file = $historyService->getFileTemplates(); + $this->view->configured = $historyService->getConfiguredTemplateIds(); + } + + public function configureTemplateAction() { + + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); + + try { + + $templateId = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $template = $historyService->loadTemplate($templateId); + + $templateType = $template["type"]; + $supportedTypes = $historyService->getSupportedTemplateTypes(); + + if (!in_array($templateType, $supportedTypes)) { + throw new Exception("Error: $templateType is not supported."); + } + + $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; + $mandatoryFields = $historyService->$getMandatoryFields(); + + $this->view->template_id = $templateId; + $this->view->template_name = $template["name"]; + $this->view->template_fields = $template["fields"]; + $this->view->template_type = $templateType; + $this->view->fileMD = $historyService->getFileMetadataTypes(); + $this->view->fields = $historyService->getFieldTypes(); + $this->view->required_fields = $mandatoryFields; + $this->view->configured = $historyService->getConfiguredTemplateIds(); + } + catch (Exception $e) { + Logging::info("Error?"); + Logging::info($e); + Logging::info($e->getMessage()); + + $this->_forward('index', 'playouthistorytemplate'); + } + } + + public function createTemplateAction() + { + $templateType = $this->_getParam('type', null); + + $request = $this->getRequest(); + $params = $request->getPost(); + + try { + $historyService = new Application_Service_HistoryService(); + $supportedTypes = $historyService->getSupportedTemplateTypes(); + + if (!in_array($templateType, $supportedTypes)) { + throw new Exception("Error: $templateType is not supported."); + } + + $id = $historyService->createTemplate($params); + + $this->view->url = $this->view->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + + $this->view->error = $e->getMessage(); + } + } + + public function setTemplateDefaultAction() + { + $templateId = $this->_getParam('id', null); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->setConfiguredTemplate($templateId); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } + + public function updateTemplateAction() + { + $templateId = $this->_getParam('id', null); + $name = $this->_getParam('name', null); + $fields = $this->_getParam('fields', array()); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->updateItemTemplate($templateId, $name, $fields); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } + + public function deleteTemplateAction() + { + $templateId = $this->_getParam('id'); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->deleteTemplate($templateId); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } +} \ No newline at end of file diff --git a/airtime_mvc/application/models/User.php b/airtime_mvc/application/models/User.php index a3b2c5d3d..8a1008577 100644 --- a/airtime_mvc/application/models/User.php +++ b/airtime_mvc/application/models/User.php @@ -1,10 +1,5 @@ isHost()) { + + } } public function insertPlayedItem($schedId) { diff --git a/airtime_mvc/application/views/scripts/menu.phtml b/airtime_mvc/application/views/scripts/menu.phtml index 009b937bd..7523b5332 100644 --- a/airtime_mvc/application/views/scripts/menu.phtml +++ b/airtime_mvc/application/views/scripts/menu.phtml @@ -8,9 +8,11 @@ diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index e899d8651..0a27df62f 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -3,15 +3,23 @@
      + userType != UTYPE_HOST): ?>
    • + +
    + userType != UTYPE_HOST): ?>
    + +
    + Show Summary +
    \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/configure-template.phtml b/airtime_mvc/application/views/scripts/playouthistorytemplate/configure-template.phtml similarity index 55% rename from airtime_mvc/application/views/scripts/playouthistory/configure-template.phtml rename to airtime_mvc/application/views/scripts/playouthistorytemplate/configure-template.phtml index 7a77b1afd..67da19bd4 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/configure-template.phtml +++ b/airtime_mvc/application/views/scripts/playouthistorytemplate/configure-template.phtml @@ -1,3 +1,3 @@
    - render('playouthistory/template-contents.phtml'); ?> + render('playouthistorytemplate/template-contents.phtml'); ?>
    \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/playouthistory/template.phtml b/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml similarity index 83% rename from airtime_mvc/application/views/scripts/playouthistory/template.phtml rename to airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml index aa23f0162..0e16acee8 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/template.phtml +++ b/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml @@ -12,19 +12,19 @@ configured)): ?>
  • - "> + ">
  • - "> + "> - "> + "> - "> + "> Set Default @@ -43,19 +43,19 @@ template_file as $id=>$name): ?> configured)): ?>
  • - "> + ">
  • - "> + "> - "> + "> - "> + "> Set Default diff --git a/airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml b/airtime_mvc/application/views/scripts/playouthistorytemplate/template-contents.phtml similarity index 100% rename from airtime_mvc/application/views/scripts/playouthistory/template-contents.phtml rename to airtime_mvc/application/views/scripts/playouthistorytemplate/template-contents.phtml diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 5087805c6..65c9a8316 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -123,7 +123,7 @@ var AIRTIME = (function(AIRTIME) { }); function updateTemplate(template_id, isDefault) { - var url = baseUrl+"Playouthistory/update-template/format/json"; + var url = baseUrl+"Playouthistorytemplate/update-template/format/json"; var data = {}; var $lis, $li; var i, len; @@ -152,7 +152,7 @@ var AIRTIME = (function(AIRTIME) { $templateDiv.on("click", "#template_set_default", function() { var $btn = $(this), template_id = $btn.data("template"), - url = baseUrl+"Playouthistory/set-template-default/format/json"; + url = baseUrl+"Playouthistorytemplate/set-template-default/format/json"; $btn.remove(); $.post(url, {id: template_id}); diff --git a/airtime_mvc/public/js/airtime/playouthistory/template.js b/airtime_mvc/public/js/airtime/playouthistory/template.js index c452d15aa..6216cfc93 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/template.js +++ b/airtime_mvc/public/js/airtime/playouthistory/template.js @@ -9,9 +9,9 @@ var AIRTIME = (function(AIRTIME) { function createItemLi(id, name, configured) { - var editUrl = baseUrl+"Playouthistory/configure-template/id/"+id; - var defaultUrl = baseUrl+"Playouthistory/set-template-default/format/json/id/"+id; - var removeUrl = baseUrl+"Playouthistory/delete-template/format/json/id/"+id; + var editUrl = baseUrl+"Playouthistorytemplate/configure-template/id/"+id; + var defaultUrl = baseUrl+"Playouthistorytemplate/set-template-default/format/json/id/"+id; + var removeUrl = baseUrl+"Playouthistorytemplate/delete-template/format/json/id/"+id; var itemConfigured = "
  • " + @@ -72,7 +72,7 @@ var AIRTIME = (function(AIRTIME) { function createTemplate(type) { - var createUrl = baseUrl+"Playouthistory/create-template"; + var createUrl = baseUrl+"Playouthistorytemplate/create-template"; $.post(createUrl, {format: "json", type: type}, function(json) { From 429cdeeffbb181cb88567147014769d309f721ce Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 19:37:46 -0400 Subject: [PATCH 127/164] filtering by a host's show so they can edit their own playout history. --- airtime_mvc/application/configs/constants.php | 6 +- .../controllers/PlayouthistoryController.php | 39 +-- .../PlayouthistorytemplateController.php | 252 +++++++++--------- .../application/services/HistoryService.php | 40 ++- .../views/scripts/playouthistory/index.phtml | 4 +- .../js/airtime/playouthistory/historytable.js | 33 ++- 6 files changed, 218 insertions(+), 156 deletions(-) diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 4b4d9634a..34f8cab41 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -39,9 +39,9 @@ define('UI_MDATA_VALUE_FORMAT_FILE' , 'File'); define('UI_MDATA_VALUE_FORMAT_STREAM' , 'live stream'); //User types -define('UTYPE_HOST' , 'H'); -define('UTYPE_ADMIN' , 'A'); -define('UTYPE_GUEST' , 'G'); +define('UTYPE_HOST' , 'H'); +define('UTYPE_ADMIN' , 'A'); +define('UTYPE_GUEST' , 'G'); define('UTYPE_PROGRAM_MANAGER' , 'P'); //Constants for playout history template fields diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 29997e17e..89a2e2f4a 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -138,25 +138,26 @@ class PlayouthistoryController extends Zend_Controller_Action } } - public function showHistoryFeedAction() - { - try { - $request = $this->getRequest(); - $current_time = time(); - $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); - $ends_epoch = $request->getParam("end", $current_time); - - $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); - $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - - $historyService = new Application_Service_HistoryService(); - $r = $historyService->getShowList($startsDT, $endsDT); - - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } + public function showHistoryFeedAction() + { + try { + $request = $this->getRequest(); + $current_time = time(); + $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); + $ends_epoch = $request->getParam("end", $current_time); + + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); + $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); + + $historyService = new Application_Service_HistoryService(); + $shows = $historyService->getShowList($startsDT, $endsDT); + + $this->_helper->json->sendJson($shows); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } } public function editFileItemAction() diff --git a/airtime_mvc/application/controllers/PlayouthistorytemplateController.php b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php index 00f4cbedc..c6651d8eb 100644 --- a/airtime_mvc/application/controllers/PlayouthistorytemplateController.php +++ b/airtime_mvc/application/controllers/PlayouthistorytemplateController.php @@ -13,131 +13,131 @@ class PlayouthistorytemplateController extends Zend_Controller_Action ->initContext(); } - public function indexAction() - { - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - $historyService = new Application_Service_HistoryService(); - $this->view->template_list = $historyService->getListItemTemplates(); - $this->view->template_file = $historyService->getFileTemplates(); - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - - public function configureTemplateAction() { - - $CC_CONFIG = Config::getConfig(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); - - try { - - $templateId = $this->_getParam('id'); - - $historyService = new Application_Service_HistoryService(); - $template = $historyService->loadTemplate($templateId); - - $templateType = $template["type"]; - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; - $mandatoryFields = $historyService->$getMandatoryFields(); - - $this->view->template_id = $templateId; - $this->view->template_name = $template["name"]; - $this->view->template_fields = $template["fields"]; - $this->view->template_type = $templateType; - $this->view->fileMD = $historyService->getFileMetadataTypes(); - $this->view->fields = $historyService->getFieldTypes(); - $this->view->required_fields = $mandatoryFields; - $this->view->configured = $historyService->getConfiguredTemplateIds(); - } - catch (Exception $e) { - Logging::info("Error?"); - Logging::info($e); - Logging::info($e->getMessage()); - - $this->_forward('index', 'playouthistorytemplate'); - } - } - - public function createTemplateAction() - { - $templateType = $this->_getParam('type', null); - - $request = $this->getRequest(); - $params = $request->getPost(); - - try { - $historyService = new Application_Service_HistoryService(); - $supportedTypes = $historyService->getSupportedTemplateTypes(); - - if (!in_array($templateType, $supportedTypes)) { - throw new Exception("Error: $templateType is not supported."); - } - - $id = $historyService->createTemplate($params); - - $this->view->url = $this->view->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - - $this->view->error = $e->getMessage(); - } - } - - public function setTemplateDefaultAction() - { - $templateId = $this->_getParam('id', null); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->setConfiguredTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function updateTemplateAction() - { - $templateId = $this->_getParam('id', null); - $name = $this->_getParam('name', null); - $fields = $this->_getParam('fields', array()); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->updateItemTemplate($templateId, $name, $fields); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } - } - - public function deleteTemplateAction() - { - $templateId = $this->_getParam('id'); - - try { - $historyService = new Application_Service_HistoryService(); - $historyService->deleteTemplate($templateId); - } - catch (Exception $e) { - Logging::info($e); - Logging::info($e->getMessage()); - } + public function indexAction() + { + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); + + $historyService = new Application_Service_HistoryService(); + $this->view->template_list = $historyService->getListItemTemplates(); + $this->view->template_file = $historyService->getFileTemplates(); + $this->view->configured = $historyService->getConfiguredTemplateIds(); + } + + public function configureTemplateAction() { + + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/configuretemplate.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/history_styles.css?'.$CC_CONFIG['airtime_version']); + + try { + + $templateId = $this->_getParam('id'); + + $historyService = new Application_Service_HistoryService(); + $template = $historyService->loadTemplate($templateId); + + $templateType = $template["type"]; + $supportedTypes = $historyService->getSupportedTemplateTypes(); + + if (!in_array($templateType, $supportedTypes)) { + throw new Exception("Error: $templateType is not supported."); + } + + $getMandatoryFields = "mandatory".ucfirst($templateType)."Fields"; + $mandatoryFields = $historyService->$getMandatoryFields(); + + $this->view->template_id = $templateId; + $this->view->template_name = $template["name"]; + $this->view->template_fields = $template["fields"]; + $this->view->template_type = $templateType; + $this->view->fileMD = $historyService->getFileMetadataTypes(); + $this->view->fields = $historyService->getFieldTypes(); + $this->view->required_fields = $mandatoryFields; + $this->view->configured = $historyService->getConfiguredTemplateIds(); + } + catch (Exception $e) { + Logging::info("Error?"); + Logging::info($e); + Logging::info($e->getMessage()); + + $this->_forward('index', 'playouthistorytemplate'); + } + } + + public function createTemplateAction() + { + $templateType = $this->_getParam('type', null); + + $request = $this->getRequest(); + $params = $request->getPost(); + + try { + $historyService = new Application_Service_HistoryService(); + $supportedTypes = $historyService->getSupportedTemplateTypes(); + + if (!in_array($templateType, $supportedTypes)) { + throw new Exception("Error: $templateType is not supported."); + } + + $id = $historyService->createTemplate($params); + + $this->view->url = $this->view->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + + $this->view->error = $e->getMessage(); + } + } + + public function setTemplateDefaultAction() + { + $templateId = $this->_getParam('id', null); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->setConfiguredTemplate($templateId); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } + + public function updateTemplateAction() + { + $templateId = $this->_getParam('id', null); + $name = $this->_getParam('name', null); + $fields = $this->_getParam('fields', array()); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->updateItemTemplate($templateId, $name, $fields); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } + } + + public function deleteTemplateAction() + { + $templateId = $this->_getParam('id'); + + try { + $historyService = new Application_Service_HistoryService(); + $historyService->deleteTemplate($templateId); + } + catch (Exception $e) { + Logging::info($e); + Logging::info($e->getMessage()); + } } } \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index ea8aef958..848fa0510 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -426,15 +426,51 @@ class Application_Service_HistoryService public function getShowList($startDT, $endDT) { $user = Application_Model_User::getCurrentUser(); - $shows = Application_Model_Show::getShows($startDT, $endDT); - Loggin::info($shows); + Logging::info($startDT->format("Y-m-d H:i:s")); + Logging::info($endDT->format("Y-m-d H:i:s")); + Logging::info($shows); + //need to filter the list to only their shows if ($user->isHost()) { + $showIds = array(); + + foreach ($shows as $show) { + $showIds[] = $show["show_id"]; + } + + $showIds = array_unique($showIds); + Logging::info($showIds); + + $hostRecords = CcShowHostsQuery::create() + ->filterByDbHost($user->getId()) + ->filterByDbShow($showIds) + ->find($this->con); + + $filteredShowIds = array(); + + foreach($hostRecords as $record) { + $filteredShowIds[] = $record->getDbShow(); + } + + Logging::info($filteredShowIds); + + $filteredShows = array(); + + foreach($shows as $show) { + if (in_array($show["show_id"], $filteredShowIds)) { + $filteredShows[] = $show; + } + } } + else { + $filteredShows = $shows; + } + + return $filteredShows; } public function insertPlayedItem($schedId) { diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index 0a27df62f..67436947f 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -18,7 +18,9 @@
    - Show Summary +
      +
    • Show Summary
    • +
    diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 8a25cc7a3..0ad480c1f 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -50,6 +50,11 @@ var AIRTIME = (function(AIRTIME) { var selectedLogItems = {}; + var dateStartId = "#his_date_start", + timeStartId = "#his_time_start", + dateEndId = "#his_date_end", + timeEndId = "#his_time_end"; + function getSelectedLogItems() { var items = Object.keys(selectedLogItems); @@ -303,16 +308,26 @@ var AIRTIME = (function(AIRTIME) { return oTable; } + function showSummaryList() { + var url = baseUrl+"playouthistory/show-history-feed", + oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId), + data = { + format: "json", + start: oRange.start, + end: oRange.end + }; + + $.post(url, data, function() { + var x; + }); + } + mod.onReady = function() { var oBaseDatePickerSettings, oBaseTimePickerSettings, oTableAgg, oTableItem, - dateStartId = "#his_date_start", - timeStartId = "#his_time_start", - dateEndId = "#his_date_end", - timeEndId = "#his_time_end", $hisDialogEl, tabsInit = [ @@ -327,6 +342,12 @@ var AIRTIME = (function(AIRTIME) { initialize: function() { oTableAgg = aggregateHistoryTable(); } + }, + { + initialized: false, + initialize: function() { + showSummaryList(); + } } ]; @@ -514,7 +535,9 @@ var AIRTIME = (function(AIRTIME) { $historyContentDiv.find("#his-tabs").tabs({ show: function( event, ui ) { - var tab = tabsInit[ui.index]; + var href = $(ui.tab).attr("href"); + var index = href.split('-').pop(); + var tab = tabsInit[index-1]; if (!tab.initialized) { tab.initialize(); From a4c97479b612c93a37ed65afec1baff46c685526 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Wed, 28 Aug 2013 23:30:15 -0400 Subject: [PATCH 128/164] using an accordian to display per show logs. --- .../controllers/PlayouthistoryController.php | 23 ++--- .../application/services/HistoryService.php | 66 ++++++++------ .../views/scripts/playouthistory/index.phtml | 4 +- .../js/airtime/playouthistory/historytable.js | 90 +++++++++++++++++-- 4 files changed, 139 insertions(+), 44 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 89a2e2f4a..b6aadf568 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -53,7 +53,7 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - + $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); @@ -77,7 +77,7 @@ class PlayouthistoryController extends Zend_Controller_Action $columns = json_encode($historyService->getDatatablesFileSummaryColumns()); $script.= "localStorage.setItem( 'datatables-historyfile-aoColumns', JSON.stringify($columns) );"; $this->view->headScript()->appendScript($script); - + $user = Application_Model_User::getCurrentUser(); $this->view->userType = $user->getType(); } @@ -120,12 +120,13 @@ class PlayouthistoryController extends Zend_Controller_Action $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); $ends_epoch = $request->getParam("end", $current_time); + $instance = $request->getParam("instance_id", null); $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); $historyService = new Application_Service_HistoryService(); - $r = $historyService->getPlayedItemData($startsDT, $endsDT, $params); + $r = $historyService->getPlayedItemData($startsDT, $endsDT, $params, $instance); $this->view->sEcho = $r["sEcho"]; $this->view->iTotalDisplayRecords = $r["iTotalDisplayRecords"]; @@ -137,7 +138,7 @@ class PlayouthistoryController extends Zend_Controller_Action Logging::info($e->getMessage()); } } - + public function showHistoryFeedAction() { try { @@ -145,13 +146,13 @@ class PlayouthistoryController extends Zend_Controller_Action $current_time = time(); $starts_epoch = $request->getParam("start", $current_time - (60*60*24)); $ends_epoch = $request->getParam("end", $current_time); - + $startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC")); $endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC")); - + $historyService = new Application_Service_HistoryService(); $shows = $historyService->getShowList($startsDT, $endsDT); - + $this->_helper->json->sendJson($shows); } catch (Exception $e) { @@ -182,11 +183,11 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->createPlayedItem($params); - + if (isset($json["form"])) { $this->view->form = $json["form"]; $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - + unset($this->view->form); } @@ -239,11 +240,11 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService = new Application_Service_HistoryService(); $json = $historyService->editPlayedItem($params); - + if (isset($json["form"])) { $this->view->form = $json["form"]; $json["form"] = $this->view->render('playouthistory/dialog.phtml'); - + unset($this->view->form); } diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 848fa0510..a7587d2d3 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -22,7 +22,7 @@ class Application_Service_HistoryService } //opts is from datatables. - public function getPlayedItemData($startDT, $endDT, $opts) + public function getPlayedItemData($startDT, $endDT, $opts, $instanceId=null) { $mainSqlQuery = ""; $paramMap = array(); @@ -59,7 +59,7 @@ class Application_Service_HistoryService } $historyRange = "(". - "SELECT history.starts, history.ends, history.id AS history_id". + "SELECT history.starts, history.ends, history.id AS history_id, history.instance_id". " FROM cc_playout_history as history". " WHERE history.starts >= :starts and history.starts < :ends". ") AS history_range"; @@ -71,7 +71,12 @@ class Application_Service_HistoryService " ) AS %KEY%". " ) AS %KEY%_filter"; - $mainSelect = array("history_range.starts", "history_range.ends", "history_range.history_id"); + $mainSelect = array( + "history_range.starts", + "history_range.ends", + "history_range.history_id", + "history_range.instance_id" + ); $mdFilters = array(); $numFileMdFields = count($fields_filemd); @@ -184,6 +189,17 @@ class Application_Service_HistoryService throw new Exception("Error: $msg"); } + //----------------------------------------------------------------------- + //Using the instance_id to filter the data. + + if (isset($instanceId)) { + + $mainSqlQuery.= + " WHERE history_range.instance_id = :instance"; + + $paramMap["instance"] = $instanceId; + } + //------------------------------------------------------------------------ //Using Datatables parameters to sort the data. @@ -422,44 +438,44 @@ class Application_Service_HistoryService "history" => $rows ); } - + public function getShowList($startDT, $endDT) { $user = Application_Model_User::getCurrentUser(); $shows = Application_Model_Show::getShows($startDT, $endDT); - + Logging::info($startDT->format("Y-m-d H:i:s")); Logging::info($endDT->format("Y-m-d H:i:s")); - + Logging::info($shows); - + //need to filter the list to only their shows if ($user->isHost()) { - + $showIds = array(); - + foreach ($shows as $show) { $showIds[] = $show["show_id"]; } - + $showIds = array_unique($showIds); Logging::info($showIds); - + $hostRecords = CcShowHostsQuery::create() ->filterByDbHost($user->getId()) ->filterByDbShow($showIds) ->find($this->con); - + $filteredShowIds = array(); - + foreach($hostRecords as $record) { $filteredShowIds[] = $record->getDbShow(); } - + Logging::info($filteredShowIds); - + $filteredShows = array(); - + foreach($shows as $show) { if (in_array($show["show_id"], $filteredShowIds)) { $filteredShows[] = $show; @@ -469,7 +485,7 @@ class Application_Service_HistoryService else { $filteredShows = $shows; } - + return $filteredShows; } @@ -878,17 +894,17 @@ class Application_Service_HistoryService throw $e; } } - + /* id is an id in cc_playout_history */ public function deletePlayedItems($ids) { - + $this->con->beginTransaction(); - + try { - + $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); $records->delete($this->con); - + $this->con->commit(); } catch (Exception $e) { @@ -915,9 +931,9 @@ class Application_Service_HistoryService return $fields; } - + private function getPhpCasts() { - + $fields = array( TEMPLATE_DATE => "strval", TEMPLATE_TIME => "strval", @@ -927,7 +943,7 @@ class Application_Service_HistoryService TEMPLATE_INT => "intval", TEMPLATE_FLOAT => "floatval", ); - + return $fields; } diff --git a/airtime_mvc/application/views/scripts/playouthistory/index.phtml b/airtime_mvc/application/views/scripts/playouthistory/index.phtml index 67436947f..0dd7d706d 100644 --- a/airtime_mvc/application/views/scripts/playouthistory/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistory/index.phtml @@ -18,9 +18,7 @@
    -
      -
    • Show Summary
    • -
    +
    diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 0ad480c1f..6f71bf0a5 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -153,6 +153,9 @@ var AIRTIME = (function(AIRTIME) { if (fnServerData.hasOwnProperty("end")) { aoData.push( { name: "end", value: fnServerData.end} ); } + if (fnServerData.hasOwnProperty("instance")) { + aoData.push( { name: "instance_id", value: fnServerData.instance} ); + } aoData.push( { name: "format", value: "json"} ); @@ -165,6 +168,83 @@ var AIRTIME = (function(AIRTIME) { } ); } + //config: name, type, filemd, required + function createShowAccordSection(config) { + var template, + $el; + + /* + template = + "
  • " + + "<%= name %>" + + "<%= starts %>" + + "<%= ends %>" + + "
  • "; + */ + + template = + "

    " + + "" + + "<%= name %>" + + "<%= starts %>" + + "<%= ends %>" + + "" + + "

    " + + "
    First content panel
    "; + + template = _.template(template); + $el = $(template(config)); + + return $el; + } + + function drawShowList(oShows) { + var $showList = $historyContentDiv.find("#history_show_summary"), + i, + len, + $accordSection, + show; + + $showList.empty(); + + for (i = 0, len = oShows.length; i < len; i++) { + show = oShows[i]; + + $accordSection = createShowAccordSection({ + instance: show.instance_id, + name: show.name, + starts: show.starts, + ends: show.ends + }); + + $showList.append($accordSection); + } + + $showList.accordion({ + create: function( event, ui ) { + var $div = $showList.find(".ui-accordion-content-active"); + }, + change: function( event, ui ) { + var x; + }, + changestart: function( event, ui ) { + var x; + } + }); + } + + function drawShowTable() { + + } + function createToolbarButtons ($el) { var $menu = $("
    "); @@ -234,9 +314,9 @@ var AIRTIME = (function(AIRTIME) { return oTable; } - function itemHistoryTable() { + function itemHistoryTable(id) { var oTable, - $historyTableDiv = $historyContentDiv.find("#history_table_list"), + $historyTableDiv = $historyContentDiv.find("#"+id), $toolbar, columns, fnRowCallback, @@ -317,8 +397,8 @@ var AIRTIME = (function(AIRTIME) { end: oRange.end }; - $.post(url, data, function() { - var x; + $.post(url, data, function(json) { + drawShowList(json); }); } @@ -334,7 +414,7 @@ var AIRTIME = (function(AIRTIME) { { initialized: false, initialize: function() { - oTableItem = itemHistoryTable(); + oTableItem = itemHistoryTable("history_table_list"); } }, { From 803409f151b649a5be76c3154829307e565ff478 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 29 Aug 2013 11:01:03 -0400 Subject: [PATCH 129/164] creating a show table beginning --- .../js/airtime/playouthistory/historytable.js | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 6f71bf0a5..9d9a7c750 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -173,19 +173,6 @@ var AIRTIME = (function(AIRTIME) { var template, $el; - /* - template = - "
  • " + - "<%= name %>" + - "<%= starts %>" + - "<%= ends %>" + - "
  • "; - */ - template = "

    Date: Thu, 29 Aug 2013 15:17:24 -0400 Subject: [PATCH 130/164] show tables filtering by instance id. --- .../application/services/HistoryService.php | 29 +++++----- .../js/airtime/playouthistory/historytable.js | 58 +++++++++++++------ 2 files changed, 55 insertions(+), 32 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index a7587d2d3..003ef41a8 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -174,20 +174,6 @@ class Application_Service_HistoryService " LEFT JOIN {$filter} USING(history_id)"; } - //---------------------------------------------------------------------- - //need to count the total rows to tell Datatables. - $stmt = $this->con->prepare($mainSqlQuery); - foreach ($paramMap as $param => $v) { - $stmt->bindValue($param, $v); - } - - if ($stmt->execute()) { - $totalRows = $stmt->rowCount(); - } - else { - $msg = implode(',', $stmt->errorInfo()); - throw new Exception("Error: $msg"); - } //----------------------------------------------------------------------- //Using the instance_id to filter the data. @@ -199,6 +185,21 @@ class Application_Service_HistoryService $paramMap["instance"] = $instanceId; } + + //---------------------------------------------------------------------- + //need to count the total rows to tell Datatables. + $stmt = $this->con->prepare($mainSqlQuery); + foreach ($paramMap as $param => $v) { + $stmt->bindValue($param, $v); + } + + if ($stmt->execute()) { + $totalRows = $stmt->rowCount(); + } + else { + $msg = implode(',', $stmt->errorInfo()); + throw new Exception("Error: $msg"); + } //------------------------------------------------------------------------ //Using Datatables parameters to sort the data. diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 9d9a7c750..5baeb3f26 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -53,7 +53,11 @@ var AIRTIME = (function(AIRTIME) { var dateStartId = "#his_date_start", timeStartId = "#his_time_start", dateEndId = "#his_date_end", - timeEndId = "#his_time_end"; + timeEndId = "#his_time_end", + + oTableAgg, + oTableItem, + oTableShow; function getSelectedLogItems() { var items = Object.keys(selectedLogItems); @@ -168,24 +172,23 @@ var AIRTIME = (function(AIRTIME) { } ); } - //config: name, type, filemd, required function createShowAccordSection(config) { var template, $el; template = - "

    " + + "

    " + "" + "<%= name %>" + "<%= starts %>" + "<%= ends %>" + "" + "

    " + - "
    First content panel
    "; + "
    "; template = _.template(template); $el = $(template(config)); @@ -196,7 +199,19 @@ var AIRTIME = (function(AIRTIME) { //$el is the div in the accordian we should create the table on. function createShowTable($el) { - oTableShow = itemHistoryTable("history_table_list"); + var instance = $el.data("instance"); + var $table = $("", { + 'cellpadding': "0", + 'cellspacing': "0", + 'class': "datatable", + 'id': "history_table_show" + }); + + //assign the retrieval function the show instance id. + fnServerData.instance = instance; + $el.append($table); + $el.css("height", "auto"); + oTableShow = itemHistoryTable("history_table_show"); } function drawShowList(oShows) { @@ -224,20 +239,18 @@ var AIRTIME = (function(AIRTIME) { $showList.accordion({ create: function( event, ui ) { var $div = $showList.find(".ui-accordion-content-active"); + createShowTable($div); }, change: function( event, ui ) { - var x; + var $div = $(ui.newContent); + createShowTable($div); }, changestart: function( event, ui ) { - var x; + $(ui.oldContent).empty(); } }); } - function drawShowTable() { - - } - function createToolbarButtons ($el) { var $menu = $("
    "); @@ -399,9 +412,6 @@ var AIRTIME = (function(AIRTIME) { var oBaseDatePickerSettings, oBaseTimePickerSettings, - oTableAgg, - oTableItem, - oTableShow, $hisDialogEl, tabsInit = [ @@ -409,18 +419,27 @@ var AIRTIME = (function(AIRTIME) { initialized: false, initialize: function() { oTableItem = itemHistoryTable("history_table_list"); + }, + navigate: function() { + delete fnServerData.instance; } }, { initialized: false, initialize: function() { oTableAgg = aggregateHistoryTable(); + }, + navigate: function() { + delete fnServerData.instance; } }, { initialized: false, initialize: function() { showSummaryList(); + }, + navigate: function() { + showSummaryList(); } } ]; @@ -617,6 +636,9 @@ var AIRTIME = (function(AIRTIME) { tab.initialize(); tab.initialized = true; } + else { + tab.navigate(); + } } }); From ec31fd50c90e028ec9506e8c58ecadfff0ff7004 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 15:34:34 -0400 Subject: [PATCH 131/164] deleteing items from the show table. --- airtime_mvc/public/css/history_styles.css | 16 +++++++++++++++- .../js/airtime/playouthistory/historytable.js | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index 01b4293f6..b846b69d5 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -101,7 +101,8 @@ } .ui-dialog form.ui-widget-content dd input { - width: 190px; + max-width: 210px; + width: 90%; } .bootstrap-datetimepicker-widget ul { @@ -114,7 +115,16 @@ border-radius: 2px !important; } +.ui-dialog-content .well { + max-width: 230px; +} +.ui-dialog-content .well .date { + margin-left: 25px; +} + .ui-dialog .ui-dialog-content .well .date .add-on { + position: absolute; + left: 30px; display: inline-block; width: auto; height: 20px; @@ -181,3 +191,7 @@ .btn [class^="icon-"] { margin-top: 0; } + +#history_content .ui-tabs .ui-tabs-panel { + padding-top: 10px; +} diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 5baeb3f26..1b052b49b 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -450,6 +450,7 @@ var AIRTIME = (function(AIRTIME) { function redrawTables() { oTableAgg && oTableAgg.fnDraw(); oTableItem && oTableItem.fnDraw(); + oTableShow && oTableShow.fnDraw(); } function removeHistoryDialog() { From 8208f8596b7708ae5525061908b5a00530bfc891 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 15:37:33 -0400 Subject: [PATCH 132/164] ordering by show start time --- airtime_mvc/application/models/Show.php | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 2930a7ff3..f5cac2aa0 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -949,6 +949,7 @@ SQL; AND ((si1.starts >= :start1::TIMESTAMP AND si1.starts < :end1::TIMESTAMP) OR (si1.ends > :start2::TIMESTAMP AND si1.ends <= :end2::TIMESTAMP) OR (si1.starts <= :start3::TIMESTAMP AND si1.ends >= :end3::TIMESTAMP)) +ORDER BY si1.starts SQL; return Application_Common_Database::prepareAndExecute( $sql, array( From 91d4d1224e15854457dd8dd3b39776c9f1e98a11 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 15:52:24 -0400 Subject: [PATCH 133/164] redoing accordian properly. --- airtime_mvc/public/css/history_styles.css | 1 - airtime_mvc/public/js/airtime/playouthistory/historytable.js | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/public/css/history_styles.css b/airtime_mvc/public/css/history_styles.css index b846b69d5..fb44d4677 100644 --- a/airtime_mvc/public/css/history_styles.css +++ b/airtime_mvc/public/css/history_styles.css @@ -101,7 +101,6 @@ } .ui-dialog form.ui-widget-content dd input { - max-width: 210px; width: 90%; } diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 1b052b49b..a2617654f 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -221,7 +221,9 @@ var AIRTIME = (function(AIRTIME) { $accordSection, show; - $showList.empty(); + $showList + .accordion( "destroy" ) + .empty(); for (i = 0, len = oShows.length; i < len; i++) { show = oShows[i]; From f97069bd0baed1ed6644b659e07dbd8a9cc6f38c Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 15:58:24 -0400 Subject: [PATCH 134/164] displaying show list in proper time zone. --- .../application/services/HistoryService.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 003ef41a8..75de3b6ae 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -279,13 +279,13 @@ class Application_Service_HistoryService } } - //need to display the results in the station's timezone. foreach ($rows as $index => &$result) { foreach ($boolCast as $name) { $result[$name] = (bool) $result[$name]; } + //need to display the results in the station's timezone. $dateTime = new DateTime($result["starts"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["starts"] = $dateTime->format("Y-m-d H:i:s"); @@ -486,6 +486,22 @@ class Application_Service_HistoryService else { $filteredShows = $shows; } + + $timezoneUTC = new DateTimeZone("UTC"); + $timezoneLocal = new DateTimeZone($this->timezone); + + foreach ($filteredShows as &$result) { + + //need to display the results in the station's timezone. + $dateTime = new DateTime($result["starts"], $timezoneUTC); + $dateTime->setTimezone($timezoneLocal); + $result["starts"] = $dateTime->format("Y-m-d H:i:s"); + + $dateTime = new DateTime($result["ends"], $timezoneUTC); + $dateTime->setTimezone($timezoneLocal); + $result["ends"] = $dateTime->format("Y-m-d H:i:s"); + + } return $filteredShows; } From d50cdd16c288eadc189f4ca920c1e84377d96a44 Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 29 Aug 2013 17:40:08 -0400 Subject: [PATCH 135/164] starting association of a show instance. --- .../application/forms/EditHistoryItem.php | 15 ++++++++++ .../application/services/HistoryService.php | 30 +++++++++++++++++-- .../scripts/form/edit-history-item.phtml | 8 +++++ .../js/airtime/playouthistory/historytable.js | 7 +++++ 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/forms/EditHistoryItem.php b/airtime_mvc/application/forms/EditHistoryItem.php index cb9868e49..9552b1c22 100644 --- a/airtime_mvc/application/forms/EditHistoryItem.php +++ b/airtime_mvc/application/forms/EditHistoryItem.php @@ -12,6 +12,15 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory 'PrepareElements', array('ViewScript', array('viewScript' => 'form/edit-history-item.phtml')) )); + + /* + $instance = new Zend_Form_Element_Select("instance_id"); + $instance->setLabel(_("Choose Show Instance")); + $instance->setMultiOptions(array("0" => "-----------")); + $instance->setValue(0); + $instance->setDecorators(array('ViewHelper')); + $this->addElement($instance); + */ $starts = new Zend_Form_Element_Text(self::ID_PREFIX.'starts'); $starts->setValidators(array( @@ -42,4 +51,10 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory parent::createFromTemplate($template, $required); } + + public function populateShowInstances($possibleInstances) { + + $instance = $this->getElement("instance_id"); + $instance->setMultiOptions($possibleInstances); + } } \ No newline at end of file diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 75de3b6ae..f950e8631 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -688,7 +688,7 @@ class Application_Service_HistoryService } } - public function populateTemplateItem($values, $id=null) { + public function populateTemplateItem($values, $id=null, $instance_id=null) { $this->con->beginTransaction(); @@ -702,6 +702,10 @@ class Application_Service_HistoryService else { $historyRecord = new CcPlayoutHistory(); } + + if (isset($instance_id)) { + $historyRecord->setDbInstanceId($instance_id); + } $timezoneUTC = new DateTimeZone("UTC"); $timezoneLocal = new DateTimeZone($this->timezone); @@ -780,12 +784,31 @@ class Application_Service_HistoryService throw $e; } } + + //start,end timestamp strings in local timezone. + public function populateShowInstances($start, $end) { + $timezoneLocal = new DateTimeZone($this->timezone); + + $startDT = new DateTime($start, $timezoneLocal); + $endDT = new DateTime($end, $timezoneLocal); + + $shows = $this->getShowList($startDT, $endDT); + + $select = array(); + + foreach ($shows as &$show) { + $select[$show["instance_id"]] = $show["name"]; + } + + return $select; + } public function createPlayedItem($data) { try { $form = $this->makeHistoryItemForm(null); $history_id = $form->getElement("his_item_id"); + $instance_id = $data["instance_id"]; $json = array(); if ($form->isValid($data)) { @@ -795,7 +818,7 @@ class Application_Service_HistoryService Logging::info("created list item"); Logging::info($values); - $this->populateTemplateItem($values); + $this->populateTemplateItem($values, null, $instance_id); } else { Logging::info("created list item NOT VALID"); @@ -819,6 +842,7 @@ class Application_Service_HistoryService try { $id = $data["his_item_id"]; + $instance_id = $data["instance_id"]; $form = $this->makeHistoryItemForm($id); $history_id = $form->getElement("his_item_id"); $history_id->setRequired(true); @@ -833,7 +857,7 @@ class Application_Service_HistoryService Logging::info("edited list item"); Logging::info($values); - $this->populateTemplateItem($values, $id); + $this->populateTemplateItem($values, $id, $instance_id); } else { Logging::info("edited list item NOT VALID"); diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index 2225e4dfc..219942121 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -31,6 +31,14 @@ +
    + +
    +
    + + +
    + getSubForm('his_item_template') as $index=>$el): ?> getName(); ?> diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index a2617654f..c37b2e11b 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -577,6 +577,13 @@ var AIRTIME = (function(AIRTIME) { url; url = (id === "") ? createUrl : updateUrl; + + if (fnServerData.instance !== undefined) { + data.push({ + name: "instance_id", + value: fnServerData.instance + }); + } $.post(url, data, function(json) { From 0f0958ee6b69894b1763f5d1f277573d31c9440c Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 29 Aug 2013 18:32:42 -0400 Subject: [PATCH 136/164] changing the query to only filter by instance id not starts/ends if instance id is set. --- .../application/services/HistoryService.php | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index f950e8631..275c8d4fe 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -30,8 +30,6 @@ class Application_Service_HistoryService $start = $startDT->format("Y-m-d H:i:s"); $end = $endDT->format("Y-m-d H:i:s"); - $paramMap["starts"] = $start; - $paramMap["ends"] = $end; $template = $this->getConfiguredItemTemplate(); $fields = $template["fields"]; @@ -58,11 +56,25 @@ class Application_Service_HistoryService } } + //----------------------------------------------------------------------- + //Using the instance_id to filter the data. + + $historyRange = "(". "SELECT history.starts, history.ends, history.id AS history_id, history.instance_id". - " FROM cc_playout_history as history". - " WHERE history.starts >= :starts and history.starts < :ends". - ") AS history_range"; + " FROM cc_playout_history as history"; + + if (isset($instanceId)) { + $historyRange.= " WHERE history.instance_id = :instance"; + $paramMap["instance"] = $instanceId; + } + else { + $historyRange.= " WHERE history.starts >= :starts and history.starts < :ends"; + $paramMap["starts"] = $start; + $paramMap["ends"] = $end; + } + + $historyRange.= ") AS history_range"; $manualMeta = "(". "SELECT %KEY%.value AS %KEY%, %KEY%.history_id". @@ -174,25 +186,13 @@ class Application_Service_HistoryService " LEFT JOIN {$filter} USING(history_id)"; } - - //----------------------------------------------------------------------- - //Using the instance_id to filter the data. - - if (isset($instanceId)) { - - $mainSqlQuery.= - " WHERE history_range.instance_id = :instance"; - - $paramMap["instance"] = $instanceId; - } - //---------------------------------------------------------------------- //need to count the total rows to tell Datatables. $stmt = $this->con->prepare($mainSqlQuery); foreach ($paramMap as $param => $v) { $stmt->bindValue($param, $v); } - + if ($stmt->execute()) { $totalRows = $stmt->rowCount(); } @@ -486,21 +486,21 @@ class Application_Service_HistoryService else { $filteredShows = $shows; } - + $timezoneUTC = new DateTimeZone("UTC"); $timezoneLocal = new DateTimeZone($this->timezone); - + foreach ($filteredShows as &$result) { - + //need to display the results in the station's timezone. $dateTime = new DateTime($result["starts"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["starts"] = $dateTime->format("Y-m-d H:i:s"); - + $dateTime = new DateTime($result["ends"], $timezoneUTC); $dateTime->setTimezone($timezoneLocal); $result["ends"] = $dateTime->format("Y-m-d H:i:s"); - + } return $filteredShows; @@ -702,7 +702,7 @@ class Application_Service_HistoryService else { $historyRecord = new CcPlayoutHistory(); } - + if (isset($instance_id)) { $historyRecord->setDbInstanceId($instance_id); } @@ -784,22 +784,22 @@ class Application_Service_HistoryService throw $e; } } - + //start,end timestamp strings in local timezone. public function populateShowInstances($start, $end) { $timezoneLocal = new DateTimeZone($this->timezone); - + $startDT = new DateTime($start, $timezoneLocal); $endDT = new DateTime($end, $timezoneLocal); - + $shows = $this->getShowList($startDT, $endDT); - + $select = array(); - + foreach ($shows as &$show) { $select[$show["instance_id"]] = $show["name"]; } - + return $select; } From 5a8957273fa2a1c2cbaa0d26ee82f9184a129873 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 29 Aug 2013 18:52:40 -0400 Subject: [PATCH 137/164] removing choice for show instance if in shows tab. --- .../scripts/form/edit-history-item.phtml | 14 +++++++------ .../js/airtime/playouthistory/historytable.js | 21 +++++++++++++++++-- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index 219942121..7edbcc8da 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -31,12 +31,14 @@ -
    - -
    -
    - - +
    +
    + +
    +
    + + +
    getSubForm('his_item_template') as $index=>$el): ?> diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index c37b2e11b..3e7aae7cd 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -57,7 +57,8 @@ var AIRTIME = (function(AIRTIME) { oTableAgg, oTableItem, - oTableShow; + oTableShow, + inShowsTab = false; function getSelectedLogItems() { var items = Object.keys(selectedLogItems); @@ -424,6 +425,9 @@ var AIRTIME = (function(AIRTIME) { }, navigate: function() { delete fnServerData.instance; + }, + always: function() { + inShowsTab = false; } }, { @@ -433,14 +437,21 @@ var AIRTIME = (function(AIRTIME) { }, navigate: function() { delete fnServerData.instance; + }, + always: function() { + inShowsTab = false; } }, { initialized: false, initialize: function() { - showSummaryList(); + }, navigate: function() { + + }, + always: function() { + inShowsTab = true; showSummaryList(); } } @@ -478,6 +489,10 @@ var AIRTIME = (function(AIRTIME) { function makeHistoryDialog(html) { $hisDialogEl = $(html); + if (inShowsTab) { + $hisDialogEl.find("#his_choose_instance").remove(); + } + $hisDialogEl.dialog({ title: $.i18n._("Edit History Record"), modal: false, @@ -649,6 +664,8 @@ var AIRTIME = (function(AIRTIME) { else { tab.navigate(); } + + tab.always(); } }); From 15e27f8166e6b1332ca1852b91230f9384e3027a Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 00:43:43 -0400 Subject: [PATCH 138/164] history records for a show have times validated within show range. --- .../controllers/PlayouthistoryController.php | 1 - .../application/models/airtime/CcSubjs.php | 15 +++- .../application/services/HistoryService.php | 90 ++++++++++++------- .../application/services/UserService.php | 7 +- .../scripts/form/edit-history-item.phtml | 9 ++ .../js/airtime/playouthistory/historytable.js | 13 ++- 6 files changed, 89 insertions(+), 46 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index b6aadf568..d28c96412 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -202,7 +202,6 @@ class PlayouthistoryController extends Zend_Controller_Action public function editListItemAction() { $id = $this->_getParam('id', null); - Logging::info("Id is: $id"); $populate = isset($id) ? true : false; diff --git a/airtime_mvc/application/models/airtime/CcSubjs.php b/airtime_mvc/application/models/airtime/CcSubjs.php index 908adf554..78fd56d9e 100644 --- a/airtime_mvc/application/models/airtime/CcSubjs.php +++ b/airtime_mvc/application/models/airtime/CcSubjs.php @@ -1,11 +1,9 @@ filterByDbHost($this->getDbId()) ->count() > 0; } + + public function isHostOfShowInstance($instanceId) + { + $showInstance = CcShowInstancesQuery::create() + ->findPk($instanceId); + + return CcShowHostsQuery::create() + ->filterByDbShow($showInstance->getDbShowId()) + ->filterByDbHost($this->getDbId()) + ->count() > 0; + } } // CcSubjs diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 275c8d4fe..ed411efd0 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -803,31 +803,72 @@ class Application_Service_HistoryService return $select; } + private function validateHistoryItem($instanceId, $form) { + + /* + $userService = new Application_Service_UserService(); + $currentUser = $userService->getCurrentUser(); + + if (!$currentUser->isAdminOrPM()) { + if (empty($instance_id) ) { + + } + } + */ + + $valid = true; + + $recordStartsEl = $form->getElement("his_item_starts"); + $recordStarts = $recordStartsEl->getValue(); + $recordEndsEl = $form->getElement("his_item_starts"); + $recordEnds = $recordEndsEl->getValue(); + + $timezoneLocal = new DateTimeZone($this->timezone); + + $startDT = new DateTime($recordStarts, $timezoneLocal); + $endDT = new DateTime($recordEnds, $timezoneLocal); + + if ($recordStarts > $recordEnds) { + $valid = false; + $recordEndsEl->addErrorMessage("End time must be after start time"); + } + + if (isset($instanceId)) { + + $instance = CcShowInstancesQuery::create()->findPk($instanceId, $this->con); + $inStartsDT = $instance->getDbStarts(null); + $inEndsDT = $instance->getDbEnds(null); + + if ($startDT < $inStartsDT) { + $valid = false; + $form->addErrorMessage("History item begins before show."); + } + else if ($startDT > $inEndsDT) { + $valid = false; + $form->addErrorMessage("History item begins after show."); + } + } + + return $valid; + } + public function createPlayedItem($data) { try { $form = $this->makeHistoryItemForm(null); $history_id = $form->getElement("his_item_id"); - $instance_id = $data["instance_id"]; + $instanceId = $data["instance_id"]; $json = array(); - if ($form->isValid($data)) { + if ($form->isValid($data) && $this->validateHistoryItem($instanceId, $form)) { + $history_id->setIgnore(true); $values = $form->getValues(); - Logging::info("created list item"); - Logging::info($values); - - $this->populateTemplateItem($values, null, $instance_id); + $this->populateTemplateItem($values, null, $instanceId); } else { - Logging::info("created list item NOT VALID"); - - $msgs = $form->getMessages(); - Logging::info($msgs); - $json["form"] = $form; - $json["error"] = $msgs; } return $json; @@ -842,31 +883,21 @@ class Application_Service_HistoryService try { $id = $data["his_item_id"]; - $instance_id = $data["instance_id"]; + $instanceId = $data["instance_id"]; $form = $this->makeHistoryItemForm($id); $history_id = $form->getElement("his_item_id"); $history_id->setRequired(true); - Logging::info($data); $json = array(); - if ($form->isValid($data)) { + if ($form->isValid($data) && $this->validateHistoryItem($instanceId, $form)) { + $history_id->setIgnore(true); $values = $form->getValues(); - - Logging::info("edited list item"); - Logging::info($values); - - $this->populateTemplateItem($values, $id, $instance_id); + $this->populateTemplateItem($values, $id, $instanceId); } else { - Logging::info("edited list item NOT VALID"); - - $msgs = $form->getMessages(); - Logging::info($msgs); - $json["form"] = $form; - $json["error"] = $msgs; } return $json; @@ -885,22 +916,15 @@ class Application_Service_HistoryService $history_id = $form->getElement("his_file_id"); $history_id->setRequired(true); - Logging::info($data); $json = array(); if ($form->isValid($data)) { $history_id->setIgnore(true); $values = $form->getValues(); - Logging::info("edited list item"); - Logging::info($values); - $this->populateTemplateFile($values, $id); } else { - $msgs = $form->getMessages(); - Logging::info($msgs); - $json["error"] = $msgs; } diff --git a/airtime_mvc/application/services/UserService.php b/airtime_mvc/application/services/UserService.php index 879ba4d48..40e077a39 100644 --- a/airtime_mvc/application/services/UserService.php +++ b/airtime_mvc/application/services/UserService.php @@ -1,10 +1,5 @@ + getErrorMessages() ?> + 0) : ?> +
      + +
    • + +
    + +
    getElement($name); ?> diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 3e7aae7cd..9be44d77f 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -486,13 +486,19 @@ var AIRTIME = (function(AIRTIME) { }); } - function makeHistoryDialog(html) { - $hisDialogEl = $(html); + function processDialogHtml($el) { if (inShowsTab) { - $hisDialogEl.find("#his_choose_instance").remove(); + $el.find("#his_choose_instance").remove(); } + return $el + } + + function makeHistoryDialog(html) { + $hisDialogEl = $(html); + $hisDialogEl = processDialogHtml($hisDialogEl); + $hisDialogEl.dialog({ title: $.i18n._("Edit History Record"), modal: false, @@ -604,6 +610,7 @@ var AIRTIME = (function(AIRTIME) { if (json.form !== undefined) { var $newForm = $(json.form); + $newForm = processDialogHtml($newForm); $hisDialogEl.html($newForm.html()); initializeDialog(); } From 2c88d1e0a0b8d52d581efe03ebc7dabb864c285e Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:06:59 -0400 Subject: [PATCH 139/164] formating the date start/end of each show in the accordian. --- airtime_mvc/public/css/playouthistory.css | 26 +++++++++++++++++++ .../js/airtime/playouthistory/historytable.js | 21 +++++++++------ 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/public/css/playouthistory.css b/airtime_mvc/public/css/playouthistory.css index 8082d97ba..792e9143a 100644 --- a/airtime_mvc/public/css/playouthistory.css +++ b/airtime_mvc/public/css/playouthistory.css @@ -41,3 +41,29 @@ table.dataTable tbody tr { .his-selected.odd { background-color: rgba(255, 136, 56, 1); } + +.show-title, .show-time { + display:inline-block; + font-size:13px; +} +.show-title { + font-weight: bold; + margin: 0 8px; +} + +.show-date { + font-size:12px; + color: #363636; + margin: 0 5px; +} + +.show-time { + font-size:12px; + color: #363636; + margin: 0 5px; +} + +.push-right { + float:right; + margin-right:5px; +} diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 9be44d77f..9e071f9a8 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -180,15 +180,17 @@ var AIRTIME = (function(AIRTIME) { template = "

    " + "" + - "<%= name %>" + - "<%= starts %>" + - "<%= ends %>" + + "<%= name %>" + + "" + + "<%= date %>" + + "<%= startTime %>" + + "-" + + "<%= endTime %>" + + "" + "" + "

    " + "
    "; template = _.template(template); @@ -220,7 +222,8 @@ var AIRTIME = (function(AIRTIME) { i, len, $accordSection, - show; + show, + tmp; $showList .accordion( "destroy" ) @@ -228,12 +231,14 @@ var AIRTIME = (function(AIRTIME) { for (i = 0, len = oShows.length; i < len; i++) { show = oShows[i]; + tmp = show.starts.split(" "); $accordSection = createShowAccordSection({ instance: show.instance_id, name: show.name, - starts: show.starts, - ends: show.ends + date: tmp[0], + startTime: tmp[1], + endTime: show.ends.split(" ").pop() }); $showList.append($accordSection); From 7b54d3b6ce44b9f1d2e5b6384e3ce26e26c4e6de Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:08:49 -0400 Subject: [PATCH 140/164] fixing colour to go back to default theme --- airtime_mvc/public/css/playouthistory.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/airtime_mvc/public/css/playouthistory.css b/airtime_mvc/public/css/playouthistory.css index 792e9143a..1f80dc252 100644 --- a/airtime_mvc/public/css/playouthistory.css +++ b/airtime_mvc/public/css/playouthistory.css @@ -53,13 +53,11 @@ table.dataTable tbody tr { .show-date { font-size:12px; - color: #363636; margin: 0 5px; } .show-time { font-size:12px; - color: #363636; margin: 0 5px; } From 53c326b320524618714e1842f2782dc5463268a4 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:23:35 -0400 Subject: [PATCH 141/164] pagination buttons look better if they can fit on the same line. --- airtime_mvc/public/css/styles.css | 1 - 1 file changed, 1 deletion(-) diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 318030923..2d9ac34b7 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -808,7 +808,6 @@ dl.inline-list dd { .dataTables_paginate { float: right; padding: 8px 0 8px 8px; - clear: left; } .dataTables_paginate .ui-button { font-size:12px; From 0e017374b7216cf31ac2baea8f8cd45af3bc2209 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:30:23 -0400 Subject: [PATCH 142/164] change default text to "No Show" --- .../application/views/scripts/form/edit-history-item.phtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml index 76b376ae9..c6cd18466 100644 --- a/airtime_mvc/application/views/scripts/form/edit-history-item.phtml +++ b/airtime_mvc/application/views/scripts/form/edit-history-item.phtml @@ -45,7 +45,9 @@
    - +
    From 8971e6330a4809563dbb1618f4c811a224298319 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:39:51 -0400 Subject: [PATCH 143/164] removing animation for smoother effect. --- airtime_mvc/public/js/airtime/playouthistory/historytable.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 9e071f9a8..bf27b2e15 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -245,16 +245,18 @@ var AIRTIME = (function(AIRTIME) { } $showList.accordion({ + animated: false, create: function( event, ui ) { var $div = $showList.find(".ui-accordion-content-active"); createShowTable($div); }, change: function( event, ui ) { var $div = $(ui.newContent); + $(ui.oldContent).empty(); createShowTable($div); }, changestart: function( event, ui ) { - $(ui.oldContent).empty(); + } }); } From a4e9cd1add47e4ff584011caade50554cdd0fd2b Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 01:51:33 -0400 Subject: [PATCH 144/164] can research times in show summary now. --- .../public/js/airtime/playouthistory/historytable.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index bf27b2e15..1ce0e5fd6 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -653,7 +653,12 @@ var AIRTIME = (function(AIRTIME) { fn.start = oRange.start; fn.end = oRange.end; - redrawTables(); + if (inShowsTab) { + showSummaryList(); + } + else { + redrawTables(); + } }); $historyContentDiv.on("click", "#his_trash", function(ev){ From 846c90bc8f86d15e12e279a77235f343148caa9d Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 02:11:26 -0400 Subject: [PATCH 145/164] fixing select all/none button --- .../js/airtime/playouthistory/historytable.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 1ce0e5fd6..a118ba566 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -269,9 +269,9 @@ var AIRTIME = (function(AIRTIME) { $.i18n._("Select")+" " + "" + "" + ""); @@ -396,11 +396,7 @@ var AIRTIME = (function(AIRTIME) { $toolbar = $historyTableDiv.parents(".dataTables_wrapper").find(".fg-toolbar:first"); createToolbarButtons($toolbar); - - $("#his-select-page").click(selectCurrentPage); - $("#his-dselect-page").click(deselectCurrentPage); - $("#his-dselect-all").click(emptySelectedLogItems); - + return oTable; } @@ -661,6 +657,10 @@ var AIRTIME = (function(AIRTIME) { } }); + $historyContentDiv.on("click", ".his-select-page", selectCurrentPage); + $historyContentDiv.on("click", ".his-dselect-page", deselectCurrentPage); + $historyContentDiv.on("click", ".his-dselect-all", emptySelectedLogItems); + $historyContentDiv.on("click", "#his_trash", function(ev){ var items = getSelectedLogItems(), url = baseUrl+"playouthistory/delete-list-items"; From ad531f9512f507ca8393ceebbcf0741a158df6ae Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 02:24:16 -0400 Subject: [PATCH 146/164] clearing internal selected items array. --- .../public/js/airtime/playouthistory/historytable.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index a118ba566..c1d5ac6f0 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -254,10 +254,9 @@ var AIRTIME = (function(AIRTIME) { var $div = $(ui.newContent); $(ui.oldContent).empty(); createShowTable($div); - }, - changestart: function( event, ui ) { - + selectedLogItems = {}; } + //changestart: function( event, ui ) {} }); } @@ -431,6 +430,7 @@ var AIRTIME = (function(AIRTIME) { }, always: function() { inShowsTab = false; + selectedLogItems = {}; } }, { @@ -443,6 +443,7 @@ var AIRTIME = (function(AIRTIME) { }, always: function() { inShowsTab = false; + selectedLogItems = {}; } }, { @@ -456,6 +457,7 @@ var AIRTIME = (function(AIRTIME) { always: function() { inShowsTab = true; showSummaryList(); + selectedLogItems = {}; } } ]; @@ -665,7 +667,8 @@ var AIRTIME = (function(AIRTIME) { var items = getSelectedLogItems(), url = baseUrl+"playouthistory/delete-list-items"; - $.post(url, {ids: items, format: "json"}, function(){ + $.post(url, {ids: items, format: "json"}, function() { + selectedLogItems = {}; redrawTables(); }); }); From de225c589f716ba34b386e9d681720879513cc12 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 02:31:23 -0400 Subject: [PATCH 147/164] restricting search properly for select all/none. --- .../js/airtime/playouthistory/historytable.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index c1d5ac6f0..8b43be9b0 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -91,8 +91,9 @@ var AIRTIME = (function(AIRTIME) { selectedLogItems = {}; } - function selectCurrentPage() { - var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + function selectCurrentPage(e) { + var $ctx = $(e.currentTarget).parents("div.dataTables_wrapper"), + $inputs = $ctx.find(".his_checkbox").find("input"), $tr, $input; @@ -104,8 +105,9 @@ var AIRTIME = (function(AIRTIME) { }); } - function deselectCurrentPage() { - var $inputs = $historyContentDiv.find(".his_checkbox").find("input"), + function deselectCurrentPage(e) { + var $ctx = $(e.currentTarget).parents("div.dataTables_wrapper"), + $inputs = $ctx.find(".his_checkbox").find("input"), $tr, $input; @@ -430,7 +432,7 @@ var AIRTIME = (function(AIRTIME) { }, always: function() { inShowsTab = false; - selectedLogItems = {}; + emptySelectedLogItems(); } }, { @@ -443,7 +445,7 @@ var AIRTIME = (function(AIRTIME) { }, always: function() { inShowsTab = false; - selectedLogItems = {}; + emptySelectedLogItems(); } }, { @@ -457,7 +459,7 @@ var AIRTIME = (function(AIRTIME) { always: function() { inShowsTab = true; showSummaryList(); - selectedLogItems = {}; + emptySelectedLogItems(); } } ]; From ab8cf60fe32a56d5d1d04dffbc7adfbec0d43274 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 30 Aug 2013 02:39:14 -0400 Subject: [PATCH 148/164] refreshing view on navigation. --- .../public/js/airtime/playouthistory/historytable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 8b43be9b0..ea92dc4b2 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -429,6 +429,7 @@ var AIRTIME = (function(AIRTIME) { }, navigate: function() { delete fnServerData.instance; + oTableItem.fnDraw(); }, always: function() { inShowsTab = false; @@ -442,6 +443,7 @@ var AIRTIME = (function(AIRTIME) { }, navigate: function() { delete fnServerData.instance; + oTableAgg.fnDraw(); }, always: function() { inShowsTab = false; @@ -656,9 +658,7 @@ var AIRTIME = (function(AIRTIME) { if (inShowsTab) { showSummaryList(); } - else { - redrawTables(); - } + redrawTables(); }); $historyContentDiv.on("click", ".his-select-page", selectCurrentPage); From 0c379ef840b4b7bb1165a366e51951ad4e01c5ff Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 30 Aug 2013 15:03:43 -0400 Subject: [PATCH 149/164] a working show instance select. --- .../application/services/HistoryService.php | 4 +- .../js/airtime/playouthistory/historytable.js | 58 ++++++++++++++++++- .../public/js/airtime/utilities/utilities.js | 26 ++++++--- 3 files changed, 75 insertions(+), 13 deletions(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index ed411efd0..1001e01cf 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -857,7 +857,7 @@ class Application_Service_HistoryService try { $form = $this->makeHistoryItemForm(null); $history_id = $form->getElement("his_item_id"); - $instanceId = $data["instance_id"]; + $instanceId = isset($data["instance_id"]) ? $data["instance_id"] : null; $json = array(); if ($form->isValid($data) && $this->validateHistoryItem($instanceId, $form)) { @@ -883,7 +883,7 @@ class Application_Service_HistoryService try { $id = $data["his_item_id"]; - $instanceId = $data["instance_id"]; + $instanceId = isset($data["instance_id"]) ? $data["instance_id"] : null; $form = $this->makeHistoryItemForm($id); $history_id = $form->getElement("his_item_id"); $history_id->setRequired(true); diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index ea92dc4b2..744a8b450 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -604,7 +604,9 @@ var AIRTIME = (function(AIRTIME) { id = data[0].value, createUrl = baseUrl+"Playouthistory/create-list-item/format/json", updateUrl = baseUrl+"Playouthistory/update-list-item/format/json", - url; + url, + $select = $hisDialogEl.find("#his_instance_select"), + instance; url = (id === "") ? createUrl : updateUrl; @@ -614,6 +616,16 @@ var AIRTIME = (function(AIRTIME) { value: fnServerData.instance }); } + else if ($select.length > 0) { + instance = $select.val(); + + if (instance > 0) { + data.push({ + name: "instance_id", + value: instance + }); + } + } $.post(url, data, function(json) { @@ -645,6 +657,46 @@ var AIRTIME = (function(AIRTIME) { } }); + $('body').on("click", "#his_instance_retrieve", function(e) { + var startPicker = $hisDialogEl.find('#his_item_starts_datetimepicker').data('datetimepicker'), + endPicker = $hisDialogEl.find('#his_item_ends_datetimepicker').data('datetimepicker'), + url = baseUrl+"playouthistory/show-history-feed", + startDate = startPicker.getLocalDate(), + endDate = endPicker.getLocalDate(), + getEpochSeconds = AIRTIME.utilities.fnGetSecondsEpoch, + data; + + data = { + start: getEpochSeconds(startDate), + end: getEpochSeconds(endDate), + format: "json" + }; + + $.get(url, data, function(json) { + var i, + $select = $('
    ") - .append( - $("") - .append(renderSection('left')) - .append(renderSection('center')) - .append(renderSection('right')) - ); - return element; - } - } - - - function destroy() { - element.remove(); - } - - - function renderSection(position) { - var e = $("" + - ""; - for (i=0; i"; // need fc- for setDayID - } - s += - "" + - "" + - ""; - for (i=0; i"; - for (j=0; j" + // need fc- for setDayID - "
    " + - (showNumbers ? - "
    " : - '' - ) + - "
    " + - "
     
    " + - "
    " + - "
    " + - ""; - } - s += - ""; - } - s += - "
    " + - "
    "); - var buttonStr = options.header[position]; - if (buttonStr) { - $.each(buttonStr.split(' '), function(i) { - if (i > 0) { - e.append(""); - } - var prevButton; - $.each(this.split(','), function(j, buttonName) { - if (buttonName == 'title') { - e.append("

     

    "); - if (prevButton) { - prevButton.addClass(tm + '-corner-right'); - } - prevButton = null; - }else{ - var buttonClick; - if (calendar[buttonName]) { - buttonClick = calendar[buttonName]; // calendar method - } - else if (fcViews[buttonName]) { - buttonClick = function() { - button.removeClass(tm + '-state-hover'); // forget why - calendar.changeView(buttonName); - }; - } - if (buttonClick) { - var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here? - var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here? - var button = $( - "" + - "" + - "" + - (icon ? - "" + - "" + - "" : - text - ) + - "" + - "" + - "" + - "" - ); - if (button) { - button - .click(function() { - if (!button.hasClass(tm + '-state-disabled')) { - buttonClick(); - } - }) - .mousedown(function() { - button - .not('.' + tm + '-state-active') - .not('.' + tm + '-state-disabled') - .addClass(tm + '-state-down'); - }) - .mouseup(function() { - button.removeClass(tm + '-state-down'); - }) - .hover( - function() { - button - .not('.' + tm + '-state-active') - .not('.' + tm + '-state-disabled') - .addClass(tm + '-state-hover'); - }, - function() { - button - .removeClass(tm + '-state-hover') - .removeClass(tm + '-state-down'); - } - ) - .appendTo(e); - if (!prevButton) { - button.addClass(tm + '-corner-left'); - } - prevButton = button; - } - } - } - }); - if (prevButton) { - prevButton.addClass(tm + '-corner-right'); - } - }); - } - return e; - } - - - function updateTitle(html) { - element.find('h2') - .html(html); - } - - - function activateButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .addClass(tm + '-state-active'); - } - - - function deactivateButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .removeClass(tm + '-state-active'); - } - - - function disableButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .addClass(tm + '-state-disabled'); - } - - - function enableButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .removeClass(tm + '-state-disabled'); - } - - -} - -fc.sourceNormalizers = []; -fc.sourceFetchers = []; - -var ajaxDefaults = { - dataType: 'json', - cache: false -}; - -var eventGUID = 1; - - -function EventManager(options, _sources) { - var t = this; - - - // exports - t.isFetchNeeded = isFetchNeeded; - t.fetchEvents = fetchEvents; - t.addEventSource = addEventSource; - t.removeEventSource = removeEventSource; - t.updateEvent = updateEvent; - t.renderEvent = renderEvent; - t.removeEvents = removeEvents; - t.clientEvents = clientEvents; - t.normalizeEvent = normalizeEvent; - - - // imports - var trigger = t.trigger; - var getView = t.getView; - var reportEvents = t.reportEvents; - - - // locals - var stickySource = { events: [] }; - var sources = [ stickySource ]; - var rangeStart, rangeEnd; - var currentFetchID = 0; - var pendingSourceCnt = 0; - var loadingLevel = 0; - var cache = []; - - - for (var i=0; i<_sources.length; i++) { - _addEventSource(_sources[i]); - } - - - - /* Fetching - -----------------------------------------------------------------------------*/ - - - function isFetchNeeded(start, end) { - return !rangeStart || start < rangeStart || end > rangeEnd; - } - - - function fetchEvents(start, end) { - rangeStart = start; - rangeEnd = end; - cache = []; - var fetchID = ++currentFetchID; - var len = sources.length; - pendingSourceCnt = len; - for (var i=0; i)), return null instead - return null; -} - - -function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false - // derived from http://delete.me.uk/2005/03/iso8601.html - // TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html - var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/); - if (!m) { - return null; - } - var date = new Date(m[1], 0, 1); - if (ignoreTimezone || !m[13]) { - var check = new Date(m[1], 0, 1, 9, 0); - if (m[3]) { - date.setMonth(m[3] - 1); - check.setMonth(m[3] - 1); - } - if (m[5]) { - date.setDate(m[5]); - check.setDate(m[5]); - } - fixDate(date, check); - if (m[7]) { - date.setHours(m[7]); - } - if (m[8]) { - date.setMinutes(m[8]); - } - if (m[10]) { - date.setSeconds(m[10]); - } - if (m[12]) { - date.setMilliseconds(Number("0." + m[12]) * 1000); - } - fixDate(date, check); - }else{ - date.setUTCFullYear( - m[1], - m[3] ? m[3] - 1 : 0, - m[5] || 1 - ); - date.setUTCHours( - m[7] || 0, - m[8] || 0, - m[10] || 0, - m[12] ? Number("0." + m[12]) * 1000 : 0 - ); - if (m[14]) { - var offset = Number(m[16]) * 60 + (m[18] ? Number(m[18]) : 0); - offset *= m[15] == '-' ? 1 : -1; - date = new Date(+date + (offset * 60 * 1000)); - } - } - return date; -} - - -function parseTime(s) { // returns minutes since start of day - if (typeof s == 'number') { // an hour - return s * 60; - } - if (typeof s == 'object') { // a Date object - return s.getHours() * 60 + s.getMinutes(); - } - var m = s.match(/(\d+)(?::(\d+))?\s*(\w+)?/); - if (m) { - var h = parseInt(m[1], 10); - if (m[3]) { - h %= 12; - if (m[3].toLowerCase().charAt(0) == 'p') { - h += 12; - } - } - return h * 60 + (m[2] ? parseInt(m[2], 10) : 0); - } -} - - - -/* Date Formatting ------------------------------------------------------------------------------*/ -// TODO: use same function formatDate(date, [date2], format, [options]) - - -function formatDate(date, format, options) { - return formatDates(date, null, format, options); -} - - -function formatDates(date1, date2, format, options) { - options = options || defaults; - var date = date1, - otherDate = date2, - i, len = format.length, c, - i2, formatter, - res = ''; - for (i=0; ii; i2--) { - if (formatter = dateFormatters[format.substring(i, i2)]) { - if (date) { - res += formatter(date, options); - } - i = i2 - 1; - break; - } - } - if (i2 == i) { - if (date) { - res += c; - } - } - } - } - return res; -}; - - -var dateFormatters = { - s : function(d) { return d.getSeconds() }, - ss : function(d) { return zeroPad(d.getSeconds()) }, - m : function(d) { return d.getMinutes() }, - mm : function(d) { return zeroPad(d.getMinutes()) }, - h : function(d) { return d.getHours() % 12 || 12 }, - hh : function(d) { return zeroPad(d.getHours() % 12 || 12) }, - H : function(d) { return d.getHours() }, - HH : function(d) { return zeroPad(d.getHours()) }, - d : function(d) { return d.getDate() }, - dd : function(d) { return zeroPad(d.getDate()) }, - ddd : function(d,o) { return o.dayNamesShort[d.getDay()] }, - dddd: function(d,o) { return o.dayNames[d.getDay()] }, - M : function(d) { return d.getMonth() + 1 }, - MM : function(d) { return zeroPad(d.getMonth() + 1) }, - MMM : function(d,o) { return o.monthNamesShort[d.getMonth()] }, - MMMM: function(d,o) { return o.monthNames[d.getMonth()] }, - yy : function(d) { return (d.getFullYear()+'').substring(2) }, - yyyy: function(d) { return d.getFullYear() }, - t : function(d) { return d.getHours() < 12 ? 'a' : 'p' }, - tt : function(d) { return d.getHours() < 12 ? 'am' : 'pm' }, - T : function(d) { return d.getHours() < 12 ? 'A' : 'P' }, - TT : function(d) { return d.getHours() < 12 ? 'AM' : 'PM' }, - u : function(d) { return formatDate(d, "yyyy-MM-dd'T'HH:mm:ss'Z'") }, - S : function(d) { - var date = d.getDate(); - if (date > 10 && date < 20) { - return 'th'; - } - return ['st', 'nd', 'rd'][date%10-1] || 'th'; - } -}; - - - -fc.applyAll = applyAll; - - -/* Event Date Math ------------------------------------------------------------------------------*/ - - -function exclEndDay(event) { - if (event.end) { - return _exclEndDay(event.end, event.allDay); - }else{ - return addDays(cloneDate(event.start), 1); - } -} - - -function _exclEndDay(end, allDay) { - end = cloneDate(end); - return allDay || end.getHours() || end.getMinutes() ? addDays(end, 1) : clearTime(end); -} - - -function segCmp(a, b) { - return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start); -} - - -function segsCollide(seg1, seg2) { - return seg1.end > seg2.start && seg1.start < seg2.end; -} - - - -/* Event Sorting ------------------------------------------------------------------------------*/ - - -// event rendering utilities -function sliceSegs(events, visEventEnds, start, end) { - var segs = [], - i, len=events.length, event, - eventStart, eventEnd, - segStart, segEnd, - isStart, isEnd; - for (i=0; i start && eventStart < end) { - if (eventStart < start) { - segStart = cloneDate(start); - isStart = false; - }else{ - segStart = eventStart; - isStart = true; - } - if (eventEnd > end) { - segEnd = cloneDate(end); - isEnd = false; - }else{ - segEnd = eventEnd; - isEnd = true; - } - segs.push({ - event: event, - start: segStart, - end: segEnd, - isStart: isStart, - isEnd: isEnd, - msLength: segEnd - segStart - }); - } - } - return segs.sort(segCmp); -} - - -// event rendering calculation utilities -function stackSegs(segs) { - var levels = [], - i, len = segs.length, seg, - j, collide, k; - for (i=0; i=0; i--) { - res = obj[parts[i].toLowerCase()]; - if (res !== undefined) { - return res; - } - } - return obj['']; -} - - -function htmlEscape(s) { - return s.replace(/&/g, '&') - .replace(//g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"') - .replace(/\n/g, '
    '); -} - - -function cssKey(_element) { - return _element.id + '/' + _element.className + '/' + _element.style.cssText.replace(/(^|;)\s*(top|left|width|height)\s*:[^;]*/ig, ''); -} - - -function disableTextSelection(element) { - element - .attr('unselectable', 'on') - .css('MozUserSelect', 'none') - .bind('selectstart.ui', function() { return false; }); -} - - -/* -function enableTextSelection(element) { - element - .attr('unselectable', 'off') - .css('MozUserSelect', '') - .unbind('selectstart.ui'); -} -*/ - - -function markFirstLast(e) { - e.children() - .removeClass('fc-first fc-last') - .filter(':first-child') - .addClass('fc-first') - .end() - .filter(':last-child') - .addClass('fc-last'); -} - - -function setDayID(cell, date) { - cell.each(function(i, _cell) { - _cell.className = _cell.className.replace(/^fc-\w*/, 'fc-' + dayIDs[date.getDay()]); - // TODO: make a way that doesn't rely on order of classes - }); -} - - -function getSkinCss(event, opt) { - var source = event.source || {}; - var eventColor = event.color; - var sourceColor = source.color; - var optionColor = opt('eventColor'); - var backgroundColor = - event.backgroundColor || - eventColor || - source.backgroundColor || - sourceColor || - opt('eventBackgroundColor') || - optionColor; - var borderColor = - event.borderColor || - eventColor || - source.borderColor || - sourceColor || - opt('eventBorderColor') || - optionColor; - var textColor = - event.textColor || - source.textColor || - opt('eventTextColor'); - var statements = []; - if (backgroundColor) { - statements.push('background-color:' + backgroundColor); - } - if (borderColor) { - statements.push('border-color:' + borderColor); - } - if (textColor) { - statements.push('color:' + textColor); - } - return statements.join(';'); -} - - -function applyAll(functions, thisObj, args) { - if ($.isFunction(functions)) { - functions = [ functions ]; - } - if (functions) { - var i; - var ret; - for (i=0; i" + - "
    "; - table = $(s).appendTo(element); - - head = table.find('thead'); - headCells = head.find('th'); - body = table.find('tbody'); - bodyRows = body.find('tr'); - bodyCells = body.find('td'); - bodyFirstCells = bodyCells.filter(':first-child'); - bodyCellTopInners = bodyRows.eq(0).find('div.fc-day-content div'); - - markFirstLast(head.add(head.find('tr'))); // marks first+last tr/th's - markFirstLast(bodyRows); // marks first+last td's - bodyRows.eq(0).addClass('fc-first'); // fc-last is done in updateCells - - dayBind(bodyCells); - - daySegmentContainer = - $("
    ") - .appendTo(element); - } - - - - function updateCells(firstTime) { - var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating? - var month = t.start.getMonth(); - var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset"))); - var cell; - var date; - var row; - - if (dowDirty) { - headCells.each(function(i, _cell) { - cell = $(_cell); - date = indexDate(i); - cell.html(formatDate(date, colFormat)); - setDayID(cell, date); - }); - } - - bodyCells.each(function(i, _cell) { - cell = $(_cell); - date = indexDate(i); - if (date.getMonth() == month) { - cell.removeClass('fc-other-month'); - }else{ - cell.addClass('fc-other-month'); - } - if (+date == +today) { - cell.addClass(tm + '-state-highlight fc-today'); - }else{ - cell.removeClass(tm + '-state-highlight fc-today'); - } - cell.find('div.fc-day-number').text(date.getDate()); - if (dowDirty) { - setDayID(cell, date); - } - }); - - bodyRows.each(function(i, _row) { - row = $(_row); - if (i < rowCnt) { - row.show(); - if (i == rowCnt-1) { - row.addClass('fc-last'); - }else{ - row.removeClass('fc-last'); - } - }else{ - row.hide(); - } - }); - } - - - - function setHeight(height) { - viewHeight = height; - - var bodyHeight = viewHeight - head.height(); - var rowHeight; - var rowHeightLast; - var cell; - - if (opt('weekMode') == 'variable') { - rowHeight = rowHeightLast = Math.floor(bodyHeight / (rowCnt==1 ? 2 : 6)); - }else{ - rowHeight = Math.floor(bodyHeight / rowCnt); - rowHeightLast = bodyHeight - rowHeight * (rowCnt-1); - } - - bodyFirstCells.each(function(i, _cell) { - if (i < rowCnt) { - cell = $(_cell); - setMinHeight( - cell.find('> div'), - (i==rowCnt-1 ? rowHeightLast : rowHeight) - vsides(cell) - ); - } - }); - - } - - - function setWidth(width) { - viewWidth = width; - colContentPositions.clear(); - colWidth = Math.floor(viewWidth / colCnt); - setOuterWidth(headCells.slice(0, -1), colWidth); - } - - - - /* Day clicking and binding - -----------------------------------------------------------*/ - - - function dayBind(days) { - days.click(dayClick) - .mousedown(daySelectionMousedown); - } - - - function dayClick(ev) { - if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick - var index = parseInt(this.className.match(/fc\-day(\d+)/)[1]); // TODO: maybe use .data - var date = indexDate(index); - trigger('dayClick', this, date, true, ev); - } - } - - - - /* Semi-transparent Overlay Helpers - ------------------------------------------------------*/ - - - function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive - if (refreshCoordinateGrid) { - coordinateGrid.build(); - } - var rowStart = cloneDate(t.visStart); - var rowEnd = addDays(cloneDate(rowStart), colCnt); - for (var i=0; i" + - "" + - "" + - " "; - for (i=0; i"; // fc- needed for setDayID - } - s += - " " + - "" + - "" + - "" + - "" + - " "; - for (i=0; i" + // fc- needed for setDayID - "
    " + - "
    " + - "
     
    " + - "
    " + - "
    " + - ""; - } - s += - " " + - "" + - "" + - ""; - dayTable = $(s).appendTo(element); - dayHead = dayTable.find('thead'); - dayHeadCells = dayHead.find('th').slice(1, -1); - dayBody = dayTable.find('tbody'); - dayBodyCells = dayBody.find('td').slice(0, -1); - dayBodyCellInners = dayBodyCells.find('div.fc-day-content div'); - dayBodyFirstCell = dayBodyCells.eq(0); - dayBodyFirstCellStretcher = dayBodyFirstCell.find('> div'); - - markFirstLast(dayHead.add(dayHead.find('tr'))); - markFirstLast(dayBody.add(dayBody.find('tr'))); - - axisFirstCells = dayHead.find('th:first'); - gutterCells = dayTable.find('.fc-agenda-gutter'); - - slotLayer = - $("
    ") - .appendTo(element); - - if (opt('allDaySlot')) { - - daySegmentContainer = - $("
    ") - .appendTo(slotLayer); - - s = - "" + - "" + - "" + - "" + - "" + - "" + - "
    " + opt('allDayText') + "" + - "
    " + - "
     
    "; - allDayTable = $(s).appendTo(slotLayer); - allDayRow = allDayTable.find('tr'); - - dayBind(allDayRow.find('td')); - - axisFirstCells = axisFirstCells.add(allDayTable.find('th:first')); - gutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter')); - - slotLayer.append( - "
    " + - "
    " + - "
    " - ); - - }else{ - - daySegmentContainer = $([]); // in jQuery 1.4, we can just do $() - - } - - slotScroller = - $("
    ") - .appendTo(slotLayer); - - slotContent = - $("
    ") - .appendTo(slotScroller); - - slotSegmentContainer = - $("
    ") - .appendTo(slotContent); - - s = - "" + - ""; - d = zeroDate(); - maxd = addMinutes(cloneDate(d), maxMinute); - addMinutes(d, minMinute); - slotCnt = 0; - for (i=0; d < maxd; i++) { - minutes = d.getMinutes(); - s += - "" + - "" + - "" + - ""; - addMinutes(d, opt('slotMinutes')); - slotCnt++; - } - s += - "" + - "
    " + - ((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') + - "" + - "
     
    " + - "
    "; - slotTable = $(s).appendTo(slotContent); - slotTableFirstInner = slotTable.find('div:first'); - - slotBind(slotTable.find('td')); - - axisFirstCells = axisFirstCells.add(slotTable.find('th:first')); - } - - - - function updateCells() { - var i; - var headCell; - var bodyCell; - var date; - var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset"))); - for (i=0; i= 0) { - addMinutes(d, minMinute + slotIndex * opt('slotMinutes')); - } - return d; - } - - - function colDate(col) { // returns dates with 00:00:00 - return addDays(cloneDate(t.visStart), col*dis+dit); - } - - - function cellIsAllDay(cell) { - return opt('allDaySlot') && !cell.row; - } - - - function dayOfWeekCol(dayOfWeek) { - return ((dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt)*dis+dit; - } - - - - - // get the Y coordinate of the given time on the given day (both Date objects) - function timePosition(day, time) { // both date objects. day holds 00:00 of current day - day = cloneDate(day, true); - if (time < addMinutes(cloneDate(day), minMinute)) { - return 0; - } - if (time >= addMinutes(cloneDate(day), maxMinute)) { - return slotTable.height(); - } - var slotMinutes = opt('slotMinutes'), - minutes = time.getHours()*60 + time.getMinutes() - minMinute, - slotI = Math.floor(minutes / slotMinutes), - slotTop = slotTopCache[slotI]; - if (slotTop === undefined) { - slotTop = slotTopCache[slotI] = slotTable.find('tr:eq(' + slotI + ') td div')[0].offsetTop; //.position().top; // need this optimization??? - } - return Math.max(0, Math.round( - slotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes) - )); - } - - - function allDayBounds() { - return { - left: axisWidth, - right: viewWidth - gutterWidth - } - } - - - function getAllDayRow(index) { - return allDayRow; - } - - - function defaultEventEnd(event) { - var start = cloneDate(event.start); - if (event.allDay) { - return start; - } - return addMinutes(start, opt('defaultEventMinutes')); - } - - - - /* Selection - ---------------------------------------------------------------------------------*/ - - - function defaultSelectionEnd(startDate, allDay) { - if (allDay) { - return cloneDate(startDate); - } - return addMinutes(cloneDate(startDate), opt('slotMinutes')); - } - - - function renderSelection(startDate, endDate, allDay) { // only for all-day - if (allDay) { - if (opt('allDaySlot')) { - renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true); - } - }else{ - renderSlotSelection(startDate, endDate); - } - } - - - function renderSlotSelection(startDate, endDate) { - var helperOption = opt('selectHelper'); - coordinateGrid.build(); - if (helperOption) { - var col = dayDiff(startDate, t.visStart) * dis + dit; - if (col >= 0 && col < colCnt) { // only works when times are on same day - var rect = coordinateGrid.rect(0, col, 0, col, slotContent); // only for horizontal coords - var top = timePosition(startDate, startDate); - var bottom = timePosition(startDate, endDate); - if (bottom > top) { // protect against selections that are entirely before or after visible range - rect.top = top; - rect.height = bottom - top; - rect.left += 2; - rect.width -= 5; - if ($.isFunction(helperOption)) { - var helperRes = helperOption(startDate, endDate); - if (helperRes) { - rect.position = 'absolute'; - rect.zIndex = 8; - selectionHelper = $(helperRes) - .css(rect) - .appendTo(slotContent); - } - }else{ - rect.isStart = true; // conside rect a "seg" now - rect.isEnd = true; // - selectionHelper = $(slotSegHtml( - { - title: '', - start: startDate, - end: endDate, - className: ['fc-select-helper'], - editable: false - }, - rect - )); - selectionHelper.css('opacity', opt('dragOpacity')); - } - if (selectionHelper) { - slotBind(selectionHelper); - slotContent.append(selectionHelper); - setOuterWidth(selectionHelper, rect.width, true); // needs to be after appended - setOuterHeight(selectionHelper, rect.height, true); - } - } - } - }else{ - renderSlotOverlay(startDate, endDate); - } - } - - - function clearSelection() { - clearOverlays(); - if (selectionHelper) { - selectionHelper.remove(); - selectionHelper = null; - } - } - - - function slotSelectionMousedown(ev) { - if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button - unselect(ev); - var dates; - hoverListener.start(function(cell, origCell) { - clearSelection(); - if (cell && cell.col == origCell.col && !cellIsAllDay(cell)) { - var d1 = cellDate(origCell); - var d2 = cellDate(cell); - dates = [ - d1, - addMinutes(cloneDate(d1), opt('slotMinutes')), - d2, - addMinutes(cloneDate(d2), opt('slotMinutes')) - ].sort(cmp); - renderSlotSelection(dates[0], dates[3]); - }else{ - dates = null; - } - }, ev); - $(document).one('mouseup', function(ev) { - hoverListener.stop(); - if (dates) { - if (+dates[0] == +dates[1]) { - reportDayClick(dates[0], false, ev); - } - reportSelection(dates[0], dates[3], false, ev); - } - }); - } - } - - - function reportDayClick(date, allDay, ev) { - trigger('dayClick', dayBodyCells[dayOfWeekCol(date.getDay())], date, allDay, ev); - } - - - - /* External Dragging - --------------------------------------------------------------------------------*/ - - - function dragStart(_dragElement, ev, ui) { - hoverListener.start(function(cell) { - clearOverlays(); - if (cell) { - if (cellIsAllDay(cell)) { - renderCellOverlay(cell.row, cell.col, cell.row, cell.col); - }else{ - var d1 = cellDate(cell); - var d2 = addMinutes(cloneDate(d1), opt('defaultEventMinutes')); - renderSlotOverlay(d1, d2); - } - } - }, ev); - } - - - function dragStop(_dragElement, ev, ui) { - var cell = hoverListener.stop(); - clearOverlays(); - if (cell) { - trigger('drop', _dragElement, cellDate(cell), cellIsAllDay(cell), ev, ui); - } - } - - -} - -function AgendaEventRenderer() { - var t = this; - - - // exports - t.renderEvents = renderEvents; - t.compileDaySegs = compileDaySegs; // for DayEventRenderer - t.clearEvents = clearEvents; - t.slotSegHtml = slotSegHtml; - t.bindDaySeg = bindDaySeg; - - - // imports - DayEventRenderer.call(t); - var opt = t.opt; - var trigger = t.trigger; - //var setOverflowHidden = t.setOverflowHidden; - var isEventDraggable = t.isEventDraggable; - var isEventResizable = t.isEventResizable; - var eventEnd = t.eventEnd; - var reportEvents = t.reportEvents; - var reportEventClear = t.reportEventClear; - var eventElementHandlers = t.eventElementHandlers; - var setHeight = t.setHeight; - var getDaySegmentContainer = t.getDaySegmentContainer; - var getSlotSegmentContainer = t.getSlotSegmentContainer; - var getHoverListener = t.getHoverListener; - var getMaxMinute = t.getMaxMinute; - var getMinMinute = t.getMinMinute; - var timePosition = t.timePosition; - var colContentLeft = t.colContentLeft; - var colContentRight = t.colContentRight; - var renderDaySegs = t.renderDaySegs; - var resizableDayEvent = t.resizableDayEvent; // TODO: streamline binding architecture - var getColCnt = t.getColCnt; - var getColWidth = t.getColWidth; - var getSlotHeight = t.getSlotHeight; - var getBodyContent = t.getBodyContent; - var reportEventElement = t.reportEventElement; - var showEvents = t.showEvents; - var hideEvents = t.hideEvents; - var eventDrop = t.eventDrop; - var eventResize = t.eventResize; - var renderDayOverlay = t.renderDayOverlay; - var clearOverlays = t.clearOverlays; - var calendar = t.calendar; - var formatDate = calendar.formatDate; - var formatDates = calendar.formatDates; - - - - /* Rendering - ----------------------------------------------------------------------------*/ - - - function renderEvents(events, modifiedEventId) { - reportEvents(events); - var i, len=events.length, - dayEvents=[], - slotEvents=[]; - for (i=0; i" + - "
    " + - "
    " + - "
    " + - htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + - "
    " + - "
    " + - "
    " + - "
    " + - htmlEscape(event.title) + - "
    " + - "
    " + - "
    " + - "
    "; // close inner - if (seg.isEnd && isEventResizable(event)) { - html += - "
    =
    "; - } - html += - ""; - return html; - } - - - function bindDaySeg(event, eventElement, seg) { - if (isEventDraggable(event)) { - draggableDayEvent(event, eventElement, seg.isStart); - } - if (seg.isEnd && isEventResizable(event)) { - resizableDayEvent(event, eventElement, seg); - } - eventElementHandlers(event, eventElement); - // needs to be after, because resizableDayEvent might stopImmediatePropagation on click - } - - - function bindSlotSeg(event, eventElement, seg) { - var timeElement = eventElement.find('div.fc-event-time'); - if (isEventDraggable(event)) { - draggableSlotEvent(event, eventElement, timeElement); - } - if (seg.isEnd && isEventResizable(event)) { - resizableSlotEvent(event, eventElement, timeElement); - } - eventElementHandlers(event, eventElement); - } - - - - /* Dragging - -----------------------------------------------------------------------------------*/ - - - // when event starts out FULL-DAY - - function draggableDayEvent(event, eventElement, isStart) { - var origWidth; - var revert; - var allDay=true; - var dayDelta; - var dis = opt('isRTL') ? -1 : 1; - var hoverListener = getHoverListener(); - var colWidth = getColWidth(); - var slotHeight = getSlotHeight(); - var minMinute = getMinMinute(); - eventElement.draggable({ - zIndex: 9, - opacity: opt('dragOpacity', 'month'), // use whatever the month view was using - revertDuration: opt('dragRevertDuration'), - start: function(ev, ui) { - trigger('eventDragStart', eventElement, event, ev, ui); - hideEvents(event, eventElement); - origWidth = eventElement.width(); - hoverListener.start(function(cell, origCell, rowDelta, colDelta) { - clearOverlays(); - if (cell) { - //setOverflowHidden(true); - revert = false; - dayDelta = colDelta * dis; - if (!cell.row) { - // on full-days - renderDayOverlay( - addDays(cloneDate(event.start), dayDelta), - addDays(exclEndDay(event), dayDelta) - ); - resetElement(); - }else{ - // mouse is over bottom slots - if (isStart) { - if (allDay) { - // convert event to temporary slot-event - eventElement.width(colWidth - 10); // don't use entire width - setOuterHeight( - eventElement, - slotHeight * Math.round( - (event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes')) - / opt('slotMinutes') - ) - ); - eventElement.draggable('option', 'grid', [colWidth, 1]); - allDay = false; - } - }else{ - revert = true; - } - } - revert = revert || (allDay && !dayDelta); - }else{ - resetElement(); - //setOverflowHidden(false); - revert = true; - } - eventElement.draggable('option', 'revert', revert); - }, ev, 'drag'); - }, - stop: function(ev, ui) { - hoverListener.stop(); - clearOverlays(); - trigger('eventDragStop', eventElement, event, ev, ui); - if (revert) { - // hasn't moved or is out of bounds (draggable has already reverted) - resetElement(); - eventElement.css('filter', ''); // clear IE opacity side-effects - showEvents(event, eventElement); - }else{ - // changed! - var minuteDelta = 0; - if (!allDay) { - minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / slotHeight) - * opt('slotMinutes') - + minMinute - - (event.start.getHours() * 60 + event.start.getMinutes()); - } - eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui); - } - //setOverflowHidden(false); - } - }); - function resetElement() { - if (!allDay) { - eventElement - .width(origWidth) - .height('') - .draggable('option', 'grid', null); - allDay = true; - } - } - } - - - // when event starts out IN TIMESLOTS - - function draggableSlotEvent(event, eventElement, timeElement) { - var origPosition; - var allDay=false; - var dayDelta; - var minuteDelta; - var prevMinuteDelta; - var dis = opt('isRTL') ? -1 : 1; - var hoverListener = getHoverListener(); - var colCnt = getColCnt(); - var colWidth = getColWidth(); - var slotHeight = getSlotHeight(); - eventElement.draggable({ - zIndex: 9, - scroll: false, - grid: [colWidth, slotHeight], - axis: colCnt==1 ? 'y' : false, - opacity: opt('dragOpacity'), - revertDuration: opt('dragRevertDuration'), - start: function(ev, ui) { - trigger('eventDragStart', eventElement, event, ev, ui); - hideEvents(event, eventElement); - origPosition = eventElement.position(); - minuteDelta = prevMinuteDelta = 0; - hoverListener.start(function(cell, origCell, rowDelta, colDelta) { - eventElement.draggable('option', 'revert', !cell); - clearOverlays(); - if (cell) { - dayDelta = colDelta * dis; - if (opt('allDaySlot') && !cell.row) { - // over full days - if (!allDay) { - // convert to temporary all-day event - allDay = true; - timeElement.hide(); - eventElement.draggable('option', 'grid', null); - } - renderDayOverlay( - addDays(cloneDate(event.start), dayDelta), - addDays(exclEndDay(event), dayDelta) - ); - }else{ - // on slots - resetElement(); - } - } - }, ev, 'drag'); - }, - drag: function(ev, ui) { - minuteDelta = Math.round((ui.position.top - origPosition.top) / slotHeight) * opt('slotMinutes'); - if (minuteDelta != prevMinuteDelta) { - if (!allDay) { - updateTimeText(minuteDelta); - } - prevMinuteDelta = minuteDelta; - } - }, - stop: function(ev, ui) { - var cell = hoverListener.stop(); - clearOverlays(); - trigger('eventDragStop', eventElement, event, ev, ui); - if (cell && (dayDelta || minuteDelta || allDay)) { - // changed! - eventDrop(this, event, dayDelta, allDay ? 0 : minuteDelta, allDay, ev, ui); - }else{ - // either no change or out-of-bounds (draggable has already reverted) - resetElement(); - eventElement.css('filter', ''); // clear IE opacity side-effects - eventElement.css(origPosition); // sometimes fast drags make event revert to wrong position - updateTimeText(0); - showEvents(event, eventElement); - } - } - }); - function updateTimeText(minuteDelta) { - var newStart = addMinutes(cloneDate(event.start), minuteDelta); - var newEnd; - if (event.end) { - newEnd = addMinutes(cloneDate(event.end), minuteDelta); - } - timeElement.text(formatDates(newStart, newEnd, opt('timeFormat'))); - } - function resetElement() { - // convert back to original slot-event - if (allDay) { - timeElement.css('display', ''); // show() was causing display=inline - eventElement.draggable('option', 'grid', [colWidth, slotHeight]); - allDay = false; - } - } - } - - - - /* Resizing - --------------------------------------------------------------------------------------*/ - - - function resizableSlotEvent(event, eventElement, timeElement) { - var slotDelta, prevSlotDelta; - var slotHeight = getSlotHeight(); - eventElement.resizable({ - handles: { - s: 'div.ui-resizable-s' - }, - grid: slotHeight, - start: function(ev, ui) { - slotDelta = prevSlotDelta = 0; - hideEvents(event, eventElement); - eventElement.css('z-index', 9); - trigger('eventResizeStart', this, event, ev, ui); - }, - resize: function(ev, ui) { - // don't rely on ui.size.height, doesn't take grid into account - slotDelta = Math.round((Math.max(slotHeight, eventElement.height()) - ui.originalSize.height) / slotHeight); - if (slotDelta != prevSlotDelta) { - timeElement.text( - formatDates( - event.start, - (!slotDelta && !event.end) ? null : // no change, so don't display time range - addMinutes(eventEnd(event), opt('slotMinutes')*slotDelta), - opt('timeFormat') - ) - ); - prevSlotDelta = slotDelta; - } - }, - stop: function(ev, ui) { - trigger('eventResizeStop', this, event, ev, ui); - if (slotDelta) { - eventResize(this, event, 0, opt('slotMinutes')*slotDelta, ev, ui); - }else{ - eventElement.css('z-index', 8); - showEvents(event, eventElement); - // BUG: if event was really short, need to put title back in span - } - } - }); - } - - -} - - -function countForwardSegs(levels) { - var i, j, k, level, segForward, segBack; - for (i=levels.length-1; i>0; i--) { - level = levels[i]; - for (j=0; j"); - var elements; - var segmentContainer = getDaySegmentContainer(); - var i; - var segCnt = segs.length; - var element; - tempContainer[0].innerHTML = daySegHTML(segs); // faster than .html() - elements = tempContainer.children(); - segmentContainer.append(elements); - daySegElementResolve(segs, elements); - daySegCalcHSides(segs); - daySegSetWidths(segs); - daySegCalcHeights(segs); - daySegSetTops(segs, getRowTops(getRowDivs())); - elements = []; - for (i=0; i" + - ""; - if (!event.allDay && seg.isStart) { - html += - "" + - htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + - ""; - } - html += - "" + htmlEscape(event.title) + "" + - "
    "; - if (seg.isEnd && isEventResizable(event)) { - html += - "
    " + - "   " + // makes hit area a lot better for IE6/7 - "
    "; - } - html += - ""; - seg.left = left; - seg.outerWidth = right - left; - seg.startCol = leftCol; - seg.endCol = rightCol + 1; // needs to be exclusive - } - return html; - } - - - function daySegElementResolve(segs, elements) { // sets seg.element - var i; - var segCnt = segs.length; - var seg; - var event; - var element; - var triggerRes; - for (i=0; i div'); // optimal selector? - } - return rowDivs; - } - - - function getRowTops(rowDivs) { - var i; - var rowCnt = rowDivs.length; - var tops = []; - for (i=0; i selection for IE - element - .mousedown(function(ev) { // prevent native selection for others - ev.preventDefault(); - }) - .click(function(ev) { - if (isResizing) { - ev.preventDefault(); // prevent link from being visited (only method that worked in IE6) - ev.stopImmediatePropagation(); // prevent fullcalendar eventClick handler from being called - // (eventElementHandlers needs to be bound after resizableDayEvent) - } - }); - - handle.mousedown(function(ev) { - if (ev.which != 1) { - return; // needs to be left mouse button - } - isResizing = true; - var hoverListener = t.getHoverListener(); - var rowCnt = getRowCnt(); - var colCnt = getColCnt(); - var dis = rtl ? -1 : 1; - var dit = rtl ? colCnt-1 : 0; - var elementTop = element.css('top'); - var dayDelta; - var helpers; - var eventCopy = $.extend({}, event); - var minCell = dateCell(event.start); - clearSelection(); - $('body') - .css('cursor', direction + '-resize') - .one('mouseup', mouseup); - trigger('eventResizeStart', this, event, ev); - hoverListener.start(function(cell, origCell) { - if (cell) { - var r = Math.max(minCell.row, cell.row); - var c = cell.col; - if (rowCnt == 1) { - r = 0; // hack for all-day area in agenda views - } - if (r == minCell.row) { - if (rtl) { - c = Math.min(minCell.col, c); - }else{ - c = Math.max(minCell.col, c); - } - } - dayDelta = (r*7 + c*dis+dit) - (origCell.row*7 + origCell.col*dis+dit); - var newEnd = addDays(eventEnd(event), dayDelta, true); - if (dayDelta) { - eventCopy.end = newEnd; - var oldHelpers = helpers; - helpers = renderTempDaySegs(compileDaySegs([eventCopy]), seg.row, elementTop); - helpers.find('*').css('cursor', direction + '-resize'); - if (oldHelpers) { - oldHelpers.remove(); - } - hideEvents(event); - }else{ - if (helpers) { - showEvents(event); - helpers.remove(); - helpers = null; - } - } - clearOverlays(); - renderDayOverlay(event.start, addDays(cloneDate(newEnd), 1)); // coordinate grid already rebuild at hoverListener.start - } - }, ev); - - function mouseup(ev) { - trigger('eventResizeStop', this, event, ev); - $('body').css('cursor', ''); - hoverListener.stop(); - clearOverlays(); - if (dayDelta) { - eventResize(this, event, dayDelta, 0, ev); - // event redraw will clear helpers - } - // otherwise, the drag handler already restored the old events - - setTimeout(function() { // make this happen after the element's click event - isResizing = false; - },0); - } - - }); - } - - -} - -//BUG: unselect needs to be triggered when events are dragged+dropped - -function SelectionManager() { - var t = this; - - - // exports - t.select = select; - t.unselect = unselect; - t.reportSelection = reportSelection; - t.daySelectionMousedown = daySelectionMousedown; - - - // imports - var opt = t.opt; - var trigger = t.trigger; - var defaultSelectionEnd = t.defaultSelectionEnd; - var renderSelection = t.renderSelection; - var clearSelection = t.clearSelection; - - - // locals - var selected = false; - - - - // unselectAuto - if (opt('selectable') && opt('unselectAuto')) { - $(document).mousedown(function(ev) { - var ignore = opt('unselectCancel'); - if (ignore) { - if ($(ev.target).parents(ignore).length) { // could be optimized to stop after first match - return; - } - } - unselect(ev); - }); - } - - - function select(startDate, endDate, allDay) { - unselect(); - if (!endDate) { - endDate = defaultSelectionEnd(startDate, allDay); - } - renderSelection(startDate, endDate, allDay); - reportSelection(startDate, endDate, allDay); - } - - - function unselect(ev) { - if (selected) { - selected = false; - clearSelection(); - trigger('unselect', null, ev); - } - } - - - function reportSelection(startDate, endDate, allDay, ev) { - selected = true; - trigger('select', null, startDate, endDate, allDay, ev); - } - - - function daySelectionMousedown(ev) { // not really a generic manager method, oh well - var cellDate = t.cellDate; - var cellIsAllDay = t.cellIsAllDay; - var hoverListener = t.getHoverListener(); - var reportDayClick = t.reportDayClick; // this is hacky and sort of weird - if (ev.which == 1 && opt('selectable')) { // which==1 means left mouse button - unselect(ev); - var _mousedownElement = this; - var dates; - hoverListener.start(function(cell, origCell) { // TODO: maybe put cellDate/cellIsAllDay info in cell - clearSelection(); - if (cell && cellIsAllDay(cell)) { - dates = [ cellDate(origCell), cellDate(cell) ].sort(cmp); - renderSelection(dates[0], dates[1], true); - }else{ - dates = null; - } - }, ev); - $(document).one('mouseup', function(ev) { - hoverListener.stop(); - if (dates) { - if (+dates[0] == +dates[1]) { - reportDayClick(dates[0], true, ev); - } - reportSelection(dates[0], dates[1], true, ev); - } - }); - } - } - - -} - -function OverlayManager() { - var t = this; - - - // exports - t.renderOverlay = renderOverlay; - t.clearOverlays = clearOverlays; - - - // locals - var usedOverlays = []; - var unusedOverlays = []; - - - function renderOverlay(rect, parent) { - var e = unusedOverlays.shift(); - if (!e) { - e = $("
    "); - } - if (e[0].parentNode != parent[0]) { - e.appendTo(parent); - } - usedOverlays.push(e.css(rect).show()); - return e; - } - - - function clearOverlays() { - var e; - while (e = usedOverlays.shift()) { - unusedOverlays.push(e.hide().unbind()); - } - } - - -} - -function CoordinateGrid(buildFunc) { - - var t = this; - var rows; - var cols; - - - t.build = function() { - rows = []; - cols = []; - buildFunc(rows, cols); - }; - - - t.cell = function(x, y) { - var rowCnt = rows.length; - var colCnt = cols.length; - var i, r=-1, c=-1; - for (i=0; i= rows[i][0] && y < rows[i][1]) { - r = i; - break; - } - } - for (i=0; i= cols[i][0] && x < cols[i][1]) { - c = i; - break; - } - } - return (r>=0 && c>=0) ? { row:r, col:c } : null; - }; - - - t.rect = function(row0, col0, row1, col1, originElement) { // row1,col1 is inclusive - var origin = originElement.offset(); - return { - top: rows[row0][0] - origin.top, - left: cols[col0][0] - origin.left, - width: cols[col1][1] - cols[col0][0], - height: rows[row1][1] - rows[row0][0] - }; - }; - -} - -function HoverListener(coordinateGrid) { - - - var t = this; - var bindType; - var change; - var firstCell; - var cell; - - - t.start = function(_change, ev, _bindType) { - change = _change; - firstCell = cell = null; - coordinateGrid.build(); - mouse(ev); - bindType = _bindType || 'mousemove'; - $(document).bind(bindType, mouse); - }; - - - function mouse(ev) { - _fixUIEvent(ev); // see below - var newCell = coordinateGrid.cell(ev.pageX, ev.pageY); - if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) { - if (newCell) { - if (!firstCell) { - firstCell = newCell; - } - change(newCell, firstCell, newCell.row-firstCell.row, newCell.col-firstCell.col); - }else{ - change(newCell, firstCell); - } - cell = newCell; - } - } - - - t.stop = function() { - $(document).unbind(bindType, mouse); - return cell; - }; - - -} - - - -// this fix was only necessary for jQuery UI 1.8.16 (and jQuery 1.7 or 1.7.1) -// upgrading to jQuery UI 1.8.17 (and using either jQuery 1.7 or 1.7.1) fixed the problem -// but keep this in here for 1.8.16 users -// and maybe remove it down the line - -function _fixUIEvent(event) { // for issue 1168 - if (event.pageX === undefined) { - event.pageX = event.originalEvent.pageX; - event.pageY = event.originalEvent.pageY; - } -} -function HorizontalPositionCache(getElement) { - - var t = this, - elements = {}, - lefts = {}, - rights = {}; - - function e(i) { - return elements[i] = elements[i] || getElement(i); - } - - t.left = function(i) { - return lefts[i] = lefts[i] === undefined ? e(i).position().left : lefts[i]; - }; - - t.right = function(i) { - return rights[i] = rights[i] === undefined ? t.left(i) + e(i).width() : rights[i]; - }; - - t.clear = function() { - elements = {}; - lefts = {}; - rights = {}; - }; - -} - -})(jQuery); diff --git a/airtime_mvc/public/js/fullcalendar/fullcalendar.js b/airtime_mvc/public/js/fullcalendar/fullcalendar.js index 99e25e38f..85b760bec 100644 --- a/airtime_mvc/public/js/fullcalendar/fullcalendar.js +++ b/airtime_mvc/public/js/fullcalendar/fullcalendar.js @@ -1,6 +1,6 @@ /** * @preserve - * FullCalendar v1.5.4 + * FullCalendar v1.5.3-CUSTOM (Changes by Martin Konecny -added primitive support for timezones) * http://arshaw.com/fullcalendar/ * * Use fullcalendar.css for basic styling. @@ -11,7 +11,7 @@ * Dual licensed under the MIT and GPL licenses, located in * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. * - * Date: Tue Sep 4 23:38:33 2012 -0700 + * Date: Mon Feb 6 22:40:40 2012 -0800 * */ @@ -111,7 +111,7 @@ var rtlDefaults = { -var fc = $.fullCalendar = { version: "1.5.4" }; +var fc = $.fullCalendar = { version: "1.5.3" }; var fcViews = fc.views = {}; @@ -227,7 +227,7 @@ function Calendar(element, options, eventSources) { var absoluteViewElement; var resizeUID = 0; var ignoreWindowResize = 0; - var date = new Date(); + var date = adjustDateToServerDate(new Date(), options["serverTimezoneOffset"]); var events = []; var _dragElement; @@ -1658,7 +1658,7 @@ function sliceSegs(events, visEventEnds, start, end) { msLength: segEnd - segStart }); } - } + } return segs.sort(segCmp); } @@ -1742,26 +1742,29 @@ function setOuterHeight(element, height, includeMargins) { } +// TODO: curCSS has been deprecated (jQuery 1.4.3 - 10/16/2010) + + function hsides(element, includeMargins) { return hpadding(element) + hborders(element) + (includeMargins ? hmargins(element) : 0); } function hpadding(element) { - return (parseFloat($.css(element[0], 'paddingLeft', true)) || 0) + - (parseFloat($.css(element[0], 'paddingRight', true)) || 0); + return (parseFloat($.curCSS(element[0], 'paddingLeft', true)) || 0) + + (parseFloat($.curCSS(element[0], 'paddingRight', true)) || 0); } function hmargins(element) { - return (parseFloat($.css(element[0], 'marginLeft', true)) || 0) + - (parseFloat($.css(element[0], 'marginRight', true)) || 0); + return (parseFloat($.curCSS(element[0], 'marginLeft', true)) || 0) + + (parseFloat($.curCSS(element[0], 'marginRight', true)) || 0); } function hborders(element) { - return (parseFloat($.css(element[0], 'borderLeftWidth', true)) || 0) + - (parseFloat($.css(element[0], 'borderRightWidth', true)) || 0); + return (parseFloat($.curCSS(element[0], 'borderLeftWidth', true)) || 0) + + (parseFloat($.curCSS(element[0], 'borderRightWidth', true)) || 0); } @@ -1771,20 +1774,20 @@ function vsides(element, includeMargins) { function vpadding(element) { - return (parseFloat($.css(element[0], 'paddingTop', true)) || 0) + - (parseFloat($.css(element[0], 'paddingBottom', true)) || 0); + return (parseFloat($.curCSS(element[0], 'paddingTop', true)) || 0) + + (parseFloat($.curCSS(element[0], 'paddingBottom', true)) || 0); } function vmargins(element) { - return (parseFloat($.css(element[0], 'marginTop', true)) || 0) + - (parseFloat($.css(element[0], 'marginBottom', true)) || 0); + return (parseFloat($.curCSS(element[0], 'marginTop', true)) || 0) + + (parseFloat($.curCSS(element[0], 'marginBottom', true)) || 0); } function vborders(element) { - return (parseFloat($.css(element[0], 'borderTopWidth', true)) || 0) + - (parseFloat($.css(element[0], 'borderBottomWidth', true)) || 0); + return (parseFloat($.curCSS(element[0], 'borderTopWidth', true)) || 0) + + (parseFloat($.curCSS(element[0], 'borderBottomWidth', true)) || 0); } @@ -1953,6 +1956,7 @@ function firstDefined() { } + fcViews.month = MonthView; function MonthView(element, calendar) { @@ -2273,7 +2277,7 @@ function BasicView(element, calendar, viewName) { function updateCells(firstTime) { var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating? var month = t.start.getMonth(); - var today = clearTime(new Date()); + var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset"))); var cell; var date; var row; @@ -3106,7 +3110,7 @@ function AgendaView(element, calendar, viewName) { var headCell; var bodyCell; var date; - var today = clearTime(new Date()); + var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset"))); for (i=0; i Date: Fri, 30 Aug 2013 16:43:05 -0400 Subject: [PATCH 153/164] don't delete a history item if a show instance is removed from the database. --- .../application/models/airtime/map/CcPlayoutHistoryTableMap.php | 2 +- .../application/models/airtime/map/CcShowInstancesTableMap.php | 2 +- airtime_mvc/build/schema.xml | 2 +- airtime_mvc/build/sql/schema.sql | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php index 00e9099a8..6c365d7bb 100644 --- a/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcPlayoutHistoryTableMap.php @@ -52,7 +52,7 @@ class CcPlayoutHistoryTableMap extends TableMap { public function buildRelations() { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); - $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null); + $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'SET NULL', null); $this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', null); } // buildRelations() diff --git a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php index 894592f79..c55e86080 100644 --- a/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcShowInstancesTableMap.php @@ -63,7 +63,7 @@ class CcShowInstancesTableMap extends TableMap { $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); $this->addRelation('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); - $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null); + $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'SET NULL', null); } // buildRelations() } // CcShowInstancesTableMap diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index d6bf6657c..f2a393f1f 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -488,7 +488,7 @@ - + diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index 1ea9dd4f6..8269fec2a 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -894,7 +894,7 @@ ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_playout_history_file_tag_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; -ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_his_item_inst_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE CASCADE; +ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_his_item_inst_fkey" FOREIGN KEY ("instance_id") REFERENCES "cc_show_instances" ("id") ON DELETE SET NULL; ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "cc_playout_history_metadata_entry_fkey" FOREIGN KEY ("history_id") REFERENCES "cc_playout_history" ("id") ON DELETE CASCADE; From 65ecc74f3fc373566f894553b5e7f51896512ae2 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 30 Aug 2013 17:45:26 -0400 Subject: [PATCH 154/164] schema sql file. upgrade for ryerson. --- .../airtime-2.5.0/upgrade-ryerson.sql | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 install_minimal/upgrades/airtime-2.5.0/upgrade-ryerson.sql diff --git a/install_minimal/upgrades/airtime-2.5.0/upgrade-ryerson.sql b/install_minimal/upgrades/airtime-2.5.0/upgrade-ryerson.sql new file mode 100644 index 000000000..253021b24 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.5.0/upgrade-ryerson.sql @@ -0,0 +1,83 @@ + +CREATE SEQUENCE cc_playout_history_id_seq + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + +CREATE SEQUENCE cc_playout_history_metadata_id_seq + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + +CREATE SEQUENCE cc_playout_history_template_field_id_seq + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + +CREATE SEQUENCE cc_playout_history_template_id_seq + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + +CREATE TABLE cc_playout_history ( + id integer DEFAULT nextval('cc_playout_history_id_seq'::regclass) NOT NULL, + file_id integer, + starts timestamp without time zone NOT NULL, + ends timestamp without time zone NOT NULL, + instance_id integer +); + +CREATE TABLE cc_playout_history_metadata ( + id integer DEFAULT nextval('cc_playout_history_metadata_id_seq'::regclass) NOT NULL, + history_id integer NOT NULL, + "key" character varying(128) NOT NULL, + "value" character varying(128) NOT NULL +); + +CREATE TABLE cc_playout_history_template ( + id integer DEFAULT nextval('cc_playout_history_template_id_seq'::regclass) NOT NULL, + name character varying(128) NOT NULL, + type character varying(35) NOT NULL +); + +CREATE TABLE cc_playout_history_template_field ( + id integer DEFAULT nextval('cc_playout_history_template_field_id_seq'::regclass) NOT NULL, + template_id integer NOT NULL, + name character varying(128) NOT NULL, + label character varying(128) NOT NULL, + type character varying(128) NOT NULL, + is_file_md boolean DEFAULT false NOT NULL, + "position" integer NOT NULL +); + +ALTER TABLE cc_playout_history + ADD CONSTRAINT cc_playout_history_pkey PRIMARY KEY (id); + +ALTER TABLE cc_playout_history_metadata + ADD CONSTRAINT cc_playout_history_metadata_pkey PRIMARY KEY (id); + +ALTER TABLE cc_playout_history_template + ADD CONSTRAINT cc_playout_history_template_pkey PRIMARY KEY (id); + +ALTER TABLE cc_playout_history_template_field + ADD CONSTRAINT cc_playout_history_template_field_pkey PRIMARY KEY (id); + +ALTER TABLE cc_playout_history + ADD CONSTRAINT cc_his_item_inst_fkey FOREIGN KEY (instance_id) REFERENCES cc_show_instances(id) ON DELETE SET NULL; + +ALTER TABLE cc_playout_history + ADD CONSTRAINT cc_playout_history_file_tag_fkey FOREIGN KEY (file_id) REFERENCES cc_files(id) ON DELETE CASCADE; + +ALTER TABLE cc_playout_history_metadata + ADD CONSTRAINT cc_playout_history_metadata_entry_fkey FOREIGN KEY (history_id) REFERENCES cc_playout_history(id) ON DELETE CASCADE; + +ALTER TABLE cc_playout_history_template_field + ADD CONSTRAINT cc_playout_history_template_template_fkey FOREIGN KEY (template_id) REFERENCES cc_playout_history_template(id) ON DELETE CASCADE; From d166f2035bc80f369be74a790b6138331c8c8834 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Sat, 31 Aug 2013 16:50:40 -0400 Subject: [PATCH 155/164] creating an upgrade script for the Ryerson feature. --- install_minimal/include/airtime-upgrade.php | 4 +++ .../upgrades/airtime-2.5.0/DbUpgrade.php | 25 +++++++++++++++++++ .../airtime-2.5.0/airtime-upgrade.php | 8 ++++++ .../{upgrade-ryerson.sql => data/schema.sql} | 0 .../upgrades/airtime-2.5.0/data/upgrade.sql | 7 ++++++ 5 files changed, 44 insertions(+) create mode 100644 install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php create mode 100644 install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php rename install_minimal/upgrades/airtime-2.5.0/{upgrade-ryerson.sql => data/schema.sql} (100%) create mode 100644 install_minimal/upgrades/airtime-2.5.0/data/upgrade.sql diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php index 66ba70838..a8e7a3a22 100644 --- a/install_minimal/include/airtime-upgrade.php +++ b/install_minimal/include/airtime-upgrade.php @@ -88,4 +88,8 @@ if (strcmp($version, "2.4.1") < 0) { passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.4.1/airtime-upgrade.php"); pause(); } +if (strcmp($version, "2.5.0") < 0) { + passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.5.0/airtime-upgrade.php"); + pause(); +} echo "******************************* Upgrade Complete *******************************".PHP_EOL; diff --git a/install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php b/install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php new file mode 100644 index 000000000..5114b8f90 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.5.0/DbUpgrade.php @@ -0,0 +1,25 @@ +&1 | grep -v \"will create implicit index\""); + passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/data/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\""); + } +} diff --git a/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php new file mode 100644 index 000000000..042b92d05 --- /dev/null +++ b/install_minimal/upgrades/airtime-2.5.0/airtime-upgrade.php @@ -0,0 +1,8 @@ + Date: Sat, 31 Aug 2013 22:56:22 -0400 Subject: [PATCH 156/164] put "no show" at the end of the select by default. --- .../js/airtime/playouthistory/historytable.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index fa4a548dd..8cf00fc15 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -679,13 +679,7 @@ var AIRTIME = (function(AIRTIME) { }), $option, show; - - $option = $('
    + getElement("his_instance_select"); ?> + + + +
    From 71ee72015b5181b8d3021b472271ac0b9a6b14f0 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Sun, 1 Sep 2013 00:56:47 -0400 Subject: [PATCH 158/164] release version updates and changelog edits. --- CREDITS | 16 ++++++++++++++++ VERSION | 2 +- changelog | 9 +++++++++ install_minimal/include/airtime-constants.php | 2 +- python_apps/api_clients/api_client.py | 2 +- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/CREDITS b/CREDITS index 4f377ea52..518f7366c 100644 --- a/CREDITS +++ b/CREDITS @@ -2,6 +2,22 @@ CREDITS ======= +Version 2.5.0 +------------- + +Denise Rigato (denise.rigato@sourcefabric.org) + Role: Software Developer + +Naomi Aro (naomi.aro@sourcefabric.org) + Role: Software Developer + +Cliff Wang (cliff.wang@sourcefabric.org) + Role: QA + +Daniel James (daniel.james@sourcefabric.org) + Role: Documentor & QA + + Version 2.4.1 ------------- diff --git a/VERSION b/VERSION index e7467e459..5a1ef0b72 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ PRODUCT_ID=Airtime -PRODUCT_RELEASE=2.4.1 +PRODUCT_RELEASE=2.5.0 diff --git a/changelog b/changelog index d5eb9175c..66da4fe23 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,12 @@ +2.5.0 - September 4th, 2013 + * New features + * Playout History feature overhaul. + - custom templates for log sheets. + - ability to manually log an item. + - ability to edit a history item. + - 3 history views: log, file summary, show summary. + - hosts can now view/log their own show history. + 2.4.1 - August 28th, 2013 * Bug Fixes * Playout Engine locking issue diff --git a/install_minimal/include/airtime-constants.php b/install_minimal/include/airtime-constants.php index 74af70dff..61408912c 100644 --- a/install_minimal/include/airtime-constants.php +++ b/install_minimal/include/airtime-constants.php @@ -1,3 +1,3 @@ Date: Sun, 1 Sep 2013 13:38:18 -0400 Subject: [PATCH 159/164] format/json to prevent zend errors. --- .../views/scripts/playouthistorytemplate/index.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml b/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml index 0e16acee8..043ee2150 100644 --- a/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml +++ b/airtime_mvc/application/views/scripts/playouthistorytemplate/index.phtml @@ -24,7 +24,7 @@
    "> - "> + "> Set Default @@ -55,7 +55,7 @@ "> - "> + "> Set Default From 4a4ef2767e90ba9040a0d2080b901e6667170927 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Sun, 1 Sep 2013 17:59:47 -0400 Subject: [PATCH 160/164] CC-5318 : Playout History: The last song of the show will display wrong end time. --- airtime_mvc/application/services/HistoryService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 08649097f..10e559c3b 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -526,10 +526,14 @@ class Application_Service_HistoryService $metadata = array(); $metadata["showname"] = $show->getDbName(); + $instanceEnd = $showInstance->getDbEnds(null); + $itemEnd = $item->getDbEnds(null); + $recordEnd = ($instanceEnd < $itemEnd) ? $instanceEnd : $itemEnd; + $history = new CcPlayoutHistory(); $history->setDbFileId($fileId); $history->setDbStarts($item->getDbStarts(null)); - $history->setDbEnds($item->getDbEnds(null)); + $history->setDbEnds($recordEnd); $history->setDbInstanceId($item->getDbInstanceId()); foreach ($metadata as $key => $val) { From 0734a4a98c26f9dc99bd802bafec7af805ef6457 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Thu, 5 Sep 2013 11:54:25 +0200 Subject: [PATCH 161/164] CC-5320 : UTC not included in Timezone List --- airtime_mvc/application/common/Timezone.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/common/Timezone.php b/airtime_mvc/application/common/Timezone.php index 271ea5f02..7da82f6f9 100644 --- a/airtime_mvc/application/common/Timezone.php +++ b/airtime_mvc/application/common/Timezone.php @@ -14,7 +14,8 @@ class Application_Common_Timezone 'Australia' => DateTimeZone::AUSTRALIA, 'Europe' => DateTimeZone::EUROPE, 'Indian' => DateTimeZone::INDIAN, - 'Pacific' => DateTimeZone::PACIFIC + 'Pacific' => DateTimeZone::PACIFIC, + 'UTC' => DateTimeZone::UTC ); $tzlist = array(); From 5a85fce89d5ec3b3aef03422ffc87cc3cbbf71f5 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 6 Sep 2013 12:35:31 +0200 Subject: [PATCH 162/164] CC-5321 : Changing Timezone after Creating shows creates Problems --- .../application/services/ShowService.php | 81 ++++++++++--------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index f5bed073e..a04ea691c 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -169,8 +169,8 @@ class Application_Service_ShowService } /** - * - * Receives a cc_show id and determines whether to create a + * + * Receives a cc_show id and determines whether to create a * single show instance or repeating show instances */ public function delegateInstanceCreation($daysAdded=null, $end=null, $fillInstances=false) @@ -190,7 +190,7 @@ class Application_Service_ShowService /* In case the user is moving forward in the calendar and there are * linked shows in the schedule we need to keep track of each cc_show * so we know which shows need to be filled with content - */ + */ $ccShows = array(); foreach ($ccShowDays as $day) { @@ -273,7 +273,7 @@ class Application_Service_ShowService } /** - * + * * Deletes all the cc_show_days entries for a specific show * that is currently being edited. They will get recreated with * the new show day specs @@ -298,12 +298,12 @@ SQL; /** * TODO: This function is messy. Needs refactoring - * + * * When editing a show we may need to perform some actions to reflect the new specs: * - Delete some show instances * - Update duration * - Update start and end time - * + * * @param $showData edit show form values in raw form * @param $isRecorded value computed from the edit show form * @param $repeatType value computed from the edit show form @@ -342,7 +342,7 @@ SQL; //if the start date changes, these are the repeat types //that require show instance deletion - $deleteRepeatTypes = array(REPEAT_BI_WEEKLY, REPEAT_MONTHLY_MONTHLY, + $deleteRepeatTypes = array(REPEAT_BI_WEEKLY, REPEAT_MONTHLY_MONTHLY, REPEAT_MONTHLY_WEEKLY); if (in_array($this->repeatType, $deleteRepeatTypes) && @@ -406,7 +406,7 @@ SQL; $this->deleteInstancesBeforeDate($showData['add_show_start_date'], $showId); } - + } } @@ -496,7 +496,7 @@ SQL; } /** - * + * * Enter description here ... * @param $daysRemoved array of days (days of the week) removed * (days of the week are represented numerically @@ -708,10 +708,10 @@ SQL; } /** - * + * * Determines what the show end date should be based on * the form data - * + * * @param $showData add/edit show form data * @return DateTime object in user's local timezone */ @@ -754,10 +754,10 @@ SQL; } /** - * + * * Returns the difference in seconds between a show's new and * old start time - * + * * @param $newStartDateTime DateTime object * @param $oldStartDateTime DateTime object */ @@ -767,9 +767,9 @@ SQL; } /** - * + * * Updates the start and end time for cc_show_instances - * + * * @param $showData edit show form data */ private function updateInstanceStartEndTime($diff) @@ -783,13 +783,13 @@ WHERE show_id = :showId SQL; Application_Common_Database::prepareAndExecute($sql, - array(':diff1' => $diff, ':diff2' => $diff, + array(':diff1' => $diff, ':diff2' => $diff, ':showId' => $this->ccShow->getDbId(), ':timestamp' => gmdate("Y-m-d H:i:s")), 'execute'); } /** - * + * * Enter description here ... * @param ccShowDays $showDay * @param DateTime $showStartDate user's local time @@ -826,7 +826,7 @@ SQL; } /** - * + * * Sets a single cc_show_instance table row * @param $showDay * @param $populateUntil @@ -863,7 +863,7 @@ SQL; } /** - * + * * Sets multiple cc_show_instances table rows * @param unknown_type $showDay * @param unknown_type $populateUntil @@ -904,7 +904,7 @@ SQL; /* * Make sure start date is less than populate until date AND * last show date is null OR start date is less than last show date - * + * * (NOTE: We cannot call getTimestamp() to compare the dates because of * a PHP 5.3.3 bug with DatePeriod objects - See CC-5159 for more details) */ @@ -964,8 +964,9 @@ SQL; */ if (isset($lastCreatedShow)) { /* Set UTC to local time before setting the next repeat date. If we don't - * the next repeat date might be scheduled for the following day */ - $lastCreatedShow->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); + * the next repeat date might be scheduled for the following day + * THIS MUST BE IN THE TIMEZONE THE SHOW WAS CREATED IN */ + $lastCreatedShow->setTimezone(new DateTimeZone($timezone)); $nextDate = $lastCreatedShow->add($repeatInterval); $this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id); } @@ -1064,10 +1065,10 @@ SQL; } /** - * + * * i.e. last thursday of each month * i.e. second monday of each month - * + * * @param string $showStart * @param string $timezone user's local timezone */ @@ -1112,7 +1113,7 @@ SQL; } /** - * + * * Enter description here ... * @param $start user's local time */ @@ -1182,7 +1183,7 @@ SQL; } /** - * + * * Create a DatePeriod object in the user's local time * It will get converted to UTC before the show instance gets created */ @@ -1203,11 +1204,11 @@ SQL; } /** - * + * * Attempts to retrieve the cc_show_instance belonging to a cc_show * that starts at $starts. We have to pass in the start * time in case the show is repeating - * + * * Returns the instance if one was found (one that is not a recording * and modified instance is false (has not been deleted)) */ @@ -1250,7 +1251,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show table row * @param $ccShow * @param $showData @@ -1285,7 +1286,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_days table row * @param $showData * @param $showId @@ -1367,7 +1368,7 @@ SQL; } /** - * + * * Deletes all the cc_show_rebroadcast entries for a specific show * that is currently being edited. They will get recreated with * the new show specs @@ -1378,7 +1379,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_rebroadcast table row * @param $showData * @param $showId @@ -1417,7 +1418,7 @@ SQL; } /** - * + * * Deletes all the cc_show_hosts entries for a specific show * that is currently being edited. They will get recreated with * the new show specs @@ -1428,7 +1429,7 @@ SQL; } /** - * + * * Sets the fields for a cc_show_hosts table row * @param $showData * @param $showId @@ -1446,10 +1447,10 @@ SQL; } /** - * + * * Gets the date and time shows (particularly repeating shows) * can be populated until. - * + * * @return DateTime object */ private static function getPopulateShowUntilDateTIme() @@ -1464,13 +1465,13 @@ SQL; } /** - * + * * Enter description here ... * @param DateTime $showStart user's local time * @param string $duration time interval (h)h:(m)m(:ss) * @param string $timezone "Europe/Prague" * @param array $offset (days, hours, mins) used for rebroadcast shows - * + * * @return array of 2 DateTime objects, start/end time of the show in UTC */ private function createUTCStartEndDateTime($showStart, $duration, $offset=null) @@ -1496,12 +1497,12 @@ SQL; } /** - * + * * Show instances for repeating shows only get created up * until what is visible on the calendar. We need to set the * date for when the next repeating show instance should be created * as the user browses the calendar further. - * + * * @param $nextDate * @param $showId * @param $day From 0b66f620458a8046ae7962cafa9769f0b419af1e Mon Sep 17 00:00:00 2001 From: denise Date: Fri, 6 Sep 2013 11:08:01 -0400 Subject: [PATCH 163/164] Removed old jquery syntax --- .../public/js/airtime/preferences/streamsetting.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js index 3fdba7c8c..894f54461 100644 --- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js +++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js @@ -13,11 +13,11 @@ function showErrorSections() { } function rebuildStreamURL(ele){ var div = ele.closest("div") - host = div.find("input:[id$=-host]").val() - port = div.find("input:[id$=-port]").val() - mount = div.find("input:[id$=-mount]").val() + host = div.find("input[id$=-host]").val() + port = div.find("input[id$=-port]").val() + mount = div.find("input[id$=-mount]").val() streamurl = "" - if(div.find("select:[id$=-output]").val()=="icecast"){ + if(div.find("select[id$=-output]").val()=="icecast"){ streamurl = "http://"+host if($.trim(port) != ""){ streamurl += ":"+port @@ -180,15 +180,15 @@ function setupEventListeners() { rebuildStreamURL($(this)); }) - $("input:[id$=-host], input:[id$=-port], input:[id$=-mount]").keyup(function(){ + $("input[id$=-host], input[id$=-port], input[id$=-mount]").keyup(function(){ rebuildStreamURL($(this)); }); - $("input:[id$=-port]").keypress(function(e){ + $("input[id$=-port]").keypress(function(e){ validate($(this),e); }); - $("select:[id$=-output]").change(function(){ + $("select[id$=-output]").change(function(){ rebuildStreamURL($(this)); }); From 4c6d96e0623a33984ff003c1464802c2bfc24cd9 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 20 Sep 2013 16:35:46 +0200 Subject: [PATCH 164/164] CC-5333 : Rebroadcast Shows are not created --- airtime_mvc/application/services/ShowService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index a04ea691c..977c23eca 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -194,7 +194,11 @@ class Application_Service_ShowService $ccShows = array(); foreach ($ccShowDays as $day) { + $this->ccShow = $day->getCcShow(); + $this->isRecorded = isset($this->isRecorded) ? $this->isRecorded : $this->ccShow->isRecorded(); + $this->isRebroadcast = isset($this->isRebroadcast) ? $this->isRebroadcast : $this->ccShow->isRebroadcast(); + if (!isset($ccShows[$day->getDbShowId()])) { $ccShows[$day->getDbShowId()] = $day->getccShow(); }