/*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajax Poll Admin v1.07 [ Commercial Version ] // Copyright (c) phpkobo.com ( http://www.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : APADM-107 // URL : http://www.phpkobo.com/ajax-poll-admin // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ (function($){ //---------------------------------------------------------------- // CWaitIcon //---------------------------------------------------------------- function CWaitIcon( url_img ) { var s = ''; s += "
"; s += ""; s += "
"; this.box = $( s ); this.box.css({ "position":"absolute", "left":"-10000px", "top":"-10000px", "padding":"5px 5px 3px 5px", "opacity":"0.5" }); this.box.hide(); this.box.appendTo( $( 'body' ) ); } CWaitIcon.prototype = { show : function( e ) { var w = this.box.outerWidth(); var h = this.box.outerHeight(); this.box.css({ "left" : (e.pageX - w/2) + "px", "top" : (e.pageY - h/2) + "px" }); this.will_show = true; var _this = this; setTimeout( function(){ if ( _this.will_show ) { _this.box.show(); } }, 1000 ); }, hide : function() { this.will_show = false; this.box.hide(); } } //---------------------------------------------------------------- // CApp //---------------------------------------------------------------- var app_object_selector = '.apadm'; function CApp( jobj ) { this.children = []; this.jobj = jobj; this.tclass = this.getAttr( 'tclass', jobj ); this.tid = this.getAttr( 'tid', jobj ); //-- tprop this.tprop = {}; var span = jobj.children( 'span' ); if ( span.length ) { var json = span.eq(0).html(); jobj.attr( 'tprop', json ); if ( json != '' ) { this.tprop = eval('(' + json + ')'); } } this.url_app_entry = '/ajax-polls/conn/index.php'; this.url_app_root = '/ajax-polls/conn/'; this.url_app_img = '/ajax-polls/conn/images/'; this.appid = this.makeRandomString( 64 ); this.app_init_cmd = 'init'; this.wait_icon = new CWaitIcon( this.url_app_img + 'wait.gif' ); if ( this.app_init_cmd != '' ) { this.send( { "cmd" : this.app_init_cmd } ); } } CApp.prototype = { showWaitIcon: function( e ) { this.wait_icon.show( e ); }, showTipBox: function( obj, cfg, tbox ) { period = ( "period" in cfg ) ? cfg["period"] : 1000; var tip_box; if ( typeof tbox === 'object' ) { tip_box = tbox.clone(); } else { txt = ( "txt" in cfg ) ? cfg["txt"] : "Saved!"; bgcolor = ( "background-color" in cfg ) ? cfg["background-color"] : "#60a060"; var s = ''; s += "