openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 0a53509f860f325b053307dbd3572c0c747cbb38
parent 93f44ff8d7d595dab2fd3c0ebda82884ce4364cd
Author: Jan Dankert <devnull@localhost>
Date:   Wed, 12 Sep 2018 21:44:11 +0200

Listenauswahlen sind jetzt wieder möglich.

Diffstat:
modules/cms-core/action/TemplateAction.class.php | 2+-
modules/cms-ui/themes/default/html/views/folder/edit.php | 16++++++++--------
modules/cms-ui/themes/default/html/views/folder/edit.tpl.src.xml | 16++++++++--------
modules/cms-ui/themes/default/html/views/grouplist/add.php | 16++++++++++++++++
modules/cms-ui/themes/default/html/views/grouplist/show.php | 13++++++++-----
modules/cms-ui/themes/default/html/views/language/advanced.php | 6+++---
modules/cms-ui/themes/default/html/views/languagelist/add.php | 16++++++++++++++++
modules/cms-ui/themes/default/html/views/languagelist/show.php | 6+++---
modules/cms-ui/themes/default/html/views/languagelist/show.tpl.src.xml | 6+++---
modules/cms-ui/themes/default/html/views/model/edit.php | 4++--
modules/cms-ui/themes/default/html/views/modellist/add.php | 18++++++++++++++++++
modules/cms-ui/themes/default/html/views/modellist/show.php | 8++++----
modules/cms-ui/themes/default/html/views/modellist/show.tpl.src.xml | 6+++---
modules/cms-ui/themes/default/html/views/template/edit.php | 15+++++++++------
modules/cms-ui/themes/default/html/views/template/edit.tpl.src.xml | 10++++++----
modules/cms-ui/themes/default/html/views/template/remove.php | 44++++++++++++++++++++++++++++++++++++++++++++
modules/cms-ui/themes/default/html/views/template/remove.tpl.src.xml | 3+--
modules/cms-ui/themes/default/html/views/templatelist/add.php | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-ui/themes/default/html/views/templatelist/show.php | 15++++++++++-----
modules/cms-ui/themes/default/html/views/templatelist/show.tpl.src.xml | 9++++++---
modules/cms-ui/themes/default/html/views/title/show.php | 2+-
modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/user/edit.php | 12++++++------
modules/cms-ui/themes/default/production/combined.min.js | 8++++----
modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.js | 2+-
modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.min.js | 2+-
26 files changed, 241 insertions(+), 74 deletions(-)

diff --git a/modules/cms-core/action/TemplateAction.class.php b/modules/cms-core/action/TemplateAction.class.php @@ -310,7 +310,7 @@ class TemplateAction extends Action */ function previewView() { - $this->setTemplateVar('preview_url',Html::url('template','show',$this->template->templateid,array('target'=>'none') ) ); + $this->setTemplateVar('preview_url',Html::url('template','show',$this->template->templateid,array('target'=>'none',REQ_PARAM_EMBED=>'1') ) ); } diff --git a/modules/cms-ui/themes/default/html/views/folder/edit.php b/modules/cms-ui/themes/default/html/views/folder/edit.php @@ -83,8 +83,8 @@ </td> <td colspan="2" class="clickable"> - <a target="_self" data-type="view" data-action="folder" data-method="createfolder" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('folder','createfolder','',array()) ?>"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/icon/create.png" /> + <a target="_self" data-type="dialog" data-action="folder" data-method="createfolder" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':'folder','dialogMethod':'createfolder'}" href="<?php echo Html::url('folder','createfolder','',array('dialogAction'=>'folder','dialogMethod'=>'createfolder')) ?>"> + <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/add.svg" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_folder_createfolder'.'')))); ?></span> @@ -98,8 +98,8 @@ </td> <td colspan="2" class="clickable"> - <a target="_self" data-type="view" data-action="folder" data-method="createpage" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('folder','createpage','',array()) ?>"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/icon/create.png" /> + <a target="_self" data-type="dialog" data-action="folder" data-method="createpage" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':'folder','dialogMethod':'createpage'}" href="<?php echo Html::url('folder','createpage','',array('dialogAction'=>'folder','dialogMethod'=>'createpage')) ?>"> + <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/add.svg" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_folder_createpage'.'')))); ?></span> @@ -113,8 +113,8 @@ </td> <td colspan="2" class="clickable"> - <a target="_self" data-type="view" data-action="folder" data-method="createfile" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('folder','createfile','',array()) ?>"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/icon/create.png" /> + <a target="_self" data-type="dialog" data-action="folder" data-method="createfile" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':'folder','dialogMethod':'createfile'}" href="<?php echo Html::url('folder','createfile','',array('dialogAction'=>'folder','dialogMethod'=>'createfile')) ?>"> + <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/add.svg" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_folder_createfile'.'')))); ?></span> @@ -128,8 +128,8 @@ </td> <td colspan="2" class="clickable"> - <a target="_self" data-type="view" data-action="folder" data-method="createlink" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('folder','createlink','',array()) ?>"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/icon/create.png" /> + <a target="_self" data-type="dialog" data-action="folder" data-method="createlink" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':'folder','dialogMethod':'createlink'}" href="<?php echo Html::url('folder','createlink','',array('dialogAction'=>'folder','dialogMethod'=>'createlink')) ?>"> + <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/add.svg" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_folder_createlink'.'')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/folder/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/folder/edit.tpl.src.xml @@ -50,8 +50,8 @@ <text raw="_" /> </column> <column colspan="2" class="clickable"> - <link type="view" action="folder" subaction="createfolder"> - <image file="icon/create"></image> + <link type="dialog" action="folder" subaction="createfolder"> + <image method="add"></image> <text key="menu_folder_createfolder"></text> </link> </column> @@ -61,8 +61,8 @@ <text raw="_" /> </column> <column colspan="2" class="clickable"> - <link type="view" action="folder" subaction="createpage"> - <image file="icon/create"></image> + <link type="dialog" action="folder" subaction="createpage"> + <image method="add"></image> <text key="menu_folder_createpage"></text> </link> </column> @@ -72,8 +72,8 @@ <text raw="_" /> </column> <column colspan="2" class="clickable"> - <link type="view" action="folder" subaction="createfile"> - <image file="icon/create"></image> + <link type="dialog" action="folder" subaction="createfile"> + <image method="add"></image> <text key="menu_folder_createfile"></text> </link> </column> @@ -83,8 +83,8 @@ <text raw="_" /> </column> <column colspan="2" class="clickable"> - <link type="view" action="folder" subaction="createlink"> - <image file="icon/create"></image> + <link type="dialog" action="folder" subaction="createlink"> + <image method="add"></image> <text key="menu_folder_createlink"></text> </link> </column> diff --git a/modules/cms-ui/themes/default/html/views/grouplist/add.php b/modules/cms-ui/themes/default/html/views/grouplist/add.php @@ -0,0 +1,15 @@ + + + <form name="" target="_self" data-target="view" action="./" data-method="add" data-action="grouplist" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="grouplist" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="grouplist" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="add" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_name" class="label"><?php echo lang('name') ?> + </label> + </div> + <div class="input"> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + + </div> + </div> + <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + + \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/grouplist/show.php b/modules/cms-ui/themes/default/html/views/grouplist/show.php @@ -11,11 +11,14 @@ </tr> <?php foreach($el as $list_key=>$list_value){ ?><?php extract($list_value) ?> <tr class="data"> - <td data-name="<?php echo $name ?>" data-action="group" data-id="<?php echo $id ?>" class="clickable"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/icon_group.png" /> - - <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - + <td data-name="<?php echo $name ?>" data-action="group" data-id="<?php echo $id ?>" class="clickable clickable"> + <a target="_self" date-name="<?php echo $name ?>" name="<?php echo $name ?>" data-type="open" data-action="group" data-method="show" data-id="<?php echo $id ?>" data-extra="[]" href="<?php echo Html::url('group','',$id,array()) ?>"> + <img class="image-icon image-icon--action" title="" src="./modules/cms-ui/themes/default/images/icon/action/group.svg" /> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $name,30,'..',constant('STR_PAD_BOTH') )))); ?></span> + + </a> + </td> </tr> <?php } ?> diff --git a/modules/cms-ui/themes/default/html/views/language/advanced.php b/modules/cms-ui/themes/default/html/views/language/advanced.php @@ -2,14 +2,14 @@ - <form name="" target="_self" data-target="view" action="./" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="1" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="advanced" data-action="language" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="language" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="language" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="advanced" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <div class="line"> <div class="label"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NAME')))); ?></span> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="50" class="focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -19,7 +19,7 @@ </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_isocode" name="isocode<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$isocode) ?>" /><?php if ('') { ?><input type="hidden" name="isocode" value="<?php $isocode ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_isocode" name="isocode<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$isocode) ?>" /><?php if ('') { ?><input type="hidden" name="isocode" value="<?php $isocode ?>"/><?php } ?></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/languagelist/add.php b/modules/cms-ui/themes/default/html/views/languagelist/add.php @@ -0,0 +1,15 @@ + + + <form name="" target="_self" data-target="view" action="./" data-method="add" data-action="languagelist" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="languagelist" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="languagelist" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="add" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="line"> + <div class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('LANGUAGE_ISOCODE')))); ?></span> + + </div> + <div class="input"> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_isocode" name="isocode" title="" class=""<?php if (count($isocodes)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($isocodes,$isocode,0,0) ?><?php if (count($isocodes)==0) { ?><input type="hidden" name="isocode" value="" /><?php } ?><?php if (count($isocodes)==1) { ?><input type="hidden" name="isocode" value="<?php echo array_keys($isocodes)[0] ?>" /><?php } ?> + </select></div> + </div> + </div> + <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + + \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/languagelist/show.php b/modules/cms-ui/themes/default/html/views/languagelist/show.php @@ -22,7 +22,7 @@ <?php foreach($el as $list_key=>$list_value){ ?><?php extract($list_value) ?> <tr class="data"> <td class="clickable"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/icon_language.png" /> + <img class="image-icon image-icon--action" title="" src="./modules/cms-ui/themes/default/images/icon/action/language.svg" /> <a target="_self" date-name="<?php echo $name ?>" name="<?php echo $name ?>" data-type="open" data-action="language" data-method="show" data-id="<?php echo $id ?>" data-extra="[]" href="<?php echo Html::url('language','',$id,array()) ?>"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $name,25,'..',constant('STR_PAD_BOTH') )))); ?></span> @@ -72,8 +72,8 @@ <?php } ?> <tr class="data"> <td colspan="4" class="clickable"> - <a target="_self" data-type="view" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('','add','',array()) ?>"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/add.png" /> + <a target="_self" data-type="dialog" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':null,'dialogMethod':'add'}" href="<?php echo Html::url('','add','',array('dialogAction'=>'','dialogMethod'=>'add')) ?>"> + <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/add.svg" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('new')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/languagelist/show.tpl.src.xml b/modules/cms-ui/themes/default/html/views/languagelist/show.tpl.src.xml @@ -18,7 +18,7 @@ <list list="el" extract="true"> <row class="data"> <column class="clickable"> - <image file="icon_language"></image> + <image action="language"></image> <link type="open" name="var:name" action="language" id="var:id"> <text var="name" maxlength="25"></text> </link> @@ -56,8 +56,8 @@ </list> <row class="data"> <column colspan="4" class="clickable"> - <link type="view" subaction="add"> - <image icon="add"/> + <link type="dialog" subaction="add"> + <image method="add"/> <text text="new"/> </link> </column> diff --git a/modules/cms-ui/themes/default/html/views/model/edit.php b/modules/cms-ui/themes/default/html/views/model/edit.php @@ -2,14 +2,14 @@ - <form name="" target="_self" data-target="view" action="./" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="edit" data-action="model" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="model" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="model" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="edit" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <div class="line"> <div class="label"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NAME')))); ?></span> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="50" class="text" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/modellist/add.php b/modules/cms-ui/themes/default/html/views/modellist/add.php @@ -0,0 +1,17 @@ + + + + + <form name="" target="_self" data-target="view" action="./" data-method="add" data-action="modellist" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="modellist" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="modellist" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="add" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="line"> + <div class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'global_name'.'')))); ?></span> + + </div> + <div class="input"> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + + </div> + </div> + <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + + \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/modellist/show.php b/modules/cms-ui/themes/default/html/views/modellist/show.php @@ -18,9 +18,9 @@ <?php foreach($el as $list_key=>$list_value){ ?><?php extract($list_value) ?> <tr class="data"> <td class="clickable"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/icon_model.png" /> - <a target="_self" date-name="<?php echo $name ?>" name="<?php echo $name ?>" data-type="open" data-action="model" data-method="show" data-id="<?php echo $id ?>" data-extra="[]" href="<?php echo Html::url('model','',$id,array()) ?>"> + <img class="image-icon image-icon--action" title="" src="./modules/cms-ui/themes/default/images/icon/action/model.svg" /> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $name,25,'..',constant('STR_PAD_BOTH') )))); ?></span> </a> @@ -64,8 +64,8 @@ <?php } ?> <tr class="data"> <td colspan="3" class="clickable"> - <a target="_self" data-type="view" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('','add','',array()) ?>"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/add.png" /> + <a target="_self" data-type="dialog" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':null,'dialogMethod':'add'}" href="<?php echo Html::url('','add','',array('dialogAction'=>'','dialogMethod'=>'add')) ?>"> + <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/add.svg" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('new')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/modellist/show.tpl.src.xml b/modules/cms-ui/themes/default/html/views/modellist/show.tpl.src.xml @@ -15,9 +15,9 @@ <list list="el" extract="true"> <row class="data"> <column class="clickable"> - <image file="icon_model"></image> <link type="open" name="var:name" action="model" id="var:id"> + <image action="model"></image> <text var="name" maxlength="25"></text> </link> </column> @@ -54,8 +54,8 @@ </list> <row class="data"> <column colspan="3" class="clickable"> - <link type="view" subaction="add"> - <image icon="add" /> + <link type="dialog" subaction="add"> + <image method="add" /> <text text="new" /> </link> </column> diff --git a/modules/cms-ui/themes/default/html/views/template/edit.php b/modules/cms-ui/themes/default/html/views/template/edit.php @@ -15,11 +15,14 @@ </tr> <?php foreach($elements as $list_key=>$list_value){ ?><?php extract($list_value) ?> <tr class="data"> - <td data-name="<?php echo $name ?>" data-action="element" data-id="<?php echo $id ?>" class="clickable"> - <img class="image-icon image-icon--element" title="" src="./modules/cms-ui/themes/default/images/icon/element/<?php echo $type ?>.svg" /> - - <span class="text" title="<?php echo $description ?>"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - + <td class="clickable"> + <a target="_self" date-name="<?php echo $name ?>" name="<?php echo $name ?>" data-type="open" data-action="element" data-method="edit" data-id="<?php echo $id ?>" data-extra="[]" href="<?php echo Html::url('element','',$id,array()) ?>"> + <img class="image-icon image-icon--element" title="" src="./modules/cms-ui/themes/default/images/icon/element/<?php echo $type ?>.svg" /> + + <span class="text" title="<?php echo $description ?>"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + + </a> + </td> <td> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('EL_'.$type.'')))); ?></span> @@ -27,7 +30,7 @@ </td> </tr> <?php } ?> - <?php $if3=(($el)==FALSE); if($if3){?> + <?php $if3=(($elements)==FALSE); if($if3){?> <tr> <td colspan="2"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'GLOBAL_NOT_FOUND'.'')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/template/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/template/edit.tpl.src.xml @@ -13,16 +13,18 @@ </row> <list list="elements" extract="true"> <row class="data"> - <column id="var:id" name="var:name" action="element"> - <image elementtype="var:type"></image> - <text var="name" title="var:description"></text> + <column class="clickable"> + <link type="open" id="var:id" name="var:name" action="element"> + <image elementtype="var:type"></image> + <text var="name" title="var:description"></text> + </link> </column> <column> <text key="var:type" prefix="EL_"></text> </column> </row> </list> - <if empty="el"> + <if empty="elements"> <row> <column colspan="2"> <text key="GLOBAL_NOT_FOUND"></text> diff --git a/modules/cms-ui/themes/default/html/views/template/remove.php b/modules/cms-ui/themes/default/html/views/template/remove.php @@ -0,0 +1,43 @@ + + + <form name="" target="_self" data-target="view" action="./" data-method="remove" data-action="template" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="template" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="template" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="remove" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><div> + <div class="line"> + <div class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NAME')))); ?></span> + + </div> + <div class="input"> + <span class="name"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + + </div> + </div> + </div></fieldset> + <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('options') ?></legend><div> + <div class="line"> + <div class="label"> + </div> + <div class="input"> + <?php { $tmpname = 'delete';$default = '';$readonly = '';$required = '1'; + if ( isset($$tmpname) ) + $checked = $$tmpname; + else + $checked = $default; + + ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1"<?php if( $checked ) echo ' checked="checked"' ?><?php if( $required ) echo ' required="required"' ?> /><?php + + if ( $readonly && $checked ) + { + ?><input type="hidden" name="<?php echo $tmpname ?>" value="1" /><?php + } + } ?> + + <label for="<?php echo REQUEST_ID ?>_delete" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('CONFIRM_DELETE')))); ?></span> + + </label> + </div> + </div> + </div></fieldset> + <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + + \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/template/remove.tpl.src.xml b/modules/cms-ui/themes/default/html/views/template/remove.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> - <header back="true"></header> <form> <group> <part class="line"> @@ -19,7 +18,7 @@ <part class="label"> </part> <part class="input"> - <checkbox name="delete"></checkbox> + <checkbox name="delete" required="true"></checkbox> <label for="delete"> <text text="CONFIRM_DELETE"></text> </label> diff --git a/modules/cms-ui/themes/default/html/views/templatelist/add.php b/modules/cms-ui/themes/default/html/views/templatelist/add.php @@ -0,0 +1,57 @@ + + + <form name="" target="_self" data-target="view" action="./" data-method="add" data-action="templatelist" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="templatelist" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="templatelist" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="add" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="line"> + <div class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('name')))); ?></span> + + </div> + <div class="input"> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="50" class="text" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + + </div> + </div> + <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('options') ?></legend><div> + <div class="line"> + <div class="label"> + <input class="radio" type="radio" id="<?php echo REQUEST_ID ?>_type_empty" name="type" value="empty"<?php if('empty'==@$type)echo ' checked="checked"' ?> /> + + </div> + <div class="input"> + <label for="<?php echo REQUEST_ID ?>_type_empty" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'empty'.'')))); ?></span> + + </label> + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_type_copy" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'copy'.'')))); ?></span> + + </label> + <input class="radio" type="radio" id="<?php echo REQUEST_ID ?>_type_copy" name="type" value="copy"<?php if('copy'==@$type)echo ' checked="checked"' ?> /> + + </div> + <div class="input"> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_templateid" name="templateid" title="" class=""<?php if (count($templates)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($templates,$templateid,0,0) ?><?php if (count($templates)==0) { ?><input type="hidden" name="templateid" value="" /><?php } ?><?php if (count($templates)==1) { ?><input type="hidden" name="templateid" value="<?php echo array_keys($templates)[0] ?>" /><?php } ?> + </select></div> + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_type_example" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'example'.'')))); ?></span> + + </label> + <input class="radio" type="radio" id="<?php echo REQUEST_ID ?>_type_example" name="type" value="example"<?php if('example'==@$type)echo ' checked="checked"' ?> /> + + </div> + <div class="input"> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_example" name="example" title="" class=""<?php if (count($examples)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($examples,$example,0,0) ?><?php if (count($examples)==0) { ?><input type="hidden" name="example" value="" /><?php } ?><?php if (count($examples)==1) { ?><input type="hidden" name="example" value="<?php echo array_keys($examples)[0] ?>" /><?php } ?> + </select></div> + </div> + </div> + </div></fieldset> + <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + + \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/templatelist/show.php b/modules/cms-ui/themes/default/html/views/templatelist/show.php @@ -9,13 +9,18 @@ </tr> <?php foreach($templates as $list_key=>$list_value){ ?><?php extract($list_value) ?> <tr class="data"> - <td data-name="<?php echo $name ?>" data-action="template" data-id="<?php echo $id ?>" class="clickable"> - <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + <td class="clickable"> + <img class="image-icon image-icon--action" title="" src="./modules/cms-ui/themes/default/images/icon/action/template.svg" /> + <a target="_self" date-name="<?php echo $name ?>" name="<?php echo $name ?>" data-type="open" data-action="template" data-method="show" data-id="<?php echo $id ?>" data-extra="[]" href="<?php echo Html::url('template','',$id,array()) ?>"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + + </a> + </td> </tr> <?php } ?> - <?php $if3=(empty($templates)); if($if3){?> + <?php $if3=(($templates)==FALSE); if($if3){?> <tr> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NO_TEMPLATES_AVAILABLE_DESC')))); ?></span> @@ -23,8 +28,8 @@ <?php } ?> <tr class="data"> <td colspan="1" class="clickable"> - <a target="_self" data-type="view" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('','add','',array()) ?>"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/add.png" /> + <a target="_self" data-type="dialog" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':null,'dialogMethod':'add'}" href="<?php echo Html::url('','add','',array('dialogAction'=>'','dialogMethod'=>'add')) ?>"> + <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/add.svg" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('new')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/templatelist/show.tpl.src.xml b/modules/cms-ui/themes/default/html/views/templatelist/show.tpl.src.xml @@ -8,8 +8,11 @@ </row> <list list="templates" extract="true"> <row class="data"> - <column id="var:id" name="var:name" action="template"> + <column class="clickable"> + <image action="template" /> + <link type="open" id="var:id" name="var:name" action="template"> <text var="name"></text> + </link> </column> </row> </list> @@ -21,8 +24,8 @@ <row class="data"> <column colspan="1" class="clickable"> - <link type="view" subaction="add"> - <image icon="add" /> + <link type="dialog" subaction="add"> + <image method="add" /> <text text="new" /> </link> </column> diff --git a/modules/cms-ui/themes/default/html/views/title/show.php b/modules/cms-ui/themes/default/html/views/title/show.php @@ -29,7 +29,7 @@ <div class="arrow-down"> </div> <div class="dropdown"> - <div class="entry clickable filtered on-action-folder on-action-page on-action-file on-action-projectlist on-action-templatelist on-action-userlist on-action-grouplist"> + <div class="entry clickable filtered on-action-folder on-action-page on-action-file on-action-projectlist on-action-templatelist on-action-userlist on-action-grouplist on-action-languagelist on-action-modellist"> <a title="<?php echo lang('menu_new_desc') ?>" target="_self" data-type="dialog" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':null,'dialogMethod':'add'}" href="<?php echo Html::url('','add','',array('dialogAction'=>'','dialogMethod'=>'add')) ?>"> <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/add.svg" /> diff --git a/modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml b/modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml @@ -30,7 +30,7 @@ <part class="arrow-down"/> <part class="dropdown"> <part - class="entry clickable filtered on-action-folder on-action-page on-action-file on-action-projectlist on-action-templatelist on-action-userlist on-action-grouplist"> + class="entry clickable filtered on-action-folder on-action-page on-action-file on-action-projectlist on-action-templatelist on-action-userlist on-action-grouplist on-action-languagelist on-action-modellist"> <link type="dialog" title="message:menu_new_desc" subaction="add"> <image method="add" align="left"></image> <text key="menu_new"></text> diff --git a/modules/cms-ui/themes/default/html/views/user/edit.php b/modules/cms-ui/themes/default/html/views/user/edit.php @@ -90,13 +90,13 @@ <div class="label"> </div> <div class="input"> - <?php { $tmpname = 'is_admin';$default = '';$readonly = ''; + <?php { $tmpname = 'is_admin';$default = '';$readonly = '';$required = ''; if ( isset($$tmpname) ) $checked = $$tmpname; else $checked = $default; - ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1" <?php if( $checked ) echo 'checked="checked"' ?> /><?php + ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1"<?php if( $checked ) echo ' checked="checked"' ?><?php if( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { @@ -166,13 +166,13 @@ </label> </div> <div class="input"> - <?php { $tmpname = 'totp';$default = '';$readonly = ''; + <?php { $tmpname = 'totp';$default = '';$readonly = '';$required = ''; if ( isset($$tmpname) ) $checked = $$tmpname; else $checked = $default; - ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1" <?php if( $checked ) echo 'checked="checked"' ?> /><?php + ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1"<?php if( $checked ) echo ' checked="checked"' ?><?php if( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { @@ -194,13 +194,13 @@ </label> </div> <div class="input"> - <?php { $tmpname = 'hotp';$default = '';$readonly = ''; + <?php { $tmpname = 'hotp';$default = '';$readonly = '';$required = ''; if ( isset($$tmpname) ) $checked = $$tmpname; else $checked = $default; - ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1" <?php if( $checked ) echo 'checked="checked"' ?> /><?php + ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1"<?php if( $checked ) echo ' checked="checked"' ?><?php if( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { diff --git a/modules/cms-ui/themes/default/production/combined.min.js b/modules/cms-ui/themes/default/production/combined.min.js @@ -284,7 +284,7 @@ else if(t=='external'){window.open($(this).attr('data-url'),' _blank')} else if(t=='popup'){window.open($(this).attr('data-url'),'Popup','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')} else if(t=='help'){help(this,$(this).attr('data-url'),$(this).attr('data-suffix'))} else if(t=='fullscreen'){fullscreen(this)} -else if(t=='open'){openNewAction($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),$(this).attr('data-extra'))} +else if(t=='open'){openNewAction($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),jQuery.parseJSON($(this).attr('data-extra').replace(/'/g,'"')))} else{alert('Fatal: Cannot open link: '+$(this).html())}})})}; /* ./modules/cms-ui/themes/default/script/plugin/jquery-plugin-orTree.min.js */;jQuery.fn.orTree=function(t){var e=$.extend({'onSelect':function(){},'type':'root','id':0,'extraId':Array(),'selectable':Array()},t);$(this).each(function(r,t){$(t).closest('div.content').addClass('loader');var i='./api/?action=tree&subaction=loadBranch&id='+e.id+'&type='+e.type+'&output=json';if(typeof e.extraId==='string'){jQuery.each(jQuery.parseJSON(e.extraId),function(e,t){i=i+'&'+e+'='+t})} else if(typeof e.extraId==='object'){jQuery.each(e.extraId,function(e,t){i=i+'&'+e+'='+t})} @@ -11026,12 +11026,12 @@ else{r=8};setTimeout(function(){$(o).fadeOut('slow').remove()},r*1000)});$.each( /* ./modules//template-engine/components/html/upload/upload.min.js */;$(document).on('orViewLoaded',function(e,n){var t=$(e.target).find('form'),o=$(e.target).find('div.filedropzone > div.input');o.on('dragenter',function(e){e.stopPropagation();e.preventDefault();$(this).css('border','1px dotted gray')});o.on('dragover',function(e){e.stopPropagation();e.preventDefault()});o.on('drop',function(e){$(this).css('border','1px dotted red');e.preventDefault();var n=e.originalEvent.dataTransfer.files;handleFileUpload(t,n)});$(e.target).find('input[type=file]').change(function(){var e=$(this).prop('files');handleFileUpload(t,e)})});function handleFileUpload(e,o){for(var a=0,r;r=o[a];a++){var n=new FormData();n.append('file',r);n.append('action','folder');n.append('subaction','createfile');n.append('output','json');n.append('token',$(e).find('input[name=token]').val());n.append('id',$(e).find('input[name=id]').val());var t=$('<div class="notice info"><div class="text loader"></div></div>');$('#noticebar').prepend(t);$(t).show();$.ajax({'type':'POST',url:'./api/',cache:!1,contentType:!1,processData:!1,data:n,success:function(n,o,a){$(t).remove();doResponse(n,o,e)},error:function(n,o,i){$(e).closest('div.content').removeClass('loader');$(t).remove();var r;try{var a=jQuery.parseJSON(n.responseText);r=a.error+'/'+a.description+': '+a.reason}catch(d){r=n.responseText};notify('error',r)}})}}; /* ./modules//template-engine/components/html/tree/tree.min.js */;$(document).on('orViewLoaded',function(o,n){}); /* ./modules/cms-ui/themes/default/script/openrat.min.js */;var OR_THEMES_EXT_DIR='modules/cms-ui/themes/';$(function(){$('html').removeClass('nojs');$('.initial-hidden').removeClass('initial-hidden');registerHeaderEvents();registerWorkbenchEvents();$('.view').each(function(e){afterViewLoaded(this)});window.onpopstate=function(e){Navigator.navigateTo(e.state)};initActualHistoryState();Workbench.initialize();$('#noticebar .notice').click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});loadTree();$(document).keyup(function(e){if(e.keyCode==27){$('#dialog .view').fadeOut('fast').html('');$('#dialog').removeClass('is-open').addClass('is-closed')}});$('#noticebar .notice').fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});registerOpenClose($('section.toggle-open-close'));$('section.toggle-open-close .on-click-open-close').click(function(){var t=$(this).closest('section');if(t.hasClass('disabled'))return;var e=t.find('div.view-loader');if(e.children().length==0)Workbench.loadNewActionIntoElement(e)})});function initActualHistoryState(){var e={};e.name=window.document.title;var t=new URLSearchParams(window.location.search);if(t.has('action')){e.action=t.get('action');e.id=t.get('id');e.name=window.document.title;e.data={};var t=Array.from(t.entries());for(var i in t){e.data[t[i][0]]=t[i][1]};Navigator.toActualHistory(e);filterMenus(e.action,e.id,e.data)}};var Navigator=new function(){'use strict';this.navigateTo=function(e){Workbench.loadNewActionState(e)};this.navigateToNew=function(e){Workbench.loadNewActionState(e);window.history.pushState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))};this.navigateToNewAction=function(e,t,i,a){var n={action:e,method:t,id:i,data:a};this.navigateToNew(n)};this.toActualHistory=function(e){window.history.replaceState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))}},Workbench=new function(){'use strict';this.initialize=function(){this.initializePingTimer()};this.initializePingTimer=function(){var e=function(){$.ajax(createUrl('title','ping',0))},t=5;window.setInterval(e,t*60*1000)};this.loadNewActionState=function(e){Workbench.loadNewAction(e.action,e.id,e.data)};this.loadNewAction=function(e,t,i){$('#editor').attr('data-action',e);$('#editor').attr('data-id',t);$('#editor').attr('data-extra',JSON.stringify(i));$('#workbench section.closed .view-loader').empty();$('#workbench section.open .view-loader').each(function(e){var t=$(this);Workbench.loadNewActionIntoElement(t)});filterMenus(e,t,i)};this.loadNewActionIntoElement=function(e){var t=$('#editor').attr('data-action'),i=$('#editor').attr('data-id'),a=$('#editor').attr('data-extra'),n=e.data('method');Workbench.loadViewIntoElement(e,t,n,i,a)};this.loadViewIntoElement=function(e,t,i,a,n){var o=createUrl(t,i,a,n,!0);e.empty().fadeTo(1,0.7).addClass('loader').html('').load(o,function(t,i,a){e.fadeTo(350,1);$(e).removeClass('loader');if(i=='error'){$(e).html('');notify('error',t);return};afterViewLoaded(e)})}};function registerWorkbenchEvents(){$('div.header').dblclick(function(){fullscreen(this)});$('div#filler').click(function(){if($('div#dialog').hasClass('modal')){} -else{$('div#dialog').removeClass('is-open').addClass('is-closed');$('div#dialog > .view').html('')}})};function loadView(e,t,i,a,n){Navigator.navigateToNewAction(t,i,a,n)};function afterViewLoaded(e){var t=$(e).closest('section'),i=$(e).children().length>0;t.toggleClass('disabled',!i);$(e).trigger('orViewLoaded');$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('.toggle-nav-open-close').click(function(){$('nav').toggleClass('open')});$(e).find('div.headermenu > a').each(function(e,t){});$(e).find('div.header > a.back').each(function(t,i){$(i).removeClass('button').wrap('<div class="entry perview" />').parent().appendTo($(e).closest('div.panel').find('div.header div.dropdown').first())});$(e).find('div.selector.tree').each(function(){var e=this;$(this).orTree({type:'project',selectable:$(e).attr('data-types').split(','),id:$(e).attr('data-init-folderid'),onSelect:function(t,i,a){var n=$(e).parent();$(n).find('input[type=text]').attr('value',t);$(n).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > .entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,t){var i=t.draggable,a=$(this).parent();startDialog($(this).text(),$(i).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(i).attr('data-type'),'subaction':'copy','id':$(i).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(i).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).parent('div.view').addClass('dirty')})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('#title .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('#title .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('#title div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('#title div.search input').orSearch({dropdown:'#title div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){$('#navigation').html('&nbsp;');$('#navigation').orTree({type:'root',id:0,onSelect:function(e,t,i,a){$('nav').removeClass('open');openNewAction(e,t,i,a)}});$('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click();$('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click()};function submitUrl(e,t){postUrl(t,e)};function postUrl(e,t){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,i,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,i,t)}})};function startDialog(e,t,i,a,n){if(!t)t=$('#editor').attr('data-action');a=$('#editor').attr('data-id');$('div#dialog > .view').html('<div class="header"><img class="icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('div#dialog > .view').data('id',a);$('div#dialog').removeClass('is-closed').addClass('is-open');Workbench.loadViewIntoElement($('div#dialog > .view'),t,i,a,n)};function modalView(e,t){var i=$(e).closest('div.panel').find('li.active').attr('data-action'),a=$(e).closest('div.panel').find('li.active').attr('data-method'),n=$(e).closest('div.panel').find('li.active').attr('data-id');$(e).closest('div.content').modal({'overlayClose':'true','xxxonClose':function(){alert('close)')}});loadView($(e).closest('div.content'),i,a,n)};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,t,i,a){setTitle(e);setNewAction(t,i,a)};function filterMenus(e,t,i){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive');$('div.clickable.filtered a').attr('data-action',e);$('div.clickable.filtered a').attr('data-id',t);$('div.clickable.filtered a').attr('data-extra',JSON.stringify(i))};function setNewAction(e,t,i){Navigator.navigateToNewAction(e,'edit',t,i)};function setNewId(e){};function notifyBrowser(e){if(!('Notification' in window)){return} +else{$('div#dialog').removeClass('is-open').addClass('is-closed');$('div#dialog > .view').html('')}})};function loadView(e,t,i,a,n){Navigator.navigateToNewAction(t,i,a,n)};function afterViewLoaded(e){var t=$(e).closest('section'),i=$(e).children().length>0;t.toggleClass('disabled',!i);$(e).trigger('orViewLoaded');$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('.toggle-nav-open-close').click(function(){$('nav').toggleClass('open')});$(e).find('div.headermenu > a').each(function(e,t){});$(e).find('div.header > a.back').each(function(t,i){$(i).removeClass('button').wrap('<div class="entry perview" />').parent().appendTo($(e).closest('div.panel').find('div.header div.dropdown').first())});$(e).find('div.selector.tree').each(function(){var e=this;$(this).orTree({type:'project',selectable:$(e).attr('data-types').split(','),id:$(e).attr('data-init-folderid'),onSelect:function(t,i,a){var n=$(e).parent();$(n).find('input[type=text]').attr('value',t);$(n).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > .entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,t){var i=t.draggable,a=$(this).parent();startDialog($(this).text(),$(i).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(i).attr('data-type'),'subaction':'copy','id':$(i).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(i).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).parent('div.view').addClass('dirty')});$(e).find('select.theme-chooser').change(function(){setUserStyle(this.value)})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('#title .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('#title .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('#title div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('#title div.search input').orSearch({dropdown:'#title div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){$('#navigation').html('&nbsp;');$('#navigation').orTree({type:'root',id:0,onSelect:function(e,t,i,a){$('nav').removeClass('open');openNewAction(e,t,i,a)}});$('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click();$('#navigation > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click()};function submitUrl(e,t){postUrl(t,e)};function postUrl(e,t){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,i,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,i,t)}})};function startDialog(e,t,i,a,n){if(!t)t=$('#editor').attr('data-action');a=$('#editor').attr('data-id');$('div#dialog > .view').html('<div class="header"><img class="icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('div#dialog > .view').data('id',a);$('div#dialog').removeClass('is-closed').addClass('is-open');Workbench.loadViewIntoElement($('div#dialog > .view'),t,i,a,n)};function modalView(e,t){var i=$(e).closest('div.panel').find('li.active').attr('data-action'),a=$(e).closest('div.panel').find('li.active').attr('data-method'),n=$(e).closest('div.panel').find('li.active').attr('data-id');$(e).closest('div.content').modal({'overlayClose':'true','xxxonClose':function(){alert('close)')}});loadView($(e).closest('div.content'),i,a,n)};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,t,i,a){setTitle(e);setNewAction(t,i,a)};function filterMenus(e,t,i){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive');$('div.clickable.filtered a').attr('data-action',e);$('div.clickable.filtered a').attr('data-id',t);$('div.clickable.filtered a').attr('data-extra',JSON.stringify(i))};function setNewAction(e,t,i){Navigator.navigateToNewAction(e,'edit',t,i)};function setNewId(e){};function notifyBrowser(e){if(!('Notification' in window)){return} else if(Notification.permission==='granted'){var t=new Notification(e)} else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){var i=new Notification(e)}})}};function setUserStyle(e){var t=$('html'),i=t.attr('class').split(/\s+/);$.each(i,function(e,i){if(i.startsWith('theme-')){t.removeClass(i)}});t.addClass('theme-'+e.toLowerCase())};function insert(e,t,i){var a=document.forms[0].elements[e];a.focus();if(typeof document.selection!='undefined'){var c=document.selection.createRange(),n=c.text;c.text=t+n+i;c=document.selection.createRange();if(n.length==0){c.move('character',-i.length)} else{c.moveStart('character',t.length+n.length+i.length)};c.select()} -else if(typeof a.selectionStart!='undefined'){var r=a.selectionStart,d=a.selectionEnd,n=a.value.substring(r,d);a.value=a.value.substr(0,r)+t+n+i+a.value.substr(d);var o;if(n.length==0){o=r+t.length} +else if(typeof a.selectionStart!='undefined'){var r=a.selectionStart,l=a.selectionEnd,n=a.value.substring(r,l);a.value=a.value.substr(0,r)+t+n+i+a.value.substr(l);var o;if(n.length==0){o=r+t.length} else{o=r+t.length+n.length+i.length};a.selectionStart=o;a.selectionEnd=o} -else{o=a.value.length;var n=prompt('Text');a.value=a.value.substr(0,o)+t+n+i+a.value.substr(o)}};function createUrl(e,t,i,a,o){var n='./';n+='?action='+e;if(t!=null)n+='&subaction='+t;n+='&id='+i;if(o)n+='&embed=1';if(typeof a==='string'){a=a.replace(/'/g,'"');jQuery.each(jQuery.parseJSON(a),function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} +else{o=a.value.length;var n=prompt('Text');a.value=a.value.substr(0,o)+t+n+i+a.value.substr(o)}};function createUrl(e,t,i,a,o){var n='./';n+='?action='+e;if(t!=null)n+='&subaction='+t;n+='&id='+i;if(o)n+='&embed=1';if(typeof a==='string'){a=a.replace(/'/g,'"');var c=jQuery.parseJSON(a);jQuery.each(c,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} else if(typeof a==='object'){jQuery.each(a,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} else{};return n};function resizeWorkbenchContainer(e){};function resizeWorkbench(){};function resizeTabs(e){};function help(e,t,i){var a=$(e).closest('div.panel').find('li.action.active').attr('data-action'),n=$(e).closest('div.panel').find('li.action.active').attr('data-method');window.open(t+a+'/'+n+i,'OpenRat_Help','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')};function notify(e,t){var i=$('<div class="notice '+e+'"><div class="text">'+t+'</div></div>');$('#noticebar').prepend(i);$(i).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})})};function registerOpenClose(e){$(e).children('.on-click-open-close').click(function(){$(this).closest('.toggle-open-close').toggleClass('open closed')})}; \ No newline at end of file diff --git a/modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.js b/modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.js @@ -65,7 +65,7 @@ jQuery.fn.orLinkify = function() else if ( type == 'open' ) { - openNewAction( $(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),jQuery.parseJSON($(this).attr('data-extra'))); + openNewAction( $(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),jQuery.parseJSON($(this).attr('data-extra').replace(/'/g,'"'))); } else { diff --git a/modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.min.js b/modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.min.js @@ -7,5 +7,5 @@ else if(t=='external'){window.open($(this).attr('data-url'),' _blank')} else if(t=='popup'){window.open($(this).attr('data-url'),'Popup','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')} else if(t=='help'){help(this,$(this).attr('data-url'),$(this).attr('data-suffix'))} else if(t=='fullscreen'){fullscreen(this)} -else if(t=='open'){openNewAction($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),jQuery.parseJSON($(this).attr('data-extra')))} +else if(t=='open'){openNewAction($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),jQuery.parseJSON($(this).attr('data-extra').replace(/'/g,'"')))} else{alert('Fatal: Cannot open link: '+$(this).html())}})})}; \ No newline at end of file