<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$title}</title>
<link href="css/global.css" rel="stylesheet" type="text/css" />
<link href="../menu/css/dropdown/dropdown.css" media="all" rel="stylesheet" type="text/css" />
<link href="../menu/css/dropdown/themes/default/default.advanced.css" media="all" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<script type="text/javascript" src="../menu/js/jquery/jquery.js"></script>
<script type="text/javascript" src="../menu/js/jquery/jquery.dropdown.js"></script>
<![endif]-->
<!-- Initialize Dojo -->
{literal}
<script src='../dojo/dojo/dojo.js' type='text/javascript'></script>
<script type='text/javascript'>
//<!--
// The following function submits the data from the 'post-form' form
// to a PHP script located at
// 'http://www.dojoforum.com/demo-0.9/xhr/parse_form.php'
// The PHP script simply outputs a string in the format of
// 'Hello $name!', which is then put in the <div> w/ the id
// of 'response'.
//
// NOTE: As with xhrGet, you can also use handleAs to accept
// JSON objects in your load() function.
//dojo.require("dojo.style");
function addAttribSet() {
attribute_set_name = document.getElementById("attribute_set_name").value;
attribute_set_description = document.getElementById("attribute_set_description").value;
dojo.xhrPost ({
// The page that parses the POST request
url: 'add_attrib_set.php?mode=create&attribute_set_name='+attribute_set_name+'&attribute_set_description='+attribute_set_description,
// Name of the Form we want to submit
//form: 'login',
// Loads this function if everything went ok
load: function (data) {
// Put the data into the appropriate <div>
//document.getElementById('loader2').style.display="";
dojo.byId('update_attrib_set_box').innerHTML = data;
//document.getElementById('loader2').style.display="none";
},
// Call this function if an error happened
error: function (error) {
console.error ('Error: ', error);
}
});
}
function delAttribSet(set_id) {
if(confirm("Are you sure you want to delete this attribute set?")){
dojo.xhrPost ({
// The page that parses the POST request
url: 'del_attrib_set.php?mode=delete&set_id='+set_id,
// Name of the Form we want to submit
//form: 'login',
// Loads this function if everything went ok
load: function (data) {
// Put the data into the appropriate <div>
//document.getElementById('loader2').style.display="";
dojo.byId('update_attrib_set_box').innerHTML = data;
//document.getElementById('loader2').style.display="none";
},
// Call this function if an error happened
error: function (error) {
console.error ('Error: ', error);
}
});
}
}
//-->
function showSetAttrib(set_id, set_name) {
//confirm("");
dojo.xhrPost ({
// The page that parses the POST request
url: 'manage_set_attrib_value.php?mode=show&set_id='+set_id,
// Name of the Form we want to submit
//form: 'login',
// Loads this function if everything went ok
load: function (data) {
// Put the data into the appropriate <div>
//document.getElementById('loader2').style.display="";
dojo.byId('update_attrib_set_value_box').innerHTML = data;
dojo.byId('selected_set_heading').innerHTML = set_name + " selected";
//document.getElementById('loader2').style.display="none";
},
// Call this function if an error happened
error: function (error) {
console.error ('Error: ', error);
}
});
}
function selectAttrib(attribute_id, attribute_name, set_id) {
//confirm("");
dojo.xhrPost ({
// The page that parses the POST request
url: 'manage_set_attrib_value.php?mode=select&attribute_id='+attribute_id+'&attribute_name='+attribute_name+'&set_id='+set_id,
// Name of the Form we want to submit
//form: 'login',
// Loads this function if everything went ok
load: function (data) {
// Put the data into the appropriate <div>
//document.getElementById('loader2').style.display="";
dojo.byId('update_attrib_set_value_box').innerHTML = data;
//document.getElementById('loader2').style.display="none";
},
// Call this function if an error happened
error: function (error) {
console.error ('Error: ', error);
}
});
}
function delSelectedAttrib(id, set_id) {
if (confirm("Are you sure that you want to delete this Attribute Set?")){
dojo.xhrPost ({
// The page that parses the POST request
url: 'manage_set_attrib_value.php?mode=delete&id='+id+'&set_id='+set_id,
// Name of the Form we want to submit
//form: 'login',
// Loads this function if everything went ok
load: function (data) {
// Put the data into the appropriate <div>
//document.getElementById('loader2').style.display="";
dojo.byId('update_attrib_set_value_box').innerHTML = data;
//document.getElementById('loader2').style.display="none";
},
// Call this function if an error happened
error: function (error) {
console.error ('Error: ', error);
}
});
}//e n d confirm
}
</script>
{/literal}
</head>
<body>
<div id="page_container">
<div id="admin_header">{include file='admin_header.tpl'}</div>
<div id="admin_nav">{include file='admin_navigation.tpl'}</div>
<div id="contents">
<!-- Manage category controls -->
<div id="manage_cat_box">
{include file='mini_catalog_nav.tpl'}
<h3>Manage Attribute Sets</h3>
{include file='create_attrib_set_form.tpl'}
<br />
<div id="update_attrib_set_box">
{include file='show_attrib_set.tpl'}
</div>
<h4><div id="selected_set_heading"></div></h4>
<div id="update_attrib_set_value_box">
{include file='all_attrib_list.tpl'}
</div>
</div>
<!-- end manage categories -->
<!-- <div id="section_info_box">
<h4>Why to select image</h4>
</div>-->
<div style="clear:both;"></div>
</div>
<div id="admin_footer">{include file='admin_footer.tpl'}</div>
</div>
</body>
</html>