当前位置: 首页>>代码示例>>PHP>>正文


PHP ZurmoHtml::ajax方法代码示例

本文整理汇总了PHP中ZurmoHtml::ajax方法的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoHtml::ajax方法的具体用法?PHP ZurmoHtml::ajax怎么用?PHP ZurmoHtml::ajax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ZurmoHtml的用法示例。


在下文中一共展示了ZurmoHtml::ajax方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCreateProgressBarAjax

 protected function getCreateProgressBarAjax($progressBarId)
 {
     return ZurmoHtml::ajax(array('type' => 'GET', 'dataType' => 'json', 'url' => Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/' . $this->refreshActionId, array_merge($_GET, array(get_class($this->model) . '_page' => $this->page + 1, 'continue' => true))), 'success' => 'function(data)
                 {
                     $(\'#' . $progressBarId . '-msg\').html(data.message);
                     $(\'#' . $progressBarId . '\').progressbar({value: data.value});
                     eval(data.callback);
                 }'));
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:9,代码来源:RebuildSecurityCacheProgressView.php

示例2: renderScripts

 protected function renderScripts()
 {
     if ($this->stickyLoadUrl != null) {
         $ajaxLoadScript = ZurmoHtml::ajax(array('type' => 'GET', 'url' => $this->stickyLoadUrl, 'update' => '#stickyListLoadingArea'));
         $javaScript = "\$(document).ready(function () { ";
         $javaScript .= $ajaxLoadScript;
         $javaScript .= "});";
         Yii::app()->getClientScript()->registerScript(__CLASS__, $javaScript);
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:10,代码来源:StickyDetailsAndRelationsBreadCrumbView.php

示例3: registerScript

 protected function registerScript()
 {
     $eventHandlerName = get_class($this);
     $ajaxOptions = CMap::mergeArray($this->getAjaxOptions(), array('url' => $this->route));
     if (Yii::app()->clientScript->isScriptRegistered($eventHandlerName)) {
         return;
     } else {
         Yii::app()->clientScript->registerScript($eventHandlerName, "\n                    function " . $eventHandlerName . "()\n                    {\n                        " . ZurmoHtml::ajax($ajaxOptions) . "\n                    }\n                ", CClientScript::POS_HEAD);
     }
     return $eventHandlerName;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:MergeTagGuideAjaxLinkActionElement.php

示例4: getElementValue

 public function getElementValue()
 {
     $eventHandlerName = 'auditEventsModalListLinkActionElementHandler';
     $ajaxOptions = CMap::mergeArray($this->getAjaxOptions(), array('url' => $this->route));
     if (Yii::app()->clientScript->isScriptRegistered($eventHandlerName)) {
         return;
     } else {
         Yii::app()->clientScript->registerScript($eventHandlerName, "\n                    function " . $eventHandlerName . "()\n                    {\n                        " . ZurmoHtml::ajax($ajaxOptions) . "\n                    }\n                ", CClientScript::POS_HEAD);
     }
     return $eventHandlerName;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:AuditEventsModalListLinkActionElement.php

示例5: renderConfigSaveAjax

 protected function renderConfigSaveAjax()
 {
     $formId = $this->getFormId();
     return ZurmoHtml::ajax(array('type' => 'POST', 'data' => 'js:$("#' . $formId . '").serialize()', 'url' => $this->getValidateAndSaveUrl(), 'success' => 'js: function(data)
                                                     {
                                                         if (typeof data.redirectUrl !== \'undefined\' &&
                                                             $(this).isValidUrl(data.redirectUrl))
                                                         {
                                                             window.location.href = data.redirectUrl;
                                                         }
                                                     }'));
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:12,代码来源:ContactExternalEditAndDetailsView.php

示例6: registerScripts

 protected function registerScripts()
 {
     $cs = Yii::app()->getClientScript();
     $cs->registerCoreScript('jquery-animate-sprite');
     $cs->registerScriptFile(Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.gamification.views.assets')) . '/jquery.animateSprite.js', CClientScript::POS_END);
     $url = $this->makeAjaxClickUrl();
     $coin = ZurmoHtml::tag('div', array('class' => 'game-coin-quantity'), $this->getGameCoinForCurrentUser()->value + 1 . '<i></i>');
     // Begin Not Coding Standard
     $script = "\$('.random-game-coin').click(function(e){\n                                \$(this).unbind('click');\n                                " . ZurmoHtml::ajax(array('type' => 'GET', 'url' => $url)) . "\n                                var audio = document.getElementById('game-coin-chime');\n                                audio.play();\n                                \$('.game-coin').animate({top:15}, 75, function(){ \$(this).hide(0) });\n                                \$('.smoke').show(0).animate({top:0}, 500).animateSprite({\n                                    columns: 8,\n                                    totalFrames: 40,\n                                    duration: 1000,\n                                    loop: false,\n                                    complete: function(){\n                                        \$('.random-game-coin').remove();\n                                    }\n                                });\n                                \$('{$coin}').prependTo('#user-toolbar')\n                                    .delay(300)\n                                    .animate({top:8}, 250)\n                                    .delay(3500)\n                                    .fadeOut(250, function(){\n                                        \$(this).remove();\n                                    });\n                            });";
     Yii::app()->clientScript->registerScript('gameCoinClickScript', $script);
     // End Not Coding Standard
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:GameCoinContainerView.php

示例7: renderAttributeDropDownOnChangeScript

 protected function renderAttributeDropDownOnChangeScript($id, $inputDivId, $ajaxOnChangeUrl)
 {
     // Begin Not Coding Standard
     $ajaxSubmitScript = ZurmoHtml::ajax(array('type' => 'GET', 'data' => 'js:\'suffix=' . $this->suffix . '&attributeIndexOrDerivedType=\' + $(this).val()', 'url' => $ajaxOnChangeUrl, 'beforeSend' => 'js:function(){
                     $("#' . $inputDivId . '").html("<span class=\\"loading z-spinner\\"></span>");
                     $(this).makeOrRemoveLoadingSpinner(true, "#' . $inputDivId . '", "dark");
                     }', 'success' => 'js:function(data){ $("#' . $inputDivId . '").html(data); }'));
     return "\$('#" . $id . "').unbind('change'); \$('#" . $id . "').bind('change', function()\n            {\n                {$ajaxSubmitScript}\n            }\n            );";
     // End Not Coding Standard
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:10,代码来源:DynamicSearchRowView.php

示例8: renderConfigSaveAjax

 protected function renderConfigSaveAjax($formName, $moduleId, $controllerId, $actionSave)
 {
     return ZurmoHtml::ajax(array('type' => 'POST', 'data' => 'js:$("#' . $formName . '").serialize()', 'url' => Yii::app()->createUrl($moduleId . '/' . $controllerId . '/' . $actionSave, GetUtil::getData()), 'update' => '#modalContainer'));
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:4,代码来源:ContactRequiresPrimaryEmailFirstModalView.php

示例9: renderSendTestEmailPostAjax

 protected function renderSendTestEmailPostAjax()
 {
     $this->registerFormDataExtractionScripts();
     $modelClass = get_class($this->model);
     $formId = static::getFormId();
     $allInputSelector = "\$('#{$formId} :input')";
     return ZurmoHtml::ajax(array('type' => 'POST', 'beforeSend' => 'js:function() {
                                     ' . $allInputSelector . '.prop("disabled", true);
                                 }', 'data' => 'js:(function() {
                                 var formData            = resolveSendTestModalFormData();
                                 var sendTestEmailData   = window.' . static::COMPILE_SEND_TEST_EMAIL_DATA_JS_FUNCTION_NAME . '();
                                 var requestData         = {"' . $modelClass . '": formData,
                                                             "sendTestEmailData": sendTestEmailData,
                                                             "YII_CSRF_TOKEN": "' . addslashes(Yii::app()->request->csrfToken) . '"};
                                 return requestData;
                                 })()', 'complete' => 'js:function() {
                                     ' . $allInputSelector . '.prop("disabled", false);
                                 }', 'url' => $this->resolveSendTestEmailRoute(), 'update' => '#modalContainer'));
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:19,代码来源:SendTestEmailModalEditView.php

示例10: registerPreviewMenuButtonClickScript

 protected function registerPreviewMenuButtonClickScript()
 {
     $ajaxOption = $this->resolvePreviewAjaxOptions();
     // Begin Not Coding Standard
     Yii::app()->clientScript->registerScript('previewMenuButtonClickScript', '
             $("#' . static::PREVIEW_MENU_BUTTON_ID . '").unbind("click.previewMenuButtonClick")
                                                         .bind("click.previewMenuButtonClick", function(event){
                 ' . ZurmoHtml::ajax($ajaxOption) . '
                 $("body").addClass("previewing-builder");
                 event.preventDefault();
             });');
     // End Not Coding Standard
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:BuilderCanvasWizardView.php

示例11: registerAddRecipientScript

 protected function registerAddRecipientScript()
 {
     $moduleClassNameId = $this->workflowWizardFormClassName . '[moduleClassName]';
     $url = Yii::app()->createUrl('workflows/default/addEmailMessageRecipient', array_merge($_GET, array('type' => $this->model->getWorkflowType())));
     // Begin Not Coding Standard
     $ajaxSubmitScript = ZurmoHtml::ajax(array('type' => 'GET', 'data' => 'js:\'recipientType=\' + $(this).val() + ' . '\'&moduleClassName=\' + $("input:radio[name=\\"' . $moduleClassNameId . '\\"]:checked").val() + ' . '\'&rowNumber=\' + ($(this).parentsUntil(".' . self::RECIPIENTS_CONTAINER_CLASS_NAME . '").parent().find("input.' . self::RECIPIENTS_ROW_COUNTER_CLASS_NAME . '").data("email-row-number")) + ' . '\'&recipientRowNumber=\' +
                          $(this).parentsUntil(".' . self::RECIPIENTS_CONTAINER_CLASS_NAME . '").parent().find(".' . self::RECIPIENTS_ROW_COUNTER_CLASS_NAME . '").val()', 'url' => $url, 'success' => 'js:function(data){
                 existingRowNumber = parseInt(triggeredObject.parentsUntil(".' . self::RECIPIENTS_CONTAINER_CLASS_NAME . '").parent().
                 find(".' . self::RECIPIENTS_ROW_COUNTER_CLASS_NAME . '").val());
                 triggeredObject.parentsUntil(".' . self::RECIPIENTS_CONTAINER_CLASS_NAME . '").parent().
                 find(".' . self::RECIPIENTS_ROW_COUNTER_CLASS_NAME . '")
                 .val(existingRowNumber + 1);
                 triggeredObject.parentsUntil(".' . self::RECIPIENTS_CONTAINER_CLASS_NAME . '").parent()
                 .find(".' . self::EMAIL_MESSAGE_RECIPIENTS_ROW_CLASS_NAME . '").find("ul:first").append(data);
                 rebuildWorkflowEmailMessageRecipientRowNumbers(triggeredObject.
                     parentsUntil(".' . self::RECIPIENTS_CONTAINER_CLASS_NAME . '").parent()
                     .find(".' . self::EMAIL_MESSAGE_RECIPIENTS_ROW_CLASS_NAME . '"));
                 triggeredObject.val("");
             }'));
     $script = "\$('." . self::ADD_RECIPIENT_CLASS_NAME . "').unbind('change');\n                       \$('." . self::ADD_RECIPIENT_CLASS_NAME . "').bind('change', function()\n                        {\n                            if (\$(this).val() != '')\n                            {\n                                var triggeredObject = \$(this);\n                                {$ajaxSubmitScript}\n                            }\n                        });";
     // End Not Coding Standard
     Yii::app()->clientScript->registerScript('workflowAddEmailMessageRecipientScript', $script);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:23,代码来源:EmailMessageRowForWorkflowComponentView.php

示例12: renderConfigSaveAjax

 protected function renderConfigSaveAjax($formId, $url, $sourceKanbanBoardId, $modalId, $sourceId)
 {
     // Begin Not Coding Standard
     if ($sourceId == null) {
         $kanbanRefreshScript = TasksUtil::resolveExtraCloseScriptForModalAjaxOptions($sourceKanbanBoardId);
     } else {
         $kanbanRefreshScript = TasksUtil::resolveExtraCloseScriptForModalAjaxOptions($sourceId);
     }
     $title = TasksUtil::getModalDetailsTitle();
     // Begin Not Coding Standard
     $options = array('type' => 'POST', 'data' => 'js:$("#' . $formId . '").serialize()', 'url' => $url, 'update' => '#' . $modalId, 'complete' => "function(XMLHttpRequest, textStatus){\n                                    \$('#" . $modalId . "').dialog('option', 'title', '" . $title . "');\n                                    " . $kanbanRefreshScript . "}");
     // End Not Coding Standard
     return ZurmoHtml::ajax($options);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:14,代码来源:TaskModalEditView.php

示例13: renderLoadModuleOrderScriptContent

 protected function renderLoadModuleOrderScriptContent()
 {
     $id = 'SavedWorkflow_moduleClassName_value';
     $inputDivId = 'dynamic-rows';
     $url = Yii::app()->createUrl('workflows/default/loadOrderByModule');
     // Begin Not Coding Standard
     $ajaxSubmitScript = ZurmoHtml::ajax(array('type' => 'GET', 'dataType' => 'json', 'data' => 'js:\'moduleClassName=\' + $(this).val()', 'url' => $url, 'success' => 'js:function(data){
                             if (data.dataToOrder == "true")
                             {
                                 $(".no-workflows-to-order-view").hide();
                                 $(".select-module-view").hide();
                                 $(".float-bar").show();
                                 $(".' . $inputDivId . '").html(data.content);
                             }
                             else
                             {
                                 $(".select-module-view").hide();
                                 $(".float-bar").hide();
                                 $(".' . $inputDivId . '").html("");
                                 $(".no-workflows-to-order-view").show();
                             }}'));
     $script = "\$('#" . $id . "').unbind('change'); \$('#" . $id . "').bind('change', function()\n            {\n\n                if (\$('#" . $id . "').val() == '')\n                {\n                    \$('.no-workflows-to-order-view').hide();\n                    \$('.select-module-view').show();\n                    \$('.float-bar').hide();\n                    \$('." . $inputDivId . "').html('');\n                }\n                else\n                {\n                    {$ajaxSubmitScript}\n                }\n            });";
     // End Not Coding Standard
     Yii::app()->clientScript->registerScript('timeTriggerAttributeDropDownOnChangeScript', $script);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:25,代码来源:WorkflowManageOrderView.php

示例14: registerConfigurationFormLayoutScripts

 protected function registerConfigurationFormLayoutScripts($form)
 {
     assert('$form instanceof ZurmoActiveForm');
     $url = Yii::app()->createUrl($this->moduleId . '/' . $this->getDefaultRoute());
     $urlScript = 'js:$.param.querystring("' . $url . '", "' . $this->dataProvider->getPagination()->pageVar . '=1&id=' . $this->importId . '&step=complete&ajax=' . $this->gridId . '&pageSize=' . $this->dataProvider->getPagination()->getPageSize() . '")';
     // Not Coding Standard
     $ajaxSubmitScript = ZurmoHtml::ajax(array('type' => 'GET', 'url' => $urlScript, 'beforeSend' => 'js:function(){$(this).makeSmallLoadingSpinner(true, "#' . $this->getGridViewId() . '"); $("#' . $this->getUniquePageId() . '").find(".cgrid-view").addClass("loading");}', 'success' => 'js:function(data)
                 {
                                 $("#' . $this->getUniquePageId() . '").replaceWith(data);
                 }'));
     Yii::app()->clientScript->registerScript($this->getUniquePageId(), "\n            \$('#ImportResultsConfigurationForm_filteredByStatus_area').buttonset();\n            \$('#ImportResultsConfigurationForm_filteredByStatus_area').change(function()\n                {\n                    " . $ajaxSubmitScript . "\n                }\n            );\n            ");
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:12,代码来源:ImportTempTableListView.php

示例15: renderConfigSaveAjax

 protected function renderConfigSaveAjax($formName, $moduleId, $controllerId, $actionSave, $uniquePortletPageId)
 {
     return ZurmoHtml::ajax(array('type' => 'POST', 'data' => 'js:$("#' . $formName . '").serialize()', 'url' => Yii::app()->createUrl($moduleId . '/' . $controllerId . '/' . $actionSave, $_GET), 'complete' => 'function(XMLHttpRequest, textStatus){$("#modalContainer").dialog("close");
                     juiPortlets.refresh();}', 'update' => '#' . $uniquePortletPageId));
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:5,代码来源:ModalConfigEditView.php


注:本文中的ZurmoHtml::ajax方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。