openrat-cms

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

commit a889e595ebff881fdca386afa30a975ef499ba02
parent 4456ccb2d1e4e6fb60e889df11140008988bf7bd
Author: Jan Dankert <devnull@localhost>
Date:   Mon, 10 Sep 2018 23:13:47 +0200

Projekte/Benutzer/Gruppen können neu angelegt und in der Liste kann ein Einzelobjekt aufgerufen werden (oder in neuem Tab geöffnet werden).

Diffstat:
modules/cms-ui/themes/default/html/views/grouplist/show.tpl.src.xml | 9++++++---
modules/cms-ui/themes/default/html/views/projectlist/add.php | 4++--
modules/cms-ui/themes/default/html/views/projectlist/add.tpl.src.xml | 2+-
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/userlist/add.php | 2+-
modules/cms-ui/themes/default/html/views/userlist/show.php | 13++++++++-----
modules/cms-ui/themes/default/html/views/userlist/show.tpl.src.xml | 9++++++---
modules/cms-ui/themes/default/script/openrat.js | 3++-
modules/cms-ui/themes/default/script/openrat.min.js | 2+-
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+-
12 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/modules/cms-ui/themes/default/html/views/grouplist/show.tpl.src.xml b/modules/cms-ui/themes/default/html/views/grouplist/show.tpl.src.xml @@ -9,9 +9,12 @@ </row> <list list="el" extract="true"> <row class="data"> - <column id="var:id" name="var:name" action="group">> - <image file="icon_group"></image> - <text var="name"></text> + <column id="var:id" name="var:name" action="group" class="clickable"> + <link type="open" id="var:id" name="var:name" action="group"> + <image action="group"></image> + <text var="name" maxlength="30"></text> + </link> + </column> </row> </list> diff --git a/modules/cms-ui/themes/default/html/views/projectlist/add.php b/modules/cms-ui/themes/default/html/views/projectlist/add.php @@ -7,7 +7,7 @@ </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="128" class="focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -30,7 +30,7 @@ <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'copy'.'')))); ?></span> </label> - <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_projectid" name="projectid" title="" class=""<?php if (count($projects)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($projects,$projectid,0,0) ?><?php if (count($projects)==0) { ?><input type="hidden" name="projectid" value="" /><?php } ?><?php if (count($projects)==1) { ?><input type="hidden" name="projectid" value="<?php echo array_keys($projects)[0] ?>" /><?php } ?> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_projectid" name="projectid" title="" class=""<?php if (count($projects)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($projects,'',0,0) ?><?php if (count($projects)==0) { ?><input type="hidden" name="projectid" value="" /><?php } ?><?php if (count($projects)==1) { ?><input type="hidden" name="projectid" value="<?php echo array_keys($projects)[0] ?>" /><?php } ?> </select></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/projectlist/add.tpl.src.xml b/modules/cms-ui/themes/default/html/views/projectlist/add.tpl.src.xml @@ -24,7 +24,7 @@ <label for="type_copy"> <text key="copy"></text> </label> - <selectbox name="projectid" list="projects"></selectbox> + <selectbox name="projectid" list="projects" default=""></selectbox> </part> </part> </group> 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"> + <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"> <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"> + 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"> <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/userlist/add.php b/modules/cms-ui/themes/default/html/views/userlist/add.php @@ -7,7 +7,7 @@ </label> </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="128" class="focus" 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/userlist/show.php b/modules/cms-ui/themes/default/html/views/userlist/show.php @@ -21,11 +21,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="user" data-id="<?php echo $id ?>" class="clickable"> - <img class="" title="" src="./modules/cms-ui/themes/default/images/icon_user.png" /> - - <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> - + <td data-name="<?php echo $name ?>" data-action="user" 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="user" data-method="show" data-id="<?php echo $id ?>" data-extra="[]" href="<?php echo Html::url('user','',$id,array()) ?>"> + <img class="image-icon image-icon--action" title="" src="./modules/cms-ui/themes/default/images/icon/action/user.svg" /> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + + </a> + </td> <td data-name="<?php echo $name ?>" data-action="user" data-id="<?php echo $id ?>" class="clickable"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities($fullname))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/userlist/show.tpl.src.xml b/modules/cms-ui/themes/default/html/views/userlist/show.tpl.src.xml @@ -16,9 +16,12 @@ </row> <list list="el" extract="true"> <row class="data"> - <column id="var:id" name="var:name" action="user"> - <image type="user"></image> - <text var="name"></text> + <column id="var:id" name="var:name" action="user" class="clickable"> + <link type="open" id="var:id" name="var:name" action="user"> + <image action="user"></image> + <text var="name"></text> + </link> + </column> <column id="var:id" name="var:name" action="user"> <text value="var:fullname"></text> diff --git a/modules/cms-ui/themes/default/script/openrat.js b/modules/cms-ui/themes/default/script/openrat.js @@ -746,7 +746,8 @@ function createUrl(action,subaction,id,extraid,embed) if ( typeof extraid === 'string') { extraid = extraid.replace(/'/g,'"'); // Replace ' with ". - jQuery.each(jQuery.parseJSON(extraid), function(name, value) { + var extraObject = jQuery.parseJSON(extraid); + jQuery.each(extraObject, function(name, value) { if(name=='action'||name=='subaction'||name=='id') return; url = url + '&' + name + '=' + value; diff --git a/modules/cms-ui/themes/default/script/openrat.min.js b/modules/cms-ui/themes/default/script/openrat.min.js @@ -5,6 +5,6 @@ else if(Notification.permission!=='denied'){Notification.requestPermission(funct else{c.moveStart('character',t.length+n.length+i.length)};c.select()} 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'),$(this).attr('data-extra')); + openNewAction( $(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),jQuery.parseJSON($(this).attr('data-extra'))); } 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'),$(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')))} else{alert('Fatal: Cannot open link: '+$(this).html())}})})}; \ No newline at end of file