aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-08-05 13:20:03 +0200
committerMario Vavti <mario@mariovavti.com>2016-08-05 13:20:03 +0200
commitbed0a5773fe2300979969b46ef633f28ab84bf43 (patch)
tree08052e59515bfdd70dac6693da3dc78debd7fe77 /view
parent53a2262fef2c1e6208a301a15c0e0c9a024b2b42 (diff)
downloadvolse-hubzilla-bed0a5773fe2300979969b46ef633f28ab84bf43.tar.gz
volse-hubzilla-bed0a5773fe2300979969b46ef633f28ab84bf43.tar.bz2
volse-hubzilla-bed0a5773fe2300979969b46ef633f28ab84bf43.zip
multi acl: port /rpost
Diffstat (limited to 'view')
-rw-r--r--view/js/acl.js6
-rw-r--r--view/js/mod_cloud.js14
-rw-r--r--view/tpl/chatrooms.tpl2
-rwxr-xr-xview/tpl/jot.tpl2
-rw-r--r--view/tpl/webpagelist.tpl2
-rw-r--r--view/tpl/wiki.tpl2
6 files changed, 13 insertions, 15 deletions
diff --git a/view/js/acl.js b/view/js/acl.js
index 9b08571ae..9b9f0eba3 100644
--- a/view/js/acl.js
+++ b/view/js/acl.js
@@ -53,8 +53,6 @@ function ACL(backend_url) {
$(document).on('click','.acl-button-show',that.on_button_show);
$(document).on('click','.acl-button-hide',that.on_button_hide);
- $(document).on('click','.acl-button-hide',that.on_button_hide);
-
$("#acl-search").keypress(that.on_search);
/* startup! */
@@ -64,7 +62,7 @@ function ACL(backend_url) {
}
-ACL.prototype.get_form_data = function(event) {
+ACL.prototype.get_form_data = function(event, form_id) {
form_id = $(this).data('form_id');
@@ -401,5 +399,5 @@ ACL.prototype.populate = function(data) {
$(el).attr('src', $(el).data("src"));
$(el).removeAttr("data-src");
});
- that.update_view();
+ //that.update_view();
};
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js
index e56ec2a81..5b3c78bed 100644
--- a/view/js/mod_cloud.js
+++ b/view/js/mod_cloud.js
@@ -100,13 +100,13 @@ function prepareHtml(f, i) {
}
function formatSizeUnits(bytes){
- if (bytes>=1000000000) {bytes=(bytes/1000000000).toFixed(2)+' GB';}
- else if (bytes>=1000000) {bytes=(bytes/1000000).toFixed(2)+' MB';}
- else if (bytes>=1000) {bytes=(bytes/1000).toFixed(2)+' KB';}
- else if (bytes>1) {bytes=bytes+' bytes';}
- else if (bytes==1) {bytes=bytes+' byte';}
- else {bytes='0 byte';}
- return bytes;
+ if (bytes>=1000000000) {bytes=(bytes/1000000000).toFixed(2)+' GB';}
+ else if (bytes>=1000000) {bytes=(bytes/1000000).toFixed(2)+' MB';}
+ else if (bytes>=1000) {bytes=(bytes/1000).toFixed(2)+' KB';}
+ else if (bytes>1) {bytes=bytes+' bytes';}
+ else if (bytes==1) {bytes=bytes+' byte';}
+ else {bytes='0 byte';}
+ return bytes;
}
// this is basically a js port of include/text.php getIconFromType() function
diff --git a/view/tpl/chatrooms.tpl b/view/tpl/chatrooms.tpl
index 04ebbcae4..64f6e8d0f 100644
--- a/view/tpl/chatrooms.tpl
+++ b/view/tpl/chatrooms.tpl
@@ -1,7 +1,7 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
{{if $is_owner}}
- <button type="button" class="btn btn-success btn-xs pull-right" onclick="openClose('chatroom-new');"><i class="fa fa-plus-circle"></i>&nbsp;{{$newroom}}</button>
+ <button type="button" class="btn btn-success btn-xs pull-right acl-form-trigger" onclick="openClose('chatroom-new');" data-form_id="chatroom-new-form"><i class="fa fa-plus-circle"></i>&nbsp;{{$newroom}}</button>
{{/if}}
<h2>{{$header}}</h2>
</div>
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index 661954623..a91c81ea9 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -165,7 +165,7 @@
</button>
{{/if}}
{{if $showacl}}
- <button id="dbtn-acl" class="acl-select btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" type="button">
+ <button id="dbtn-acl" class="acl-select btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" type="button" data-form_id="profile-jot-form">
<i id="jot-perms-icon" class="fa fa-{{$lockstate}} jot-icons"></i>{{if $bang}}&nbsp;<i class="fa fa-exclamation jot-icons"></i>{{/if}}
</button>
{{/if}}
diff --git a/view/tpl/webpagelist.tpl b/view/tpl/webpagelist.tpl
index 524460408..4dec7518f 100644
--- a/view/tpl/webpagelist.tpl
+++ b/view/tpl/webpagelist.tpl
@@ -2,7 +2,7 @@
<div class="section-title-wrapper">
{{if $editor}}
<div class="pull-right">
- <button id="webpage-create-btn" class="btn btn-xs btn-success" onclick="openClose('webpage-editor');"><i class="fa fa-pencil-square-o"></i>&nbsp;{{$create}}</button>
+ <button id="webpage-create-btn" class="btn btn-xs btn-success acl-form-trigger" onclick="openClose('webpage-editor');" data-form_id="profile-jot-form"><i class="fa fa-pencil-square-o"></i>&nbsp;{{$create}}</button>
</div>
{{/if}}
<h2>{{$listtitle}}</h2>
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index c346bed60..c05b33a61 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -15,7 +15,7 @@
<div class="section-title-wrapper">
<div class="pull-right">
{{if $showNewWikiButton}}
- <button class="btn btn-primary btn-xs" onclick="$('#new-page-form-wrapper').hide(); openClose('new-wiki-form-wrapper');">New Wiki</button>
+ <button class="btn btn-primary btn-xs acl-form-trigger" onclick="$('#new-page-form-wrapper').hide(); openClose('new-wiki-form-wrapper');" data-form_id="new-wiki-form">New Wiki</button>
{{/if}}
{{if $showNewPageButton}}
<button class="btn btn-success btn-xs" onclick="$('#new-wiki-form-wrapper').hide(); openClose('new-page-form-wrapper');">New Page</button>