diff --git a/modules/menu/tpl/sitemap.html b/modules/menu/tpl/sitemap.html
index dcf05b7af..737a56452 100644
--- a/modules/menu/tpl/sitemap.html
+++ b/modules/menu/tpl/sitemap.html
@@ -459,77 +459,26 @@
@@ -587,12 +536,9 @@
.mapi>ul>li>ul{border-top:2px solid #666;margin-top:7px;padding-top:7px}
/* li>a */
.mapi li>a{border:0 !important;padding:0 8px !important;margin:0 60px 1px 0;border-radius:3px;position:relative;z-index:2;height:23px;line-height:23px;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}
-.mapi .x_icon-home,
-.mapi .x_icon-share-alt{opacity:.5;filter:alpha(opacity=50)}
+.mapi .x_icon-home{opacity:.5;filter:alpha(opacity=50)}
.mapi .jstree-hovered>.x_icon-home,
-.mapi .jstree-hovered>.x_icon-share-alt,
-.mapi .jstree-clicked>.x_icon-home,
-.mapi .jstree-clicked>.x_icon-share-alt{background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png);opacity:1;filter:alpha(opacity=100)}
+.mapi .jstree-clicked>.x_icon-home{background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png);opacity:1;filter:alpha(opacity=100)}
/* li>.side */
.mapi .side{position:absolute;z-index:2;top:0;right:0;line-height:0}
.mapi .side>button{border:0;border-radius:3px;width:23px;height:23px;overflow:hidden;font-size:0;line-height:0;text-indent:24px;background:url({getUrl('')}common/img/glyphicons-halflings.png) no-repeat;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}
@@ -2289,14 +2235,16 @@ jQuery(function($){
});
})
- $('#auth').on('show', function(){
+ $('#auth').on('show', function(ev){
+ if(this !== ev.target) return;
+
// https://code.google.com/p/xe-core/wiki/MenuPerm?ts=1350276450&updated=MenuPerm
$.exec_json("menu.getMenuAdminItemInfo", {
menu_item_srl : htNodeInfo[$._xeAdminVar.sSelectedMenuSrl].sNodeSrl
}, PermAReceived);
});
function PermAReceived(htData){
- console.log(1, htData);
+ //console.log(1, htData);
/*
{
@@ -2346,10 +2294,11 @@ jQuery(function($){
//console.log($._xeAdminVar.aUserGroups, $._xeAdminVar.htUserGroups);
aPerms[0] = {
- sTitle : '메뉴 노출',
+ sKey : '',
+ sTitle : '메뉴 노출 대상',
sDefault : 'guest',
- sGrant : htData.menu_item.grant,
- aGroup : htData.menu_item.group
+ sGrant : htData.menu_item.grant || 'all',
+ aGroup : htData.menu_item.group_srls
};
var params = {
@@ -2360,7 +2309,7 @@ jQuery(function($){
$.exec_json("module.getModuleAdminGrant", params, PermBReceived);
}
function PermBReceived(htData){
- console.log(2, htData);
+ //console.log(2, htData);
var htNode = htNodeInfo[$._xeAdminVar.sSelectedMenuSrl];
var aPerms = htNode.aPerms;
@@ -2375,20 +2324,206 @@ jQuery(function($){
}
},
*/
-
for(var sPerm in htData.grantList){
htTmp = htData.grantList[sPerm];
aPerms.push({
+ sKey : sPerm,
sTitle : htTmp.title,
- sDefault : htTmp.default,
+ // IE7 takes 'default' as a keyword. So use this array form to access the value
+ sDefault : htTmp['default'],
sGrant : htTmp.grant || "",
- aGroup : htTmp.group || []
+ aGroup : htTmp.group_srls || []
});
}
- console.log(aPerms);
+ drawPermSetupScreen(aPerms);
}
+ $("#tmpl_permItem").template( "permItem");
+ $("#tmpl_perm_groupItem").template( "perm_groupItem");
+ function drawPermSetupScreen(aPerms){
+ //console.log(aPerms);
+
+ var $List = $('#auth ._list');
+ $List.html("");
+
+ var aUserGroups = $._xeAdminVar.aUserGroups;
+ var htInfo, sDefault, $node, $groupNode, aGroup, sGrant;
+ for(var i=0, nLen=aPerms.length; i
+
+
+
+
+
+ */
+
+ sDefault = htInfo.sDefault;
+ aGroup = htInfo.aGroup;
+ sGrant = htInfo.sGrant;
+
+ $node = $.tmpl("permItem", {
+ PermId : htInfo.sKey,
+ PermTitle : htInfo.sTitle
+ });
+ $node.find('select').data('key', htInfo.sKey);
+ //console.log($node.find('select').data('key'));
+
+ var htGrantStrToSelectValMap = {
+ 'all': '0',
+ 'member': '-1',
+ 'site': '-2',
+ 'group': '-10'
+ };
+ if(htInfo.sGrant){
+ $node.find('select').val(htGrantStrToSelectValMap[htInfo.sGrant]);
+ }
+
+ // Add groups
+ //
+ for(var ii=0, nLen2=aUserGroups.length; ii");
$foggyLayer.css({
@@ -2521,16 +2656,6 @@ setTimeout(function(){
});
});
*/
-// Auth
- $('#auth select').change(function(){
- var $this = $(this);
- var $selected = $this.next('.selected');
- if($this.find('>option:selected').val() == 'selected'){
- $selected.show();
- } else {
- $selected.hide();
- }
- });
// File upload
$('.fileTrigger').click(function(){
$(this).next('input[type="file"]').click();