Permalink
Browse files

обновил скин. добавли кнопки быстрого перехода - на открыть / просмот…

…р/ права
  • Loading branch information...
esclkm committed Nov 10, 2015
1 parent 05c3e18 commit 7db1272343e1615db5970235c9d0ef68e83dc1b9
Showing with 272 additions and 92 deletions.
  1. +5 −1 inc/cateditor.structure.php
  2. +1 −1 lib/cateditor.js
  3. +215 −52 lib/jquery.nestable.css
  4. +15 −9 tpl/cateditor.admin.editor.tpl
  5. +17 −21 tpl/cateditor.admin.list.tpl
  6. +19 −8 tpl/cateditor.tree.tpl
@@ -65,7 +65,7 @@ private function last_exist_parent($path)
{
return $this->nav[$mt_curr[1]];
}
return last_exist_parent($mt_curr[1]);
return $this->last_exist_parent($mt_curr[1]);
}
public function get_parent($category)
{
@@ -106,9 +106,11 @@ public function nextpath($parent = null)
public function build_tree($parent = null, $depth = 0, $tpl = 'cateditor.tree' , $selectedid = null)
{
$array = array();
$array = (empty($parent)) ? $this->childs_null : $this->childs[$parent];
$is_module =cot_module_active($this->area);
if(!empty($parent))
{
// cot_print($parent, );
@@ -126,6 +128,8 @@ public function build_tree($parent = null, $depth = 0, $tpl = 'cateditor.tree' ,
$t->assign(array(
'ADMIN_STRUCTURE_EDIT_URL' => cot_url('admin', 'm=other&p=cateditor&n='.$this->area.'&id='.$row['structure_id']),
'ADMIN_STRUCTURE_AJAX_EDIT_URL' => cot_url('index', 'r=cateditor&n='.$this->area.'&id='.$row['structure_id']),
'ADMIN_STRUCTURE_RIGHTS_URL' => $is_module ? cot_url('admin', 'm=rightsbyitem&ic='.$this->area.'&io='.$row['structure_code']) : '',
'ADMIN_STRUCTURE_OPEN_URL' => cot_url($n, 'c='.$row['structure_code']),
'ADMIN_STRUCTURE_ID' => $row['structure_id'],
'ADMIN_STRUCTURE_CODE' => $row['structure_code'],
'ADMIN_STRUCTURE_TITLE' => $row['structure_title'],
View
@@ -56,7 +56,7 @@ $(document).on('click', '.alert .close', function(e) {
$(this).parent().hide();
});
$(document).on('click', '.dd-item a', function(e) {
$(document).on('click', '.dd-item>a', function(e) {
var href = $(this).data('ajaxhref');
console.log(href);
$.get( href, function( data ) {
View
@@ -2,82 +2,245 @@
* Nestable
*/
.dd { position: relative; display: block; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 20px; }
.dd-list { display: block; position: relative; margin: 0; padding: 0; list-style: none; }
.dd-list .dd-list { padding-left: 30px; }
.dd-collapsed .dd-list { display: none; }
.dd {
position: relative;
display: block;
margin: 0;
padding: 0;
list-style: none;
font-size: 13px;
line-height: 20px;
}
.dd-list {
display: block;
position: relative;
margin: 0;
padding: 0;
list-style: none;
}
.dd-list .dd-list {
padding-left: 30px;
}
.dd-collapsed .dd-list {
display: none;
}
.dd-item,
.dd-empty,
.dd-placeholder { display: block; position: relative; margin: 0; padding: 0; min-height: 20px; font-size: 13px; line-height: 20px; }
.dd-handle { display: block; height: 30px; margin: 5px 0; padding: 5px 10px; color: #333; text-decoration: none; font-weight: bold; border: 1px solid #ccc;
.dd-placeholder {
display: block;
position: relative;
margin: 0;
padding: 0;
min-height: 20px;
font-size: 13px;
line-height: 20px;
}
.dd-handle {
display: block;
height: 36px;
margin: 5px 0;
padding: 7px 10px;
color: #333;
text-decoration: none;
font-weight: bold;
border: 1px solid #ccc;
background: #fafafa;
box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd-handle:hover {
color: #2ea8e5;
background: #fff;
}
.dd-item > button {
font-family: 'Glyphicons Halflings';
display: block;
position: relative;
cursor: pointer;
float: left;
width: 25px;
height: 36px;
margin: 0px 5px 0px 0;
padding: 7px 0;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
border: 0;
background: transparent;
font-size: 12px;
line-height: 1;
text-align: center;
/* font-weight: bold;*/
}
.dd-item > button:hover {
background: #ddd;
}
.dd-item > button:before {
content: "\e080";
display: block;
position: absolute;
width: 100%;
text-align: center;
text-indent: 0;
}
.dd-item > button[data-action="collapse"]:before {
content: "\e114";
}
.dd-handle:hover { color: #2ea8e5; background: #fff; }
.dd-item > button { display: block; position: relative; cursor: pointer; float: left; width: 25px; height: 20px; margin: 5px 0; padding: 0; text-indent: 100%; white-space: nowrap; overflow: hidden; border: 0; background: transparent; font-size: 12px; line-height: 1; text-align: center; font-weight: bold; }
.dd-item > button:before { content: '+'; display: block; position: absolute; width: 100%; text-align: center; text-indent: 0; }
.dd-item > button[data-action="collapse"]:before { content: '-'; }
.dd-placeholder,
.dd-empty { margin: 5px 0; padding: 0; min-height: 30px; background: #f2fbff; border: 1px dashed #b6bcbf; box-sizing: border-box; -moz-box-sizing: border-box; }
.dd-empty { border: 1px dashed #bbb; min-height: 100px; background-color: #e5e5e5;
.dd-empty {
margin: 5px 0;
padding: 0;
min-height: 30px;
background: #f2fbff;
border: 1px dashed #b6bcbf;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd-empty {
border: 1px dashed #bbb;
min-height: 100px;
background-color: #e5e5e5;
background-size: 60px 60px;
background-position: 0 0, 30px 30px;
}
.dd-dragel { position: absolute; pointer-events: none; z-index: 9999; }
.dd-dragel > .dd-item .dd-handle { margin-top: 0; }
.dd-dragel .dd-handle {
box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1);
.dd-dragel {
position: absolute;
pointer-events: none;
z-index: 9999;
}
.dd-dragel > .dd-item .dd-handle {
margin-top: 0;
}
.dd-dragel {
background: #fff;
box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
}
/**
* Nestable Extras
*/
.nestable-lists { display: block; clear: both; padding: 30px 0; width: 100%; border: 0; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; }
#nestable-menu { padding: 0; margin: 20px 0; }
.nestable-lists {
display: block;
clear: both;
padding: 30px 0;
width: 100%;
border: 0;
border-top: 2px solid #ddd;
border-bottom: 2px solid #ddd;
}
#nestable-menu {
padding: 0;
margin: 20px 0;
}
#nestable-output,
#nestable2-output { width: 100%; height: 7em; font-size: 0.75em; line-height: 1.333333em; font-family: Consolas, monospace; padding: 5px; box-sizing: border-box; -moz-box-sizing: border-box; }
#nestable2-output {
width: 100%;
height: 7em;
font-size: 0.75em;
line-height: 1.333333em;
font-family: Consolas, monospace;
padding: 5px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
#nestable2 .dd-handle {
color: #fff;
border: 1px solid #999;
background: #bbb;
}
#nestable2 .dd-handle:hover { background: #bbb; }
#nestable2 .dd-item > button:before { color: #fff; }
.dd-hover > .dd-handle { background: #2ea8e5 !important; }
#nestable2 .dd-handle:hover {
background: #bbb;
}
#nestable2 .dd-item > button:before {
color: #fff;
}
.dd-hover > .dd-handle {
background: #2ea8e5 !important;
}
/**
* Nestable Draggable Handles
*/
.dd3-content { display: block; height: 30px; margin: 5px 0; padding: 5px 10px 5px 40px; color: #333; text-decoration: none; font-weight: bold; border: 1px solid #ccc;
background: #fafafa;
box-sizing: border-box; -moz-box-sizing: border-box;
//.dd3-item {border: 1px solid #aaa;}
.dd3-content {
display: block;
height: 36px;
margin: 0px 0;
padding: 8px 10px 8px 40px;
color: #333;
text-decoration: none;
font-weight: bold;
background: #fff;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.dd3-content a { overflow: hidden;
text-overflow: ellipsis;
.dd3-content a {
overflow: hidden;
text-overflow: ellipsis;
}
.dd3-content:hover { color: #2ea8e5; background: #fff; }
.dd-dragel > .dd3-item > .dd3-content { margin: 0; }
.dd3-item > button { margin-left: 30px; }
.dd3-handle { position: absolute; margin: 0; left: 0; top: 0; cursor: pointer; width: 30px; text-indent: 100%; white-space: nowrap; overflow: hidden;
border: 1px solid #aaa;
.dd3-content:hover {
background: transparent;
}
.dd-dragel > .dd3-item > .dd3-content {
margin: 0;
}
.dd3-item+ul,
.dd3-item+li {
margin-top: 5px;
}
.dd3-item > button {
margin-left: 30px;
}
.dd3-handle {
position: absolute;
margin: 0;
left: 0;
top: 0;
cursor: pointer;
width: 30px;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
border: none;
background: transparent;
}
.dd3-handle:before {
content: '';
display: block;
position: absolute;
left: 0;
top: 0px;
bottom: 0;
padding-top: 8px;
width: 100%;
text-align: center;
text-indent: 0;
font-size: 20px;
font-weight: normal;
color: #000;
}
.dd3-handle:hover {
background: #ddd;
color: #000;
}
.dd-handle:hover + .dd3-content,
.dd3-content:hover,
.dd-item button:hover + .dd-handle + .dd3-content,
.dd-item button:hover + button + .dd-handle + .dd3-content {
background: #f5f5f5;
}
.dd3-handle:before { content: ''; display: block; position: absolute; left: 0; top: 3px; width: 100%; text-align: center; text-indent: 0; color: #fff; font-size: 20px; font-weight: normal; }
.dd3-handle:hover { background: #ddd; }
.dd3-content .pull-right {display: none;}
.dd-handle:hover + .dd3-content .pull-right,
.dd3-content:hover .pull-right,
.dd-item button:hover + .dd-handle + .dd3-content .pull-right,
.dd-item button:hover + button + .dd-handle + .dd3-content .pull-right{
display: block; position:absolute;right:0; top:0; height: 36px;
padding-top: 8px; padding-left: 8px; padding-right: 8px;
text-align: right;
background: #f5f5f5;
width:90px;
}
.dd3-content>a {display: inherit; overflow: hidden;word-wrap: normal; white-space: nowrap;}
@@ -6,20 +6,26 @@
</div>
<div class="row">
<div class="col-md-5">
<div>
<a href="{NEWCATEGORY_URL}" class="btn btn-success" id="newcategory">{PHP.L.new_category}</a>
<div class="pull-right">
<div class="panel panel-default">
<div class="panel-body panel-nopadding">
<a href="{NEWCATEGORY_URL}" class="btn btn-success btn-block" id="newcategory">{PHP.L.new_category}</a>
{TREE}
</div>
<div class="panel-footer">
<a class="btn btn-default" id="catsaveorder" href="#">{PHP.L.Save_order}</a>
<a class="btn btn-default" id="catresync" href="{RESYNC_URL}">{PHP.L.Resync}</a>
<a class="btn btn-default" id="catresync" href="{RESYNC_URL}">{PHP.L.Resync}</a>
</div>
</div>
<hr/>
{TREE}
</div>
</div>
<div class="col-md-7 fixheader-md">
<div id="objeditor">
{EDITOR}
<div class="panel panel-default">
<div class="panel-body">
<div id="objeditor">
{EDITOR}
</div>
</div>
</div>
</div>
</div>
Oops, something went wrong.

0 comments on commit 7db1272

Please sign in to comment.