* @version $Id$
* @access public
* @license http://opensource.org/licenses/gpl-3.0.html
*/
//////////// Check Inclusion de pages ////////////
if (!class_exists('auth')){
include_once("../lib/lib_common.php");
ReloadIndex('admin');
}
////////////
//////////// Check Droits utilisateur ////////////
if (!$l21auth->hasRight('sdi')) ReloadIndex('admin');
////////////
include_once(override('../dashboard/common.php', THEME_ADMIN_PATH));
include_once(override('../level/mysql.inc.php', THEME_ADMIN_PATH));
// we get levels
$result=$sql_object->DBSelect(SQL_getLevelsList());
$sdi_object= new sdi;
// we get indicators
$sdi = $sql_object->DBSelect(SQL_getListSdi2("R"));
// Number of records
$bdd_nb_sdi = get_unique_indicators($sdi);
$bdd_nb_sdi_display = '' .$bdd_nb_sdi['count'] .' ' . _t('sdi','nb_total').'
'. PHP_EOL;
include_once('../class/class.tag.php');
// getting tags menu filter
$otag = new tag();
$tags =$otag->getTags('indicator', -1, false);
footerAddJS('../lib/js/jquery.nestable.js');
$js = ' $("div.dd").nestable({listNodeName: "ul"}).on("change", function() {
console.log($(this).prop("id"));
var json_text = $("#" + $(this).prop("id")).nestable("serialize");
console.log(json_text);
$.get("../admin/_ajax_sort.php", {
rub: "'.$rub.'",
"sort-table": json_text
}, function(data){
console.log(data);
// replacing data.class by data["class"] for IE8 bug fix
if(data["class"] == "succeed") {
alertify.success(data.msg);
} else {
alertify.error(data.msg);
}
}, "json");
});';
footerAddInlineJS($js);
/**
* getMenuFilter()
*
* @param array $tags
* @return string
*/
function getMenuFilter ($tags = array()) {
footerAddJS('../lib/js/jquery-tag-filtering/jquery.tagfiltering.simo.js');
addDynamicCSS('../lib/js/jquery-tag-filtering/jquery.tagfiltering.simo.css');
// one call to apply many filters from several lists (ul) with same css class and using distincts data-* attributes
// to comment if individual filtering are applied
footerAddInlineJS('$("ul.filter-menu").tagfiltering({target_attr:"data-tags,data-types,data-strats", separator:";", callback:compute_values});');
$filter_menu = '