var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); function process_name(name, len) { if (typeof(name) != 'string') { return ''; } var len = parseInt(len); if (isNaN(len)) { len = 8; } if (name.length <= len) { return name; } var half = Math.floor(len / 2); return name.substr(0, half) + '...' + name.substr(name.length - half); } function _done() { var reurl = getRequestValue('redirect_uri'); if (!reurl || reurl.length <= 0) { reurl = document.referrer; } if (reurl && reurl.length > 0) { window.location.href = reurl; return true; } else { return false; } } function getRequestValue(name){ var _search = window.location.search, _val = _search.match(new RegExp("[\?\&]" + name + "=([^\&]*)(\&?)","i")); return _val ? _val[1] : _val; } function linkDatePicker(params) { var firstObj = null;//第一个对象 if (!params) { return; } for (filter in params) { var tmpJ = $(filter); if (!firstObj) { firstObj = tmpJ; } tmpJ.val(params[filter]); } if (firstObj[0].form) { for (i in firstObj[0].form) { if (i == 'form') { alert(i); } } $(firstObj[0].form).submit(); } } function yellowNotice(con) { if (con) { $('#yellownotice').show().find('.con').html(con); } } $(function(){ //消息显示控件 (function(){ var $popup_msg = $('#popup-msg'), hideTimer = null, hideInterval = 10000, minShowTime = 300, startTime = 0; function popup_msg(msg, type, interval) { type = type || 'error'; hideInterval = (interval || 10) * 1000; $popup_msg.html(msg).show(); $popup_msg.addClass(type); var offset_width = $popup_msg.attr('offsetWidth')||$popup_msg.prop('offsetWidth'); var left = ($(document).width() - offset_width) / 2; $popup_msg.css('left', left);//.hide().slideDown(); startTime = + new Date; hideTimer = setTimeout(function(){ hide_msg() }, hideInterval); } function hide_msg() { if (hideTimer) { window.clearTimeout(hideTimer); hideTimer = null; } var showTime = + new Date - startTime; if (showTime < minShowTime) { hideTimer = setTimeout(function() { hide_msg() }, minShowTime - showTime); return; } $popup_msg.hide(); } window.popup_msg = popup_msg; window.hide_popup_msg = hide_msg; })(); //自动绑定日期控件 $('input.datepicker').live('focus', function() { var $t = $(this); if ($t.data('datepicker')) { return; } $t.blur(); $t.data('datepicker', 1); $t.datepicker({ onSelect: function(){ if ($t.prev().is('.input-bg')) { $t.prev().hide(); } } }); if ($t.hasClass('dp-history')) { //昨天之前的日期 var $d = new Date(); $d.setTime($d.getTime() - 86400 * 1000); $t.datepicker("option", "maxDate", $d); } if ($t.hasClass('dp-history-today')) { //今天之前的日期 var $d = new Date(); $t.datepicker("option", "maxDate", $d); } if ($t.hasClass('dp-future')) { //昨天之前的日期 var $d = new Date(); $t.datepicker("option", "minDate", $d); } }); //数字输入框控制 $('input.numeric').keyup(function(event){ this.value = this.value.replace(/[^0-9.]+/, ''); }); //过滤条件选择框变化自动提交查询表单 $('select.filter').change(function(){ this.form.submit(); }); //input 背景显示控制 $('input.input-bg').focus(function(){ var $t = $(this); $t.hide().next().trigger('focus'); if ( ! $t.next().data('input-bg')) { $t.next().data('input-bg', true).blur(function(){ if (this.value == '') { $t.show(); } }).change(function(){ if (this.value == '') { $t.show(); } }); } }).each(function(){ if ($(this).next().val() == '') { $(this).show(); } else { $(this).hide(); } }); //单选、勾选框点击触发显示框架 function bind_toggle_trigger() { $(':checkbox[rel^=trigger-],:radio[rel^=trigger-]').not('.trigger-toggle').click(function(event, from_trigger){ var $t = $(this), type = $t.attr('rel').replace(/^trigger-/, ''), $targets = $('[rel=target-' + type + ']'); $untargets = $('[rel=untarget-' + type + ']'); if ($t.is(':checked')) { $targets.show(); $untargets.hide(); } else { $targets.hide(); $untargets.show(); } if ($t.is(':radio') && ! from_trigger) { $(':radio[name=' + this.name + ']').not($t).each(function(){ $(this).triggerHandler('click', true); }); } }).each(function(){ $(this).addClass('trigger-toggle').triggerHandler('click'); }); } bind_toggle_trigger(); $(window).bind('ajax_load_page', function(){ bind_toggle_trigger(); }); //Ajax提交表单 function bind_ajax_form() { $('form.ajax').not('.bind-ajax').submit(function(event){ event.preventDefault(); //popup_msg('数据保存中...', 'info'); var form = $(this); if(form.attr('progress') == '1'){ return; } form.attr('progress','1') $.ajax({ type : 'post', dataType : 'json', url : $(this).attr('action') || location.href , data : $(this).serialize(), success : function(ret){ if (ret.code != 0) { popup_msg(ret.msg, 'error'); } else { if (ret.redirect_uri) { hide_popup_msg(); if (/javascript\s*:\s*(.+)/.test(ret.redirect_uri)) { $.globalEval(RegExp.$1); } else { if (is_popup_mode()) { popup(ret.redirect_uri); } else { window.location = ret.redirect_uri; } } } else { popup_msg(ret.msg, 'succ'); } } form.attr('progress','0') }, error : function(){ form.attr('progress','0') } }) }).each(function(){ $(this).addClass('bind-ajax'); }); } bind_ajax_form(); //记录列表操作 if ($('.list-table').length) { var $bat_action_btn = $('.btn[class*=bat-]'); $(':checkbox.sel-all,:checkbox.sel-item').click(function(){ var $t = $(this), isChecked = $t.attr('checked'); if ($t.is('.sel-all')) { if (isChecked) { $(':checkbox.sel-item,:checkbox.sel-all').attr('checked', true); $(':checkbox.sel-item').closest('tr').addClass('selected'); } else { $(':checkbox.sel-item,:checkbox.sel-all').attr('checked', false); $(':checkbox.sel-item').closest('tr').removeClass('selected'); } } else { if (isChecked) { if ($(':checkbox.sel-item:not(:checked)').length == 0) { $(':checkbox.sel-all').attr('checked', true); } $t.closest('tr').addClass('selected'); } else { $(':checkbox.sel-all').attr('checked', false); $t.closest('tr').removeClass('selected'); } } if ($(':checkbox.sel-item:checked').length == 0) { $bat_action_btn.addClass('disabled'); } else { $bat_action_btn.removeClass('disabled'); } }).triggerHandler('click'); $('.list-table tbody tr').click(function(event){ var $target = $(event.target); if ($target.is('a,:input,button')) { return; } var $checkbox = $target.closest('tr').find(':checkbox'); if ($checkbox.length) { $checkbox.attr('checked', ! $checkbox.attr('checked')); $checkbox.triggerHandler('click'); } }); window.get_selected_item_ids = function() { return $(':checkbox.sel-item:checked').map(function(){ return this.value; }).get().join(','); }; window.get_ids = function(elem) { var ids = ''; if ($(elem).is(':not([class*=bat-])')) { ids = $(elem).closest('tr').find(':checkbox').val(); } else { ids = get_selected_item_ids(); } if ( ! ids) { return; } return ids; }; } //遮罩层 var $mask = null; function show_mask() { if ($mask == null) { $mask = $('
') .appendTo(document.body) } var dw = $(document).width(), dh = $(document).height(); $mask.css({ width: dw, height: dh }).show(); } function hide_mask() { if ($mask) { $mask.hide(); } } //调出层 (function(){ var $popup = null; function init() { $popup = $('').appendTo(document.body); $('#popup-box .close').live('click', function(event){ event.preventDefault(); hide_popup(); }); $(document).keydown(function(event){ if (event.which == 27) { hide_popup(); } }); } function hide_popup() { hide_mask(); $popup.hide(); hide_popup_msg(); } function popup(url, title) { $popup == null && init(); show_mask(); title !== undefined && $popup.find('.title').html(title); $popup.find('.content').html('

Loading...

').end().show(); var w = $popup.attr('offsetWidth'), h = $popup.attr('offsetHeight'), ww = $(window).width(), wh = $(window).height(); $popup.css({ // width : w, left : Math.max(0, (ww - w) / 2), //top : Math.max(0, (wh - h) / 2) top : document.documentElement.scrollTop + 30 }).find('.content').load(url, function(){ // var nh = $popup.attr('offsetHeight'); var nw = $popup.find('.content').attr('offsetWidth'); var nh = $popup.find('.content').attr('offsetHeight'); /* $popup.css({ left : Math.max(0, (ww - nw) / 2), top : Math.max(0, (wh - nh) / 2) }); */ $popup.find('form:not(.ajax_validation)').addClass('ajax'); $(window).trigger('ajax_load_page'); }); }; function is_popup_mode() { return $popup && $popup.is(':visible'); } $(window).bind('ajax_load_page', function(){ if ( ! $popup) return; if (is_popup_mode()) { $popup.find('a:not([href^=#]):not([href^=javascript]):not(.bind-popup)').click(function(event){ event.preventDefault(); popup($(this).attr('href')); }).each(function(){ $(this).addClass('bind-popup'); }); } if (is_popup_mode()) { $('form.filter').submit(function(event){ event.preventDefault(); var url = $(this).attr('action') || location.href; url = url.split('?')[0]; url += '?' + $(this).serialize(); popup(url); return false; }); } bind_ajax_form(); bind_ajax_validation_form(); if (is_popup_mode()) { //绑定物料预览tip元素的相应事件 } }); window.popup = popup; window.hide_popup = hide_popup; window.is_popup_mode = is_popup_mode; })(); $(function(){ $('a.popup').click(function(event){ event.preventDefault(); popup($(this).attr('href'), $(this).attr('title')); }); if($('#search_key').val()==''||$('#search_key').val()=='输入创意名称,搜索创意'){ $('#search_key').addClass('gray').val('输入创意名称,搜索创意'); }; $('#search_key').click(function(){ $(this).val(''); $(this).removeClass('gray'); }); $('#search_key').blur(function(){ if($('#search_key').val()==''||$('#search_key').val()=='输入创意名称,搜索创意'){ $('#search_key').addClass('gray').val('输入创意名称,搜索创意'); }; }) $('#material-search').click(function(){ if($('#search_key').val()==''||$('#search_key').val()=='输入创意名称,搜索创意'){ return false; }else{ $('#main-form').submit(); } return false; }) }); $('a.lnkbtn_seek,a.submit').live('click', function(event){ event.preventDefault(); var $f = $(this).closest('form'); if ($f.length) { $f.trigger('submit'); } }); if ($.browser.msie) { $('a input[type=button]').each(function(){ var $btn = $(this), $a = $btn.closest('a'), url = $a.attr('href'), target = $a.attr('target'); if (url) { $a.click(function(event){ event.preventDefault }); $btn.click(function(){ if (target == '_blank') { window.open(url); } else { window.location = url; } }); } }); } }); function replacer(str,obj){ return str.replace(/{(\w+)}/g,function(all,$1){ return typeof obj[$1] == 'undefined' ? '' : obj[$1]; }); } //充值框开始 var Dialog = { show : function(el,callback){ this.el = el = $(el).show(); this.reset(); callback&&callback(el); if(!el.data('init')){ el.delegate('.close','click',function(e){ e.preventDefault(); Dialog.hide(); }); $('#float_mask').bind('click',function(){ Dialog.hide(); }) el.data('init',true) } }, hide : function(){ if(!this.el){return;} this.el.hide(); $('#float_mask').hide(); this.el = null; }, reset : function(){ if(!this.el)return; var me = this, doc = document, width = me.el.width(), height = me.el.height(), docWidth = $(doc).width(), docHeight = $(doc).height(), clientHeight = doc.documentElement.clientHeight; me.el.css({ top : $(doc).scrollTop() + (clientHeight - height)/2, left : (docWidth - width)/2, zIndex : 1003 }); $('#float_mask').show().css({ width : docWidth, height : docHeight, zIndex : 1002 }); } } function showRecharge(){ function err(msg) { $('#recharge .form-error').html(msg); $('#recharge .tips').hide(); } Dialog.show($('#recharge'),function(el){ if(!el.data('init')){ var handler = function(){ this.value = this.value.replace(/[^\d.]/,''); } el.delegate('.btn-recharge','click',function(){ var txtVal = +el.find('[name=amount]').val(); if(!txtVal){ err('请输入正确的金额.'); return; } if(txtVal1000000){ err('可输入的最大金额为1000000.'); return; } $('#pay_route').submit(); el.find('#rechargeForm').hide(); el.find('#rechargeResult').show(); el.addClass('recharge-result').removeClass('recharge'); }) .delegate('.close_dialog','click',function(){ Dialog.hide(); }) .delegate('.btn-recharge-succ','click',function(){ location.reload(true); }) .delegate('[name=amount]','keyup',handler) .delegate('[name=amount]','paste',handler) .delegate('[name=amount]','keypress',handler); } el.find('#rechargeForm').show(); el.find('#rechargeResult').hide(); el.removeClass('recharge-result').addClass('recharge'); el.find('[name=amount]').val(''); setTimeout(function(){ el.find('[name=amount]').focus(); },0) }); } $(function(){ $(document).delegate('.payit','click',function(e){ e.preventDefault(); showRecharge(); }); //充值框结束 //绑定物料预览tip元素的相应事件 $('#tool_tip_box').delegate('.previewtips','mouseenter',function(){ var data_id = $(this).attr('data_id'); tooltip.left($(this)); tooltip.top($(this)); tooltip.show(data_id); }); $('#tool_tip_box').delegate('.previewtips','mouseleave',function(){ tooltip.clean(); tooltip.hide(); }); }); //tooltip事件主体 var tooltip = { box: function(){return $('#tool_tip')}, con: function(){return $('#tool_tip div.con')}, timer: 1000, show : function(obj){ s = setTimeout("showtool('"+obj+"')",tooltip.timer); }, hide:function(){tooltip.box().css({top:0,left:0}).hide();}, clean: function(){ tooltip.con().html(''); window.clearTimeout(s); }, left:function(obj){ var offset = obj.offset(); offleft = offset.left+obj.width() tooltip.box().css('left', offleft ) }, top: function(obj){ var offset = obj.offset();tooltip.box().css('top', offset.top-5)} } //展示物料 var showtool = function(obj){ tooltip.box().show(); tooltip.con().html('载入中...'); $.get('/material/ajaxM', {'id':obj}, function(json){ if(json.code != 0) { tooltip.con().html(json.msg); tooltip.box().show(); } else { var mHtml = getMHtml(json.data); tooltip.con().html(mHtml); tooltip.box().show() } }, 'json'); } //根据物料对象返回物料展示html function getMHtml(m) { if (!m) { return '参数错误'; } var width = 240; var height = 210 var mType = m.type; if (mType == 1) {//txt return showMTxt(m.txt_title, m.txt_desc, width, height, m.txt_show_url); } if(mType == 2) {//img return showMImage(m.image_upload, width, height, m.width, m.height); } if (mType == 3) {//media if (m.media_type == 1) {//swf return showMSwf(m.media_upload, width, height, m.width,m.height, 'swfdiv'); } else {//flv return showMFlv(m.media_upload, width, height, m.width,m.height, 'flvdiv'); } } if (mType == 4) {//rich return showRich(width, height); } if (mType == 5) { return showPopup(width, height); } if (mType == 6) { return showMTxt(m.txtlink_title, '', width, height, ''); } } //物料展示 function getScaleSize(boxWidth,boxHeight,objWidth,objHeight){ var ratio = 1; var temp; if (objWidth > objHeight) { if (objWidth > boxWidth) { ratio = boxWidth / objWidth; } } else { if (objHeight > boxHeight) { ratio = boxHeight / objHeight; } } objWidth *= ratio; objHeight *= ratio; return [objWidth,objHeight]; } function showPopup(width, height) { return ''; } function showRich(width, height) { return ''; } function showDefaultPreview(width , height) { return ''; } function showMImage(imagePath, width, height, imgWidth, imgHeight, ext) { var ratio = 1; var scaleSize = getScaleSize(width, height, +imgWidth||1, +imgHeight||1); imgWidth = scaleSize[0]; imgHeight = scaleSize[1]; var html = ''; return html; } function showMTxt($title, $comment, $width, $height, $showUrl) { $title = stripTags($title); $comment = stripTags($comment); $showUrl = stripTags($showUrl); var $style = 'width:' + $width + 'px;height:' + $height + 'px;'; var $html = '
'; $html += '

' + $title + '

'; if ($showUrl) { $html += '
' + $showUrl + '
'; } $html += '

' + $comment + '

'; $html += '
'; return $html; } function showMSwf($flashPath, $width, $height, $swfWidth, $swfHeight, $divName) { var $ratio = 1; var scaleSize = getScaleSize($width, $height, +$swfWidth||1, +$swfHeight||1); $swfWidth = scaleSize[0]; $swfHeight = scaleSize[1]; $html = '
'; return $html; } function showMFlv($flashPath, $width, $height,$flvWidth, $flvHeight, $divName) { var $player = '/player.swf'; var scaleSize = getScaleSize($width, $height, +$flvWidth||1, +$flvHeight||1); $flvWidth = scaleSize[0]; $flvHeight = scaleSize[1]; var $html = '
'; return $html; } function stripTags(str) { if (typeof str == 'string') { return str.replace(/<\/?[^>]+>/gi, '').replace(/(^\s*)|(\s*$)/g, ''); } else { return str; } } //表格帮助提示 $('.help-icon').mouseover(function(){ var title=$(this).parent().attr('msg-title'); var msg_data=decodeURIComponent($(this).parent().attr('msg-data').replace(/\+/g,'%20')).split(';'); var data=""; for(var i=0;i'; } if(title){ $('.table-help h5').text(title); }else{ $('.table-help h5').text(''); } $('#help_list').html(data); //固定位置 var left=$(this).offset().left-10; var help=$('.table-help'); //var width=help.width(); var top=$(this).offset().top-help.height()-26; help.css({left:left,top:top}); help.width(160) $('.table-help').show(); }) $(document).mousedown(function(e){ $('.table-help').hide(); }) $('.table-help').mousedown(function(e){ e.stopPropagation(); }) ;(function(window, document, undefined){ var tipNode; $(document).delegate('[data-helptip]','mouseover',function() { if(!tipNode){ tipNode = $('
').addClass('help-tip').appendTo(document.body); } var me = $(this); var arrow = tipNode.find('.help-tip-arrow'); var contents = $(this).attr('data-helptip').split('::'); var title = contents[1]?'' +contents[0]+'':''; var content = contents[1] ? contents[1] : contents[0]; tipNode .find('.help-tip-content').html( title + content ) .end() .show() tipNode .css({ left : me.offset().left - 10 }) tipNode.css({ top : me.offset().top - tipNode.outerHeight() - arrow.outerHeight() }) arrow.css({ left : 10 }) }) .delegate('[data-helptip]','mouseout',function() { if(tipNode){ tipNode.hide() } }) })(window, document); /* * Placeholder plugin for jQuery * --- * Copyright 2010, Daniel Stocks (http://webcloud.se) * Released under the MIT, BSD, and GPL Licenses. */ (function(b){function d(a){this.input=a;a.attr("type")=="password"&&this.handlePassword();b(a[0].form).submit(function(){if(a.hasClass("placeholder")&&a[0].value==a.attr("placeholder"))a[0].value=""})}d.prototype={show:function(a){if(this.input[0].value===""||a&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(b){this.input.before(this.fakePassword.show()).hide()}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}}, hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")&&(this.input.removeClass("placeholder"),this.input[0].value="",this.isPassword)){try{this.input[0].setAttribute("type","password")}catch(a){}this.input.show();this.input[0].focus()}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var a=this.input;a.attr("realType","password");this.isPassword=!0;if(b.browser.msie&&a[0].outerHTML){var c=b(a[0].outerHTML.replace(/type=(['"])?password\1/gi, "type=$1text$1"));this.fakePassword=c.val(a.attr("placeholder")).addClass("placeholder").focus(function(){a.trigger("focus");b(this).hide()});b(a[0].form).submit(function(){c.remove();a.show()})}}};var e=!!("placeholder"in document.createElement("input"));b.fn.placeholder=function(){return e?this:this.each(function(){var a=b(this),c=new d(a);c.show(!0);a.focus(function(){c.hide()});a.blur(function(){c.show(!1)});b.browser.msie&&(b(window).load(function(){a.val()&&a.removeClass("placeholder");c.show(!0)}), a.focus(function(){if(this.value==""){var a=this.createTextRange();a.collapse(!0);a.moveStart("character",0);a.select()}}))})}})(jQuery); var ie6=!-[1,]&&!window.XMLHttpRequest; if(ie6){ $(document).delegate('.j-hover tr','mouseenter',function(){ $(this).addClass('j-hover-row') }).delegate('.j-hover tr','mouseleave',function(){ $(this).removeClass('j-hover-row') }) } $(function(){ $('#quit_instead').click(function(e){ e.preventDefault(); if (!confirm('确认退出?')) { return; } var url = $(this).attr('href'); $.getJSON( url, function(data) { if(data && data.code == 0) { window.close(); } else { alert(data.msg); } } ) }) }) } /* FILE ARCHIVED ON 23:31:13 May 18, 2014 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 04:34:32 Oct 10, 2025. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 0.816 exclusion.robots: 0.037 exclusion.robots.policy: 0.023 esindex: 0.014 cdx.remote: 338.862 LoadShardBlock: 291.214 (3) PetaboxLoader3.datanode: 301.142 (4) load_resource: 297.873 PetaboxLoader3.resolve: 89.772 */