Changeset 4000:f4e55f97c992 for plugins
- Timestamp:
- 06/30/19 17:43:01 (6 years ago)
- Branch:
- default
- Location:
- plugins/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/widgets/index.php
r3874 r4000 204 204 <title><?php echo __('Widgets'); ?></title> 205 205 <?php 206 echo dcPage::cssLoad(dcPage::getPF('widgets/style.css')) .207 dcPage::jsLoad('js/jquery/jquery-ui.custom.js') .208 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') .209 dcPage::jsLoad(dcPage::getPF('widgets/js/widgets.js'));210 211 $core->auth->user_prefs->addWorkspace('accessibility');212 $user_dm_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop;213 if (!$user_dm_nodragdrop) {214 echo dcPage::jsLoad(dcPage::getPF('widgets/js/dragdrop.js'));215 }216 echo dcPage::jsVars(['dotclear.msg.confirm_widgets_reset' => __('Are you sure you want to reset sidebars?')]);217 218 206 $widget_editor = $core->auth->getOption('editor'); 219 207 $rte_flag = true; … … 222 210 $rte_flag = $rte_flags['widgets_text']; 223 211 } 212 echo dcPage::cssLoad(dcPage::getPF('widgets/style.css')) . 213 dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . 214 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . 215 dcPage::jsJson('widgets', [ 216 'widget_noeditor' => ($rte_flag ? 0 : 1), 217 'msg' => ['confirm_widgets_reset' => __('Are you sure you want to reset sidebars?')] 218 ]) . 219 dcPage::jsLoad(dcPage::getPF('widgets/js/widgets.js')); 220 221 $core->auth->user_prefs->addWorkspace('accessibility'); 222 $user_dm_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop; 223 if (!$user_dm_nodragdrop) { 224 echo dcPage::jsLoad(dcPage::getPF('widgets/js/dragdrop.js')); 225 } 224 226 if ($rte_flag) { 225 echo dcPage::jsVars(['dotclear.widget_noeditor' => 0]);226 227 echo $core->callBehavior('adminPostEditor', $widget_editor['xhtml'], 'widget', 227 228 ['#sidebarsWidgets textarea:not(.noeditor)'], 'xhtml'); 228 } else {229 echo dcPage::jsVars(['dotclear.widget_noeditor' => 1]);230 229 } 231 230 echo (dcPage::jsConfirmClose('sidebarsWidgets')); -
plugins/widgets/js/widgets.js
r3936 r4000 1 /*global $, dotclear, jsToolBar */1 /*global $, dotclear, jsToolBar, mergeDeep, getData */ 2 2 'use strict'; 3 3 … … 92 92 93 93 $(function() { 94 95 mergeDeep(dotclear, getData('widgets')); 96 94 97 // reset 95 98 $('input[name="wreset"]').click(function() {
Note: See TracChangeset
for help on using the changeset viewer.