From a363a5316681aefaceb4b0acc4d8df11b8acac49 Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Mon, 7 Nov 2011 15:07:56 -0500 Subject: [PATCH 1/2] CC-2990: Library: Remember search string Fixed by telling datatable to save the states --- airtime_mvc/public/js/airtime/library/library.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index dffc71432..46b29b29c 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -323,7 +323,8 @@ function createDataTable(data) { "oLanguage": { "sSearch": "" }, - "iDisplayLength": getNumEntriesPreference(data) + "iDisplayLength": getNumEntriesPreference(data), + "bStateSave": true }); dTable.fnSetFilteringDelay(350); From 04bcc28b5e1883a22ff022893867222834ed5f24 Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Mon, 7 Nov 2011 17:43:38 -0500 Subject: [PATCH 2/2] CC-3001: Preferences->"Submit" button renamed to "Save", and should be at the top and the bottom of the screen Fixed by: 1. changing label to say "Save" 2. wrap the preference form inside another form; within the wrapper form, add a submit button at the top --- airtime_mvc/application/forms/Preferences.php | 4 ++-- .../views/scripts/preference/index.phtml | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/forms/Preferences.php b/airtime_mvc/application/forms/Preferences.php index 0fa9f0b58..b4783c591 100644 --- a/airtime_mvc/application/forms/Preferences.php +++ b/airtime_mvc/application/forms/Preferences.php @@ -11,7 +11,7 @@ class Application_Form_Preferences extends Zend_Form $this->setDecorators(array( array('ViewScript', array('viewScript' => 'form/preferences.phtml')) )); - + $general_pref = new Application_Form_GeneralPreferences(); $this->addSubForm($general_pref, 'preferences_general'); @@ -24,7 +24,7 @@ class Application_Form_Preferences extends Zend_Form $this->addElement('submit', 'submit', array( 'class' => 'ui-button ui-state-default right-floated', 'ignore' => true, - 'label' => 'Submit', + 'label' => 'Save', 'decorators' => array( 'ViewHelper' ) diff --git a/airtime_mvc/application/views/scripts/preference/index.phtml b/airtime_mvc/application/views/scripts/preference/index.phtml index b5cf1fd4b..17aed0dcd 100644 --- a/airtime_mvc/application/views/scripts/preference/index.phtml +++ b/airtime_mvc/application/views/scripts/preference/index.phtml @@ -1,7 +1,15 @@
-

Preferences

-statusMsg; - echo $this->form; -?> +

Preferences

+
+ +
+ +
+
+ + statusMsg; + echo $this->form; + ?> +