aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-04-21 22:45:54 +0200
committerMario Vavti <mario@mariovavti.com>2015-04-21 22:45:54 +0200
commit21704ecb93e293f39d0228ae0d9765f37af8d99e (patch)
treeba934e990f9c26a15ddbe1b9aa0a298323cb1ffc /view
parent0bd9fe0b11013423a17ebaabb22482bee38d8f0f (diff)
downloadvolse-hubzilla-21704ecb93e293f39d0228ae0d9765f37af8d99e.tar.gz
volse-hubzilla-21704ecb93e293f39d0228ae0d9765f37af8d99e.tar.bz2
volse-hubzilla-21704ecb93e293f39d0228ae0d9765f37af8d99e.zip
bring lockview to menu items, slightly change the way /lockview is called
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js4
-rwxr-xr-xview/tpl/conv_item.tpl2
-rwxr-xr-xview/tpl/conv_list.tpl2
-rw-r--r--view/tpl/mitemedit.tpl23
-rw-r--r--view/tpl/mitemlist.tpl6
-rwxr-xr-xview/tpl/photo_view.tpl2
-rwxr-xr-xview/tpl/search_item.tpl2
7 files changed, 20 insertions, 21 deletions
diff --git a/view/js/main.js b/view/js/main.js
index d7777ea8c..d1e61dc24 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -884,8 +884,8 @@ function getPosition(e) {
return cursor;
}
-function lockview(event, id) {
- $.get('lockview/' + id, function(data) {
+function lockview(type, id) {
+ $.get('lockview/' + type + '/' + id, function(data) {
$('#panel-' + id).html(data);
});
}
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index facda251b..e0acc25ae 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -21,7 +21,7 @@
{{/if}}
{{if $item.lock}}
<div class="wall-item-lock dropdown">
- <i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" title="{{$item.lock}}" onclick="lockview(event,{{$item.id}});" ></i><ul id="panel-{{$item.id}}" class="lockview-panel dropdown-menu"></ul>&nbsp;
+ <i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i><ul id="panel-{{$item.id}}" class="lockview-panel dropdown-menu"></ul>&nbsp;
</div>
{{/if}}
<div class="wall-item-author">
diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl
index c737c29ef..85425b4e2 100755
--- a/view/tpl/conv_list.tpl
+++ b/view/tpl/conv_list.tpl
@@ -21,7 +21,7 @@
{{/if}}
{{if $item.lock}}
<div class="wall-item-lock dropdown">
- <i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" title="{{$item.lock}}" onclick="lockview(event,{{$item.id}});" ></i><ul id="panel-{{$item.id}}" class="lockview-panel dropdown-menu"></ul>&nbsp;
+ <i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i><ul id="panel-{{$item.id}}" class="lockview-panel dropdown-menu"></ul>&nbsp;
</div>
{{/if}}
<div class="wall-item-author">
diff --git a/view/tpl/mitemedit.tpl b/view/tpl/mitemedit.tpl
index 5fb8f0a9e..3200766ca 100644
--- a/view/tpl/mitemedit.tpl
+++ b/view/tpl/mitemedit.tpl
@@ -5,29 +5,26 @@
{{/if}}
<div id="menu-element-creator" class="section-content-tools-wrapper" style="display: {{$display}};">
<form id="mitemedit" action="mitem/{{$menu_id}}{{if $mitem_id}}/{{$mitem_id}}{{/if}}" method="post" >
-
<input type="hidden" name="menu_id" value="{{$menu_id}}" />
-
{{if $mitem_id}}
<input type="hidden" name="mitem_id" value="{{$mitem_id}}" />
{{/if}}
-
{{include file="field_input.tpl" field=$mitem_desc}}
{{include file="field_input.tpl" field=$mitem_link}}
{{include file="field_input.tpl" field=$mitem_order}}
{{include file="field_checkbox.tpl" field=$usezid}}
{{include file="field_checkbox.tpl" field=$newwin}}
-
- <div id="settings-default-perms" class="settings-default-perms form-group">
- <button class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" onclick="return false;">{{$permissions}}</button>
+ <div class="pull-right btn-group form-group">
+ <div class="btn-group">
+ <button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;">
+ <i id="jot-perms-icon" class="icon-{{$lockstate}}"></i>
+ </button>
+ {{if $submit_more}}
+ <button class="btn btn-primary btn-sm" type="submit" name="submit-more" value="{{$submit_more}}">{{$submit_more}}&nbsp;<i id="jot-perms-icon" class="icon-caret-right"></i></button>
+ {{/if}}
+ <button class="btn btn-primary btn-sm" type="submit" name="submit" value="{{$submit}}">{{$submit}}</button>
+ </div>
{{$aclselect}}
</div>
- <div class="mitemedit-submit-wrapper" >
- {{if $submit_more}}
- <input type="submit" name="submit-more" class="mitemedit-submit" value="{{$submit_more}}" />
- {{/if}}
- <input type="submit" name="submit" class="mitemedit-submit" value="{{$submit}}" />
- </div>
-
</form>
</div>
diff --git a/view/tpl/mitemlist.tpl b/view/tpl/mitemlist.tpl
index 68dd225ee..983776fa3 100644
--- a/view/tpl/mitemlist.tpl
+++ b/view/tpl/mitemlist.tpl
@@ -13,14 +13,16 @@
<table id="mitem-list-table">
<tr>
<th width="1%">{{$nametitle}}</th>
- <th width="97%">{{$targettitle}}</th>
+ <th width="96%">{{$targettitle}}</th>
+ <th width="1%"></th>
<th width="1%"></th>
<th width="1%"></th>
</tr>
{{foreach $mlist as $m }}
<tr id="mitem-list-item-{{$m.mitem_id}}">
<td width="1%">{{$m.mitem_desc}}</td>
- <td width="97%"><a href="{{$m.mitem_link}}">{{$m.mitem_link}}</a></td>
+ <td width="96%"><a href="{{$m.mitem_link}}">{{$m.mitem_link}}</a></td>
+ <td width="1%" class="dropdown">{{if $m.allow_cid || $m.allow_gid || $m.deny_cid || $m.deny_gid}}<i class="icon-lock dropdown-toggle lockview" data-toggle="dropdown" onclick="lockview('menu_item',{{$m.mitem_id}});" ></i><ul id="panel-{{$m.mitem_id}}" class="lockview-panel dropdown-menu"></ul>{{/if}}</td>
<td width="1%" class="mitem-list-tool"><a href="mitem/{{$menu_id}}/{{$m.mitem_id}}" title="{{$hintedit}}"><i class="icon-pencil"></i></a></td>
<td width="1%" class="mitem-list-tool"><a href="#" title="{{$hintdrop}}" onclick="dropItem('mitem/{{$menu_id}}/{{$m.mitem_id}}/drop', '#mitem-list-item-{{$m.mitem_id}}, #pmenu-item-{{$m.mitem_id}}'); return false;"><i class="icon-trash drop-icons"></i></a></td>
</tr>
diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl
index 52ef161ba..49181b018 100755
--- a/view/tpl/photo_view.tpl
+++ b/view/tpl/photo_view.tpl
@@ -18,7 +18,7 @@
<i class="icon-pencil btn btn-default btn-xs" title="{{$edit.edit}}" onclick="openClose('photo-edit');"></i>
{{/if}}
{{if $lock}}
- <i id="lockview" class="icon-lock btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" title="{{$lock}}" onclick="lockview(event,{{$id}});" ></i><ul id="panel-{{$id}}" class="lockview-panel dropdown-menu"></ul>
+ <i id="lockview" class="icon-lock btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" title="{{$lock}}" onclick="lockview('item',{{$id}});" ></i><ul id="panel-{{$id}}" class="lockview-panel dropdown-menu"></ul>
{{/if}}
</div>
<div class="btn-group btn-group">
diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl
index 014cf4192..d5a608c82 100755
--- a/view/tpl/search_item.tpl
+++ b/view/tpl/search_item.tpl
@@ -13,7 +13,7 @@
{{/if}}
{{if $item.lock}}
<div class="wall-item-lock dropdown">
- <i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" title="{{$item.lock}}" onclick="lockview(event,{{$item.id}});" ></i><ul id="panel-{{$item.id}}" class="lockview-panel dropdown-menu"></ul>&nbsp;
+ <i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" title="{{$item.lock}}" onclick="lockview('item',{{$item.id}});" ></i><ul id="panel-{{$item.id}}" class="lockview-panel dropdown-menu"></ul>&nbsp;
</div>
{{/if}}
<div class="wall-item-author">