CRM-12872 - Add ui-spinner to page num input
authorColeman Watts <coleman@civicrm.org>
Tue, 7 Jan 2014 22:13:38 +0000 (14:13 -0800)
committerColeman Watts <coleman@civicrm.org>
Tue, 7 Jan 2014 22:13:38 +0000 (14:13 -0800)
CRM/Core/QuickForm/Action/Refresh.php
templates/CRM/Contact/Form/Search/Basic.tpl
templates/CRM/common/pager.tpl

index 32e42318a4f9a43e62b93a58220e9a1610d30e7c..48ce4d7e6acecf7ba7625460e86aa53be2136f48 100644 (file)
@@ -50,8 +50,8 @@ class CRM_Core_QuickForm_Action_Refresh extends CRM_Core_QuickForm_Action {
   /**
    * Processes the request.
    *
-   * @param  object    $page       CRM_Core_Form the current form-page
-   * @param  string    $actionName Current action name, as one Action object can serve multiple actions
+   * @param  CRM_Core_Form $page the current form-page
+   * @param  string $actionName Current action name, as one Action object can serve multiple actions
    *
    * @return void
    * @access public
index b16f00229ae0f032f48082ea407e6d0c3abb878b..cbb44d34b1b11b6159f7ac2d3d84a999571a1d57 100644 (file)
@@ -72,3 +72,4 @@
     <div class="spacer">&nbsp;</div>
 {/if}
 </div>
+{*include file="CRM/common/searchJs.tpl"*}
index 2b0ddde1b668035c2a4dce51709dff256c6977e7..1ced52c0cd7d17b3a77fc14a9c261cd08a4c7b12 100644 (file)
@@ -26,7 +26,7 @@
 {if $pager and $pager->_response}
     {if $pager->_response.numPages > 1}
         <div class="crm-pager">
-          {if ! isset($noForm) || ! $noForm}
+          {if empty($noForm)}
             <span class="element-right">
             {if $location eq 'top'}
               {$pager->_response.titleTop}&nbsp;<input class="form-submit" name="{$pager->_response.buttonTop}" value="{ts}Go{/ts}" type="submit"/>
           </span>
 
         </div>
+      {if empty($noForm) and $location neq 'top'}
+      <script type="text/javascript">
+        cj('input[name^=crmPID]', '#{$form.formName}').spinner({ldelim}
+          min: 1,
+          max: {$pager->_response.numPages}
+        {rdelim});
+      </script>
+      {/if}
     {/if}
 
     {* Controller for 'Rows Per Page' *}