" + msg;
- $.jGrowl(msg, {theme: "jGrowl-notify-submit", position: "bottom-right"});
-}
-
-// Returns an HTML string with the json keys and values
-// Attempts to css format output, giving different values to
-// margins etc. according to depth level etc.
-// See exapmle of use in plugins.
-function prettyPrintJSON(template_json,padding,weight, border_bottom,padding_top_bottom){
- var str = ""
- if (!template_json){ return "Not defined";}
- if (!padding) {padding=0};
- if (!weight) {weight="bold";}
- if (!border_bottom) {border_bottom = "1px solid #CCCCCC";}
- if (!padding_top_bottom) {padding_top_bottom=6;}
- var field = null;
-
- if (template_json.constructor == Array){
- for (field = 0; field < template_json.length; ++field){
- str += prettyPrintRowJSON(field,template_json[field],padding,weight, border_bottom,padding_top_bottom);
- }
- } else {
- for (field in template_json) {
- str += prettyPrintRowJSON(field,template_json[field],padding,weight, border_bottom,padding_top_bottom);
- }
- }
- return str;
-}
-
-function prettyPrintRowJSON(field,value,padding,weight, border_bottom,padding_top_bottom){
- var str="";
-
- if (typeof value == 'object'){
- //name of field row
- str += '
';
- };
-
- return str;
-}
-
-//Add a listener to the check-all box of a datatable, enabling it to
-//check and uncheck all the checkboxes of its elements.
-function initCheckAllBoxes(datatable){
-
- //small css hack
- $('input.check_all',datatable).css({"border":"2px"});
- $('input.check_all',datatable).live("change",function(){
- var table = $(this).parents('table');
- var checked = $(this).attr('checked');
- if (checked) { //check all
- $('tbody input.check_item',table).attr('checked','checked');
- } else { //uncheck all
- $('tbody input.check_item',table).removeAttr('checked');
- };
- recountCheckboxes(table);
- });
-}
-
-//standard handling for the server errors on ajax requests.
-//Pops up a message with the information.
-function onError(request,error_json) {
- var method;
- var action;
- var object;
- var id;
- var reason;
- var m;
- var message = error_json.error.message;
-
- if ( typeof onError.disabled == 'undefined' ) {
- onError.disabled=false;
- };
-
- //redirect to login if unauthenticated
- if (error_json.error.http_status=="401") {
- window.location.href = "login";
- onError.disabled=false;
- return false;
- };
-
-
- if (!message){
- if (!onError.disabled){
- notifyError(tr("Cannot contact server: is it running and reachable?"));
- onError.disabled=true;
- }
- return false;
- };
-
- if (message.match(/^Network is unreachable .+$/)){
- if (!onError.disabled){
- notifyError(tr("Network is unreachable: is OpenNebula running?"));
- onError.disabled=true;
- };
- return false;
- } else {
- onError.disabled=false;
- };
-
-
- //Parse known errors:
- var get_error = /^\[(\w+)\] Error getting ([\w ]+) \[(\d+)\]\.$/;
- var auth_error = /^\[(\w+)\] User \[(\d+)\] not authorized to perform action on ([\w ]+).$/;
-
- if (m = message.match(get_error)) {
- method = m[1];
- action = "Show";
- object = m[2];
- id = m[3];
- } else if (m = message.match(auth_error)) {
- method = m[1];
- object = m[3];
- reason = tr("Unauthorized");
- };
-
- if (m) {
- var rows;
- var i;
- var value;
- rows = ["method","action","object","id","reason"];
- message = "";
- for (i = 0; i
"+key+"
"+value+"
";
- }
- message = "
" + message + "
";
- };
-
- notifyError(message);
- return true;
-}
-
-//Replaces the checkboxes of a datatable with a ajax-loading spinner.
-//Used when refreshing elements of a datatable.
-function waitingNodes(dataTable){
- var nodes = dataTable.fnGetData();
- for (var i=0;i');
- obj.append('');
-
- obj.append('');
-
- //add the text to .tipspan
- $('span.tipspan',obj).html(tip);
- //make sure it is not floating in the wrong place
- obj.parent().append('');
- //hide the text
- $('span.tipspan',obj).hide();
-
- //When the mouse is hovering on the icon we fadein/out
- //the tip text
- $('span.info_icon',obj).hover(function(e){
- var icon = $(this);
- var top, left;
- top = e.pageY - 15;// - $(this).parents('#create_vm_dialog').offset().top - 15;
- left = e.pageX + 15;// - $(this).parents('#create_vm_dialog').offset().left;
- icon.next().css(
- {"top":top+"px",
- "left":left+"px"});
- icon.next().fadeIn();
- },function(){
- $(this).next().fadeOut();
- });
- });
-}
-
-//returns an array of ids of selected elements in a dataTable
-function getSelectedNodes(dataTable){
- var selected_nodes = [];
- if (dataTable){
- //Which rows of the datatable are checked?
- var nodes = $('tbody input.check_item:checked',dataTable);
- $.each(nodes,function(){
- selected_nodes.push($(this).val());
- });
- };
- return selected_nodes;
-}
-
-//returns a HTML string with a select input code generated from
-//a dataTable. Allows filtering elements.
-function makeSelectOptions(dataTable,
- id_col,name_col,
- status_cols,
- bad_status_values,no_empty_opt){
- var nodes = dataTable.fnGetData();
- var select = "";
- if (!no_empty_opt)
- select = '';
- var array;
- for (var j=0; j'+name+'';
- };
- };
- return select;
-}
-
-//Escape " in a string and return it
-function escapeDoubleQuotes(string){
- string = string.replace(/\\"/g,'"');
- return string.replace(/"/g,'\\"');
-}
-
-//Generate the div elements in which the monitoring graphs
-//will be contained. They have some elements which ids are
-//determined by the graphs configuration, so when the time
-//of plotting comes, we can put the data in the right place.
-function generateMonitoringDivs(graphs, id_prefix){
- var str = "";
- //43% of the width of the screen minus
- //129px (left menu size)
- var width = ($(window).width()-129)*40/100;
- var id_suffix="";
- var label="";
- var id="";
-
- $.each(graphs,function(){
- label = this.monitor_resources;
- id_suffix=label.replace(/,/g,'_');
- id = id_prefix+id_suffix;
- str+='
\
-
'+this.title+'
\
-
\
-
\
-
'+
- spinner+
- '
\
-
';
- });
-
- return str;
-}
-
-//Draws data for plotting. It will find the correct
-//div for doing it in the context with an id
-//formed by a prefix (i.e. "hosts") and a suffix
-//determined by the graph configuration: "info".
-function plot_graph(data,context,id_prefix,info){
- var labels = info.monitor_resources;
- var humanize = info.humanize_figures ?
- humanize_size : function(val){ return val };
- var id_suffix = labels.replace(/,/g,'_');
- var labels_array = labels.split(',');
- var monitoring = data.monitoring
- var series = [];
- var serie;
- var mon_count = 0;
-
- //make sure series are painted in the order of the
- //labels array.
- for (var i=0; i');
- var dialog = $('#template_update_dialog',dialogs_context);
-
- //Put HTML in place
- dialog.html(
- '');
-
- //Convert into jQuery
- dialog.dialog({
- autoOpen:false,
- width:700,
- modal:true,
- height:410,
- resizable:false,
- });
-
- $('button',dialog).button();
-
- $('#template_update_select',dialog).change(function(){
- var id = $(this).val();
- if (id && id.length){
- var dialog = $('#template_update_dialog');
- var resource = $('#template_update_button',dialog).val();
- $('#template_update_textarea',dialog).val("Loading...");
- Sunstone.runAction(resource+".fetch_template",id);
- } else {
- $('#template_update_textarea',dialog).val("");
- };
- });
-
- $('#template_update_button',dialog).click(function(){
- var dialog = $('#template_update_dialog');
- var new_template = $('#template_update_textarea',dialog).val();
- var id = $('#template_update_select',dialog).val();
-
- if (!id || !id.length) {
- dialog.dialog('close');
- return false;
- };
-
- var resource = $(this).val();
- Sunstone.runAction(resource+".update",id,new_template);
- dialog.dialog('close');
- return false;
- });
-}
-
-//Pops up a dialog to update a template.
-//If 1 element is selected, then this the only one shown.
-//If no elements are selected, then all elements are included in the select box.
-//If several elements are selected, only those are included in the select box.
-function popUpTemplateUpdateDialog(elem_str,select_items,sel_elems){
- var dialog = $('#template_update_dialog');
- $('#template_update_button',dialog).val(elem_str);
- $('#template_update_select',dialog).html(select_items);
- $('#template_update_textarea',dialog).val("");
-
- if (sel_elems.length >= 1){ //several items in the list are selected
- //grep them
- var new_select= sel_elems.length > 1? '' : "";
- $('option','').each(function(){
- var val = $(this).val();
- if ($.inArray(val,sel_elems) >= 0){
- new_select+='';
- };
- });
- $('#template_update_select',dialog).html(new_select);
- if (sel_elems.length == 1) {
- $('#template_update_select option',dialog).attr('selected','selected');
- $('#template_update_select',dialog).trigger("change");
- }
- };
-
- dialog.dialog('open');
- return false;
-}
-
-function mustBeAdmin(){
- return gid == 0;
-}
-
-function users_sel(){
- return users_select;
-}
-
-function groups_sel(){
- return groups_select;
-}
-
-function hosts_sel(){
- return hosts_select;
-}
diff --git a/src/cloud/occi/lib/ui/public/js/sunstone.js b/src/cloud/occi/lib/ui/public/js/sunstone.js
deleted file mode 100644
index 235791ec1f..0000000000
--- a/src/cloud/occi/lib/ui/public/js/sunstone.js
+++ /dev/null
@@ -1,762 +0,0 @@
-/* -------------------------------------------------------------------------- */
-/* Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) */
-/* */
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
-/* not use this file except in compliance with the License. You may obtain */
-/* a copy of the License at */
-/* */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* Unless required by applicable law or agreed to in writing, software */
-/* distributed under the License is distributed on an "AS IS" BASIS, */
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
-/* See the License for the specific language governing permissions and */
-/* limitations under the License. */
-/* -------------------------------------------------------------------------- */
-
-var cookie = {};
-var username = '';
-var uid = '';
-var gid = '';
-var spinner = '';
-
-var main_tabs_context;
-var dialogs_context;
-var plots_context;
-var info_panels_context;
-
-
-//Sunstone configuration is formed by predifined "actions", main tabs
-//and "info_panels". Each tab has "content" and "buttons". Each
-//"info_panel" has "tabs" with "content".
-var SunstoneCfg = {
- "actions" : {},
- "tabs" : {},
- "info_panels" : {}
-};
-
-/* Public plugin interface */
-
-var Sunstone = {
-
- //Adds a predifined action
- "addAction" : function (action_name,action_obj) {
- SunstoneCfg["actions"][action_name] = action_obj;
- },
-
- //Replaces a predefined action
- "updateAction" : function(action_name,action_obj) {
- SunstoneCfg["actions"][action_name] = action_obj;
- },
-
- //Deletes a predefined action.
- "removeAction" : function(action_name) {
- delete SunstoneCfg["actions"][action_name];
- },
-
- //Adds several actions encapsulated in an js object.
- "addActions" : function(actions) {
- for (action in actions){
- Sunstone.addAction(action,actions[action]);
- }
- },
-
- //Adds a new main tab. Refreshes the dom if wanted.
- "addMainTab" : function(tab_id,tab_obj,refresh) {
- SunstoneCfg["tabs"][tab_id] = tab_obj;
- if (refresh){
- insertTab(tab_id);
- }
- },
-
- //Updates the content of an info tab and refreshes the DOM if wanted.
- "updateMainTabContent" : function(tab_id,content_arg,refresh){
- SunstoneCfg["tabs"][tab_id]["content"]=content_arg;
- if (refresh){ //if not present it won't be updated
- $('div#'+tab_id, main_tabs_context).html(content_arg);
- }
- },
-
- //Replaces the buttons of an info tab and regenerates them if wanted.
- "updateMainTabButtons" : function(tab_id,buttons_arg,refresh){
- SunstoneCfg["tabs"][tab_id]["buttons"]=buttons_arg;
- if (refresh){
- $('div#'+tab_id+' .action_blocks', main_tabs_context).empty();
- insertButtonsInTab(tab_id);
- }
- },
-
- //Removes a tab and refreshes the DOM
- "removeMainTab" : function(tab_id,refresh) {
- delete SunstoneCfg["tabs"][tab_id];
- if (refresh) {
- $('div#'+tab_id, main_tabs_context).remove();
- $('ul#navigation li#li_'+tab_id).remove();
- }
- },
-
- //Adds a new info panel
- "addInfoPanel" : function(panel_name, panel_obj){
- SunstoneCfg["info_panels"][panel_name]=panel_obj;
- },
-
- //Replaces an existing info panel
- "updateInfoPanel" : function(panel_name,panel_obj){
- SunstoneCfg["info_panels"][panel_name]=panel_obj;
- },
-
- //Removes an info panel
- "removeInfoPanel" : function(panel_name){
- delete SunstoneCfg["info_panels"][panel_name];
- },
-
- //Makes an info panel content pop up in the screen.
- "popUpInfoPanel" : function(panel_name, selected_tab){
- popDialog(Sunstone.getInfoPanelHTML(panel_name, selected_tab));
- },
-
- //Generates and returns the HTML div element for an info panel, with
- //Jquery tabs.
- "getInfoPanelHTML" : function(panel_name,selected_tab){
- var info_panel = $('
');
- var tabs = SunstoneCfg["info_panels"][panel_name];
- var tab=null;
- for (tab_name in tabs){
- tab=tabs[tab_name];
- $('ul',info_panel).append('
');
- }
- if (selected_tab){
- return info_panel.tabs({selected: selected_tab});
- }
- return info_panel.tabs({selected: 0});
-
- },
-
- //adds a tab to an info panel.
- "addInfoPanelTab" : function(panel_name, panel_tab_id, panel_tab_obj){
- SunstoneCfg["info_panels"][panel_name][panel_tab_id] = panel_tab_obj;
- },
-
- //Replaces a tab from an info panel. Refreshes the DOM if wanted.
- "updateInfoPanelTab" : function(panel_name, panel_tab_id,
- panel_tab_obj, refresh){
- SunstoneCfg["info_panels"][panel_name][panel_tab_id] = panel_tab_obj;
- if (refresh){
- var tab_content = panel_tab_obj.content;
- $('div#'+panel_name+' div#'+panel_tab_id,info_panel_context).html(tab_content);
- }
- },
-
- //Removes a tab from an info panel configuration.
- "removeInfoPanelTab" : function(panel_name,panel_tab_id){
- delete SunstoneCfg["info_panels"][panel_name][panel_tab_id];
- },
-
- //Runs a predefined action. Wraps the calls to opennebula.js and
- //can be use to run action depending on conditions and notify them
- //if desired. Returns 1 if some problem has been detected: i.e
- //the condition to run the action is not met, the action is not found
- "runAction" : function(action, data_arg, extra_param){
-
- var actions = SunstoneCfg["actions"];
- if (!actions[action]){
- notifyError("Action "+action+" not defined");
- return 1;
- }
-
- var action_cfg = actions[action];
- var notify = action_cfg.notify;
-
- var condition = action_cfg["condition"];
-
- //Is the condition to run the action met?
- //Should we inform if it is not met?
- if (condition && !condition()){
- if (notify) {
- notifyError("This action cannot be run");
- }
- return 1;
- }
-
- var call = action_cfg["call"];
- var callback = action_cfg["callback"];
- var err = action_cfg["error"];
-
- //We ease the use of:
- // * "create" calls to opennebula.js
- // * "single" element calls to opennebula.js
- // * "list" (get the pool of elements) calls to opennebula.js
- // * "monitor_global" (returns monitoring info from a pool of elements
- // * "monitor_single" (returns monitoring info from 1 element)
- // * "multiple" - actions to be run on a given list of elements
- // (with maybe an extra parameter).
- // * The default actions. Simple call the the pre-defined "call"
- // function with an extraparam if defined.
- switch (action_cfg.type){
-
- case "create":
- case "register":
- call({data:data_arg, success: callback, error:err});
- break;
- case "single":
- if (extra_param){
- call({
- data:{
- id:data_arg,
- extra_param:extra_param
- },
- success: callback,error:err
- });
- } else {
- call({data:{id:data_arg}, success: callback,error:err});
- };
- break;
- case "list":
- call({success: callback, error:err});
- break;
- case "monitor_global":
- call({
- timeout: true,
- success: callback,
- error:err,
- data: {monitor: data_arg}});
- break;
- case "monitor":
- case "monitor_single":
- call({
- timeout: true,
- success: callback,
- error:err,
- data: {id:data_arg, monitor: extra_param}});
- break;
- case "multiple":
- //run on the list of nodes that come on the data
- $.each(data_arg,function(){
- if (extra_param){
- call({
- data:{
- id:this,
- extra_param:extra_param
- },
- success: callback,
- error: err});
- } else {
- call({
- data:{id:this},
- success: callback,
- error:err});
- }
- });
- break;
- default:
- //This action is complemente handled by the "call" function.
- //we pass any data if present.
- if (data_arg && extra_param) {call(data_arg,extra_param);}
- else if (data_arg) {call(data_arg);}
- else {call();}
- }
- //notify submission
- if (notify) {
- notifySubmit(action,data_arg,extra_param);
- }
-
- return 0;
- },
-
- //returns a button object from the desired tab
- "getButton" : function(tab_id,button_name){
- var button = null;
- var buttons = SunstoneCfg["tabs"][tab_id]["buttons"];
- button = buttons[button_name];
- //not found, is it in the list then?
- if (!button && buttons["action_list"])
- {
- button = buttons["action_list"]["actions"][button_name];
- }
- return button;
- } //end sunstone methods
-
-};
-
-
-
-//Plugins have done their pre-ready jobs when we execute this. That means
-//all startup configuration is in place regarding tabs, info panels etc.
-$(document).ready(function(){
-
- //Contexts - make everything more efficient
- main_tabs_context = $('div.inner-center');
- dialogs_context = $('div#dialogs');
- plots_context = $('div#plots');
- info_panels_context = $('div#info_panels');
-
- readCookie();
- setLogin();
-
- //Insert the tabs in the DOM and their buttons.
- insertTabs();
- //hideSubTabs();
- insertButtons();
-
- //Enhace the look of select buttons
- initListButtons();
-
- //Prepare the standard confirmation dialogs
- setupConfirmDialogs();
-
- //This dialog is shared to update templates
- setupTemplateUpdateDialog();
-
- //Listen for .action_buttons
- //An action buttons runs a predefined action. If it has type
- //"multiple" it runs that action on the elements of a datatable.
- $('.action_button').live("click",function(){
- var error = 0;
- var table = null;
- var value = $(this).attr('value');
- var action = SunstoneCfg["actions"][value];
- if (!action) {
- notifyError("Action "+value+" not defined.");
- return false;
- };
- switch (action.type){
- case "multiple": //find the datatable
- var nodes = action.elements();
- error = Sunstone.runAction(value,nodes);
- break;
- default:
- error = Sunstone.runAction(value);
- }
-
- if (!error){
- //proceed to close confirm dialog in
- //case it was open
- $('div#confirm_dialog').dialog("close");
- };
-
- return false;
- });
-
-
- //Listen .confirm_buttons. These buttons show a confirmation dialog
- //before running the action.
- $('.confirm_button',main_tabs_context).live("click",function(){
- popUpConfirmDialog(this);
- return false;
- });
-
- //Listen .confirm_buttons. These buttons show a confirmation dialog
- //with a select box before running the action.
- $('.confirm_with_select_button',main_tabs_context).live("click",function(){
- popUpConfirmWithSelectDialog(this);
- return false;
- });
-
- //Jquery-enhace the buttons in the DOM
- $('button').button();
-
- //Close overlay dialogs when clicking outside of them.
- $(".ui-widget-overlay").live("click", function (){
- $("div:ui-dialog:visible").dialog("close");
- });
-
- //Close select lists when clicking somewhere else.
- $('*:not(.action_list,.list_button)').click(function(){
- $('.action_blocks .action_list:visible',main_tabs_context).hide();
- });
-
- //Close open panel
- $('.close_dialog_link').live("click",function(){
- hideDialog();
- return false;
- });
-
- //Start with the dashboard (supposing we have one).
- showTab('#dashboard_tab');
-
-});
-
-
-
-
-//reads the cookie and places its info in the 'cookie' var
-function readCookie(){
- $.each(document.cookie.split("; "), function(i,e){
- var e_split = e.split("=");
- var key = e_split[0];
- var value = e_split[1];
- cookie[key] = value;
- });
-}
-
-//sets the user info in the top bar and creates a listner in the
-//signout button
-function setLogin(){
- //This variables can be used anywhere
- switch(whichUI()){
- case "sunstone":
- username = cookie["one-user"];
- uid = cookie["one-user_id"];
- gid = cookie["one-user_gid"];
- break;
- case "ozones":
- username = cookie["ozones-user"];
- break;
- case "occi":
- username = cookie["occi-user"];
- break;
- };
-
-
- $("div#header span#user").html(username);
-
- $("div#header a#logout").click(function(){
- redirect = function(){window.location.href = "login";};
- switch(whichUI()){
- case "sunstone":
- OpenNebula.Auth.logout({success:redirect});
- break;
- case "ozones":
- oZones.Auth.logout({success:redirect});
- break;
- case "occi":
- OCCI.Auth.logout({success:function(){window.location.href = "ui";}});
- break;
- }
- return false;
- });
-}
-
-//returns whether we are Sunstone, or oZones
-//not the most elegant way, but better in its own function
-function whichUI(){
- if (typeof(OpenNebula)!="undefined")
- return "sunstone";
- if (typeof(oZones)!="undefined")
- return "ozones";
- if (typeof(OCCI)!="undefined")
- return "occi";
-};
-
-//Inserts all main tabs in the DOM
-function insertTabs(){
- var tab_info;
- for (tab in SunstoneCfg["tabs"]){
- insertTab(tab);
- }
-}
-
-
-//Inserts a main tab in the DOM. This is done by
-//adding the content to the proper div and by adding a list item
-//link to the navigation menu
-function insertTab(tab_name){
- var tab_info = SunstoneCfg["tabs"][tab_name];
- var condition = tab_info["condition"];
- var tabClass = tab_info["tabClass"];
- var parent = "";
-
- if (!tabClass) {
- tabClass="topTab";
- } else if (tabClass=="subTab") {
- parent = tab_info["parentTab"];
- };
-
- //skip this tab if we do not meet the condition
- if (condition && !condition()) {return;}
-
- main_tabs_context.append('');
-
- $('div#'+tab_name,main_tabs_context).html(tab_info.content);
-
- $('div#menu ul#navigation').append('
');
-}
-
-function hideSubTabs(){
- for (tab in SunstoneCfg["tabs"]){
- var tab_info = SunstoneCfg["tabs"][tab];
- var tabClass = tab_info["tabClass"];
- if (tabClass=="subTab"){
- $('div#menu ul#navigation #li_'+tab).hide();
- };
- };
-}
-
-
-
-//Inserts the buttons of all tabs.
-function insertButtons(){
- for (tab in SunstoneCfg["tabs"]){
- insertButtonsInTab(tab)
- }
-}
-
-//If we have defined a block of action buttons in a tab,
-//this function takes care of inserting them in the DOM.
-function insertButtonsInTab(tab_name){
- var buttons = SunstoneCfg["tabs"][tab_name]["buttons"];
- var button_code="";
- var sel_obj=null;
- var condition=null;
-
- //Check if we have included an appropiate space our tab to
- //insert them (an .action_blocks div)
- var action_block = $('div#'+tab_name+' div.action_blocks',main_tabs_context)
-
- if (action_block.length){
-
- //for every button defined for this tab...
- for (button_name in buttons){
- button_code = "";
- button = buttons[button_name];
- condition = button.condition;
- //if we meet the condition we proceed. Otherwise we skip it.
- if (condition && !condition()) { continue; }
-
- //depending on the type of button we generate different
- //code. There are 4 possible types:
- /*
- * select: We need to create a select element with actions inside.
- * image: a button consisting of a link with an image inside.
- * create: we make sure they have the "action_button" class.
- * default: generally buttons have the "_button" class.
- */
- switch (button.type) {
- case "select":
- button_code = '';
- break;
- case "image":
- button_code = '';
- break;
- case "create_dialog":
- button_code = '';
- break;
- default:
- button_code = '';
-
- }
-
- if (button.alwaysActive) {
- button_code = $(button_code).addClass("alwaysActive");
- }
-
- action_block.append(button_code);
-
- }//for each button in tab
- $('.top_button',action_block).button();
- }//if tab exists
-}
-
-//Converts selects into buttons which show a list of actions when
-//clicked. This lists have two parts, one for the last action run, and
-//another containing a list of actions that can be folded/unfolded.
-function initListButtons(){
-
- //for each multi_action select
- $('.multi_action_slct',main_tabs_context).each(function(){
- //prepare replacement buttons
- var buttonset = $(''+tr("Previous action")+'').button();
- button1.attr('disabled','disabled');
- var button2 = $('').button({
- text:false,
- icons: { primary: "ui-icon-triangle-1-s" }
- });
- buttonset.append(button1);
- buttonset.append(button2);
- buttonset.buttonset();
-
- //prepare list
- var options = $('option', $(this));
- var list = $('
',
-
- classes: {
- // used to get elements from templates
- button: 'qq-upload-button',
- drop: 'qq-upload-drop-area',
- dropActive: 'qq-upload-drop-area-active',
- list: 'qq-upload-list',
-
- file: 'qq-upload-file',
- spinner: 'qq-upload-spinner',
- size: 'qq-upload-size',
- cancel: 'qq-upload-cancel',
-
- // added to list item when upload completes
- // used in css to hide progress spinner
- success: 'qq-upload-success',
- fail: 'qq-upload-fail'
- }
- });
- // overwrite options with user supplied
- qq.extend(this._options, o);
-
- this._element = this._options.element;
- this._element.innerHTML = this._options.template;
- this._listElement = this._options.listElement || this._find(this._element, 'list');
-
- this._classes = this._options.classes;
-
- this._button = this._createUploadButton(this._find(this._element, 'button'));
-
- this._bindCancelEvent();
- this._setupDragDrop();
-};
-
-// inherit from Basic Uploader
-qq.extend(qq.FileUploader.prototype, qq.FileUploaderBasic.prototype);
-
-qq.extend(qq.FileUploader.prototype, {
- /**
- * Gets one of the elements listed in this._options.classes
- **/
- _find: function(parent, type){
- var element = qq.getByClass(parent, this._options.classes[type])[0];
- if (!element){
- throw new Error('element not found ' + type);
- }
-
- return element;
- },
- _setupDragDrop: function(){
- var self = this,
- dropArea = this._find(this._element, 'drop');
-
- var dz = new qq.UploadDropZone({
- element: dropArea,
- onEnter: function(e){
- qq.addClass(dropArea, self._classes.dropActive);
- e.stopPropagation();
- },
- onLeave: function(e){
- e.stopPropagation();
- },
- onLeaveNotDescendants: function(e){
- qq.removeClass(dropArea, self._classes.dropActive);
- },
- onDrop: function(e){
- dropArea.style.display = 'none';
- qq.removeClass(dropArea, self._classes.dropActive);
- self._uploadFileList(e.dataTransfer.files);
- }
- });
-
- dropArea.style.display = 'none';
-
- qq.attach(document, 'dragenter', function(e){
- if (!dz._isValidFileDrag(e)) return;
-
- dropArea.style.display = 'block';
- });
- qq.attach(document, 'dragleave', function(e){
- if (!dz._isValidFileDrag(e)) return;
-
- var relatedTarget = document.elementFromPoint(e.clientX, e.clientY);
- // only fire when leaving document out
- if ( ! relatedTarget || relatedTarget.nodeName == "HTML"){
- dropArea.style.display = 'none';
- }
- });
- },
- _onSubmit: function(id, fileName){
- qq.FileUploaderBasic.prototype._onSubmit.apply(this, arguments);
- this._addToList(id, fileName);
- },
- _onProgress: function(id, fileName, loaded, total){
- qq.FileUploaderBasic.prototype._onProgress.apply(this, arguments);
-
- var item = this._getItemByFileId(id);
- var size = this._find(item, 'size');
- size.style.display = 'inline';
-
- var text;
- if (loaded != total){
- text = Math.round(loaded / total * 100) + '% from ' + this._formatSize(total);
- } else {
- text = this._formatSize(total);
- }
-
- qq.setText(size, text);
- },
- _onComplete: function(id, fileName, result){
- qq.FileUploaderBasic.prototype._onComplete.apply(this, arguments);
-
- // mark completed
- var item = this._getItemByFileId(id);
- qq.remove(this._find(item, 'cancel'));
- qq.remove(this._find(item, 'spinner'));
-
- if (result.success){
- qq.addClass(item, this._classes.success);
- } else {
- qq.addClass(item, this._classes.fail);
- }
- },
- _addToList: function(id, fileName){
- var item = qq.toElement(this._options.fileTemplate);
- item.qqFileId = id;
-
- var fileElement = this._find(item, 'file');
- qq.setText(fileElement, this._formatFileName(fileName));
- this._find(item, 'size').style.display = 'none';
-
- this._listElement.appendChild(item);
- },
- _getItemByFileId: function(id){
- var item = this._listElement.firstChild;
-
- // there can't be txt nodes in dynamically created list
- // and we can use nextSibling
- while (item){
- if (item.qqFileId == id) return item;
- item = item.nextSibling;
- }
- },
- /**
- * delegate click event for cancel link
- **/
- _bindCancelEvent: function(){
- var self = this,
- list = this._listElement;
-
- qq.attach(list, 'click', function(e){
- e = e || window.event;
- var target = e.target || e.srcElement;
-
- if (qq.hasClass(target, self._classes.cancel)){
- qq.preventDefault(e);
-
- var item = target.parentNode;
- self._handler.cancel(item.qqFileId);
- qq.remove(item);
- }
- });
- }
-});
-
-qq.UploadDropZone = function(o){
- this._options = {
- element: null,
- onEnter: function(e){},
- onLeave: function(e){},
- // is not fired when leaving element by hovering descendants
- onLeaveNotDescendants: function(e){},
- onDrop: function(e){}
- };
- qq.extend(this._options, o);
-
- this._element = this._options.element;
-
- this._disableDropOutside();
- this._attachEvents();
-};
-
-qq.UploadDropZone.prototype = {
- _disableDropOutside: function(e){
- // run only once for all instances
- if (!qq.UploadDropZone.dropOutsideDisabled ){
-
- qq.attach(document, 'dragover', function(e){
- if (e.dataTransfer){
- e.dataTransfer.dropEffect = 'none';
- e.preventDefault();
- }
- });
-
- qq.UploadDropZone.dropOutsideDisabled = true;
- }
- },
- _attachEvents: function(){
- var self = this;
-
- qq.attach(self._element, 'dragover', function(e){
- if (!self._isValidFileDrag(e)) return;
-
- var effect = e.dataTransfer.effectAllowed;
- if (effect == 'move' || effect == 'linkMove'){
- e.dataTransfer.dropEffect = 'move'; // for FF (only move allowed)
- } else {
- e.dataTransfer.dropEffect = 'copy'; // for Chrome
- }
-
- e.stopPropagation();
- e.preventDefault();
- });
-
- qq.attach(self._element, 'dragenter', function(e){
- if (!self._isValidFileDrag(e)) return;
-
- self._options.onEnter(e);
- });
-
- qq.attach(self._element, 'dragleave', function(e){
- if (!self._isValidFileDrag(e)) return;
-
- self._options.onLeave(e);
-
- var relatedTarget = document.elementFromPoint(e.clientX, e.clientY);
- // do not fire when moving a mouse over a descendant
- if (qq.contains(this, relatedTarget)) return;
-
- self._options.onLeaveNotDescendants(e);
- });
-
- qq.attach(self._element, 'drop', function(e){
- if (!self._isValidFileDrag(e)) return;
-
- e.preventDefault();
- self._options.onDrop(e);
- });
- },
- _isValidFileDrag: function(e){
- var dt = e.dataTransfer,
- // do not check dt.types.contains in webkit, because it crashes safari 4
- isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1;
-
- // dt.effectAllowed is none in Safari 5
- // dt.types.contains check is for firefox
- return dt && dt.effectAllowed != 'none' &&
- (dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files')));
-
- }
-};
-
-qq.UploadButton = function(o){
- this._options = {
- element: null,
- // if set to true adds multiple attribute to file input
- multiple: false,
- // name attribute of file input
- name: 'file',
- onChange: function(input){},
- hoverClass: 'qq-upload-button-hover',
- focusClass: 'qq-upload-button-focus'
- };
-
- qq.extend(this._options, o);
-
- this._element = this._options.element;
-
- // make button suitable container for input
- qq.css(this._element, {
- position: 'relative',
- overflow: 'hidden',
- // Make sure browse button is in the right side
- // in Internet Explorer
- direction: 'ltr'
- });
-
- this._input = this._createInput();
-};
-
-qq.UploadButton.prototype = {
- /* returns file input element */
- getInput: function(){
- return this._input;
- },
- /* cleans/recreates the file input */
- reset: function(){
- if (this._input.parentNode){
- qq.remove(this._input);
- }
-
- qq.removeClass(this._element, this._options.focusClass);
- this._input = this._createInput();
- },
- _createInput: function(){
- var input = document.createElement("input");
-
- if (this._options.multiple){
- input.setAttribute("multiple", "multiple");
- }
-
- input.setAttribute("type", "file");
- input.setAttribute("name", this._options.name);
-
- qq.css(input, {
- position: 'absolute',
- // in Opera only 'browse' button
- // is clickable and it is located at
- // the right side of the input
- right: 0,
- top: 0,
- fontFamily: 'Arial',
- // 4 persons reported this, the max values that worked for them were 243, 236, 236, 118
- fontSize: '118px',
- margin: 0,
- padding: 0,
- cursor: 'pointer',
- opacity: 0
- });
-
- this._element.appendChild(input);
-
- var self = this;
- qq.attach(input, 'change', function(){
- self._options.onChange(input);
- });
-
- qq.attach(input, 'mouseover', function(){
- qq.addClass(self._element, self._options.hoverClass);
- });
- qq.attach(input, 'mouseout', function(){
- qq.removeClass(self._element, self._options.hoverClass);
- });
- qq.attach(input, 'focus', function(){
- qq.addClass(self._element, self._options.focusClass);
- });
- qq.attach(input, 'blur', function(){
- qq.removeClass(self._element, self._options.focusClass);
- });
-
- // IE and Opera, unfortunately have 2 tab stops on file input
- // which is unacceptable in our case, disable keyboard access
- if (window.attachEvent){
- // it is IE or Opera
- input.setAttribute('tabIndex', "-1");
- }
-
- return input;
- }
-};
-
-/**
- * Class for uploading files, uploading itself is handled by child classes
- */
-qq.UploadHandlerAbstract = function(o){
- this._options = {
- debug: false,
- action: '/upload.php',
- // maximum number of concurrent uploads
- maxConnections: 999,
- onProgress: function(id, fileName, loaded, total){},
- onComplete: function(id, fileName, response){},
- onCancel: function(id, fileName){}
- };
- qq.extend(this._options, o);
-
- this._queue = [];
- // params for files in queue
- this._params = [];
-};
-qq.UploadHandlerAbstract.prototype = {
- log: function(str){
- if (this._options.debug && window.console) console.log('[uploader] ' + str);
- },
- /**
- * Adds file or file input to the queue
- * @returns id
- **/
- add: function(file){},
- /**
- * Sends the file identified by id and additional query params to the server
- */
- upload: function(id, params){
- var len = this._queue.push(id);
-
- var copy = {};
- qq.extend(copy, params);
- this._params[id] = copy;
-
- // if too many active uploads, wait...
- if (len <= this._options.maxConnections){
- this._upload(id, this._params[id]);
- }
- },
- /**
- * Cancels file upload by id
- */
- cancel: function(id){
- this._cancel(id);
- this._dequeue(id);
- },
- /**
- * Cancells all uploads
- */
- cancelAll: function(){
- for (var i=0; i= max && i < max){
- var nextId = this._queue[max-1];
- this._upload(nextId, this._params[nextId]);
- }
- }
-};
-
-/**
- * Class for uploading files using form and iframe
- * @inherits qq.UploadHandlerAbstract
- */
-qq.UploadHandlerForm = function(o){
- qq.UploadHandlerAbstract.apply(this, arguments);
-
- this._inputs = {};
-};
-// @inherits qq.UploadHandlerAbstract
-qq.extend(qq.UploadHandlerForm.prototype, qq.UploadHandlerAbstract.prototype);
-
-qq.extend(qq.UploadHandlerForm.prototype, {
- add: function(fileInput){
- fileInput.setAttribute('name', 'qqfile');
- var id = 'qq-upload-handler-iframe' + qq.getUniqueId();
-
- this._inputs[id] = fileInput;
-
- // remove file input from DOM
- if (fileInput.parentNode){
- qq.remove(fileInput);
- }
-
- return id;
- },
- getName: function(id){
- // get input value and remove path to normalize
- return this._inputs[id].value.replace(/.*(\/|\\)/, "");
- },
- _cancel: function(id){
- this._options.onCancel(id, this.getName(id));
-
- delete this._inputs[id];
-
- var iframe = document.getElementById(id);
- if (iframe){
- // to cancel request set src to something else
- // we use src="javascript:false;" because it doesn't
- // trigger ie6 prompt on https
- iframe.setAttribute('src', 'javascript:false;');
-
- qq.remove(iframe);
- }
- },
- _upload: function(id, params){
- var input = this._inputs[id];
-
- if (!input){
- throw new Error('file with passed id was not added, or already uploaded or cancelled');
- }
-
- var fileName = this.getName(id);
-
- var iframe = this._createIframe(id);
- var form = this._createForm(iframe, params);
- form.appendChild(input);
-
- var self = this;
- this._attachLoadEvent(iframe, function(){
- self.log('iframe loaded');
-
- var response = self._getIframeContentJSON(iframe);
-
- self._options.onComplete(id, fileName, response);
- self._dequeue(id);
-
- delete self._inputs[id];
- // timeout added to fix busy state in FF3.6
- setTimeout(function(){
- qq.remove(iframe);
- }, 1);
- });
-
- form.submit();
- qq.remove(form);
-
- return id;
- },
- _attachLoadEvent: function(iframe, callback){
- qq.attach(iframe, 'load', function(){
- // when we remove iframe from dom
- // the request stops, but in IE load
- // event fires
- if (!iframe.parentNode){
- return;
- }
-
- // fixing Opera 10.53
- if (iframe.contentDocument &&
- iframe.contentDocument.body &&
- iframe.contentDocument.body.innerHTML == "false"){
- // In Opera event is fired second time
- // when body.innerHTML changed from false
- // to server response approx. after 1 sec
- // when we upload file with iframe
- return;
- }
-
- callback();
- });
- },
- /**
- * Returns json object received by iframe from server.
- */
- _getIframeContentJSON: function(iframe){
- // iframe.contentWindow.document - for IE<7
- var doc = iframe.contentDocument ? iframe.contentDocument: iframe.contentWindow.document,
- response;
-
- this.log("converting iframe's innerHTML to JSON");
- this.log("innerHTML = " + doc.body.innerHTML);
-
- try {
- response = eval("(" + doc.body.innerHTML + ")");
- } catch(err){
- response = {};
- }
-
- return response;
- },
- /**
- * Creates iframe with unique name
- */
- _createIframe: function(id){
- // We can't use following code as the name attribute
- // won't be properly registered in IE6, and new window
- // on form submit will open
- // var iframe = document.createElement('iframe');
- // iframe.setAttribute('name', id);
-
- var iframe = qq.toElement('');
- // src="javascript:false;" removes ie6 prompt on https
-
- iframe.setAttribute('id', id);
-
- iframe.style.display = 'none';
- document.body.appendChild(iframe);
-
- return iframe;
- },
- /**
- * Creates form, that will be submitted to iframe
- */
- _createForm: function(iframe, params){
- // We can't use the following code in IE6
- // var form = document.createElement('form');
- // form.setAttribute('method', 'post');
- // form.setAttribute('enctype', 'multipart/form-data');
- // Because in this case file won't be attached to request
- var form = qq.toElement('');
-
- var queryString = qq.obj2url(params, this._options.action);
-
- form.setAttribute('action', queryString);
- form.setAttribute('target', iframe.name);
- form.style.display = 'none';
- document.body.appendChild(form);
-
- return form;
- }
-});
-
-/**
- * Class for uploading files using xhr
- * @inherits qq.UploadHandlerAbstract
- */
-qq.UploadHandlerXhr = function(o){
- qq.UploadHandlerAbstract.apply(this, arguments);
-
- this._files = [];
- this._xhrs = [];
-
- // current loaded size in bytes for each file
- this._loaded = [];
-};
-
-// static method
-qq.UploadHandlerXhr.isSupported = function(){
- var input = document.createElement('input');
- input.type = 'file';
-
- return (
- 'multiple' in input &&
- typeof File != "undefined" &&
- typeof (new XMLHttpRequest()).upload != "undefined" );
-};
-
-// @inherits qq.UploadHandlerAbstract
-qq.extend(qq.UploadHandlerXhr.prototype, qq.UploadHandlerAbstract.prototype)
-
-qq.extend(qq.UploadHandlerXhr.prototype, {
- /**
- * Adds file to the queue
- * Returns id to use with upload, cancel
- **/
- add: function(file){
- if (!(file instanceof File)){
- throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');
- }
-
- return this._files.push(file) - 1;
- },
- getName: function(id){
- var file = this._files[id];
- // fix missing name in Safari 4
- return file.fileName != null ? file.fileName : file.name;
- },
- getSize: function(id){
- var file = this._files[id];
- return file.fileSize != null ? file.fileSize : file.size;
- },
- /**
- * Returns uploaded bytes for file identified by id
- */
- getLoaded: function(id){
- return this._loaded[id] || 0;
- },
- /**
- * Sends the file identified by id and additional query params to the server
- * @param {Object} params name-value string pairs
- */
- _upload: function(id, params){
- var file = this._files[id],
- name = this.getName(id),
- size = this.getSize(id);
-
- this._loaded[id] = 0;
-
- var xhr = this._xhrs[id] = new XMLHttpRequest();
- var self = this;
-
- xhr.upload.onprogress = function(e){
- if (e.lengthComputable){
- self._loaded[id] = e.loaded;
- self._options.onProgress(id, name, e.loaded, e.total);
- }
- };
-
- xhr.onreadystatechange = function(){
- if (xhr.readyState == 4){
- self._onComplete(id, xhr);
- }
- };
-
- // build query string
- params = params || {};
- params['qqfile'] = name;
- var queryString = qq.obj2url(params, this._options.action);
-
- xhr.open("POST", queryString, true);
- xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
- xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
- xhr.setRequestHeader("Content-Type", "application/octet-stream");
- xhr.send(file);
- },
- _onComplete: function(id, xhr){
- // the request was aborted/cancelled
- if (!this._files[id]) return;
-
- var name = this.getName(id);
- var size = this.getSize(id);
-
- this._options.onProgress(id, name, size, size);
-
- if (xhr.status == 200){
- this.log("xhr - server response received");
- this.log("responseText = " + xhr.responseText);
-
- var response;
-
- try {
- response = eval("(" + xhr.responseText + ")");
- } catch(err){
- response = {};
- }
-
- this._options.onComplete(id, name, response);
-
- } else {
- this._options.onComplete(id, name, {});
- }
-
- this._files[id] = null;
- this._xhrs[id] = null;
- this._dequeue(id);
- },
- _cancel: function(id){
- this._options.onCancel(id, this.getName(id));
-
- this._files[id] = null;
-
- if (this._xhrs[id]){
- this._xhrs[id].abort();
- this._xhrs[id] = null;
- }
- }
-});
\ No newline at end of file
diff --git a/src/cloud/occi/lib/ui/public/vendor/flot/LICENSE.txt b/src/cloud/occi/lib/ui/public/vendor/flot/LICENSE.txt
deleted file mode 100644
index 07d5b2094d..0000000000
--- a/src/cloud/occi/lib/ui/public/vendor/flot/LICENSE.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2007-2009 IOLA and Ole Laursen
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/cloud/occi/lib/ui/public/vendor/flot/NOTICE b/src/cloud/occi/lib/ui/public/vendor/flot/NOTICE
deleted file mode 100644
index 7350db1db3..0000000000
--- a/src/cloud/occi/lib/ui/public/vendor/flot/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-THIRD-PARTY SOFTWARE
-
- * Author: Ole Laursen (http://people.iola.dk/olau/)
- * Info: http://code.google.com/p/flot/
- * Copyright: Copyright (c) 2007-2012 IOLA and Ole Laursen
- * License: MIT License: http://www.opensource.org/licenses/mit-license.php (or LICENSE.txt)
diff --git a/src/cloud/occi/lib/ui/public/vendor/flot/README.txt b/src/cloud/occi/lib/ui/public/vendor/flot/README.txt
deleted file mode 100644
index 1e49787a05..0000000000
--- a/src/cloud/occi/lib/ui/public/vendor/flot/README.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-About
------
-
-Flot is a Javascript plotting library for jQuery. Read more at the
-website:
-
- http://code.google.com/p/flot/
-
-Take a look at the examples linked from above, they should give a good
-impression of what Flot can do and the source code of the examples is
-probably the fastest way to learn how to use Flot.
-
-
-Installation
-------------
-
-Just include the Javascript file after you've included jQuery.
-
-Generally, all browsers that support the HTML5 canvas tag are
-supported.
-
-For support for Internet Explorer < 9, you can use Excanvas, a canvas
-emulator; this is used in the examples bundled with Flot. You just
-include the excanvas script like this:
-
-
-
-If it's not working on your development IE 6.0, check that it has
-support for VML which Excanvas is relying on. It appears that some
-stripped down versions used for test environments on virtual machines
-lack the VML support.
-
-You can also try using Flashcanvas (see
-http://code.google.com/p/flashcanvas/), which uses Flash to do the
-emulation. Although Flash can be a bit slower to load than VML, if
-you've got a lot of points, the Flash version can be much faster
-overall. Flot contains some wrapper code for activating Excanvas which
-Flashcanvas is compatible with.
-
-You need at least jQuery 1.2.6, but try at least 1.3.2 for interactive
-charts because of performance improvements in event handling.
-
-
-Basic usage
------------
-
-Create a placeholder div to put the graph in:
-
-
-
-You need to set the width and height of this div, otherwise the plot
-library doesn't know how to scale the graph. You can do it inline like
-this:
-
-
-
-You can also do it with an external stylesheet. Make sure that the
-placeholder isn't within something with a display:none CSS property -
-in that case, Flot has trouble measuring label dimensions which
-results in garbled looks and might have trouble measuring the
-placeholder dimensions which is fatal (it'll throw an exception).
-
-Then when the div is ready in the DOM, which is usually on document
-ready, run the plot function:
-
- $.plot($("#placeholder"), data, options);
-
-Here, data is an array of data series and options is an object with
-settings if you want to customize the plot. Take a look at the
-examples for some ideas of what to put in or look at the reference
-in the file "API.txt". Here's a quick example that'll draw a line from
-(0, 0) to (1, 1):
-
- $.plot($("#placeholder"), [ [[0, 0], [1, 1]] ], { yaxis: { max: 1 } });
-
-The plot function immediately draws the chart and then returns a plot
-object with a couple of methods.
-
-
-What's with the name?
----------------------
-
-First: it's pronounced with a short o, like "plot". Not like "flawed".
-
-So "Flot" rhymes with "plot".
-
-And if you look up "flot" in a Danish-to-English dictionary, some up
-the words that come up are "good-looking", "attractive", "stylish",
-"smart", "impressive", "extravagant". One of the main goals with Flot
-is pretty looks.
diff --git a/src/cloud/occi/lib/ui/public/vendor/flot/jquery.flot.min.js b/src/cloud/occi/lib/ui/public/vendor/flot/jquery.flot.min.js
deleted file mode 100644
index 4467fc5d8c..0000000000
--- a/src/cloud/occi/lib/ui/public/vendor/flot/jquery.flot.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Javascript plotting library for jQuery, v. 0.7.
- *
- * Released under the MIT license by IOLA, December 2007.
- *
- */
-(function(b){b.color={};b.color.make=function(d,e,g,f){var c={};c.r=d||0;c.g=e||0;c.b=g||0;c.a=f!=null?f:1;c.add=function(h,j){for(var k=0;k=1){return"rgb("+[c.r,c.g,c.b].join(",")+")"}else{return"rgba("+[c.r,c.g,c.b,c.a].join(",")+")"}};c.normalize=function(){function h(k,j,l){return jl?l:j)}c.r=h(0,parseInt(c.r),255);c.g=h(0,parseInt(c.g),255);c.b=h(0,parseInt(c.b),255);c.a=h(0,c.a,1);return c};c.clone=function(){return b.color.make(c.r,c.b,c.g,c.a)};return c.normalize()};b.color.extract=function(d,e){var c;do{c=d.css(e).toLowerCase();if(c!=""&&c!="transparent"){break}d=d.parent()}while(!b.nodeName(d.get(0),"body"));if(c=="rgba(0, 0, 0, 0)"){c="transparent"}return b.color.parse(c)};b.color.parse=function(c){var d,f=b.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10))}if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]))}if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55)}if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55,parseFloat(d[4]))}if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)){return f(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16))}if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)){return f(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16))}var e=b.trim(c).toLowerCase();if(e=="transparent"){return f(255,255,255,0)}else{d=a[e]||[0,0,0];return f(d[0],d[1],d[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function(c){function b(av,ai,J,af){var Q=[],O={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:0.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},hooks:{}},az=null,ad=null,y=null,H=null,A=null,p=[],aw=[],q={left:0,right:0,top:0,bottom:0},G=0,I=0,h=0,w=0,ak={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},aq=this;aq.setData=aj;aq.setupGrid=t;aq.draw=W;aq.getPlaceholder=function(){return av};aq.getCanvas=function(){return az};aq.getPlotOffset=function(){return q};aq.width=function(){return h};aq.height=function(){return w};aq.offset=function(){var aB=y.offset();aB.left+=q.left;aB.top+=q.top;return aB};aq.getData=function(){return Q};aq.getAxes=function(){var aC={},aB;c.each(p.concat(aw),function(aD,aE){if(aE){aC[aE.direction+(aE.n!=1?aE.n:"")+"axis"]=aE}});return aC};aq.getXAxes=function(){return p};aq.getYAxes=function(){return aw};aq.c2p=C;aq.p2c=ar;aq.getOptions=function(){return O};aq.highlight=x;aq.unhighlight=T;aq.triggerRedrawOverlay=f;aq.pointOffset=function(aB){return{left:parseInt(p[aA(aB,"x")-1].p2c(+aB.x)+q.left),top:parseInt(aw[aA(aB,"y")-1].p2c(+aB.y)+q.top)}};aq.shutdown=ag;aq.resize=function(){B();g(az);g(ad)};aq.hooks=ak;F(aq);Z(J);X();aj(ai);t();W();ah();function an(aD,aB){aB=[aq].concat(aB);for(var aC=0;aC=O.colors.length){aG=0;++aF}}var aH=0,aN;for(aG=0;aGa3.datamax&&a1!=aB){a3.datamax=a1}}c.each(m(),function(a1,a2){a2.datamin=aO;a2.datamax=aI;a2.used=false});for(aU=0;aU0&&aT[aR-aP]!=null&&aT[aR-aP]!=aT[aR]&&aT[aR-aP+1]!=aT[aR+1]){for(aN=0;aNaM){aM=a0}}if(aX.y){if(a0aV){aV=a0}}}}if(aJ.bars.show){var aY=aJ.bars.align=="left"?0:-aJ.bars.barWidth/2;if(aJ.bars.horizontal){aQ+=aY;aV+=aY+aJ.bars.barWidth}else{aK+=aY;aM+=aY+aJ.bars.barWidth}}aF(aJ.xaxis,aK,aM);aF(aJ.yaxis,aQ,aV)}c.each(m(),function(a1,a2){if(a2.datamin==aO){a2.datamin=null}if(a2.datamax==aI){a2.datamax=null}})}function j(aB,aC){var aD=document.createElement("canvas");aD.className=aC;aD.width=G;aD.height=I;if(!aB){c(aD).css({position:"absolute",left:0,top:0})}c(aD).appendTo(av);if(!aD.getContext){aD=window.G_vmlCanvasManager.initElement(aD)}aD.getContext("2d").save();return aD}function B(){G=av.width();I=av.height();if(G<=0||I<=0){throw"Invalid dimensions for plot, width = "+G+", height = "+I}}function g(aC){if(aC.width!=G){aC.width=G}if(aC.height!=I){aC.height=I}var aB=aC.getContext("2d");aB.restore();aB.save()}function X(){var aC,aB=av.children("canvas.base"),aD=av.children("canvas.overlay");if(aB.length==0||aD==0){av.html("");av.css({padding:0});if(av.css("position")=="static"){av.css("position","relative")}B();az=j(true,"base");ad=j(false,"overlay");aC=false}else{az=aB.get(0);ad=aD.get(0);aC=true}H=az.getContext("2d");A=ad.getContext("2d");y=c([ad,az]);if(aC){av.data("plot").shutdown();aq.resize();A.clearRect(0,0,G,I);y.unbind();av.children().not([az,ad]).remove()}av.data("plot",aq)}function ah(){if(O.grid.hoverable){y.mousemove(aa);y.mouseleave(l)}if(O.grid.clickable){y.click(R)}an(ak.bindEvents,[y])}function ag(){if(M){clearTimeout(M)}y.unbind("mousemove",aa);y.unbind("mouseleave",l);y.unbind("click",R);an(ak.shutdown,[y])}function r(aG){function aC(aH){return aH}var aF,aB,aD=aG.options.transform||aC,aE=aG.options.inverseTransform;if(aG.direction=="x"){aF=aG.scale=h/Math.abs(aD(aG.max)-aD(aG.min));aB=Math.min(aD(aG.max),aD(aG.min))}else{aF=aG.scale=w/Math.abs(aD(aG.max)-aD(aG.min));aF=-aF;aB=Math.max(aD(aG.max),aD(aG.min))}if(aD==aC){aG.p2c=function(aH){return(aH-aB)*aF}}else{aG.p2c=function(aH){return(aD(aH)-aB)*aF}}if(!aE){aG.c2p=function(aH){return aB+aH/aF}}else{aG.c2p=function(aH){return aE(aB+aH/aF)}}}function L(aD){var aB=aD.options,aF,aJ=aD.ticks||[],aI=[],aE,aK=aB.labelWidth,aG=aB.labelHeight,aC;function aH(aM,aL){return c('
'];var aJ=m();for(var aD=0;aD');for(var aE=0;aEaC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('
').data("jGrowl",o).addClass(o.theme).children('div.jGrowl-close').bind("click.jGrowl",function(){$(this).parent().trigger('jGrowl.close');}).parent();$(notification).bind("mouseover.jGrowl",function(){$('div.jGrowl-notification',self.element).data("jGrowl.pause",true);}).bind("mouseout.jGrowl",function(){$('div.jGrowl-notification',self.element).data("jGrowl.pause",false);}).bind('jGrowl.beforeOpen',function(){if(o.beforeOpen.apply(notification,[notification,message,o,self.element])!=false){$(this).trigger('jGrowl.open');}}).bind('jGrowl.open',function(){if(o.open.apply(notification,[notification,message,o,self.element])!=false){if(o.glue=='after'){$('div.jGrowl-notification:last',self.element).after(notification);}else{$('div.jGrowl-notification:first',self.element).before(notification);}
-$(this).animate(o.animateOpen,o.openDuration,o.easing,function(){if($.browser.msie&&(parseInt($(this).css('opacity'),10)===1||parseInt($(this).css('opacity'),10)===0))
-this.style.removeAttribute('filter');if($(this).data("jGrowl")!=null)
-$(this).data("jGrowl").created=new Date();$(this).trigger('jGrowl.afterOpen');});}}).bind('jGrowl.afterOpen',function(){o.afterOpen.apply(notification,[notification,message,o,self.element]);}).bind('jGrowl.beforeClose',function(){if(o.beforeClose.apply(notification,[notification,message,o,self.element])!=false)
-$(this).trigger('jGrowl.close');}).bind('jGrowl.close',function(){$(this).data('jGrowl.pause',true);$(this).animate(o.animateClose,o.closeDuration,o.easing,function(){if($.isFunction(o.close)){if(o.close.apply(notification,[notification,message,o,self.element])!==false)
-$(this).remove();}else{$(this).remove();}});}).trigger('jGrowl.beforeOpen');if(o.corners!=''&&$.fn.corner!=undefined)$(notification).corner(o.corners);if($('div.jGrowl-notification:parent',self.element).size()>1&&$('div.jGrowl-closer',self.element).size()==0&&this.defaults.closer!=false){$(this.defaults.closerTemplate).addClass('jGrowl-closer ui-state-highlight ui-corner-all').addClass(this.defaults.theme).appendTo(self.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){$(this).siblings().trigger("jGrowl.beforeClose");if($.isFunction(self.defaults.closer)){self.defaults.closer.apply($(this).parent()[0],[$(this).parent()[0]]);}});};},update:function(){$(this.element).find('div.jGrowl-notification:parent').each(function(){if($(this).data("jGrowl")!=undefined&&$(this).data("jGrowl").created!=undefined&&($(this).data("jGrowl").created.getTime()+parseInt($(this).data("jGrowl").life))<(new Date()).getTime()&&$(this).data("jGrowl").sticky!=true&&($(this).data("jGrowl.pause")==undefined||$(this).data("jGrowl.pause")!=true)){$(this).trigger('jGrowl.beforeClose');}});if(this.notifications.length>0&&(this.defaults.pool==0||$(this.element).find('div.jGrowl-notification:parent').size()');this.interval=setInterval(function(){$(e).data('jGrowl.instance').update();},parseInt(this.defaults.check));if($.browser.msie&&parseInt($.browser.version)<7&&!window["XMLHttpRequest"]){$(this.element).addClass('ie6');}},shutdown:function(){$(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove();clearInterval(this.interval);},close:function(){$(this.element).find('div.jGrowl-notification').each(function(){$(this).trigger('jGrowl.beforeClose');});}});$.jGrowl.defaults=$.fn.jGrowl.prototype.defaults;})(jQuery);
\ No newline at end of file
diff --git a/src/cloud/occi/lib/ui/public/vendor/jQuery/MIT-LICENSE.txt b/src/cloud/occi/lib/ui/public/vendor/jQuery/MIT-LICENSE.txt
deleted file mode 100644
index 532704636b..0000000000
--- a/src/cloud/occi/lib/ui/public/vendor/jQuery/MIT-LICENSE.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2011 John Resig, http://jquery.com/
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/cloud/occi/lib/ui/public/vendor/jQuery/NOTICE b/src/cloud/occi/lib/ui/public/vendor/jQuery/NOTICE
deleted file mode 100644
index 796234964d..0000000000
--- a/src/cloud/occi/lib/ui/public/vendor/jQuery/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-THIRD-PARTY SOFTWARE
-
- * Author: John Resig (www.sprymedia.co.uk)
- * Info: http://jquery.com/
- * Copyright: Copyright (c) 2012 John Resig, http://jquery.com/
- * License: MIT License: See MIT-LICENSE.txt
diff --git a/src/cloud/occi/lib/ui/public/vendor/jQuery/jquery-1.7.1.min.js b/src/cloud/occi/lib/ui/public/vendor/jQuery/jquery-1.7.1.min.js
deleted file mode 100644
index 198b3ff07d..0000000000
--- a/src/cloud/occi/lib/ui/public/vendor/jQuery/jquery-1.7.1.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.7.1 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="