Example #1
0
 public function getJSClassParams()
 {
     if (!isset($this->_JSClassParams)) {
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('setSortOrderUrl' => Yii::app()->controller->createUrl('/profile/setWidgetOrder'), 'showWidgetContentsUrl' => Yii::app()->controller->createUrl('/profile/view', array('id' => 1))));
     }
     return $this->_JSClassParams;
 }
Example #2
0
 public function getJSClassParams()
 {
     if (!isset($this->_JSClassParams)) {
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('startDateAttribute' => $this->startDateAttribute, 'endDateAttribute' => $this->endDateAttribute, 'element' => '#' . $this->resolveId($this->id)), $this->options);
     }
     return $this->_JSClassParams;
 }
 public function getJSClassParams()
 {
     if (!isset($this->_JSClassParams)) {
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('defaultWidth' => '65', 'columnWidth' => $this->columnWidthPercentage, 'editLayoutButton' => '#' . self::$editLayoutButtonId, 'container' => '#' . $this->namespace . '-layout-editor', 'draggable' => '#' . $this->namespace . '-section-1', 'mainColumnSelector' => $this->mainColumnSelector, 'responsiveCssSelector' => '#' . $this->responsiveCssId, 'minWidths' => array(50, 35), 'column1' => array('#RecordViewWidgetManagerwidgets-container-2', '#main-column', '#' . $this->namespace . '-section-1'), 'column2' => array('#RecordViewWidgetManagerwidgets-container'), 'miscSettingsUrl' => Yii::app()->controller->createUrl('/profile/saveMiscLayoutSetting'), 'settingName' => $this->miscLayoutSettingsKey, 'dimensions' => array('singleColumnThresholdNoWidgets' => $this->singleColumnThresholdNoWidgets, 'singleColumnThreshold' => $this->singleColumnThreshold, 'extraContentWidth' => $this->extraContentWidth, 'rightWidgetWidth' => $this->rightWidgetWidth, 'formLayoutWidthThreshold' => $this->formLayoutWidthThreshold)));
     }
     return $this->_JSClassParams;
 }
 public function getJSClassParams()
 {
     if (!isset($this->_JSClassParams)) {
         $title = X2Model::getModelTitle(get_class($this->model), true);
         $targetClass = $this->targetClass;
         $behavior = $this->model->asa('X2ModelConversionBehavior');
         $conversionFailed = $behavior->conversionFailed && $behavior->errorModel !== null && get_class($behavior->errorModel) === $this->targetClass;
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('buttonSelector' => $this->buttonSelector, 'translations' => array('conversionError' => Yii::t('app', '{model} conversion failed.', array('{model}' => $title)), 'conversionWarning' => Yii::t('app', '{model} Conversion Warning', array('{model}' => $title)), 'convertAnyway' => Yii::t('app', 'Convert Anyway'), 'Cancel' => Yii::t('app', 'Cancel')), 'targetClass' => $this->targetClass, 'modelId' => $this->model->id, 'conversionFailed' => $conversionFailed, 'conversionIncompatibilityWarnings' => $this->model->getConversionIncompatibilityWarnings($this->targetClass), 'errorSummary' => $conversionFailed ? "<div class='form'>" . CHtml::errorSummary($this->model->asa('X2ModelConversionBehavior')->errorModel, Yii::t('app', '{model} conversion failed.', array('{model}' => $title))) . "</div>" : ''));
     }
     return $this->_JSClassParams;
 }
Example #5
0
 public function getJSClassParams()
 {
     if (!isset($this->_JSClassParams)) {
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('tabId' => $this->tabId, 'translations' => array('beforeSubmit' => Yii::t('actions', 'Please enter a description.'), 'startDateError' => Yii::t('actions', 'Please enter a start date.'), 'endDateError' => Yii::t('actions', 'Please enter an end date.'))));
     }
     return $this->_JSClassParams;
 }
Example #6
0
 public function getJSClassParams()
 {
     $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('iframeSrc' => Yii::app()->createExternalUrl($this->url), 'externalAbsoluteBaseUrl' => Yii::app()->getExternalAbsoluteBaseUrl(), 'saveUrl' => Yii::app()->createAbsoluteUrl($this->saveUrl), 'savedForms' => $this->formAttrs, 'deleteFormUrl' => Yii::app()->createAbsoluteUrl('/marketing/marketing/deleteWebForm'), 'fields' => array('fg', 'bgc', 'font', 'bs', 'bc'), 'colorfields' => array('fg', 'bgc', 'bc')));
     return $this->_JSClassParams;
 }
Example #7
0
 public function getJSClassParams()
 {
     if (!isset($this->_JSClassParams)) {
         $selectedTab = $this->tabs[0]->tabId;
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('translations' => array(), 'initTabId' => $selectedTab, 'publisherCreateUrl' => Yii::app()->controller->createUrl('/actions/actions/publisherCreate'), 'isCalendar' => $this->calendar, 'renderTabs' => $this->renderTabs));
     }
     return $this->_JSClassParams;
 }
Example #8
0
 public function getJSClassParams()
 {
     return array_merge(parent::getJSClassParams(), array('modelId' => $this->model->id, 'modelName' => $this->modelName));
 }
Example #9
0
 public function getJSClassParams()
 {
     return array_merge(parent::getJSClassParams(), array('translations' => array('defaultTemplateDialogTitle' => Yii::t('app', 'Set a Default Email Template'), 'Cancel' => Yii::t('app', 'Cancel'), 'Save' => Yii::t('app', 'Save'), 'New Message' => Yii::t('app', 'New Message')), 'disableTemplates' => $this->disableTemplates, 'saveDefaultTemplateUrl' => Yii::app()->controller->createUrl('/profile/profile/ajaxSaveDefaultEmailTemplate'), 'tmpUploadUrl' => Yii::app()->createUrl('/site/tmpUpload'), 'rmTmpUploadUrl' => Yii::app()->createUrl('/site/removeTmpUpload'), 'type' => $this->type, 'enableResizability' => $this->enableResizability));
 }
Example #10
0
 public function getJSClassParams()
 {
     $totalEmails = count($this->listItems) + $this->sentCount;
     if (!isset($this->_JSClassParams)) {
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('sentCount' => $this->sentCount, 'totalEmails' => $totalEmails, 'listItems' => $this->listItems, 'sendUrl' => Yii::app()->controller->createUrl('/marketing/marketing/mailIndividual'), 'campaignId' => $this->campaign->id, 'paused' => !(isset($_GET['launch']) && $_GET['launch'])));
     }
     return $this->_JSClassParams;
 }
Example #11
0
 public function getJSClassParams()
 {
     if (!isset($this->_JSClassParams)) {
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('url' => $this->url, 'id' => $this->id, 'mediaParams' => $this->mediaParams, 'viewParams' => $this->viewParams, 'acceptedFiles' => $this->acceptedFiles));
     }
     return $this->_JSClassParams;
 }
Example #12
0
 public function getJSClassParams()
 {
     if (!isset($this->_JSClassParams)) {
         $this->_JSClassParams = array_merge(parent::getJSClassParams(), array('url' => $this->url, 'id' => $this->id, 'mediaParams' => $this->mediaParams, 'viewParams' => $this->viewParams, 'acceptedFiles' => $this->acceptedFiles, 'maxFileSize' => floor(AppFileUtil::sizeToMb(ini_get('upload_max_filesize')))));
     }
     return $this->_JSClassParams;
 }
Example #13
0
 /**
  * @return arguments passed to $pillBoxJSClass constructor
  */
 public function getJSClassParams()
 {
     return array_merge(parent::getJSClassParams(), array('name' => $this->name, 'options' => $this->options, 'value' => $this->value, 'translations' => array_merge(array('helpText' => Yii::t('app', 'Click to add'), 'optionsHeader' => $this->optionsHeader, 'delete' => Yii::t('app', 'Delete')), $this->translations), 'pillClass' => $this->pillJSClass));
 }