Commit Graph

78 Commits

Author SHA1 Message Date
Lucas Bickel baa0f9ba77 Make CORS great again
This fixes CORS to work properly with most 2.5 api endpoints while keeping the JSONP format available.

* [x] return JSONP or JSON with proper CORS headers from API
* [x] Field in Genereal Preferences Form to configure CORS enabled URLs

See #17 for what triggered this refactor. I beleive this should make integrating the APIs on the client side trivial without mandating the use of JSONP.
2017-03-10 15:10:56 +01:00
Lucas Bickel 4a7f3ea001 Fix preference page with customer ImageSize plugin
As noted in the code, this was getting loaded in a rather special way.
2017-03-02 14:29:19 +01:00
Lucas Bickel 625f92fe44 Vendorize ZF1, fix PHPUnit and configure travis
This a a rather large commit due to the nature of the stuff it is touching. To get PHPUnit up and running again I had to update some deps and I did so by vendorizing them. The vendorizing of zf1 makes sense since distros are already considering to drop it from their repos.

* [x] install vendorized zf1 with composer
* [x] load composer autoloader before zf1
* [x] Implement headAction for all Zend_Rest_Controller based controllers
* [x] switch to yml dataset to get around string only limitations of xml sets (also removed warning in readme)
* [x] use year 2044 as hardcoded date for tests since it is in the future and has the same days like previously used 2016
* [x] make tests easier to run when accessing phpunit directly
* [x] clean up test helper to always use airtime.conf
* [x] switch test dbname to libretime_test
* [x] test db username password switched to libretime/libretime
* [x] install phpunit with composer in a clear version (make tests easier to reproduce on other platforms)
* [x] remove local libs from airtime repo (most of airtime_mvc/library was not needed of in vendor already)
* [x] configure composer autoloading and use it (also removed requires that are not needed anymore)
* [x] add LibreTime prefix for FileNotFoundException (phing had a similar class and these are all pre-namespace style)
* [x] add .travis.yml file
* [x] make etc and logdir configurable with LIBRETIME_CONF_DIR and LIBRETIME_LOG_DIR env (so travis can change it)
* [x] slight cleanup in config for travis not to fail
* [x] add cloud_storage.conf for during test runs
* [x] rewrite mvc testing docs and move them to docs/ folder
* [x] don't use `static::class` in a class that does not have a parent class, use `__CLASS__` instead.
* [x] don't use `<ClassName>::class`, since we already know what class we want `"<ClassName>"` ist just fine.
* [x] fix "can't use method in write context" errors on 5.4 (also helps the optimizer)
* [x] add build status badge on main README.md

Fixes https://github.com/LibreTime/libretime/issues/4

The PHP parts of https://github.com/LibreTime/libretime/pull/10 get obsoleted by this change and it will need rebasing.

This also contains https://github.com/LibreTime/libretime/pull/8, the late static binding compat code was broken for no reason and until CentOS drops php 5.4 there is no reason I'm aware of not to support it. I inlined #8 since the test would be failing on php 5.4 without the change.

If you want to run tests you need to run `composer install` in the root directory and then `cd airtime_mvc/tests && ../../vendor/bin/phpunit`. For the tests to run the user `libretime` needs to be allowed to create the `libretime_test` database. See `docs/TESTING.md` for more info on getting set up.
2017-02-27 17:59:01 +01:00
Duncan Sommerville 63ce022a8d SAAS-1040 - station logo functionality improvements 2015-09-02 15:28:36 -04:00
drigato 8276b1762e Updated outdated public airtime api setting message on preferences page 2015-07-15 13:47:54 -04:00
drigato 670395bb2e SAAS-939: Add option to preferences to display login button on radio page
Change option to ON by default
2015-07-09 15:16:54 -04:00
drigato 0601bd675e SAAS-939: Add option to preferences to display login button on radio page 2015-07-09 14:38:44 -04:00
Duncan Sommerville 6fb9c6a30c SAAS-885, SAAS-857, SAAS-878 - Cosmetic fixes, remove js widget box in preferences 2015-06-25 14:13:09 -04:00
Duncan Sommerville 936d11b367 Merge branch '2.5.x-albertenhancements' into saas 2015-02-27 17:21:20 -05:00
Duncan Sommerville 78c7170c4e Reformatted logo remove button to use Zend 2015-02-27 17:19:37 -05:00
Albert Santoni 7c28b66ce9 Merge branch '2.5.x-albertenhancements' into saas
Conflicts:
	airtime_mvc/application/controllers/PreferenceController.php
	airtime_mvc/application/forms/Preferences.php
	airtime_mvc/application/views/scripts/form/preferences.phtml
	airtime_mvc/application/views/scripts/form/support-setting.phtml
2015-01-15 16:32:29 -05:00
Albert Santoni f9bf71a349 Moved the Station Logo field to GeneralPreferences, and stopped using
AJAX on the general prefs form
2015-01-15 16:28:18 -05:00
Albert Santoni c24a040689 Fixed my SuperAdmin_Only decorator 2015-01-14 14:34:14 -05:00
Albert Santoni d5b969f94f Merge branch '2.5.x' into saas
Conflicts:
	airtime_mvc/application/forms/GeneralPreferences.php
	airtime_mvc/application/views/scripts/form/preferences_general.phtml
	airtime_mvc/application/views/scripts/form/support-setting.phtml
2015-01-13 21:31:57 -05:00
Albert Santoni c4d3a8fa62 Massive simplification of the GeneralPreferences dialog
* The purpose of this was so that we can use Zend_Form_Element
  decorators, which I need.
2015-01-13 20:51:46 -05:00
Albert Santoni caf37e1b87 CC-5975: Default fade-in/out, and crossfade time validators don't work
* Fixed the number formatting and validation in the preferences and streaming preferences
  (the silly 00.5-style numbers are gone)
* Regex decmical validation of the default fade-in, fade-out, and
  crossfade duration was totally broken (you could enter words and it would work). That's fixed now.
2015-01-13 12:18:57 -05:00
Albert Santoni 9cfcaf2ffd SAAS-537: Fixed the week view of the schedule widgets
* Also improved the instructions inline for how to use them...
  (this is a stop-gap measure until we get a real iframe widget)
* ALSO renamed the field HTML Code since it's not JS! (it was
  misleading before)
2015-01-12 22:29:21 -05:00
Naomi Aro 49474ab5c4 Merge branch '2.5.x' into 2.5.x-saas
Conflicts:
	airtime_mvc/application/forms/AddShowWhen.php
	airtime_mvc/application/forms/LiveStreamingPreferences.php
	airtime_mvc/application/models/Schedule.php
	airtime_mvc/application/views/scripts/form/preferences.phtml
	airtime_mvc/application/views/scripts/form/preferences_livestream.phtml
	airtime_mvc/application/views/scripts/form/support-setting.phtml
	airtime_mvc/application/views/scripts/schedule/add-show-form.phtml
2013-12-17 17:20:38 -05:00
denise 55254e88a5 UI text improvements for setting the station/user timezones
Added info icon in the add-show form for timezone setting
2013-10-07 14:49:52 -04:00
Martin Konecny 3b9b23a7dd Merge branch '2.3.x-saas' into 2.4.x-saas
Conflicts:
	airtime_mvc/application/controllers/ScheduleController.php
	airtime_mvc/application/forms/AddShowWhen.php
	airtime_mvc/application/models/Schedule.php
	python_apps/pypo/airtime-playout
2013-05-21 16:40:10 -04:00
Naomi 435bb83588 CC-2301 : dos2unix being run 2013-05-02 16:52:30 -04:00
Naomi 517bb7557a CC-2301 : testing default crossfade settings 2013-05-02 16:15:21 -04:00
Naomi 58957cc919 CC-2301 : running dos2unix on 3 files. 2013-04-29 17:01:08 -04:00
Naomi 410d298272 CC-2301 : creating an offset column to help create crossfades in the playlist.
changing default fade to be a separate default fade in/out
2013-04-29 16:55:08 -04:00
Martin Konecny 3f7ccf6967 fix missing closing parentheses 2013-03-04 11:41:42 -05:00
Martin Konecny 8bec9dea55 Merge branch '2.3.x' into 2.3.x-saas 2013-02-20 14:41:55 -05:00
denise ad334d9e74 CC-4926: System-> Preference: Please limit the default fade value less than 60
- added a range validator of 0 - 59.9 on default fade
2013-02-06 15:44:52 -05:00
Martin Konecny 8cd6bd9aa4 Merge branch 'devel' into 2.3.x-saas
Conflicts:
	airtime_mvc/application/controllers/PreferenceController.php
	airtime_mvc/application/forms/AddShowWhen.php
	airtime_mvc/application/forms/GeneralPreferences.php
	airtime_mvc/application/forms/LiveStreamingPreferences.php
	airtime_mvc/application/forms/SoundcloudPreferences.php
	airtime_mvc/application/forms/SupportSettings.php
	airtime_mvc/application/views/scripts/form/preferences.phtml
	airtime_mvc/application/views/scripts/form/preferences_email_server.phtml
	airtime_mvc/application/views/scripts/form/preferences_general.phtml
	airtime_mvc/application/views/scripts/form/preferences_livestream.phtml
	airtime_mvc/application/views/scripts/form/support-setting.phtml
	airtime_mvc/application/views/scripts/schedule/add-
show-form.phtml
	airtime_mvc/public/js/airtime/preferences/preferences.js
	python_apps/api_clients/api_client.py
	python_apps/pypo/listenerstat.py
2013-01-15 13:44:44 -05:00
denise db62b538dd CC-4816: Timezones should be a user preference
-done
2013-01-09 13:38:38 -05:00
denise a65e72941f CC-4805: Localization -> Changing default language changes datatables and add media language setting
-fixed
2013-01-07 18:18:40 -05:00
Daniel James 771b9b9412 Fixed whitespace in Preferences page between 'Timezone' and colon 2013-01-07 11:41:29 +00:00
Daniel James a2c1b9c699 Clarify label on default interface language preference 2013-01-07 11:05:38 +00:00
denise 2f0c6b702a CC-1960: Internationalize Airtime / Support translations
- created locale table
- create locale model
- set default locale in pref table
2012-11-29 18:21:03 -05:00
denise 542434d9f0 CC-1960: Internationalize Airtime / Support translations
-got rid of spaces at beginning of strings
-removed empty string translations
-overwrote Zend_Validate_Between object error messages
2012-11-28 16:16:39 -05:00
denise 9acfb6c181 CC-1960: Internationalize Airtime / Support translations
- overwrote default zend form error messages
2012-11-27 17:11:29 -05:00
denise 42d535a922 CC-1960: Internationalize Airtime / Support translations
-unlocalized some strings
2012-11-27 12:33:43 -05:00
denise dd0e71efcc CC-1960: Internationalize Airtime / Support translations
-added gettext wrapper function to all strings missing it
-i18n of jquery timepicker and datepicker
-i18n of jquery datatables columnFilter input place holder labels
2012-11-22 17:32:24 -05:00
denise 7a9f01458c CC-1960: Internationalize Airtime / Support translations
-fixed langauge label on preferences page
2012-11-21 12:46:52 -05:00
denise 25ddd083bc CC-1960: Internationalize Airtime / Support translations
-added language option in preferences
2012-11-21 12:44:50 -05:00
denise e5f67c8b05 CC-1960: Internationalize Airtime / Support translations
-added gettext wrapper functions for all strings in view/scripts, and forms
2012-11-20 11:33:37 -05:00
Martin Konecny 4b09b289ce SAAS-290: Hosted SaaS widgets + javascript code generation
Slight improvements to description as well as element
positioning
2012-11-07 15:44:22 -05:00
Martin Konecny 1b0b124247 SAAS-290: Hosted SaaS widgets + javascript code generation
-working code
2012-11-07 12:49:17 -05:00
Martin Konecny 27d40ef4df SAAS-290: Hosted SaaS widgets + javascript code generation 2012-11-06 18:10:53 -05:00
Martin Konecny fd3305bc4c SAAS-289: Remove all isSaaS checks
-done
2012-11-06 17:10:47 -05:00
Martin Konecny 38d28d3346 SAAS-289: Remove all isSaaS checks 2012-11-06 16:48:34 -05:00
denise 796274e4ef CC-4642: Default Fade preference should be in seconds and tenths, rather than millionths
-fixed
2012-11-02 15:51:36 -04:00
Martin Konecny e3c1a3ac0e CC-4434: Make Application_Model_Preference::getValue and setValue private methods
-initial commit
2012-09-14 12:09:40 -04:00
Martin Konecny b2327472e8 CC-4090: Make code style PSR compliant - part 4
-forms directory
2012-08-28 23:04:55 -04:00
Martin Konecny 7ce4934cdc CC-4090: Make code style PSR compliant
-removed all trailing whitespace in forms directory
-replace all tabs with 4 spaces
2012-07-10 18:55:44 -04:00
Martin Konecny e91c96b90e CC-4090: Make code style PSR compliant
StreamSetting.php
2012-07-09 23:32:21 -04:00