diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 749ca75eb..6ce4c3f9b 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -230,15 +230,21 @@ function populate_acl($defaults = null,$unused = false) { array_walk($deny_gid,'fixacl'); } + $jotnets = ''; + call_hooks('jot_networks', $jotnets); + $tpl = get_markup_template("acl_selector.tpl"); $o = replace_macros($tpl, array( '$showall'=> t("Visible to everybody"), - '$show' => t("show"), - '$hide' => t("don't show"), + '$show' => t("Show"), + '$hide' => t("Don't show"), '$allowcid' => json_encode($allow_cid), '$allowgid' => json_encode($allow_gid), '$denycid' => json_encode($deny_cid), '$denygid' => json_encode($deny_gid), + '$jotnets' => $jotnets, + '$aclModalTitle' => t('Permissions'), + '$aclModalDismiss' => t('Close') )); diff --git a/include/conversation.php b/include/conversation.php index 9ffa1e77a..541da1d9b 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1153,7 +1153,7 @@ function status_editor($a,$x,$popup=false) { '$encrypt' => t('Encrypt text'), '$cipher' => $cipher, '$expiryModalOK' => t('OK'), - '$expiryModalCANCEL' => t('Cancel'), + '$expiryModalCANCEL' => t('Cancel') )); diff --git a/mod/chat.php b/mod/chat.php index 88f456422..bf6eed57c 100644 --- a/mod/chat.php +++ b/mod/chat.php @@ -203,6 +203,7 @@ function chat_content(&$a) { $o = replace_macros(get_markup_template('chatroom_new.tpl'),array( '$header' => t('New Chatroom'), '$name' => array('room_name',t('Chatroom Name'),'', ''), + '$permissions' => t('Permissions'), '$acl' => populate_acl($channel_acl), '$submit' => t('Submit') )); @@ -228,4 +229,4 @@ function chat_content(&$a) { return $o; -} \ No newline at end of file +} diff --git a/view/js/acl.js b/view/js/acl.js index 308e65131..28e47011f 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -17,7 +17,7 @@ function ACL(backend_url, preset){ that.item_tpl = unescape($(".acl-list-item[rel=acl-template]").html()); that.showall = $("#acl-showall"); - if (preset.length==0) that.showall.addClass("selected"); + if (preset.length==0) that.showall.removeClass("btn-default").addClass("btn-warning"); /*events*/ @@ -70,10 +70,10 @@ ACL.prototype.on_showall = function(event){ event.preventDefault() event.stopPropagation(); - if (that.showall.hasClass("selected")){ + if (that.showall.hasClass("btn-warning")){ return false; } - that.showall.addClass("selected"); + that.showall.removeClass("btn-default").addClass("btn-warning"); that.allow_cid = []; that.allow_gid = []; @@ -164,7 +164,7 @@ ACL.prototype.set_deny = function(itemid){ ACL.prototype.update_view = function(){ if (that.allow_gid.length==0 && that.allow_cid.length==0 && that.deny_gid.length==0 && that.deny_cid.length==0){ - that.showall.addClass("selected"); + that.showall.removeClass("btn-default").addClass("btn-warning"); /* jot acl */ $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock'); $('#jot-public').show(); @@ -174,7 +174,7 @@ ACL.prototype.update_view = function(){ } } else { - that.showall.removeClass("selected"); + that.showall.removeClass("btn-warning").addClass("btn-default"); /* jot acl */ $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock'); $('#jot-public').hide(); @@ -190,20 +190,20 @@ ACL.prototype.update_view = function(){ type = itemid[0]; id = itemid.substr(1); - btshow = $(this).children(".acl-button-show").removeClass("selected"); - bthide = $(this).children(".acl-button-hide").removeClass("selected"); + btshow = $(this).children(".acl-button-show").removeClass("btn-success").addClass("btn-default"); + bthide = $(this).children(".acl-button-hide").removeClass("btn-danger").addClass("btn-default"); switch(type){ case "g": var uclass = ""; if (that.allow_gid.indexOf(id)>=0){ - btshow.addClass("selected"); - bthide.removeClass("selected"); + btshow.removeClass("btn-default").addClass("btn-success"); + bthide.removeClass("btn-danger").addClass("btn-default"); uclass="groupshow"; } if (that.deny_gid.indexOf(id)>=0){ - btshow.removeClass("selected"); - bthide.addClass("selected"); + btshow.removeClass("btn-success").addClass("btn-default"); + bthide.removeClass("btn-default").addClass("btn-danger"); uclass="grouphide"; } @@ -223,12 +223,12 @@ ACL.prototype.update_view = function(){ break; case "c": if (that.allow_cid.indexOf(id)>=0){ - btshow.addClass("selected"); - bthide.removeClass("selected"); + btshow.removeClass("btn-default").addClass("btn-success"); + bthide.removeClass("btn-danger").addClass("btn-default"); } if (that.deny_cid.indexOf(id)>=0){ - btshow.removeClass("selected"); - bthide.addClass("selected"); + btshow.removeClass("btn-success").addClass("btn-default"); + bthide.removeClass("btn-default").addClass("btn-danger"); } } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 2b4314fdb..2138f05ca 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1521,7 +1521,7 @@ header { right: 43%; margin: 0px; padding: 0px; - z-index: 1400; + z-index: 1040; color: #fff; } @@ -1552,101 +1552,73 @@ header { clear: both; } -#acl-wrapper { - width: 690px; - float:left; +#acl-search { + margin-top: 20px; + padding: 8px; + border: 1px solid #ccc; + width: 100%; } -#acl-search { - float:right; - background: #ffffff url("../../../../images/search_18.png") no-repeat right center; - padding-right:20px; +#acl-search::-webkit-input-placeholder { + font-family: FontAwesome; } -#acl-showall { - float: left; - display: block; - width: auto; - height: 26px; - background-color: #cccccc; - background-image: url("../../../../images/show_all_off.png"); - background-position: 7px 7px; - background-repeat: no-repeat; - padding: 7px 5px 0px 30px; - -webkit-border-radius: $radiuspx; - -moz-border-radius: $radiuspx; - border-radius: $radiuspx; - color: #999999; -} -#acl-showall.selected { - color: #000000; - background-color: #ff9900; - background-image: url("../../../../images/show_all_on.png"); + +#acl-search::-moz-placeholder { + font-family: FontAwesome; } #acl-list { - height: 210px; - border: 1px solid #cccccc; - clear: both; - margin-top: 30px; - overflow: auto; -} -#acl-list-content { - -} -.acl-list-item { display: block; - width: 150px; - height: 30px; border: 1px solid #cccccc; - margin: 5px; - float: left; + overflow: auto; + clear: both; + min-height: 62px; + margin-top: 20px; + padding: 10px 10px 0px 0px; + -webkit-border-radius: $radiuspx ; + -moz-border-radius: $radiuspx; + border-radius: $radiuspx; } + +.acl-list-item { + width: calc(50% - 10px); + border: 1px solid #cccccc; + margin: 0px 0px 10px 10px; + padding: 5px; + float: left; + -webkit-border-radius: $radiuspx ; + -moz-border-radius: $radiuspx; + border-radius: $radiuspx; +} + .acl-list-item img{ - width:22px; - height: 22px; + width: 40px; + height: 40px; float: left; - margin: 4px; + margin-right: 5px; + -webkit-border-radius: $radiuspx ; + -moz-border-radius: $radiuspx; + border-radius: $radiuspx; } + .acl-list-item.taggable { background-color: #ddddff; } -.acl-list-item p { height: 12px; font-size: 10px; margin: 0px; overflow: hidden;} -.acl-list-item a { - font-size: 8px; - display: block; - width: 40px; - height: 10px; - float: left; - color: #999999; - background-color: #cccccc; - background-position: 3px 3px; - background-repeat: no-repeat; - margin-right: 5px; - -webkit-border-radius: 2px ; - -moz-border-radius: 2px; - border-radius: 2px; - padding-left: 15px; +.acl-list-item p { + font-size: $font_size; + margin: 0px; + overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } -#acl-wrapper a:hover { - text-decoration: none; - color:#000000; -} -.acl-button-show { background-image: url("../../../../images/show_off.png"); } -.acl-button-hide { background-image: url("../../../../images/hide_off.png"); } -.acl-button-show.selected { - color: #000000; - background-color: #9ade00; - background-image: url("../../../../images/show_on.png"); +.acl-button-show, +.acl-button-hide { + float: right; + margin-left: 5px; } -.acl-button-hide.selected { - color: #000000; - background-color: #ff4141; - background-image: url("../../../../images/hide_on.png"); -} -.acl-list-item.groupshow { border-color: #9ade00; } -.acl-list-item.grouphide { border-color: #ff4141; } .contact-block-content { margin-top: 8px; @@ -2284,4 +2256,8 @@ blockquote { width: 32px !important; height: 32px !important; } + + .acl-list-item { + width: calc(100% - 10px); + } } diff --git a/view/tpl/acl_selector.tpl b/view/tpl/acl_selector.tpl index d869562e2..c98350843 100755 --- a/view/tpl/acl_selector.tpl +++ b/view/tpl/acl_selector.tpl @@ -1,18 +1,34 @@ -
- - {{$showall}} -
-
-
-
- -
- - +