@@ -45,40 +45,40 @@ |
||
45 | 45 | |
46 | 46 | class ViewHistory extends SugarView |
47 | 47 | { |
48 | - /** |
|
49 | - * @see SugarView::_getModuleTitleParams() |
|
50 | - */ |
|
51 | - protected function _getModuleTitleParams($browserTitle = false) |
|
52 | - { |
|
53 | - global $mod_strings; |
|
48 | + /** |
|
49 | + * @see SugarView::_getModuleTitleParams() |
|
50 | + */ |
|
51 | + protected function _getModuleTitleParams($browserTitle = false) |
|
52 | + { |
|
53 | + global $mod_strings; |
|
54 | 54 | |
55 | - return array( |
|
56 | - translate('LBL_MODULE_NAME','Administration'), |
|
57 | - ModuleBuilderController::getModuleTitle(), |
|
58 | - ); |
|
55 | + return array( |
|
56 | + translate('LBL_MODULE_NAME','Administration'), |
|
57 | + ModuleBuilderController::getModuleTitle(), |
|
58 | + ); |
|
59 | 59 | } |
60 | 60 | |
61 | - //STUDIO LABELS ONLY// |
|
62 | - //TODO Bundle Studio and ModuleBuilder label handling to increase maintainability. |
|
63 | - function display() |
|
64 | - { |
|
65 | - $root = new ExtNode('root', 'root', true); |
|
66 | - $sb = new StudioBrowser(); |
|
67 | - $sb->loadModules(); |
|
68 | - foreach($sb->modules as $name => $studioMod) { |
|
69 | - $root->add_node($this->buildStudioNode($studioMod)); |
|
70 | - } |
|
71 | - $json = getJSONobj(); |
|
72 | - echo($json->encode($root)); |
|
73 | - } |
|
61 | + //STUDIO LABELS ONLY// |
|
62 | + //TODO Bundle Studio and ModuleBuilder label handling to increase maintainability. |
|
63 | + function display() |
|
64 | + { |
|
65 | + $root = new ExtNode('root', 'root', true); |
|
66 | + $sb = new StudioBrowser(); |
|
67 | + $sb->loadModules(); |
|
68 | + foreach($sb->modules as $name => $studioMod) { |
|
69 | + $root->add_node($this->buildStudioNode($studioMod)); |
|
70 | + } |
|
71 | + $json = getJSONobj(); |
|
72 | + echo($json->encode($root)); |
|
73 | + } |
|
74 | 74 | |
75 | - /** |
|
76 | - * |
|
77 | - * @return ExtNode built from the passed StudioModule |
|
78 | - * @param $module StudioModule |
|
79 | - */ |
|
80 | - function buildStudioNode($module) { |
|
75 | + /** |
|
76 | + * |
|
77 | + * @return ExtNode built from the passed StudioModule |
|
78 | + * @param $module StudioModule |
|
79 | + */ |
|
80 | + function buildStudioNode($module) { |
|
81 | 81 | |
82 | - } |
|
82 | + } |
|
83 | 83 | |
84 | 84 | } |
@@ -48,19 +48,19 @@ discard block |
||
48 | 48 | class ViewResetmodule extends SugarView |
49 | 49 | { |
50 | 50 | /** |
51 | - * @see SugarView::_getModuleTitleParams() |
|
52 | - */ |
|
53 | - protected function _getModuleTitleParams($browserTitle = false) |
|
54 | - { |
|
55 | - global $mod_strings; |
|
51 | + * @see SugarView::_getModuleTitleParams() |
|
52 | + */ |
|
53 | + protected function _getModuleTitleParams($browserTitle = false) |
|
54 | + { |
|
55 | + global $mod_strings; |
|
56 | 56 | |
57 | - return array( |
|
58 | - translate('LBL_MODULE_NAME','Administration'), |
|
59 | - ModuleBuilderController::getModuleTitle(), |
|
60 | - ); |
|
57 | + return array( |
|
58 | + translate('LBL_MODULE_NAME','Administration'), |
|
59 | + ModuleBuilderController::getModuleTitle(), |
|
60 | + ); |
|
61 | 61 | } |
62 | 62 | |
63 | - function display() |
|
63 | + function display() |
|
64 | 64 | { |
65 | 65 | $moduleName = $this->module = $_REQUEST['view_module']; |
66 | 66 | if (isset($_REQUEST['handle']) && $_REQUEST['handle'] == "execute") { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | array("name" => "fields", "label" => translate("LBL_REMOVE_FIELDS")), |
80 | 80 | array("name" => "layouts", "label" => translate("LBL_RESET_LAYOUTS")), |
81 | 81 | array("name" => "labels", "label" => translate("LBL_RESET_LABELS")), |
82 | - array("name" => "extensions", "label" => translate("LBL_CLEAR_EXTENSIONS")), |
|
82 | + array("name" => "extensions", "label" => translate("LBL_CLEAR_EXTENSIONS")), |
|
83 | 83 | )); |
84 | 84 | |
85 | 85 | $ajax->addSection ( |
@@ -104,10 +104,10 @@ discard block |
||
104 | 104 | if (!empty($_REQUEST['layouts'])) |
105 | 105 | $out .= $this->removeCustomLayouts(); |
106 | 106 | |
107 | - if (!empty($_REQUEST['labels'])) |
|
107 | + if (!empty($_REQUEST['labels'])) |
|
108 | 108 | $out .= $this->removeCustomLabels(); |
109 | 109 | |
110 | - if (!empty($_REQUEST['extensions'])) |
|
110 | + if (!empty($_REQUEST['extensions'])) |
|
111 | 111 | $out .= $this->removeCustomExtensions(); |
112 | 112 | |
113 | 113 | |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | $customFields = array(); |
149 | 149 | foreach($seed->field_defs as $def) { |
150 | 150 | if(isset($def['source']) && $def['source'] == 'custom_fields') { |
151 | - $field = $df->getFieldWidget($moduleName, $def['name']); |
|
152 | - $field->delete ( $df ) ; |
|
151 | + $field = $df->getFieldWidget($moduleName, $def['name']); |
|
152 | + $field->delete ( $df ) ; |
|
153 | 153 | |
154 | - $module->removeFieldFromLayouts( $def['name'] ); |
|
155 | - $customFields[] = $def['name']; |
|
154 | + $module->removeFieldFromLayouts( $def['name'] ); |
|
155 | + $customFields[] = $def['name']; |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | $out = ""; |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | function removeCustomRelationships() |
198 | 198 | { |
199 | - require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' ; |
|
199 | + require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' ; |
|
200 | 200 | $out = ""; |
201 | 201 | $madeChanges = false; |
202 | 202 | $relationships = new DeployedRelationships ( $this->module ) ; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | } |
211 | 211 | } |
212 | 212 | if ($madeChanges) |
213 | - $relationships->save () ; |
|
213 | + $relationships->save () ; |
|
214 | 214 | |
215 | 215 | return $out; |
216 | 216 | } |
@@ -218,33 +218,33 @@ discard block |
||
218 | 218 | function removeCustomLabels() |
219 | 219 | { |
220 | 220 | $out = ""; |
221 | - $languageDir = "custom/modules/{$this->module}/language"; |
|
221 | + $languageDir = "custom/modules/{$this->module}/language"; |
|
222 | 222 | if (is_dir($languageDir)) { |
223 | 223 | $files = scandir($languageDir); |
224 | 224 | foreach ($files as $langFile) { |
225 | 225 | if (substr($langFile, 0 ,1) == '.') continue; |
226 | - $language = substr($langFile, 0, strlen($langFile) - 9); |
|
227 | - unlink($languageDir . "/" . $langFile); |
|
226 | + $language = substr($langFile, 0, strlen($langFile) - 9); |
|
227 | + unlink($languageDir . "/" . $langFile); |
|
228 | 228 | |
229 | - LanguageManager::clearLanguageCache ( $this->module, $language ) ; |
|
230 | - $out .= "Removed language file $langFile<br/>"; |
|
229 | + LanguageManager::clearLanguageCache ( $this->module, $language ) ; |
|
230 | + $out .= "Removed language file $langFile<br/>"; |
|
231 | 231 | } |
232 | 232 | } |
233 | 233 | |
234 | - return $out; |
|
234 | + return $out; |
|
235 | 235 | } |
236 | 236 | |
237 | - function removeCustomExtensions() |
|
238 | - { |
|
237 | + function removeCustomExtensions() |
|
238 | + { |
|
239 | 239 | $out = ""; |
240 | 240 | $extDir = "custom/Extension/modules/{$this->module}"; |
241 | 241 | if (is_dir($extDir)) { |
242 | - rmdir_recursive($extDir); |
|
243 | - require_once ('modules/Administration/QuickRepairAndRebuild.php') ; |
|
242 | + rmdir_recursive($extDir); |
|
243 | + require_once ('modules/Administration/QuickRepairAndRebuild.php') ; |
|
244 | 244 | $rac = new RepairAndClear ( ) ; |
245 | 245 | $rac->repairAndClearAll ( array ( 'clearAll' ), array ( $this->module ), true, false ) ; |
246 | - $rac->rebuildExtensions(); |
|
247 | - $out .= "Cleared extensions for {$this->module}<br/>"; |
|
246 | + $rac->rebuildExtensions(); |
|
247 | + $out .= "Cleared extensions for {$this->module}<br/>"; |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | return $out; |
@@ -41,127 +41,127 @@ |
||
41 | 41 | require_once('modules/ModuleBuilder/MB/ModuleBuilder.php'); |
42 | 42 | class Viewpackage extends SugarView |
43 | 43 | { |
44 | - /** |
|
45 | - * @see SugarView::_getModuleTitleParams() |
|
46 | - */ |
|
47 | - protected function _getModuleTitleParams($browserTitle = false) |
|
48 | - { |
|
49 | - global $mod_strings; |
|
44 | + /** |
|
45 | + * @see SugarView::_getModuleTitleParams() |
|
46 | + */ |
|
47 | + protected function _getModuleTitleParams($browserTitle = false) |
|
48 | + { |
|
49 | + global $mod_strings; |
|
50 | 50 | |
51 | - return array( |
|
52 | - translate('LBL_MODULE_NAME','Administration'), |
|
53 | - ModuleBuilderController::getModuleTitle(), |
|
54 | - ); |
|
51 | + return array( |
|
52 | + translate('LBL_MODULE_NAME','Administration'), |
|
53 | + ModuleBuilderController::getModuleTitle(), |
|
54 | + ); |
|
55 | 55 | } |
56 | 56 | |
57 | - function display() |
|
58 | - { |
|
59 | - global $mod_strings; |
|
60 | - $smarty = new Sugar_Smarty(); |
|
61 | - $mb = new ModuleBuilder(); |
|
62 | - //if (!empty($_REQUEST['package'])) { |
|
63 | - if (empty($_REQUEST['package']) && empty($_REQUEST['new'])) { |
|
64 | - $this->generatePackageButtons($mb->getPackageList()); |
|
57 | + function display() |
|
58 | + { |
|
59 | + global $mod_strings; |
|
60 | + $smarty = new Sugar_Smarty(); |
|
61 | + $mb = new ModuleBuilder(); |
|
62 | + //if (!empty($_REQUEST['package'])) { |
|
63 | + if (empty($_REQUEST['package']) && empty($_REQUEST['new'])) { |
|
64 | + $this->generatePackageButtons($mb->getPackageList()); |
|
65 | 65 | |
66 | - $smarty->assign('buttons', $this->buttons); |
|
67 | - $smarty->assign('title', $GLOBALS['mod_strings']['LBL_MODULEBUILDER']); |
|
68 | - $smarty->assign("question", $GLOBALS['mod_strings']['LBL_QUESTION_PACKAGE']); |
|
69 | - $smarty->assign("defaultHelp", "mbHelp"); |
|
66 | + $smarty->assign('buttons', $this->buttons); |
|
67 | + $smarty->assign('title', $GLOBALS['mod_strings']['LBL_MODULEBUILDER']); |
|
68 | + $smarty->assign("question", $GLOBALS['mod_strings']['LBL_QUESTION_PACKAGE']); |
|
69 | + $smarty->assign("defaultHelp", "mbHelp"); |
|
70 | 70 | |
71 | - $ajax = new AjaxCompose(); |
|
72 | - $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package")'); |
|
73 | - $ajax->addCrumb($GLOBALS['mod_strings']['LBL_PACKAGE_LIST'],''); |
|
74 | - $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_PACKAGE_LIST'], $smarty->fetch('modules/ModuleBuilder/tpls/wizard.tpl')); |
|
75 | - echo $ajax->getJavascript(); |
|
76 | - } |
|
77 | - else { |
|
71 | + $ajax = new AjaxCompose(); |
|
72 | + $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package")'); |
|
73 | + $ajax->addCrumb($GLOBALS['mod_strings']['LBL_PACKAGE_LIST'],''); |
|
74 | + $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_PACKAGE_LIST'], $smarty->fetch('modules/ModuleBuilder/tpls/wizard.tpl')); |
|
75 | + echo $ajax->getJavascript(); |
|
76 | + } |
|
77 | + else { |
|
78 | 78 | |
79 | - $name = (!empty($_REQUEST['package']))?$_REQUEST['package']:''; |
|
80 | - $mb->getPackage($name); |
|
79 | + $name = (!empty($_REQUEST['package']))?$_REQUEST['package']:''; |
|
80 | + $mb->getPackage($name); |
|
81 | 81 | |
82 | 82 | require_once ('modules/ModuleBuilder/MB/MBPackageTree.php') ; |
83 | 83 | $mbt = new MBPackageTree(); |
84 | 84 | $nodes = $mbt->fetchNodes(); |
85 | 85 | |
86 | - $package_labels = array(); |
|
87 | - if(!empty($nodes['tree_data']['nodes'])) |
|
88 | - { |
|
89 | - foreach($nodes['tree_data']['nodes'] as $entry) |
|
90 | - { |
|
91 | - if(!empty($entry['data']['label']) && $name != $entry['data']['label']) |
|
92 | - { |
|
93 | - $package_labels[] = strtoupper($entry['data']['label']); |
|
94 | - } |
|
95 | - } |
|
96 | - } |
|
86 | + $package_labels = array(); |
|
87 | + if(!empty($nodes['tree_data']['nodes'])) |
|
88 | + { |
|
89 | + foreach($nodes['tree_data']['nodes'] as $entry) |
|
90 | + { |
|
91 | + if(!empty($entry['data']['label']) && $name != $entry['data']['label']) |
|
92 | + { |
|
93 | + $package_labels[] = strtoupper($entry['data']['label']); |
|
94 | + } |
|
95 | + } |
|
96 | + } |
|
97 | 97 | |
98 | - $json = getJSONobj(); |
|
99 | - $smarty->assign('package_labels', $json->encode($package_labels)); |
|
98 | + $json = getJSONobj(); |
|
99 | + $smarty->assign('package_labels', $json->encode($package_labels)); |
|
100 | 100 | |
101 | - $this->package =& $mb->packages[$name]; |
|
102 | - $this->loadModuleTypes(); |
|
103 | - $this->loadPackageHelp($name); |
|
104 | - $this->package->date_modified = $GLOBALS['timedate']->to_display_date_time($this->package->date_modified); |
|
105 | - $smarty->assign('package', $this->package); |
|
106 | - $smarty->assign('mod_strings',$mod_strings); |
|
107 | - $smarty->assign('package_already_deployed', 'false'); |
|
101 | + $this->package =& $mb->packages[$name]; |
|
102 | + $this->loadModuleTypes(); |
|
103 | + $this->loadPackageHelp($name); |
|
104 | + $this->package->date_modified = $GLOBALS['timedate']->to_display_date_time($this->package->date_modified); |
|
105 | + $smarty->assign('package', $this->package); |
|
106 | + $smarty->assign('mod_strings',$mod_strings); |
|
107 | + $smarty->assign('package_already_deployed', 'false'); |
|
108 | 108 | foreach($this->package->modules as $a_module){ |
109 | 109 | if(in_array($a_module->key_name, $GLOBALS['moduleList'])){ |
110 | - $smarty->assign('package_already_deployed', 'true'); |
|
110 | + $smarty->assign('package_already_deployed', 'true'); |
|
111 | 111 | break; |
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | - $ajax = new AjaxCompose(); |
|
116 | - $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package")'); |
|
117 | - if(empty($name))$name = $mod_strings['LBL_NEW_PACKAGE']; |
|
118 | - $ajax->addCrumb($name,''); |
|
119 | - $html=$smarty->fetch('modules/ModuleBuilder/tpls/MBPackage/package.tpl'); |
|
120 | - if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SavePackage') |
|
121 | - $html.="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>"; |
|
122 | - $ajax->addSection('center', translate('LBL_SECTION_PACKAGE', 'ModuleBuilder'), $html); |
|
123 | - echo $ajax->getJavascript(); |
|
124 | - } |
|
125 | - } |
|
115 | + $ajax = new AjaxCompose(); |
|
116 | + $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package")'); |
|
117 | + if(empty($name))$name = $mod_strings['LBL_NEW_PACKAGE']; |
|
118 | + $ajax->addCrumb($name,''); |
|
119 | + $html=$smarty->fetch('modules/ModuleBuilder/tpls/MBPackage/package.tpl'); |
|
120 | + if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SavePackage') |
|
121 | + $html.="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>"; |
|
122 | + $ajax->addSection('center', translate('LBL_SECTION_PACKAGE', 'ModuleBuilder'), $html); |
|
123 | + echo $ajax->getJavascript(); |
|
124 | + } |
|
125 | + } |
|
126 | 126 | |
127 | - function loadModuleTypes() |
|
128 | - { |
|
129 | - $this->package->moduleTypes = array(); |
|
130 | - $this->package->loadModules(); |
|
131 | - foreach(array_keys($this->package->modules) as $name){ |
|
132 | - foreach($this->package->modules[$name]->config['templates'] as $template=>$var){ |
|
127 | + function loadModuleTypes() |
|
128 | + { |
|
129 | + $this->package->moduleTypes = array(); |
|
130 | + $this->package->loadModules(); |
|
131 | + foreach(array_keys($this->package->modules) as $name){ |
|
132 | + foreach($this->package->modules[$name]->config['templates'] as $template=>$var){ |
|
133 | 133 | |
134 | - $this->package->moduleTypes[$name] = $template; |
|
134 | + $this->package->moduleTypes[$name] = $template; |
|
135 | 135 | |
136 | - } |
|
137 | - } |
|
138 | - } |
|
139 | - function loadPackageHelp( |
|
140 | - $name |
|
141 | - ) |
|
142 | - { |
|
143 | - $this->package->help['default'] = (empty($name))?'create':'modify'; |
|
144 | - $this->package->help['group'] = 'package'; |
|
145 | - } |
|
136 | + } |
|
137 | + } |
|
138 | + } |
|
139 | + function loadPackageHelp( |
|
140 | + $name |
|
141 | + ) |
|
142 | + { |
|
143 | + $this->package->help['default'] = (empty($name))?'create':'modify'; |
|
144 | + $this->package->help['group'] = 'package'; |
|
145 | + } |
|
146 | 146 | |
147 | - function generatePackageButtons( |
|
148 | - $packages |
|
149 | - ) |
|
150 | - { |
|
151 | - global $mod_strings; |
|
152 | - $this->buttons[$mod_strings['LBL_NEW_PACKAGE']] = array( |
|
153 | - 'action' => "module=ModuleBuilder&action=package&new=1", |
|
154 | - 'imageTitle' => 'package_create', |
|
155 | - 'size' => '64', |
|
156 | - 'help' => 'newPackage', |
|
147 | + function generatePackageButtons( |
|
148 | + $packages |
|
149 | + ) |
|
150 | + { |
|
151 | + global $mod_strings; |
|
152 | + $this->buttons[$mod_strings['LBL_NEW_PACKAGE']] = array( |
|
153 | + 'action' => "module=ModuleBuilder&action=package&new=1", |
|
154 | + 'imageTitle' => 'package_create', |
|
155 | + 'size' => '64', |
|
156 | + 'help' => 'newPackage', |
|
157 | 157 | 'linkId' => 'newPackageLink' |
158 | - ); |
|
159 | - foreach($packages as $package) { |
|
160 | - $this->buttons[$package] = array( |
|
161 | - 'action' =>"module=ModuleBuilder&action=package&package={$package}", |
|
162 | - 'imageTitle' => 'package', |
|
163 | - 'size' => '64', |
|
164 | - ); |
|
165 | - } |
|
166 | - } |
|
158 | + ); |
|
159 | + foreach($packages as $package) { |
|
160 | + $this->buttons[$package] = array( |
|
161 | + 'action' =>"module=ModuleBuilder&action=package&package={$package}", |
|
162 | + 'imageTitle' => 'package', |
|
163 | + 'size' => '64', |
|
164 | + ); |
|
165 | + } |
|
166 | + } |
|
167 | 167 | } |
168 | 168 | \ No newline at end of file |
@@ -46,16 +46,16 @@ discard block |
||
46 | 46 | class ViewRelationships extends SugarView |
47 | 47 | { |
48 | 48 | /** |
49 | - * @see SugarView::_getModuleTitleParams() |
|
50 | - */ |
|
51 | - protected function _getModuleTitleParams($browserTitle = false) |
|
52 | - { |
|
53 | - global $mod_strings; |
|
49 | + * @see SugarView::_getModuleTitleParams() |
|
50 | + */ |
|
51 | + protected function _getModuleTitleParams($browserTitle = false) |
|
52 | + { |
|
53 | + global $mod_strings; |
|
54 | 54 | |
55 | - return array( |
|
56 | - translate('LBL_MODULE_NAME','Administration'), |
|
57 | - ModuleBuilderController::getModuleTitle(), |
|
58 | - ); |
|
55 | + return array( |
|
56 | + translate('LBL_MODULE_NAME','Administration'), |
|
57 | + ModuleBuilderController::getModuleTitle(), |
|
58 | + ); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | function display() |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $ajax = new AjaxCompose ( ) ; |
71 | 71 | $json = getJSONobj () ; |
72 | - $this->fromModuleBuilder = !empty ( $_REQUEST [ 'MB' ] ) || (!empty($_REQUEST['view_package']) && $_REQUEST['view_package'] != 'studio') ; |
|
72 | + $this->fromModuleBuilder = !empty ( $_REQUEST [ 'MB' ] ) || (!empty($_REQUEST['view_package']) && $_REQUEST['view_package'] != 'studio') ; |
|
73 | 73 | $smarty->assign('fromModuleBuilder', $this->fromModuleBuilder); |
74 | 74 | if (!$this->fromModuleBuilder) |
75 | 75 | { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $mb = new ModuleBuilder ( ) ; |
98 | 98 | $module = & $mb->getPackageModule ( $_REQUEST [ 'view_package' ], $_REQUEST [ 'view_module' ] ) ; |
99 | 99 | $package = $mb->packages [ $_REQUEST [ 'view_package' ] ] ; |
100 | - $package->loadModuleTitles(); |
|
100 | + $package->loadModuleTitles(); |
|
101 | 101 | $relationships = new UndeployedRelationships ( $module->getModuleDir () ) ; |
102 | 102 | $ajaxRelationships = $this->getAjaxRelationships( $relationships ) ; |
103 | 103 | $smarty->assign ( 'relationships', $json->encode ( $ajaxRelationships ) ) ; |
@@ -129,23 +129,23 @@ discard block |
||
129 | 129 | |
130 | 130 | //#28668 , translate the relationship type before render it . |
131 | 131 | switch($rel['relationship_type']){ |
132 | - case 'one-to-one': |
|
133 | - $rel['relationship_type'] = translate ( 'LBL_ONETOONE' ); |
|
134 | - break; |
|
135 | - case 'one-to-many': |
|
136 | - $rel['relationship_type'] = translate ( 'LBL_ONETOMANY' ); |
|
137 | - break; |
|
138 | - case 'many-to-one': |
|
139 | - $rel['relationship_type'] = translate ( 'LBL_MANYTOONE' ); |
|
140 | - break; |
|
141 | - case 'many-to-many': |
|
142 | - $rel['relationship_type'] = translate ( 'LBL_MANYTOMANY' ); |
|
143 | - break; |
|
144 | - default: $rel['relationship_type'] = ''; |
|
132 | + case 'one-to-one': |
|
133 | + $rel['relationship_type'] = translate ( 'LBL_ONETOONE' ); |
|
134 | + break; |
|
135 | + case 'one-to-many': |
|
136 | + $rel['relationship_type'] = translate ( 'LBL_ONETOMANY' ); |
|
137 | + break; |
|
138 | + case 'many-to-one': |
|
139 | + $rel['relationship_type'] = translate ( 'LBL_MANYTOONE' ); |
|
140 | + break; |
|
141 | + case 'many-to-many': |
|
142 | + $rel['relationship_type'] = translate ( 'LBL_MANYTOMANY' ); |
|
143 | + break; |
|
144 | + default: $rel['relationship_type'] = ''; |
|
145 | 145 | } |
146 | 146 | $rel [ 'name' ] = $relationshipName ; |
147 | 147 | if ($rel [ 'is_custom' ] && isset($rel [ 'from_studio' ]) && $rel [ 'from_studio' ]) { |
148 | - $rel [ 'name' ] = $relationshipName . "*"; |
|
148 | + $rel [ 'name' ] = $relationshipName . "*"; |
|
149 | 149 | } |
150 | 150 | $ajaxrels [] = $rel ; |
151 | 151 | } |
@@ -43,22 +43,22 @@ |
||
43 | 43 | class Viewdeletemodule extends SugarView |
44 | 44 | { |
45 | 45 | /** |
46 | - * @see SugarView::_getModuleTitleParams() |
|
47 | - */ |
|
48 | - protected function _getModuleTitleParams($browserTitle = false) |
|
49 | - { |
|
50 | - global $mod_strings; |
|
46 | + * @see SugarView::_getModuleTitleParams() |
|
47 | + */ |
|
48 | + protected function _getModuleTitleParams($browserTitle = false) |
|
49 | + { |
|
50 | + global $mod_strings; |
|
51 | 51 | |
52 | - return array( |
|
53 | - translate('LBL_MODULE_NAME','Administration'), |
|
54 | - ModuleBuilderController::getModuleTitle(), |
|
55 | - ); |
|
52 | + return array( |
|
53 | + translate('LBL_MODULE_NAME','Administration'), |
|
54 | + ModuleBuilderController::getModuleTitle(), |
|
55 | + ); |
|
56 | 56 | } |
57 | 57 | |
58 | - function display() |
|
59 | - { |
|
60 | - $ajax = new AjaxCompose(); |
|
61 | - $ajax->addSection('center', 'Module Deleted', $_REQUEST['module'] . ' was deleted from ' . $_REQUEST['package']); |
|
62 | - echo $ajax->getJavascript(); |
|
63 | - } |
|
58 | + function display() |
|
59 | + { |
|
60 | + $ajax = new AjaxCompose(); |
|
61 | + $ajax->addSection('center', 'Module Deleted', $_REQUEST['module'] . ' was deleted from ' . $_REQUEST['package']); |
|
62 | + echo $ajax->getJavascript(); |
|
63 | + } |
|
64 | 64 | } |
65 | 65 | \ No newline at end of file |
@@ -46,16 +46,16 @@ discard block |
||
46 | 46 | class ViewListView extends SugarView |
47 | 47 | { |
48 | 48 | /** |
49 | - * @see SugarView::_getModuleTitleParams() |
|
50 | - */ |
|
51 | - protected function _getModuleTitleParams($browserTitle = false) |
|
52 | - { |
|
53 | - global $mod_strings; |
|
49 | + * @see SugarView::_getModuleTitleParams() |
|
50 | + */ |
|
51 | + protected function _getModuleTitleParams($browserTitle = false) |
|
52 | + { |
|
53 | + global $mod_strings; |
|
54 | 54 | |
55 | - return array( |
|
56 | - translate('LBL_MODULE_NAME','Administration'), |
|
57 | - ModuleBuilderController::getModuleTitle(), |
|
58 | - ); |
|
55 | + return array( |
|
56 | + translate('LBL_MODULE_NAME','Administration'), |
|
57 | + ModuleBuilderController::getModuleTitle(), |
|
58 | + ); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /* |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | |
113 | 113 | |
114 | 114 | $labels = array ( |
115 | - MB_LISTVIEW => 'LBL_LISTVIEW' , |
|
116 | - ) ; |
|
115 | + MB_LISTVIEW => 'LBL_LISTVIEW' , |
|
116 | + ) ; |
|
117 | 117 | $translatedViewType = '' ; |
118 | - if ( isset ( $labels [ strtolower ( $this->editLayout ) ] ) ) |
|
119 | - $translatedViewType = translate ( $labels [ strtolower( $this->editLayout ) ] , 'ModuleBuilder' ) ; |
|
120 | - $this->translatedViewType = $translatedViewType; |
|
118 | + if ( isset ( $labels [ strtolower ( $this->editLayout ) ] ) ) |
|
119 | + $translatedViewType = translate ( $labels [ strtolower( $this->editLayout ) ] , 'ModuleBuilder' ) ; |
|
120 | + $this->translatedViewType = $translatedViewType; |
|
121 | 121 | |
122 | 122 | if ($this->fromModuleBuilder) |
123 | 123 | { |
@@ -198,8 +198,8 @@ discard block |
||
198 | 198 | $subRef = $subList[strtolower($this->subpanel)]; |
199 | 199 | $subTitleKey = !empty($subRef) ? $subRef : "LBL_" . strtoupper($this->subpanel) . "_SUBPANEL_TITLE"; |
200 | 200 | $subTitle = !empty($subRef) ? translate($subTitleKey, $this->editModule) : UCfirst($this->subpanel); |
201 | - $smarty->assign ( 'subpanel_label', $subTitleKey ) ; |
|
202 | - $smarty->assign ( 'subpanel_title', $subTitle ) ; |
|
201 | + $smarty->assign ( 'subpanel_label', $subTitleKey ) ; |
|
202 | + $smarty->assign ( 'subpanel_title', $subTitle ) ; |
|
203 | 203 | } |
204 | 204 | } |
205 | 205 | $helpName = $this->subpanel ? 'subPanelEditor' : 'listViewEditor'; |
@@ -321,11 +321,11 @@ discard block |
||
321 | 321 | |
322 | 322 | function _buildImageButtons ($buttons , $horizontal = true) |
323 | 323 | { |
324 | - $text = '<table cellspacing=2><tr>' ; |
|
324 | + $text = '<table cellspacing=2><tr>' ; |
|
325 | 325 | foreach ( $buttons as $button ) |
326 | 326 | { |
327 | 327 | if (empty($button['id'])) { |
328 | - $button['id'] = $button['name']; |
|
328 | + $button['id'] = $button['name']; |
|
329 | 329 | } |
330 | 330 | if (! $horizontal) |
331 | 331 | { |
@@ -68,16 +68,16 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * @see SugarView::_getModuleTitleParams() |
|
72 | - */ |
|
73 | - protected function _getModuleTitleParams($browserTitle = false) |
|
74 | - { |
|
75 | - global $mod_strings; |
|
71 | + * @see SugarView::_getModuleTitleParams() |
|
72 | + */ |
|
73 | + protected function _getModuleTitleParams($browserTitle = false) |
|
74 | + { |
|
75 | + global $mod_strings; |
|
76 | 76 | |
77 | - return array( |
|
78 | - translate('LBL_MODULE_NAME','Administration'), |
|
79 | - ModuleBuilderController::getModuleTitle(), |
|
80 | - ); |
|
77 | + return array( |
|
78 | + translate('LBL_MODULE_NAME','Administration'), |
|
79 | + ModuleBuilderController::getModuleTitle(), |
|
80 | + ); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | // DO NOT REMOVE - overrides parent ViewEdit preDisplay() which attempts to load a bean for a non-existent module |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | $smarty = $this->constructSmarty ( $parser ) ; |
98 | 98 | if ($preview) |
99 | 99 | { |
100 | - echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ; |
|
100 | + echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ; |
|
101 | 101 | } else |
102 | 102 | { |
103 | - $ajax = $this->constructAjax () ; |
|
104 | - $ajax->addSection ( 'center', translate('LBL_DASHLET'), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ; |
|
105 | - echo $ajax->getJavascript () ; |
|
103 | + $ajax = $this->constructAjax () ; |
|
104 | + $ajax->addSection ( 'center', translate('LBL_DASHLET'), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ; |
|
105 | + echo $ajax->getJavascript () ; |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | $helpName = (isset( $_REQUEST['view']) && $_REQUEST['view']=='dashletsearch') ? 'searchViewEditor' : 'listViewEditor'; |
146 | 146 | $smarty->assign ( 'helpName', $helpName ) ; |
147 | 147 | $smarty->assign ( 'helpDefault', 'modify' ) ; |
148 | - if ($this->fromModuleBuilder) { |
|
149 | - $mb = new ModuleBuilder ( ) ; |
|
148 | + if ($this->fromModuleBuilder) { |
|
149 | + $mb = new ModuleBuilder ( ) ; |
|
150 | 150 | $module = & $mb->getPackageModule ( $this->editPackage, $this->editModule ) ; |
151 | - $smarty->assign('current_mod_strings', $module->getModStrings()); |
|
152 | - } |
|
151 | + $smarty->assign('current_mod_strings', $module->getModStrings()); |
|
152 | + } |
|
153 | 153 | $smarty->assign ( 'title', $this->_constructTitle () ) ; |
154 | 154 | $groups = array ( ) ; |
155 | 155 | foreach ( $parser->columns as $column => $function ) |
@@ -48,60 +48,60 @@ |
||
48 | 48 | |
49 | 49 | class ViewModulelabels extends SugarView |
50 | 50 | { |
51 | - /** |
|
52 | - * @see SugarView::_getModuleTitleParams() |
|
53 | - */ |
|
54 | - protected function _getModuleTitleParams($browserTitle = false) |
|
55 | - { |
|
56 | - global $mod_strings; |
|
51 | + /** |
|
52 | + * @see SugarView::_getModuleTitleParams() |
|
53 | + */ |
|
54 | + protected function _getModuleTitleParams($browserTitle = false) |
|
55 | + { |
|
56 | + global $mod_strings; |
|
57 | 57 | |
58 | - return array( |
|
59 | - translate('LBL_MODULE_NAME','Administration'), |
|
60 | - ModuleBuilderController::getModuleTitle(), |
|
61 | - ); |
|
58 | + return array( |
|
59 | + translate('LBL_MODULE_NAME','Administration'), |
|
60 | + ModuleBuilderController::getModuleTitle(), |
|
61 | + ); |
|
62 | 62 | } |
63 | 63 | |
64 | - function display() |
|
65 | - { |
|
66 | - global $mod_strings; |
|
64 | + function display() |
|
65 | + { |
|
66 | + global $mod_strings; |
|
67 | 67 | $bak_mod_strings=$mod_strings; |
68 | - $smarty = new Sugar_Smarty(); |
|
68 | + $smarty = new Sugar_Smarty(); |
|
69 | 69 | $smarty->assign('mod_strings', $mod_strings); |
70 | - $package_name = $_REQUEST['view_package']; |
|
71 | - $module_name = $_REQUEST['view_module']; |
|
70 | + $package_name = $_REQUEST['view_package']; |
|
71 | + $module_name = $_REQUEST['view_module']; |
|
72 | 72 | |
73 | - require_once('modules/ModuleBuilder/MB/ModuleBuilder.php'); |
|
74 | - $mb = new ModuleBuilder(); |
|
75 | - $mb->getPackage($_REQUEST['view_package']); |
|
76 | - $package = $mb->packages[$_REQUEST['view_package']]; |
|
77 | - $package->getModule($module_name); |
|
78 | - $mbModule = $package->modules[$module_name]; |
|
79 | - $selected_lang = (!empty($_REQUEST['selected_lang'])?$_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']); |
|
80 | - if(empty($selected_lang)){ |
|
81 | - $selected_lang = $GLOBALS['sugar_config']['default_language']; |
|
82 | - } |
|
83 | - //need to change the following to interface with MBlanguage. |
|
73 | + require_once('modules/ModuleBuilder/MB/ModuleBuilder.php'); |
|
74 | + $mb = new ModuleBuilder(); |
|
75 | + $mb->getPackage($_REQUEST['view_package']); |
|
76 | + $package = $mb->packages[$_REQUEST['view_package']]; |
|
77 | + $package->getModule($module_name); |
|
78 | + $mbModule = $package->modules[$module_name]; |
|
79 | + $selected_lang = (!empty($_REQUEST['selected_lang'])?$_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']); |
|
80 | + if(empty($selected_lang)){ |
|
81 | + $selected_lang = $GLOBALS['sugar_config']['default_language']; |
|
82 | + } |
|
83 | + //need to change the following to interface with MBlanguage. |
|
84 | 84 | |
85 | 85 | $smarty->assign('MOD', $mbModule->getModStrings($selected_lang)); |
86 | - $smarty->assign('APP', $GLOBALS['app_strings']); |
|
87 | - $smarty->assign('selected_lang', $selected_lang); |
|
88 | - $smarty->assign('view_package', $package_name); |
|
89 | - $smarty->assign('view_module', $module_name); |
|
90 | - $smarty->assign('mb','1'); |
|
91 | - $smarty->assign('available_languages', get_languages()); |
|
92 | - /////////////////////////////////////////////////////////////////// |
|
93 | - ////ASSISTANT |
|
94 | - $smarty->assign('assistant',array('group'=>'module', 'key'=>'labels')); |
|
95 | - ///////////////////////////////////////////////////////////////// |
|
96 | - ////ASSISTANT |
|
86 | + $smarty->assign('APP', $GLOBALS['app_strings']); |
|
87 | + $smarty->assign('selected_lang', $selected_lang); |
|
88 | + $smarty->assign('view_package', $package_name); |
|
89 | + $smarty->assign('view_module', $module_name); |
|
90 | + $smarty->assign('mb','1'); |
|
91 | + $smarty->assign('available_languages', get_languages()); |
|
92 | + /////////////////////////////////////////////////////////////////// |
|
93 | + ////ASSISTANT |
|
94 | + $smarty->assign('assistant',array('group'=>'module', 'key'=>'labels')); |
|
95 | + ///////////////////////////////////////////////////////////////// |
|
96 | + ////ASSISTANT |
|
97 | 97 | |
98 | - $ajax = new AjaxCompose(); |
|
99 | - $ajax->addCrumb($bak_mod_strings['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")'); |
|
100 | - $ajax->addCrumb($package_name, 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name. '")'); |
|
98 | + $ajax = new AjaxCompose(); |
|
99 | + $ajax->addCrumb($bak_mod_strings['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")'); |
|
100 | + $ajax->addCrumb($package_name, 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name. '")'); |
|
101 | 101 | $ajax->addCrumb($module_name, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package='.$package->name.'&view_module='. $module_name . '")'); |
102 | 102 | $ajax->addCrumb($bak_mod_strings['LBL_LABELS'], ''); |
103 | - $ajax->addSection('center', $bak_mod_strings['LBL_LABELS'],$smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl')); |
|
104 | - echo $ajax->getJavascript(); |
|
105 | - } |
|
103 | + $ajax->addSection('center', $bak_mod_strings['LBL_LABELS'],$smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl')); |
|
104 | + echo $ajax->getJavascript(); |
|
105 | + } |
|
106 | 106 | } |
107 | 107 |
@@ -47,19 +47,19 @@ discard block |
||
47 | 47 | var $pageSize = 10 ; |
48 | 48 | |
49 | 49 | /** |
50 | - * @see SugarView::_getModuleTitleParams() |
|
51 | - */ |
|
52 | - protected function _getModuleTitleParams($browserTitle = false) |
|
53 | - { |
|
54 | - global $mod_strings; |
|
50 | + * @see SugarView::_getModuleTitleParams() |
|
51 | + */ |
|
52 | + protected function _getModuleTitleParams($browserTitle = false) |
|
53 | + { |
|
54 | + global $mod_strings; |
|
55 | 55 | |
56 | - return array( |
|
57 | - translate('LBL_MODULE_NAME','Administration'), |
|
58 | - ModuleBuilderController::getModuleTitle(), |
|
59 | - ); |
|
56 | + return array( |
|
57 | + translate('LBL_MODULE_NAME','Administration'), |
|
58 | + ModuleBuilderController::getModuleTitle(), |
|
59 | + ); |
|
60 | 60 | } |
61 | 61 | |
62 | - function display () |
|
62 | + function display () |
|
63 | 63 | { |
64 | 64 | $this->layout = strtolower ( $_REQUEST [ 'view' ] ) ; |
65 | 65 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | } |
136 | 136 | echo "<input type='button' name='close$sid' value='". translate ( 'LBL_BTN_CLOSE' )."' " . |
137 | 137 | "class='button' onclick='ModuleBuilder.tabPanel.removeTab(ModuleBuilder.tabPanel.get(\"activeTab\"));' style='margin:5px;'>" . |
138 | - "<input type='button' name='restore$sid' value='" . translate ( 'LBL_MB_RESTORE' ) . "' " . |
|
138 | + "<input type='button' name='restore$sid' value='" . translate ( 'LBL_MB_RESTORE' ) . "' " . |
|
139 | 139 | "class='button' onclick='ModuleBuilder.history.revert(\"$this->module\",\"{$this->layout}\",\"$sid\"$subpanel);' style='margin:5px;'>" ; |
140 | 140 | $this->history->restoreByTimestamp ( $sid ) ; |
141 | 141 | $view ; |
@@ -149,12 +149,12 @@ discard block |
||
149 | 149 | $view = new ViewSearchView ( ) ; |
150 | 150 | } else if ($this->layout == 'dashlet' || $this->layout == 'dashletsearch') |
151 | 151 | { |
152 | - require_once ("modules/ModuleBuilder/views/view.dashlet.php") ; |
|
153 | - $view = new ViewDashlet ( ) ; |
|
152 | + require_once ("modules/ModuleBuilder/views/view.dashlet.php") ; |
|
153 | + $view = new ViewDashlet ( ) ; |
|
154 | 154 | } else if ($this->layout == 'popuplist' || $this->layout == 'popupsearch') |
155 | 155 | { |
156 | - require_once ("modules/ModuleBuilder/views/view.popupview.php") ; |
|
157 | - $view = new ViewPopupview ( ) ; |
|
156 | + require_once ("modules/ModuleBuilder/views/view.popupview.php") ; |
|
157 | + $view = new ViewPopupview ( ) ; |
|
158 | 158 | } else |
159 | 159 | { |
160 | 160 | require_once ("modules/ModuleBuilder/views/view.layoutview.php") ; |
@@ -175,12 +175,12 @@ discard block |
||
175 | 175 | $this->history->restoreByTimestamp ( $sid ) ; |
176 | 176 | } |
177 | 177 | |
178 | - /** |
|
179 | - * Restores a layout to its current customized state. |
|
180 | - * Called when leaving a restored layout without saving. |
|
181 | - */ |
|
178 | + /** |
|
179 | + * Restores a layout to its current customized state. |
|
180 | + * Called when leaving a restored layout without saving. |
|
181 | + */ |
|
182 | 182 | function unrestore() |
183 | 183 | { |
184 | - $this->history->undoRestore () ; |
|
184 | + $this->history->undoRestore () ; |
|
185 | 185 | } |
186 | 186 | } |