diff --git a/.gitignore b/.gitignore index d3d724b79..46d67dd30 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ node_modules/ *.tmp *.cmd ~* -upload.py + /test/fis-tmp/target/cache /doc/output @@ -47,3 +47,4 @@ upload.py /test/downloads/ /test/xpy/ /test/xpy2/ +.svn diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/build.sh b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/build.sh new file mode 100755 index 000000000..8c4abf160 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/build.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +MOD_NAME="common" +TAR="$MOD_NAME.tar.gz" + +# add path +export PATH=/home/fis/npm/bin:$PATH +#show fisp version +fisp --version --no-color + +#通过fisp release 命令进行模块编译 开启optimize、md5、打包功能,同时需开启-u 独立缓存编译方式,产出到同目录下output中 +fisp release -cuompd output + +php ./json2php.php $MOD_NAME + +#进入output目录 +cd output +#删除产出的test目录 +rm -rf test + +#整理output目录 +mkdir webroot +mkdir views +rm json2php.php +mv static/ webroot/static +mv static304/ webroot/static304 +mv template/ views/templates +mv config/ views/templates/config +#mv server.conf webroot/ +rm -f plugin/compiler.fis_require.php +mkdir libs +mkdir libs/Third +mkdir libs/Third/Smarty +mv plugin/ libs/Third/Smarty/plugins + + +#将output目录进行打包 +tar zcf $TAR ./* +mv $TAR ../ + +cd .. +rm -rf output + +mkdir output + +mv $TAR output/ + +echo "build end" diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/common-autopack.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/common-autopack.json new file mode 100755 index 000000000..10dc56053 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/common-autopack.json @@ -0,0 +1,9 @@ +{ + "pack" : { + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ] + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/config/xss.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/config/xss.php new file mode 100755 index 000000000..d1923badd --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/config/xss.php @@ -0,0 +1,40 @@ + '<%', //smarty左界符 + 'TPL_RIGHT_DELIMITER' => '%>', //smarty右界符 + 'TPL_SUFFIX' => 'tpl', //模板文件扩展名 + 'func_name_callback' => '/callback/', //回调函数名,$callback(json),正则匹配,防止多个变量名,不需要则可以关闭check_callback + 'name_callback' => 'callback', //smarty.get.callback(json),不需要则可以关闭check_callback + + //添加各场景开关检查功能,on 或者 off,默认为on,即全部要检查 + 'check_callback' => 'on', + 'check_html' => 'off', + 'check_js' => 'on', + 'check_data' => 'on', + 'check_path' => 'on', + 'check_event' => 'on', + + //各场景对应的安全转义函数,正则配置 + 'escape_js' => '/sp_escape_js|escape:("|\'?)javascript\1/', //js转义函数配置 + 'escape_html' => '/sp_escape_html|escape:("|\'?)html\1|(escape$)|(escape\|)/', //html转义函数配置 + 'escape_event' => '/sp_escape_event|escape:("|\'?)javascript\1\|escape:("|\'?)html\2/', //标签事件属性值场景转义函数配置 + 'escape_data' => '/sp_escape_data/', //json数据转义配置 + 'escape_path' => '/sp_path|escape:("|\'?)url\1|escape:("|\'?)html\2|(escape$)|(escape\|)/', //url属性里转义 + 'escape_callback' => '/sp_escape_callback/', //callback最小化转义 + + //如果某个特定变量不需要转义,可以加上|escape:none ,正则配置 + 'noescape' => '/escape:[\'|\"]?none[\'|\"]?/', + + //全局白名单,变量名与正则匹配则可信,不对其进行检查,明妃,坤哥,如果你们从cms中读取的变量取了新的名称请把名称填写到这里 + 'XSS_SAFE_VAR' => array( //安全变量列表,必须是正则,不包含$ + '/(?:body|html|head|value|hotSiteCon|listValue|entry|link|linksValue|defaultClass|data|sBoxTag|sysInfo|uaq|mod|root\.html\.content|country|host|smarty|engine|tag|params|root\.conf)/ies', + '/(?:_pv|_num|_id)/ies' + ), + //精确白名单,某特定文件名,或其内某个变量是完全可信的 + 'file_safe_var' =>array( //filename为相对路径(非中文),$varname为变量,表明filename下的所有$varname都是白名单。 + 'filename::$varname' + ) + +); +?> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-conf2.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-conf2.js new file mode 100755 index 000000000..663395c6d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-conf2.js @@ -0,0 +1,630 @@ +//rtl,ltr首页公共模块 +var common_commonCss = [ + // include CSS BASE:节省请求 + // /^\/widget\/ui\/css-framework-base\/(.*\.css)$/i, + // merge the ui + + // icon, remove form: css-base + // "/widget/ui/css-icon/rtl/rtl.css", + '/widget/ui/prompt/prompt.css', + '/widget/ui/suggest/suggest.css', + '/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css', + '/widget/ui/jquery/widget/jquery.ui.datepicker/jquery.ui.datepicker.css', + // widget + '/widget/header/add-fav-bar/add-fav-bar.css', + '/widget/header/logo/logo.css', + // '/widget/keyboard/keyboard.css', + '/widget/ui/lottery/lottery.css', + '/widget/ui/dropdownlist/dropdownlist.css', + '/widget/ui/scrollable/scrollable.css', + '/widget/ui/popup/popup.css', + '/widget/ui/css-ui/css-ui.css', + '/widget/ui/calendar/calendar.css', + '/widget/ui/sns-share/sns-share.css', + '/widget/ui/dialog/dialog.css' +]; + + + +// fis.config.merge({ +// namespace : 'common', +// //roadmap: { +// // domain: { +// // "image": "<%$root.head.cdn%>" +// // } +// //}, +// pack: { +// //合并打包配置 +// // JS文件打包配置 +// // BASE +// 'pkg/js_framework.js': [ +// /^\/widget\/ui\/jquery\/([^\/]*\.js)$/i, +// '/widget/ui/jquery/1.8.3/jquery.min.js', +// '/static/lazyload.js', +// '/static/BigPipe.js', +// '/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js', +// '/widget/ui/message/src/message.js', +// /^\/widget\/ui\/helper\/(.*\.js)$/i, +// /^\/widget\/ui\/localstorage\/(.*\.js)$/i, +// /^\/widget\/ui\/localcookie\/(.*\.js)$/i, +// /^\/widget\/ui\/ut\/(.*\.js)$/i, +// /^\/widget\/ui\/eventcenter\/(.*\.js)$/i, +// /^\/widget\/ui\/monitor\/(.*\.js)$/i, +// 'widget/ui/cookieless/cookieless.js' +// ], +// // common modules' js +// 'pkg/module_common.js': [ +// '/widget/ui/cycletabs/cycletabs.js', +// // UI +// '/widget/ui/date/date.js', +// '/widget/ui/date-new/date.js', +// '/widget/ui/md5/md5.js', +// '/widget/ui/time/time.js', +// '/widget/ui/side-render/side-render.js', +// '/widget/ui/multicookie/multicookie.js', +// '/widget/ui/suggest/suggest.js', +// '/widget/ui/popup/popup.js', +// '/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js', +// '/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js', +// '/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js', +// '/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js', +// '/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js', +// '/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js', +// '/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js', +// '/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js', +// '/widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js', + +// '/widget/ui/bubble/src/bubble.js', +// '/widget/ui/scrollable/scrollable.js', + +// // widget +// // search box +// '/widget/search-box/search-box-async.js', +// '/widget/search-box-4ps/search-box-4ps-async.js', +// // keybord AR/SA ONLY +// '/widget/keyboard/keyboard-async.js' +// // lottery +// // '/widget/ui/lottery/lottery.js', +// // dropdownlist +// //'/widget/ui/dropdownlist/dropdownlist.js', +// // notice popup +// //'/widget/ui/notice-pop/notice-pop.js' +// ], +// // head & foot +// 'pkg/common_heot.js': [ +// '/widget/header/logo/logo-async.js', +// '/widget/footer/footer.js', +// '/widget/header/clock/clock-async.js', +// '/widget/header/account/account-async.js', +// '/widget/header/site-switch/site-switch-async.js', +// '/widget/ui/weather/weather.js', +// '/widget/header/userbar-btn/userbar-btn-async.js', +// '/widget/header/tear-page/tear-page-async.js', +// '/widget/header/add-fav-bar/add-fav-bar-async.js' +// ], +// // calendar +// 'pkg/calen_async.js': [ +// '/widget/header/clock/calendar-async.js', +// '/widget/ui/calendar/calendar.js', +// '/widget/ui/date-new/plugin/buddhist.js', +// '/widget/ui/date-new/plugin/isl.js', +// '/widget/ui/date-new/plugin/lunar.js', +// '/widget/ui/date-new/plugin/rokuyou.js' +// ], +// // heederTest's async js +// 'pkg/headerTest_async.js': [ +// '/widget/header/header-com/header-com-async.js', +// '/widget/header/account-test/account-test-async.js', +// '/widget/header/userbar-btn-test/userbar-btn-test-async.js', +// '/widget/header/skinbox/skinbox-async.js', +// '/widget/header/message/message-async.js', +// '/widget/header/userbar-btn-header/userbar-btn-header-async.js', +// '/widget/header/skin-trans/skin-trans-async.js', +// '/widget/header/skinbox/skin-mod.js' +// ], +// // common modules headerTest css +// 'pkg/module_headerTest_ltr.css': [ +// '/widget/header/header-com/ltr-s/ltr.more.css', +// '/widget/header/userbar-btn-test/ltr-s/ltr.more.css', +// '/widget/header/account-test/ltr-s/ltr.more.css', +// '/widget/header/skinbox/ltr/ltr.more.css', +// '/widget/header/message/ltr/ltr.more.css', +// '/widget/header/userbar-btn-header/ltr-s/ltr.more.css' +// ], +// // common modules headerTest css +// 'pkg/module_headerTest_rtl.css': [ +// '/widget/header/header-com/rtl-s/rtl.more.css', +// '/widget/header/userbar-btn-test/rtl-s/rtl.more.css', +// '/widget/header/account-test/rtl-s/rtl.more.css', +// '/widget/header/skinbox/rtl/rtl.more.css', +// '/widget/header/message/rtl/rtl.more.css', +// '/widget/header/userbar-btn-header/rtl-s/rtl.more.css' +// ], +// 'pkg/header_flat_ltr.css': [ +// '/widget/header-flat/ltr/ltr.more.css', +// '/widget/header-flat/account/ltr/ltr.more.css', +// '/widget/header-flat/clock/ltr/ltr.more.css', +// '/widget/header-flat/logo/ltr/ltr.more.css', +// '/widget/header-flat/message/ltr/ltr.more.css', +// '/widget/header-flat/site-switch/ltr/ltr.more.css', +// '/widget/header-flat/userbar-btn-header/ltr/ltr.more.css', +// '/widget/header-flat/weather/ltr/ltr.more.css', +// '/widget/header-flat/banner-site/ltr/ltr.more.css', +// '/widget/userbar-btn-searchside/ltr/ltr.more.css', +// '/widget/header-flat/fontsize-switch/ltr/ltr.more.css', +// '/widget/header-flat/add-fav-bar/ltr/ltr.more.css' +// ], +// 'pkg/header_flat_rtl.css': [ +// '/widget/header-flat/rtl/rtl.more.css', +// '/widget/header-flat/account/rtl/rtl.more.css', +// '/widget/header-flat/clock/rtl/rtl.more.css', +// '/widget/header-flat/logo/rtl/rtl.more.css', +// '/widget/header-flat/message/rtl/rtl.more.css', +// '/widget/header-flat/site-switch/rtl/rtl.more.css', +// '/widget/header-flat/userbar-btn-header/rtl/rtl.more.css', +// '/widget/header-flat/weather/rtl/rtl.more.css', +// '/widget/header-flat/banner-site/rtl/rtl.more.css', +// '/widget/userbar-btn-searchside/rtl/rtl.more.css', +// '/widget/header-flat/fontsize-switch/rtl/rtl.more.css', +// '/widget/header-flat/add-fav-bar/rtl/rtl.more.css' +// ], +// 'pkg/module_common.css': common_commonCss, +// // ltr's HEADER & FOOTER & common +// 'pkg/module_common_ltr.css': [ +// // include CSS BASE:节省请求 + +// // merge icons +// "/widget/ui/css-icon/ltr/ltr.css", +// '/widget/ui/cycletabs/ltr/ltr.css', // cycletabs +// // merge the ui +// // '/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css', +// '/widget/ui/jquery/widget/jquery.ui.tip/ltr/ltr.css', +// // widget + +// // /^\/widget\/header\/ltr\/([^.]+\..+\.css)$/i, +// // /^\/widget\/footer\/ltr\/(.*\.css)$/i, +// // /^\/widget\/header\/[^\/]*\/ltr\/([^.]+\..+\.css)$/i, + +// // searchbox +// // '/widget/search-box/ltr/ltr.css', +// // notice popup +// '/widget/ui/notice-pop/ltr/ltr.css', +// //login popup +// '/widget/login-popup/ltr/ltr.css' +// ], +// 'pkg/module_common_rtl.css': [ +// // include CSS BASE:节省请求 + +// // merge icons +// "/widget/ui/css-icon/rtl/rtl.css", +// '/widget/ui/cycletabs/rtl/rtl.css',// cycletabs +// // merge the ui +// // '/widget/ui/jquery/widget/jquery.ui.button/rtl/rtl.css', +// '/widget/ui/jquery/widget/jquery.ui.tip/rtl/rtl.css', +// // widget +// // /^\/widget\/footer\/rtl\/(.*\.css)$/i, +// // searchbox +// // '/widget/search-box/rtl/rtl.css', +// "/widget/rtl/rtl/rtl.css", +// // notice popup +// '/widget/ui/notice-pop/rtl/rtl.css', +// //login popup +// '/widget/login-popup/rtl/rtl.css', +// //keyboard +// '/widget/keyboard/rtl/rtl.css' +// ], +// 'pkg/module_sidebar_ltr.css': [ +// '/widget/css-base/dist/base.ltr.css', +// '/widget/css-base/dist/base.ltr.ie.css', +// '/widget/css-flatbase/ltr/ltr.css' +// ], +// 'pkg/module_sidebar_rtl.css': [ +// '/widget/css-base/dist/base.rtl.css', +// '/widget/css-base/dist/base.rtl.ie.css', +// '/widget/css-flatbase/rtl/rtl.css' +// ] + +// }, +// settings: { +// smarty : { +// 'left_delimiter' : '<%', +// 'right_delimiter' : '%>' +// }, +// spriter: { +// csssprites: { +// //图之间的边距 +// margin: 5 +// } +// }, +// optimizer : { +// 'png-compressor' : { +// type : 'pngquant' //default is pngcrush +// } +// }, +// preprocessor: { +// 'widget-inline': { +// include: /.+/i, +// exclude: /(rightcolumn|bottombar|footer|\$)/i +// } +// } +// } +// }); + +// fis.config.get('roadmap.path').unshift({ +// reg : '/widget/ui/keyboard/keyboard.js', +// useCompile : false, +// release : '/static/common/widget/ui/keyboard/keyboard.js' +// }); +// fis.config.get('roadmap.path').unshift({ +// reg: "/static/sidebar-base.js", +// useHash: false, +// useMap: false, +// release: "/static304/sidebar-base.js" +// }); +// fis.config.get('roadmap.path').unshift({ +// reg: "/static/ar_hao123_sug.js", +// useHash: false, +// useMap: false, +// release: "/static304/ar_hao123_sug.js" +// }); +// fis.config.get('roadmap.path').unshift({ +// reg: "/static/br_hao123_sug.js", +// useHash: false, +// useMap: false, +// release: "/static304/br_hao123_sug.js" +// }); +// fis.config.get('roadmap.path').unshift({ +// reg: "/static/th_hao123_sug.js", +// useHash: false, +// useMap: false, +// release: "/static304/th_hao123_sug.js" +// }); + +// fis.config.set('modules.optimizer.tpl','html-compress'); + +// fis.config.merge({ +// modules: { +// postpackager: 'ext-map', +// packager : 'autopack' +// }, +// //插件参数设置 +// settings: { +// packager : { +// autopack : { +// //fid为接入自动合并后分配的产品线FID字符串 +// 'fid' : 'globalhao123' +// } +// } +// } +// }); + + + + +//wangrui +fis.require('smarty')(fis); + +fis.set('namespace', "common"); + +fis + .media('dev') + .match('**' , { + useHash: false + }); + +fis.set('smarty', { + 'left_delimiter': '<%', + 'right_delimiter': '%>' +}); + +fis.set('spriter', { + csssprites: { + //图之间的边距 + margin: 5 + } +}); + +fis.set('optimizer', { + 'png-compressor' : { + type : 'pngquant' //default is pngcrush + } +}); + +fis.set('preprocessor', { + 'widget-inline': { + include: /.+/i, + exclude: /(rightcolumn|bottombar|footer|\$)/i + } +}); + +fis.set('pack', { + //合并打包配置 + // JS文件打包配置 + // BASE + 'pkg/js_framework.js': [ + /^\/widget\/ui\/jquery\/([^\/]*\.js)$/i, + '/widget/ui/jquery/1.8.3/jquery.min.js', + '/static/lazyload.js', + '/static/BigPipe.js', + '/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js', + '/widget/ui/message/src/message.js', + /^\/widget\/ui\/helper\/(.*\.js)$/i, + /^\/widget\/ui\/localstorage\/(.*\.js)$/i, + /^\/widget\/ui\/localcookie\/(.*\.js)$/i, + /^\/widget\/ui\/ut\/(.*\.js)$/i, + /^\/widget\/ui\/eventcenter\/(.*\.js)$/i, + /^\/widget\/ui\/monitor\/(.*\.js)$/i, + 'widget/ui/cookieless/cookieless.js' + ], + // common modules' js + 'pkg/module_common.js': [ + '/widget/ui/cycletabs/cycletabs.js', + // UI + '/widget/ui/date/date.js', + '/widget/ui/date-new/date.js', + '/widget/ui/md5/md5.js', + '/widget/ui/time/time.js', + '/widget/ui/side-render/side-render.js', + '/widget/ui/multicookie/multicookie.js', + '/widget/ui/suggest/suggest.js', + '/widget/ui/popup/popup.js', + '/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js', + '/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js', + '/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js', + '/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js', + '/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js', + '/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js', + '/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js', + '/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js', + '/widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js', + + '/widget/ui/bubble/src/bubble.js', + '/widget/ui/scrollable/scrollable.js', + + // widget + // search box + '/widget/search-box/search-box-async.js', + '/widget/search-box-4ps/search-box-4ps-async.js', + // keybord AR/SA ONLY + '/widget/keyboard/keyboard-async.js' + // lottery + // '/widget/ui/lottery/lottery.js', + // dropdownlist + //'/widget/ui/dropdownlist/dropdownlist.js', + // notice popup + //'/widget/ui/notice-pop/notice-pop.js' + ], + // head & foot + 'pkg/common_heot.js': [ + '/widget/header/logo/logo-async.js', + '/widget/footer/footer.js', + '/widget/header/clock/clock-async.js', + '/widget/header/account/account-async.js', + '/widget/header/site-switch/site-switch-async.js', + '/widget/ui/weather/weather.js', + '/widget/header/userbar-btn/userbar-btn-async.js', + '/widget/header/tear-page/tear-page-async.js', + '/widget/header/add-fav-bar/add-fav-bar-async.js' + ], + // calendar + 'pkg/calen_async.js': [ + '/widget/header/clock/calendar-async.js', + '/widget/ui/calendar/calendar.js', + '/widget/ui/date-new/plugin/buddhist.js', + '/widget/ui/date-new/plugin/isl.js', + '/widget/ui/date-new/plugin/lunar.js', + '/widget/ui/date-new/plugin/rokuyou.js' + ], + // heederTest's async js + 'pkg/headerTest_async.js': [ + '/widget/header/header-com/header-com-async.js', + '/widget/header/account-test/account-test-async.js', + '/widget/header/userbar-btn-test/userbar-btn-test-async.js', + '/widget/header/skinbox/skinbox-async.js', + '/widget/header/message/message-async.js', + '/widget/header/userbar-btn-header/userbar-btn-header-async.js', + '/widget/header/skin-trans/skin-trans-async.js', + '/widget/header/skinbox/skin-mod.js' + ], + // common modules headerTest css wangrui + // 'pkg/module_headerTest_ltr.css': [ + // '/widget/header/header-com/ltr-s/ltr.more.css', + // '/widget/header/userbar-btn-test/ltr-s/ltr.more.css', + // '/widget/header/account-test/ltr-s/ltr.more.css', + // '/widget/header/skinbox/ltr/ltr.more.css', + // '/widget/header/message/ltr/ltr.more.css', + // '/widget/header/userbar-btn-header/ltr-s/ltr.more.css' + // ], + // common modules headerTest css + 'pkg/module_headerTest_rtl.css': [ + '/widget/header/header-com/rtl-s/rtl.more.css', + '/widget/header/userbar-btn-test/rtl-s/rtl.more.css', + '/widget/header/account-test/rtl-s/rtl.more.css', + '/widget/header/skinbox/rtl/rtl.more.css', + '/widget/header/message/rtl/rtl.more.css', + '/widget/header/userbar-btn-header/rtl-s/rtl.more.css' + ], + 'pkg/header_flat_ltr.css': [ + '/widget/header-flat/ltr/ltr.more.css', + '/widget/header-flat/account/ltr/ltr.more.css', + '/widget/header-flat/clock/ltr/ltr.more.css', + '/widget/header-flat/logo/ltr/ltr.more.css', + '/widget/header-flat/message/ltr/ltr.more.css', + '/widget/header-flat/site-switch/ltr/ltr.more.css', + '/widget/header-flat/userbar-btn-header/ltr/ltr.more.css', + '/widget/header-flat/weather/ltr/ltr.more.css', + '/widget/header-flat/banner-site/ltr/ltr.more.css', + '/widget/userbar-btn-searchside/ltr/ltr.more.css', + '/widget/header-flat/fontsize-switch/ltr/ltr.more.css', + '/widget/header-flat/add-fav-bar/ltr/ltr.more.css' + ], + 'pkg/header_flat_rtl.css': [ + '/widget/header-flat/rtl/rtl.more.css', + '/widget/header-flat/account/rtl/rtl.more.css', + '/widget/header-flat/clock/rtl/rtl.more.css', + '/widget/header-flat/logo/rtl/rtl.more.css', + '/widget/header-flat/message/rtl/rtl.more.css', + '/widget/header-flat/site-switch/rtl/rtl.more.css', + '/widget/header-flat/userbar-btn-header/rtl/rtl.more.css', + '/widget/header-flat/weather/rtl/rtl.more.css', + '/widget/header-flat/banner-site/rtl/rtl.more.css', + '/widget/userbar-btn-searchside/rtl/rtl.more.css', + '/widget/header-flat/fontsize-switch/rtl/rtl.more.css', + '/widget/header-flat/add-fav-bar/rtl/rtl.more.css' + ], + 'pkg/module_common.css': common_commonCss, + // ltr's HEADER & FOOTER & common + 'pkg/module_common_ltr.css': [ + // include CSS BASE:节省请求 + + // merge icons + "/widget/ui/css-icon/ltr/ltr.css", + '/widget/ui/cycletabs/ltr/ltr.css', // cycletabs + // merge the ui + // '/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css', + '/widget/ui/jquery/widget/jquery.ui.tip/ltr/ltr.css', + // widget + + // /^\/widget\/header\/ltr\/([^.]+\..+\.css)$/i, + // /^\/widget\/footer\/ltr\/(.*\.css)$/i, + // /^\/widget\/header\/[^\/]*\/ltr\/([^.]+\..+\.css)$/i, + + // searchbox + // '/widget/search-box/ltr/ltr.css', + // notice popup + '/widget/ui/notice-pop/ltr/ltr.css', + //login popup + '/widget/login-popup/ltr/ltr.css' + ], + 'pkg/module_common_rtl.css': [ + // include CSS BASE:节省请求 + + // merge icons + "/widget/ui/css-icon/rtl/rtl.css", + '/widget/ui/cycletabs/rtl/rtl.css',// cycletabs + // merge the ui + // '/widget/ui/jquery/widget/jquery.ui.button/rtl/rtl.css', + '/widget/ui/jquery/widget/jquery.ui.tip/rtl/rtl.css', + // widget + // /^\/widget\/footer\/rtl\/(.*\.css)$/i, + // searchbox + // '/widget/search-box/rtl/rtl.css', + "/widget/rtl/rtl/rtl.css", + // notice popup + '/widget/ui/notice-pop/rtl/rtl.css', + //login popup + '/widget/login-popup/rtl/rtl.css', + //keyboard + '/widget/keyboard/rtl/rtl.css' + ], + 'pkg/module_sidebar_ltr.css': [ + '/widget/css-base/dist/base.ltr.css', + '/widget/css-base/dist/base.ltr.ie.css', + '/widget/css-flatbase/ltr/ltr.css' + ], + 'pkg/module_sidebar_rtl.css': [ + '/widget/css-base/dist/base.rtl.css', + '/widget/css-base/dist/base.rtl.ie.css', + '/widget/css-flatbase/rtl/rtl.css' + ] +}); + +fis.match('::package', { + packager: fis.plugin('map', { + 'pkg/module_headerTest_ltr.css': [ + '/widget/header/header-com/ltr-s/ltr.more.css', + '/widget/header/userbar-btn-test/ltr-s/ltr.more.css', + '/widget/header/account-test/ltr-s/ltr.more.css', + '/widget/header/skinbox/ltr/ltr.more.css', + '/widget/header/message/ltr/ltr.more.css', + '/widget/header/userbar-btn-header/ltr-s/ltr.more.css' + ], + 'pkg/common_heot.js':[ + '/widget/header/logo/logo-async.js', + '/widget/footer/footer.js', + '/widget/header/clock/clock-async.js', + '/widget/header/account/account-async.js', + '/widget/header/site-switch/site-switch-async.js', + '/widget/ui/weather/weather.js', + '/widget/header/userbar-btn/userbar-btn-async.js', + '/widget/header/tear-page/tear-page-async.js', + // '/widget/header/add-fav-bar/add-fav-bar-async.js' + ] + }) +}); + + +fis.match('/widget/header/skinbox/ltr/ltr.more.css', { + packTo: 'pkg/module_headerTest_ltr.css', + packOrder: -100 +}); + +fis.match('/widget/header/add-fav-bar/add-fav-bar-async.js', { + isMod: true, // 设置 comp 下都是一些组件,组件建议都是匿名方式 define + release: '/pkg/$0', + lint: fis.plugin('jshint', { + ignored: [/jquery\.js$/i], + + //using Chinese reporter + i18n: 'zh-CN', + es3: true, + //jshint options + camelcase: true, + curly: true, + eqeqeq: true, + forin: true, + immed: true, + latedef: true, + newcap: true, + noarg: true, + noempty: true + }) +}); + +fis.set('modules', { + postpackager: 'ext-map', + packager : 'autopack' +}); + + +fis.set('settings', { + //插件参数设置 + + packager : { + autopack : { + //fid为接入自动合并后分配的产品线FID字符串 + 'fid' : 'globalhao123' + } + } +}); +fis.config.set('modules.optimizer.tpl','html-compress'); + + +fis.match('/widget/ui/keyboard/keyboard.js' , { + useCompile : false, + release : '/static/common/widget/ui/keyboard/keyboard.js' +}); +fis.match("/static/sidebar-base.js" , { + useHash: false, + useMap: false, + release: "/static304/sidebar-base.js" +}); +fis.match("/static/ar_hao123_sug.js" , { + useHash: false, + useMap: false, + release: "/static304/ar_hao123_sug.js" +}); +fis.match("/static/br_hao123_sug.js" , { + useHash: false, + useMap: false, + release: "/static304/br_hao123_sug.js" +}); + +fis.match("/static/th_hao123_sug.js" , { + useHash: false, + useMap: false, + release: "/static304/th_hao123_sug.js" +}); + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ae.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ae.json new file mode 100755 index 000000000..e576afd15 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ae.json @@ -0,0 +1,104 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_ae.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date-new/date.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/suggest/suggest.js", + "/widget/ui/time/time.js", + "/widget/ui/weather/ae/ae.js", + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/cycletabs/cycletabs.js" + ], + "pkg/common_sync_pri1_css_0_ae.css": [ + "/widget/footer/ltr/ltr.css", + "/widget/keyboard/rtl/rtl.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/prompt/prompt.css", + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_ae.css": [ + "/widget/header/account/ltr/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/userbar-btn/ltr/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/search-box/ltr/ltr.more.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css" + ], + "pkg/common_sync_pri1_css_2_ae.css": [ + "/widget/footer/rtl/rtl.css", + "/widget/header/account/rtl/rtl.more.css", + "/widget/header/add-fav-bar/rtl/rtl.more.css", + "/widget/header/clock/rtl/rtl.more.css", + "/widget/header/logo/rtl/rtl.more.css", + "/widget/header/rtl/rtl.more.css", + "/widget/header/site-switch/rtl/rtl.more.css", + "/widget/header/userbar-btn/rtl/rtl.more.css", + "/widget/header/weather/rtl/rtl.more.css", + "/widget/search-box/rtl/rtl.more.css", + "/widget/ui/jquery/widget/jquery.ui.button/rtl/rtl.css" + ], + "pkg/common_async_pri1_js_0_ae.js": [ + "/widget/header/account/account-async.js", + "/widget/header/userbar-btn/userbar-btn-async.js", + "/widget/search-box/search-box-async.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/localcookie/localcookie.js", + "/widget/ui/popup/popup.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/weather/weather.js" + ], + "pkg/common_async_pri1_js_1_ae.js": [ + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_ae.js": [ + "/widget/keyboard/keyboard-main.js", + "/widget/keyboard/keyboard-async.js" + ], + "pkg/common_async_pri1_css_0_ae.css": [ + "/widget/ui/calendar/calendar.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/popup/popup.css" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ar.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ar.json new file mode 100755 index 000000000..5fc4410d0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ar.json @@ -0,0 +1,177 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_ar.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/suggest/suggest.js", + "/widget/ui/weather/ar/ar_flat.js", + "/widget/ui/localcookie/localcookie.js" + ], + "pkg/common_sync_pri1_js_1_ar.js": [ + "/widget/ui/weather/ar/ar.js" + ], + "pkg/common_sync_pri1_js_2_ar.js": [ + "/widget/header/skinbox/skin-mod.js", + "/widget/header/skinbox/skinbox-async.js", + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js" + ], + "pkg/common_sync_pri2_css_0_ar.css": [ + "/widget/ui/dialog/dialog.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/sns-share/sns-share.css" + ], + "pkg/common_sync_pri2_css_1_ar.css": [ + "/widget/css-base/dist/base.rtl.css", + "/widget/css-base/dist/base.rtl.ie.css", + "/widget/css-flatbase/rtl/rtl.css", + "/widget/ui/css-ui/css-ui.css" + ], + "pkg/common_sync_pri1_css_0_ar.css": [ + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_ar.css": [ + "/widget/footer/rtl/rtl.css", + "/widget/header-flat/account/rtl/rtl.more.css", + "/widget/header-flat/add-fav-bar/rtl/rtl.more.css", + "/widget/header-flat/clock/rtl/rtl.more.css", + "/widget/header-flat/logo/rtl/rtl.more.css", + "/widget/header-flat/rtl/rtl.more.css", + "/widget/header-flat/site-switch/rtl/rtl.more.css", + "/widget/header-flat/userbar-btn-header/rtl/rtl.more.css", + "/widget/keyboard/rtl/rtl.css", + "/widget/search-box-new/rtl/rtl.more.css", + "/widget/ui/prompt/prompt.css", + "/widget/header-flat/weather/rtl/rtl.more.css" + ], + "pkg/common_sync_pri1_css_2_ar.css": [ + "/widget/header/account/rtl/rtl.more.css", + "/widget/header/add-fav-bar/rtl/rtl.more.css", + "/widget/header/clock/rtl/rtl.more.css", + "/widget/header/logo/rtl/rtl.more.css", + "/widget/header/rtl/rtl.more.css", + "/widget/header/site-switch/rtl/rtl.more.css", + "/widget/header/userbar-btn/rtl/rtl.more.css", + "/widget/header/weather/rtl/rtl.more.css" + ], + "pkg/common_sync_pri1_css_3_ar.css": [ + "/widget/header-flat/message/rtl/rtl.more.css", + "/widget/search-box-flat/flow/rtl/rtl.flow.css", + "/widget/search-box-flat/rtl/rtl.more.css", + "/widget/search-box/rtl/rtl.more.css" + ], + "pkg/common_sync_pri1_css_4_ar.css": [ + "/widget/header/account-test/rtl-s/rtl.more.css", + "/widget/header/header-com/rtl-s/rtl.lv2.more.css", + "/widget/header/header-com/rtl-s/rtl.more.css", + "/widget/header/message/rtl/rtl.more.css", + "/widget/header/skin-trans/rtl/rtl.more.css", + "/widget/header/skinbox/rtl/rtl.more.css", + "/widget/header/userbar-btn-header/rtl-s/rtl.more.css", + "/widget/header/userbar-btn-test/rtl-s/rtl.more.css", + "/widget/login-popup/rtl/rtl.css", + "/widget/ui/jquery/widget/jquery.ui.button/rtl/rtl.css" + ], + "pkg/common_sync_pri1_css_5_ar.css": [ + "/widget/ui/text-overflow/rtl/rtl.css" + ], + "pkg/common_async_pri1_js_0_ar.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_ar.js": [ + "/widget/header-flat/account/account-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/site-switch/site-switch-async.js", + "/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/weather/weather_flat.js", + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_ar.js": [ + "/widget/header-flat/add-fav-bar/add-fav-bar-async.js", + "/widget/keyboard/keyboard-main.js", + "/widget/keyboard/keyboard-async.js" + ], + "pkg/common_async_pri1_js_3_ar.js": [ + "/widget/header/account/account-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/header-com/header-com-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/ui/popup/popup.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn/userbar-btn-async.js" + ], + "pkg/common_async_pri1_js_4_ar.js": [ + "/widget/header/account-test/account-test-async.js", + "/widget/header/message/message-async.js", + "/widget/header/skin-trans/skin-trans-async.js", + "/widget/header/userbar-btn-header/userbar-btn-header-async.js", + "/widget/header/userbar-btn-test/userbar-btn-test-async.js", + "/widget/search-box/search-box-async.js", + "/widget/ui/notice-pop/notice-pop.js" + ], + "pkg/common_async_pri1_js_5_ar.js": [ + "/widget/header-flat/message/message-async.js" + ], + "pkg/common_async_pri1_js_6_ar.js": [ + "/widget/search-box-4ps/search-box-4ps-async.js" + ], + "pkg/common_sync_pri2_js_0_ar.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/ut/ut.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/time/time.js" + ], + "pkg/common_sync_pri2_js_1_ar.js": [ + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/drap/drap.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/slide/slide.js", + "/widget/ui/dialog/dialog.js" + ], + "pkg/common_async_pri2_js_0_ar.js": [ + "/widget/ui/monitor/monitor.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/slide/plugin/animate.js", + "/widget/ui/slide/plugin/control.js", + "/widget/ui/slide/plugin/pagination.js", + "/widget/ui/slide/plugin/play.js", + "/widget/ui/slide/plugin/stop-at-edge.js", + "/widget/ui/sns-share/sns-share.js", + "/widget/ui/dropdownlist/dropdownlist.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-br.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-br.json new file mode 100755 index 000000000..d562ac0fb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-br.json @@ -0,0 +1,199 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_br.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri1_js_1_br.js": [ + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/weather/br/br_flat.js" + ], + "pkg/common_sync_pri1_js_2_br.js": [ + "/widget/ui/weather/br/br.js" + ], + "pkg/common_sync_pri1_js_3_br.js": [ + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js" + ], + "pkg/common_sync_pri1_js_4_br.js": [ + "/widget/header/skinbox/skin-mod.js", + "/widget/header/skinbox/skinbox-async.js", + "/widget/ui/jquery/widget/jquery.ui.datepicker/jquery.ui.datepicker.js" + ], + "pkg/common_sync_pri1_js_5_br.js": [ + "/widget/ui/slide/plugin/stop-at-edge.js" + ], + "pkg/common_sync_pri2_css_0_br.css": [ + "/widget/ui/scrollable/scrollable.css" + ], + "pkg/common_sync_pri2_css_1_br.css": [ + "/widget/css-base/dist/base.ltr.css", + "/widget/css-base/dist/base.ltr.ie.css", + "/widget/css-flatbase/ltr/ltr.css", + "/widget/ui/css-ui/css-ui.css" + ], + "pkg/common_sync_pri2_css_2_br.css": [ + "/widget/ui/dialog/dialog.css" + ], + "pkg/common_sync_pri1_css_0_br.css": [ + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_br.css": [ + "/widget/header-flat/account/ltr/ltr.more.css", + "/widget/header-flat/clock/ltr/ltr.more.css", + "/widget/header-flat/logo/ltr/ltr.more.css", + "/widget/header-flat/ltr/ltr.more.css", + "/widget/header-flat/site-switch/ltr/ltr.more.css", + "/widget/header-flat/userbar-btn-header/ltr/ltr.more.css", + "/widget/search-box-new/ltr/ltr.more.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/prompt/prompt.css", + "/widget/header-flat/weather/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_2_br.css": [ + "/widget/footer/ltr/ltr.css" + ], + "pkg/common_sync_pri1_css_3_br.css": [ + "/widget/header/account/ltr/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/userbar-btn/ltr/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/ui/sns-share/sns-share.css" + ], + "pkg/common_sync_pri1_css_4_br.css": [ + "/widget/header/userbar-btn-test/ltr-s/ltr.more.css", + "/widget/search-box-flat/flow/ltr/ltr.flow.css", + "/widget/search-box-flat/ltr/ltr.more.css", + "/widget/search-box/ltr/ltr.more.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/jquery/widget/jquery.ui.datepicker/jquery.ui.datepicker.css" + ], + "pkg/common_sync_pri1_css_5_br.css": [ + "/widget/header/account-test/ltr-s/ltr.more.css", + "/widget/header/header-com/ltr-s/ltr.more.css", + "/widget/header/message/ltr/ltr.more.css", + "/widget/header/skin-trans/ltr/ltr.more.css", + "/widget/header/skinbox/ltr/ltr.more.css", + "/widget/header/userbar-btn-header/ltr-s/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css", + "/widget/ui/lottery/lottery.css" + ], + "pkg/common_sync_pri1_css_6_br.css": [ + "/widget/header-flat/simple-nav/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_7_br.css": [ + "/widget/header/header-com/ltr-s/ltr.lv2.more.css", + "/widget/ui/text-overflow/ltr/ltr.css" + ], + "pkg/common_sync_pri1_css_8_br.css": [ + "/widget/header-flat/add-fav-bar/ltr/ltr.more.css", + "/widget/header-flat/message/ltr/ltr.more.css", + "/widget/userbar-btn-searchside/ltr/ltr.more.css" + ], + "pkg/common_async_pri1_js_0_br.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_br.js": [ + "/widget/header-flat/account/account-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/site-switch/site-switch-async.js", + "/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/ui/weather/weather_flat.js", + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_br.js": [ + "/widget/header/account/account-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn/userbar-btn-async.js" + ], + "pkg/common_async_pri1_js_3_br.js": [ + "/widget/header/account-test/account-test-async.js", + "/widget/header/header-com/header-com-async.js", + "/widget/header/message/message-async.js", + "/widget/header/skin-trans/skin-trans-async.js", + "/widget/header/userbar-btn-header/userbar-btn-header-async.js", + "/widget/header/userbar-btn-test/userbar-btn-test-async.js", + "/widget/search-box/search-box-async.js", + "/widget/ui/lottery/lottery.js", + "/widget/ui/notice-pop/notice-pop.js", + "/widget/ui/popup/popup.js", + "/widget/ui/sns-share/sns-share.js" + ], + "pkg/common_async_pri1_js_4_br.js": [ + "/widget/header-flat/simple-nav/simple-nav-async.js" + ], + "pkg/common_async_pri1_js_5_br.js": [ + "/widget/header-flat/add-fav-bar/add-fav-bar-async.js", + "/widget/header-flat/message/message-async.js", + "/widget/userbar-btn-searchside/userbar-btn-searchside-async.js" + ], + "pkg/common_async_pri1_js_6_br.js": [ + "/widget/search-box-4ps/search-box-4ps-async.js" + ], + "pkg/common_async_pri1_js_7_br.js": [ + "/widget/header-flat/nav/nav-async.js" + ], + "pkg/common_sync_pri2_js_0_br.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/slide/plugin/control.js", + "/widget/ui/slide/plugin/pagination.js", + "/widget/ui/slide/plugin/play.js", + "/widget/ui/slide/slide.js", + "/widget/ui/time/time.js", + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/drap/drap.js", + "/widget/ui/localcookie/localcookie.js", + "/widget/ui/slide/plugin/animate.js" + ], + "pkg/common_sync_pri2_js_1_br.js": [ + "/widget/ui/tpl/tpl.js" + ], + "pkg/common_sync_pri2_js_2_br.js": [ + "/widget/ui/dialog/dialog.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-en.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-en.json new file mode 100755 index 000000000..8d132057b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-en.json @@ -0,0 +1,105 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_en.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri1_js_1_en.js": [ + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js", + "/widget/ui/weather/en/en.js" + ], + "pkg/common_sync_pri1_css_0_en.css": [ + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_en.css": [ + "/widget/header-flat/clock/ltr/ltr.more.css", + "/widget/header-flat/logo/ltr/ltr.more.css", + "/widget/header-flat/ltr/ltr.more.css", + "/widget/header-flat/site-switch/ltr/ltr.more.css", + "/widget/search-box-new/ltr/ltr.more.css", + "/widget/ui/prompt/prompt.css" + ], + "pkg/common_sync_pri1_css_2_en.css": [ + "/widget/header/account/ltr/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/userbar-btn/ltr/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css" + ], + "pkg/common_async_pri1_js_0_en.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_en.js": [ + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/site-switch/site-switch-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_en.js": [ + "/widget/header/account/account-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/search-box/search-box-async.js", + "/widget/ui/popup/popup.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn/userbar-btn-async.js" + ], + "pkg/common_async_pri1_css_0_en.css": [ + "/widget/ui/calendar/calendar.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/scrollable/scrollable.css" + ], + "pkg/common_async_pri1_css_1_en.css": [ + "/widget/ui/popup/popup.css" + ], + "pkg/common_sync_pri2_js_0_en.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/drap/drap.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/time/time.js", + "/widget/ui/dialog/dialog.js", + "/widget/ui/localcookie/localcookie.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-id.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-id.json new file mode 100755 index 000000000..2af45a6a3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-id.json @@ -0,0 +1,172 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_id.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri1_js_1_id.js": [ + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/slide/plugin/control.js", + "/widget/ui/slide/plugin/pagination.js", + "/widget/ui/slide/plugin/play.js", + "/widget/ui/slide/slide.js", + "/widget/ui/weather/id/id_flat.js", + "/widget/ui/slide/plugin/animate.js" + ], + "pkg/common_sync_pri1_js_2_id.js": [ + "/widget/ui/weather/id/id.js" + ], + "pkg/common_sync_pri1_js_3_id.js": [ + "/widget/header/skinbox/skin-mod.js", + "/widget/header/skinbox/skinbox-async.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js" + ], + "pkg/common_sync_pri1_js_4_id.js": [ + "/widget/ui/slide/plugin/animate-carousel.js" + ], + "pkg/common_sync_pri1_js_5_id.js": [ + "/widget/ui/slide/plugin/stop-at-edge.js" + ], + "pkg/common_sync_pri2_css_0_id.css": [ + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/sns-share/sns-share.css" + ], + "pkg/common_sync_pri2_css_1_id.css": [ + "/widget/css-base/dist/base.ltr.css", + "/widget/css-base/dist/base.ltr.ie.css", + "/widget/css-flatbase/ltr/ltr.css", + "/widget/ui/css-ui/css-ui.css" + ], + "pkg/common_sync_pri1_css_0_id.css": [ + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_id.css": [ + "/widget/header-flat/account/ltr/ltr.more.css", + "/widget/header-flat/clock/ltr/ltr.more.css", + "/widget/header-flat/logo/ltr/ltr.more.css", + "/widget/header-flat/ltr/ltr.more.css", + "/widget/header-flat/site-switch/ltr/ltr.more.css", + "/widget/header-flat/userbar-btn-header/ltr/ltr.more.css", + "/widget/search-box-new/ltr/ltr.more.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/prompt/prompt.css", + "/widget/header-flat/weather/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_2_id.css": [ + "/widget/footer/ltr/ltr.css", + "/widget/search-box-flat/flow/ltr/ltr.flow.css", + "/widget/search-box-flat/ltr/ltr.more.css", + "/widget/search-box/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_3_id.css": [ + "/widget/header/account-test/ltr-s/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/header-com/ltr-s/ltr.lv2.more.css", + "/widget/header/header-com/ltr-s/ltr.more.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/message/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/userbar-btn-header/ltr-s/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css", + "/widget/ui/text-overflow/ltr/ltr.css" + ], + "pkg/common_sync_pri1_css_4_id.css": [ + "/widget/header/skin-trans/ltr/ltr.more.css", + "/widget/header/skinbox/ltr/ltr.more.css", + "/widget/header/userbar-btn-test/ltr-s/ltr.more.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css" + ], + "pkg/common_sync_pri1_css_5_id.css": [ + "/widget/header/account/ltr/ltr.more.css", + "/widget/header/ltr/ltr.more.css", + "/widget/header/userbar-btn/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_6_id.css": [ + "/widget/header-flat/add-fav-bar/ltr/ltr.more.css", + "/widget/header-flat/message/ltr/ltr.more.css" + ], + "pkg/common_async_pri1_js_0_id.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_id.js": [ + "/widget/header-flat/account/account-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/site-switch/site-switch-async.js", + "/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/ui/weather/weather_flat.js", + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_id.js": [ + "/widget/header/account-test/account-test-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/header-com/header-com-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/message/message-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/ui/popup/popup.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn-header/userbar-btn-header-async.js" + ], + "pkg/common_async_pri1_js_3_id.js": [ + "/widget/header/skin-trans/skin-trans-async.js", + "/widget/header/userbar-btn-test/userbar-btn-test-async.js", + "/widget/search-box/search-box-async.js", + "/widget/ui/notice-pop/notice-pop.js" + ], + "pkg/common_async_pri1_js_4_id.js": [ + "/widget/header/account/account-async.js", + "/widget/header/userbar-btn/userbar-btn-async.js" + ], + "pkg/common_async_pri1_js_5_id.js": [ + "/widget/header-flat/add-fav-bar/add-fav-bar-async.js", + "/widget/header-flat/message/message-async.js" + ], + "pkg/common_sync_pri2_js_0_id.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/time/time.js", + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/drap/drap.js", + "/widget/ui/localcookie/localcookie.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-image.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-image.json new file mode 100644 index 000000000..565b3cdd5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-image.json @@ -0,0 +1,90 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_image.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri1_js_1_image.js": [ + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js", + "/widget/ui/weather/en/en.js" + ], + "pkg/common_async_pri1_js_0_image.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_image.js": [ + "/widget/header/account/account-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/search-box/search-box-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/popup/popup.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn/userbar-btn-async.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js" + ], + "pkg/common_sync_pri1_css_0_image.css": [ + "/widget/ui/prompt/prompt.css", + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_image.css": [ + "/widget/header/account/ltr/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/userbar-btn/ltr/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css", + "/widget/ui/scrollable/scrollable.css" + ], + "pkg/common_async_pri1_css_0_image.css": [ + "/widget/ui/calendar/calendar.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/popup/popup.css" + ], + "pkg/common_sync_pri2_js_0_image.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/drap/drap.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/time/time.js", + "/widget/ui/dialog/dialog.js", + "/widget/ui/localcookie/localcookie.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-imagesearch.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-imagesearch.json new file mode 100644 index 000000000..22f47830e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-imagesearch.json @@ -0,0 +1,65 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_imagesearch.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_async_pri1_js_0_imagesearch.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/site-switch/site-switch-async.js", + "/widget/search-box-new/search-box-new-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_sync_pri1_css_0_imagesearch.css": [ + "/widget/header-flat/clock/ltr/ltr.more.css", + "/widget/header-flat/logo/ltr/ltr.more.css", + "/widget/header-flat/ltr/ltr.more.css", + "/widget/header-flat/site-switch/ltr/ltr.more.css", + "/widget/search-box-new/ltr/ltr.more.css", + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_async_pri1_css_0_imagesearch.css": [ + "/widget/ui/calendar/calendar.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/scrollable/scrollable.css" + ], + "pkg/common_sync_pri2_js_0_imagesearch.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/drap/drap.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/time/time.js", + "/widget/ui/dialog/dialog.js", + "/widget/ui/localcookie/localcookie.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-jp.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-jp.json new file mode 100755 index 000000000..52f127c47 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-jp.json @@ -0,0 +1,172 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_jp.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri1_js_1_jp.js": [ + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/slide/plugin/play.js", + "/widget/ui/weather/jp/jp_flat.js" + ], + "pkg/common_sync_pri1_js_2_jp.js": [ + "/widget/ui/bubble/src/bubble.js" + ], + "pkg/common_sync_pri1_js_3_jp.js": [ + "/widget/ui/weather/jp/jp.js" + ], + "pkg/common_sync_pri1_js_4_jp.js": [ + "/widget/header/skinbox/skin-mod.js", + "/widget/header/skinbox/skinbox-async.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js" + ], + "pkg/common_async_pri2_js_0_jp.js": [ + "/widget/footer-seo/footer-seo-async.js", + "/widget/ui/monitor/monitor.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/sns-share/sns-share.js" + ], + "pkg/common_sync_pri2_css_0_jp.css": [ + "/widget/footer-seo/ltr/ltr.css", + "/widget/footer/ltr/ltr.css", + "/widget/ui/css-ui/css-ui.css", + "/widget/ui/dialog/dialog.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/sns-share/sns-share.css", + "/widget/ui/text-overflow/ltr/ltr.css" + ], + "pkg/common_async_pri1_js_0_jp.js": [ + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_jp.js": [ + "/widget/header-flat/account/account-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/ui/weather/weather_flat.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_jp.js": [ + "/widget/search-box/search-box-async.js" + ], + "pkg/common_async_pri1_js_3_jp.js": [ + "/widget/header/account-test/account-test-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/header-com/header-com-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/message/message-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/header/skin-trans/skin-trans-async.js", + "/widget/ui/popup/popup.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn-header/userbar-btn-header-async.js", + "/widget/header/userbar-btn-test/userbar-btn-test-async.js" + ], + "pkg/common_async_pri1_js_4_jp.js": [ + "/widget/header/account/account-async.js", + "/widget/header/userbar-btn/userbar-btn-async.js" + ], + "pkg/common_async_pri1_js_5_jp.js": [ + "/widget/header-flat/add-fav-bar/add-fav-bar-async.js", + "/widget/header-flat/fontsize-switch/fontsize-switch-async.js", + "/widget/header-flat/message/message-async.js" + ], + "pkg/common_async_pri1_js_6_jp.js": [ + "/widget/ui/jquery/widget/jquery.textarealimit/jquery.textarealimit.js" + ], + "pkg/common_sync_pri1_css_0_jp.css": [ + "/widget/header-flat/userbar-btn-header/ltr/ltr.more.css", + "/widget/header-flat/weather/ltr/ltr.more.css", + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_jp.css": [ + "/widget/header-flat/account/ltr/ltr.more.css", + "/widget/header-flat/clock/ltr/ltr.more.css", + "/widget/header-flat/logo/ltr/ltr.more.css", + "/widget/header-flat/ltr/ltr.more.css", + "/widget/search-box-new/ltr/ltr.more.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/prompt/prompt.css" + ], + "pkg/common_sync_pri1_css_2_jp.css": [ + "/widget/search-box-flat/flow/ltr/ltr.flow.css", + "/widget/search-box-flat/ltr/ltr.more.css", + "/widget/search-box/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_3_jp.css": [ + "/widget/header/account-test/ltr-s/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/header-com/ltr-s/ltr.lv2.more.css", + "/widget/header/header-com/ltr-s/ltr.more.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/message/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/skin-trans/ltr/ltr.more.css", + "/widget/header/skinbox/ltr/ltr.more.css", + "/widget/header/userbar-btn-header/ltr-s/ltr.more.css", + "/widget/header/userbar-btn-test/ltr-s/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css" + ], + "pkg/common_sync_pri1_css_4_jp.css": [ + "/widget/header/account/ltr/ltr.more.css", + "/widget/header/ltr/ltr.more.css", + "/widget/header/userbar-btn/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_5_jp.css": [ + "/widget/header-flat/add-fav-bar/ltr/ltr.more.css", + "/widget/header-flat/fontsize-switch/ltr/ltr.more.css", + "/widget/header-flat/message/ltr/ltr.more.css" + ], + "pkg/common_sync_pri2_js_0_jp.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/drap/drap.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/slide/plugin/control.js", + "/widget/ui/slide/plugin/pagination.js", + "/widget/ui/slide/plugin/stop-at-edge.js", + "/widget/ui/slide/slide.js", + "/widget/ui/time/time.js", + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/dialog/dialog.js", + "/widget/ui/localcookie/localcookie.js", + "/widget/ui/slide/plugin/animate.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ma.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ma.json new file mode 100755 index 000000000..ad0cb999d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-ma.json @@ -0,0 +1,92 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_ma.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date-new/date.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/time/time.js", + "/widget/ui/weather/ma/ma.js", + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/cycletabs/cycletabs.js" + ], + "pkg/common_sync_pri1_js_1_ma.js": [ + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri1_css_0_ma.css": [ + "/widget/footer/rtl/rtl.css", + "/widget/header/account/rtl/rtl.more.css", + "/widget/header/add-fav-bar/rtl/rtl.more.css", + "/widget/header/clock/rtl/rtl.more.css", + "/widget/header/logo/rtl/rtl.more.css", + "/widget/header/rtl/rtl.more.css", + "/widget/header/site-switch/rtl/rtl.more.css", + "/widget/header/userbar-btn/rtl/rtl.more.css", + "/widget/keyboard/rtl/rtl.css", + "/widget/login-popup/rtl/rtl.css", + "/widget/search-box/rtl/rtl.more.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/jquery/widget/jquery.ui.button/rtl/rtl.css", + "/widget/ui/prompt/prompt.css", + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/sns-share/sns-share.css", + "/widget/ui/suggest/suggest.css", + "/widget/header/weather/rtl/rtl.more.css" + ], + "pkg/common_async_pri1_js_0_ma.js": [ + "/widget/search-box/search-box-async.js", + "/widget/ui/localcookie/localcookie.js", + "/widget/ui/notice-pop/notice-pop.js", + "/widget/ui/popup/popup.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/sns-share/sns-share.js" + ], + "pkg/common_async_pri1_js_1_ma.js": [ + "/widget/header/account/account-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/keyboard/keyboard-main.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/userbar-btn/userbar-btn-async.js", + "/widget/keyboard/keyboard-async.js" + ], + "pkg/common_async_pri1_css_0_ma.css": [ + "/widget/ui/calendar/calendar.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/popup/popup.css" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-sa.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-sa.json new file mode 100755 index 000000000..c58a613cf --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-sa.json @@ -0,0 +1,172 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_sa.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/slide/plugin/animate.js", + "/widget/ui/slide/plugin/control.js", + "/widget/ui/slide/plugin/pagination.js", + "/widget/ui/slide/plugin/play.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri1_js_1_sa.js": [ + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/weather/sa/sa_flat.js" + ], + "pkg/common_sync_pri1_js_2_sa.js": [ + "/widget/ui/weather/sa/sa.js" + ], + "pkg/common_sync_pri1_js_3_sa.js": [ + "/widget/header/account-test/account-test-async.js", + "/widget/header/skinbox/skin-mod.js", + "/widget/header/skinbox/skinbox-async.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js" + ], + "pkg/common_sync_pri2_css_0_sa.css": [ + "/widget/ui/dialog/dialog.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/sns-share/sns-share.css" + ], + "pkg/common_sync_pri2_css_1_sa.css": [ + "/widget/css-base/dist/base.rtl.css", + "/widget/css-base/dist/base.rtl.ie.css", + "/widget/css-flatbase/rtl/rtl.css", + "/widget/ui/css-ui/css-ui.css" + ], + "pkg/common_sync_pri1_css_0_sa.css": [ + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_sa.css": [ + "/widget/footer/rtl/rtl.css", + "/widget/header-flat/account/rtl/rtl.more.css", + "/widget/header-flat/add-fav-bar/rtl/rtl.more.css", + "/widget/header-flat/clock/rtl/rtl.more.css", + "/widget/header-flat/logo/rtl/rtl.more.css", + "/widget/header-flat/rtl/rtl.more.css", + "/widget/header-flat/site-switch/rtl/rtl.more.css", + "/widget/header-flat/userbar-btn-header/rtl/rtl.more.css", + "/widget/keyboard/rtl/rtl.css", + "/widget/search-box-new/rtl/rtl.more.css", + "/widget/ui/prompt/prompt.css", + "/widget/header-flat/weather/rtl/rtl.more.css" + ], + "pkg/common_sync_pri1_css_2_sa.css": [ + "/widget/header/account/rtl/rtl.more.css", + "/widget/header/add-fav-bar/rtl/rtl.more.css", + "/widget/header/clock/rtl/rtl.more.css", + "/widget/header/logo/rtl/rtl.more.css", + "/widget/header/rtl/rtl.more.css", + "/widget/header/site-switch/rtl/rtl.more.css", + "/widget/header/userbar-btn/rtl/rtl.more.css", + "/widget/header/weather/rtl/rtl.more.css" + ], + "pkg/common_sync_pri1_css_3_sa.css": [ + "/widget/header-flat/message/rtl/rtl.more.css", + "/widget/search-box-flat/flow/rtl/rtl.flow.css", + "/widget/search-box-flat/rtl/rtl.more.css", + "/widget/search-box/rtl/rtl.more.css" + ], + "pkg/common_sync_pri1_css_4_sa.css": [ + "/widget/header/account-test/rtl-s/rtl.more.css", + "/widget/header/header-com/rtl-s/rtl.lv2.more.css", + "/widget/header/header-com/rtl-s/rtl.more.css", + "/widget/header/message/rtl/rtl.more.css", + "/widget/header/skin-trans/rtl/rtl.more.css", + "/widget/header/skinbox/rtl/rtl.more.css", + "/widget/header/userbar-btn-header/rtl-s/rtl.more.css", + "/widget/header/userbar-btn-test/rtl-s/rtl.more.css", + "/widget/login-popup/rtl/rtl.css", + "/widget/ui/jquery/widget/jquery.ui.button/rtl/rtl.css", + "/widget/ui/text-overflow/rtl/rtl.css" + ], + "pkg/common_async_pri1_js_0_sa.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_sa.js": [ + "/widget/header-flat/account/account-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/site-switch/site-switch-async.js", + "/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/weather/weather_flat.js", + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_sa.js": [ + "/widget/header-flat/add-fav-bar/add-fav-bar-async.js", + "/widget/keyboard/keyboard-main.js", + "/widget/keyboard/keyboard-async.js" + ], + "pkg/common_async_pri1_js_3_sa.js": [ + "/widget/header/account/account-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn-header/userbar-btn-header-async.js", + "/widget/header/userbar-btn/userbar-btn-async.js" + ], + "pkg/common_async_pri1_js_4_sa.js": [ + "/widget/search-box/search-box-async.js" + ], + "pkg/common_async_pri1_js_5_sa.js": [ + "/widget/header/header-com/header-com-async.js", + "/widget/header/message/message-async.js", + "/widget/header/skin-trans/skin-trans-async.js", + "/widget/header/userbar-btn-test/userbar-btn-test-async.js", + "/widget/ui/popup/popup.js" + ], + "pkg/common_async_pri1_js_6_sa.js": [ + "/widget/header-flat/message/message-async.js" + ], + "pkg/common_sync_pri2_js_0_sa.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/drap/drap.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/slide/slide.js", + "/widget/ui/time/time.js", + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/dialog/dialog.js", + "/widget/ui/localcookie/localcookie.js" + ], + "pkg/common_async_pri2_js_0_sa.js": [ + "/widget/ui/monitor/monitor.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/slide/plugin/stop-at-edge.js", + "/widget/ui/sns-share/sns-share.js", + "/widget/ui/dropdownlist/dropdownlist.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-th.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-th.json new file mode 100755 index 000000000..da3fb7a7c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-th.json @@ -0,0 +1,192 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_th.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri1_js_1_th.js": [ + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/slide/plugin/control.js", + "/widget/ui/slide/plugin/pagination.js", + "/widget/ui/slide/plugin/play.js", + "/widget/ui/slide/slide.js", + "/widget/ui/weather/th/th_flat.js", + "/widget/ui/slide/plugin/animate.js" + ], + "pkg/common_sync_pri1_js_2_th.js": [ + "/widget/ui/weather/th/th.js" + ], + "pkg/common_sync_pri1_js_3_th.js": [ + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/dialog/dialog.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/tpl/tpl.js" + ], + "pkg/common_sync_pri1_js_4_th.js": [ + "/widget/header/skinbox/skin-mod.js", + "/widget/header/skinbox/skinbox-async.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.datepicker/jquery.ui.datepicker.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js" + ], + "pkg/common_sync_pri2_css_0_th.css": [ + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/sns-share/sns-share.css" + ], + "pkg/common_sync_pri2_css_1_th.css": [ + "/widget/css-base/dist/base.ltr.css", + "/widget/css-base/dist/base.ltr.ie.css", + "/widget/css-flatbase/ltr/ltr.css", + "/widget/ui/css-ui/css-ui.css" + ], + "pkg/common_sync_pri1_css_0_th.css": [ + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_th.css": [ + "/widget/header-flat/account/ltr/ltr.more.css", + "/widget/header-flat/banner-site/ltr/ltr.more.css", + "/widget/header-flat/clock/ltr/ltr.more.css", + "/widget/header-flat/logo/ltr/ltr.more.css", + "/widget/header-flat/ltr/ltr.more.css", + "/widget/header-flat/site-switch/ltr/ltr.more.css", + "/widget/header-flat/userbar-btn-header/ltr/ltr.more.css", + "/widget/search-box-new/ltr/ltr.more.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/prompt/prompt.css", + "/widget/header-flat/weather/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_2_th.css": [ + "/widget/footer/ltr/ltr.css" + ], + "pkg/common_sync_pri1_css_3_th.css": [ + "/widget/header/account/ltr/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/userbar-btn/ltr/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/ui/jquery/widget/jquery.ui.datepicker/jquery.ui.datepicker.css" + ], + "pkg/common_sync_pri1_css_4_th.css": [ + "/widget/search-box-flat/flow/ltr/ltr.flow.css", + "/widget/search-box-flat/ltr/ltr.more.css", + "/widget/search-box/ltr/ltr.more.css", + "/widget/ui/dialog/dialog.css" + ], + "pkg/common_sync_pri1_css_5_th.css": [ + "/widget/header/header-com/ltr-s/ltr.lv2.more.css", + "/widget/ui/text-overflow/ltr/ltr.css" + ], + "pkg/common_sync_pri1_css_6_th.css": [ + "/widget/header/account-test/ltr-s/ltr.more.css", + "/widget/header/header-com/ltr-s/ltr.more.css", + "/widget/header/message/ltr/ltr.more.css", + "/widget/header/skin-trans/ltr/ltr.more.css", + "/widget/header/skinbox/ltr/ltr.more.css", + "/widget/header/userbar-btn-header/ltr-s/ltr.more.css", + "/widget/header/userbar-btn-test/ltr-s/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css", + "/widget/ui/lottery/lottery.css" + ], + "pkg/common_sync_pri1_css_7_th.css": [ + "/widget/header-flat/simple-nav/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_8_th.css": [ + "/widget/header-flat/add-fav-bar/ltr/ltr.more.css", + "/widget/header-flat/message/ltr/ltr.more.css" + ], + "pkg/common_async_pri1_js_0_th.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_th.js": [ + "/widget/header-flat/account/account-async.js", + "/widget/header-flat/banner-site/banner-site-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/site-switch/site-switch-async.js", + "/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/ui/weather/weather_flat.js", + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_th.js": [ + "/widget/header/account-test/account-test-async.js", + "/widget/header/account/account-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn/userbar-btn-async.js" + ], + "pkg/common_async_pri1_js_3_th.js": [ + "/widget/header/header-com/header-com-async.js", + "/widget/header/userbar-btn-header/userbar-btn-header-async.js", + "/widget/header/userbar-btn-test/userbar-btn-test-async.js", + "/widget/search-box/search-box-async.js", + "/widget/ui/notice-pop/notice-pop.js", + "/widget/ui/popup/popup.js" + ], + "pkg/common_async_pri1_js_4_th.js": [ + "/widget/header/message/message-async.js", + "/widget/header/skin-trans/skin-trans-async.js", + "/widget/ui/lottery/lottery.js" + ], + "pkg/common_async_pri1_js_5_th.js": [ + "/widget/header-flat/simple-nav/simple-nav-async.js" + ], + "pkg/common_async_pri1_js_6_th.js": [ + "/widget/header-flat/add-fav-bar/add-fav-bar-async.js", + "/widget/header-flat/message/message-async.js" + ], + "pkg/common_async_pri1_js_7_th.js": [ + "/widget/search-box-4ps/search-box-4ps-async.js" + ], + "pkg/common_sync_pri2_js_0_th.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/time/time.js", + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/drap/drap.js", + "/widget/ui/localcookie/localcookie.js" + ], + "pkg/common_async_pri2_js_0_th.js": [ + "/widget/ui/monitor/monitor.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/sns-share/sns-share.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-tw.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-tw.json new file mode 100755 index 000000000..e48ae9da0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-tw.json @@ -0,0 +1,139 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_tw.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/date-new/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/suggest/suggest.js", + "/widget/ui/weather/tw/tw_flat.js" + ], + "pkg/common_sync_pri1_js_1_tw.js": [ + "/widget/ui/weather/tw/tw.js" + ], + "pkg/common_sync_pri1_js_2_tw.js": [ + "/widget/header/skinbox/skin-mod.js", + "/widget/header/skinbox/skinbox-async.js", + "/widget/ui/bubble/src/bubble.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js" + ], + "pkg/common_sync_pri2_css_0_tw.css": [ + "/widget/ui/dialog/dialog.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/sns-share/sns-share.css" + ], + "pkg/common_sync_pri2_css_1_tw.css": [ + "/widget/css-base/dist/base.ltr.css", + "/widget/css-base/dist/base.ltr.ie.css", + "/widget/css-flatbase/ltr/ltr.css", + "/widget/ui/css-ui/css-ui.css" + ], + "pkg/common_sync_pri1_css_0_tw.css": [ + "/widget/header-flat/account/ltr/ltr.more.css", + "/widget/header-flat/userbar-btn-header/ltr/ltr.more.css", + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_tw.css": [ + "/widget/header-flat/clock/ltr/ltr.more.css", + "/widget/header-flat/logo/ltr/ltr.more.css", + "/widget/header-flat/ltr/ltr.more.css", + "/widget/search-box-new/ltr/ltr.more.css", + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/prompt/prompt.css", + "/widget/header-flat/weather/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_2_tw.css": [ + "/widget/footer/ltr/ltr.css", + "/widget/header/account-test/ltr-s/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/header-com/ltr-s/ltr.more.css", + "/widget/header/header-com/ltr-s/ltr.ps.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/message/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/skin-trans/ltr/ltr.more.css", + "/widget/header/userbar-btn-header/ltr-s/ltr.more.css", + "/widget/header/userbar-btn-test/ltr-s/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css" + ], + "pkg/common_sync_pri1_css_3_tw.css": [ + "/widget/header/skinbox/ltr/ltr.more.css" + ], + "pkg/common_async_pri1_js_0_tw.js": [ + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js" + ], + "pkg/common_async_pri1_js_1_tw.js": [ + "/widget/header-flat/account/account-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/ui/weather/weather_flat.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_tw.js": [ + "/widget/header/account-test/account-test-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/header-com/header-com-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/message/message-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/search-box-4ps/search-box-4ps-async.js", + "/widget/ui/popup/popup.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn-header/userbar-btn-header-async.js", + "/widget/header/userbar-btn-test/userbar-btn-test-async.js" + ], + "pkg/common_async_pri1_js_3_tw.js": [ + "/widget/header/skin-trans/skin-trans-async.js", + "/widget/ui/notice-pop/notice-pop.js" + ], + "pkg/common_sync_pri2_js_0_tw.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/drap/drap.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/time/time.js", + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/dialog/dialog.js", + "/widget/ui/localcookie/localcookie.js" + ], + "pkg/common_async_pri2_js_0_tw.js": [ + "/widget/ui/monitor/monitor.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/sns-share/sns-share.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-vn.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-vn.json new file mode 100755 index 000000000..904749c07 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-vn.json @@ -0,0 +1,140 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_vn.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/date-new/date.js", + "/widget/ui/date/date.js", + "/widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js", + "/widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js", + "/widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js", + "/widget/ui/suggest/suggest.js", + "/widget/ui/weather/vn/vn_flat.js" + ], + "pkg/common_sync_pri1_js_1_vn.js": [ + "/widget/ui/bubble/src/bubble.js" + ], + "pkg/common_sync_pri1_js_2_vn.js": [ + "/widget/ui/weather/vn/vn.js" + ], + "pkg/common_sync_pri1_js_3_vn.js": [ + "/widget/header/skinbox/skin-mod.js", + "/widget/header/skinbox/skinbox-async.js", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js", + "/widget/ui/jquery/widget/jquery.ui.datepicker/jquery.ui.datepicker.js", + "/widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js", + "/widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js" + ], + "pkg/common_sync_pri1_css_0_vn.css": [ + "/widget/ui/dropdownlist/dropdownlist.css", + "/widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.css", + "/widget/ui/prompt/prompt.css", + "/widget/ui/scrollable/scrollable.css", + "/widget/ui/suggest/suggest.css" + ], + "pkg/common_sync_pri1_css_1_vn.css": [ + "/widget/header-flat/account/ltr/ltr.more.css", + "/widget/header-flat/clock/ltr/ltr.more.css", + "/widget/header-flat/logo/ltr/ltr.more.css", + "/widget/header-flat/ltr/ltr.more.css", + "/widget/header-flat/site-switch/ltr/ltr.more.css", + "/widget/header-flat/userbar-btn-header/ltr/ltr.more.css", + "/widget/header-flat/weather/ltr/ltr.more.css", + "/widget/search-box-new/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_2_vn.css": [ + "/widget/footer/ltr/ltr.css", + "/widget/search-box-flat/flow/ltr/ltr.flow.css", + "/widget/search-box-flat/ltr/ltr.more.css", + "/widget/search-box/ltr/ltr.more.css" + ], + "pkg/common_sync_pri1_css_3_vn.css": [ + "/widget/header/account-test/ltr-s/ltr.more.css", + "/widget/header/account/ltr/ltr.more.css", + "/widget/header/add-fav-bar/ltr/ltr.more.css", + "/widget/header/clock/ltr/ltr.more.css", + "/widget/header/header-com/ltr-s/ltr.more.css", + "/widget/header/logo/ltr/ltr.more.css", + "/widget/header/ltr/ltr.more.css", + "/widget/header/message/ltr/ltr.more.css", + "/widget/header/site-switch/ltr/ltr.more.css", + "/widget/header/skin-trans/ltr/ltr.more.css", + "/widget/header/skinbox/ltr/ltr.more.css", + "/widget/header/tear-page/ltr/ltr.more.css", + "/widget/header/userbar-btn-header/ltr-s/ltr.more.css", + "/widget/header/userbar-btn-test/ltr-s/ltr.more.css", + "/widget/header/userbar-btn/ltr/ltr.more.css", + "/widget/header/weather/ltr/ltr.more.css", + "/widget/login-popup/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css", + "/widget/ui/jquery/widget/jquery.ui.datepicker/jquery.ui.datepicker.css", + "/widget/ui/lottery/lottery.css" + ], + "pkg/common_async_pri1_js_0_vn.js": [ + "/widget/header-flat/header-flat-async.js", + "/widget/search-box-new/search-box-new-async.js", + "/widget/ui/date-new/plugin/lunar.js", + "/widget/ui/scrollable/scrollable.js" + ], + "pkg/common_async_pri1_js_1_vn.js": [ + "/widget/header-flat/account/account-async.js", + "/widget/header-flat/logo/logo-async.js", + "/widget/header-flat/site-switch/site-switch-async.js", + "/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js", + "/widget/ui/calendar/calendar.js", + "/widget/ui/date-new/plugin/buddhist.js", + "/widget/ui/date-new/plugin/isl.js", + "/widget/ui/date-new/plugin/rokuyou.js", + "/widget/ui/dropdownlist/dropdownlist.js", + "/widget/ui/weather/weather_flat.js", + "/widget/header-flat/clock/calendar-async.js", + "/widget/header-flat/clock/clock-async.js" + ], + "pkg/common_async_pri1_js_2_vn.js": [ + "/widget/search-box/search-box-async.js" + ], + "pkg/common_async_pri1_js_3_vn.js": [ + "/widget/header/account-test/account-test-async.js", + "/widget/header/account/account-async.js", + "/widget/header/add-fav-bar/add-fav-bar-async.js", + "/widget/header/clock/calendar-async.js", + "/widget/header/clock/clock-async.js", + "/widget/header/header-com/header-com-async.js", + "/widget/header/logo/logo-async.js", + "/widget/header/message/message-async.js", + "/widget/header/site-switch/site-switch-async.js", + "/widget/header/skin-trans/skin-trans-async.js", + "/widget/header/tear-page/tear-page-async.js", + "/widget/ui/lottery/lottery.js", + "/widget/ui/notice-pop/notice-pop.js", + "/widget/ui/popup/popup.js", + "/widget/ui/sethome-ff/sethome-ff-c.js", + "/widget/ui/weather/weather.js", + "/widget/header/userbar-btn-header/userbar-btn-header-async.js", + "/widget/header/userbar-btn-test/userbar-btn-test-async.js", + "/widget/header/userbar-btn/userbar-btn-async.js" + ], + "pkg/common_sync_pri2_js_0_vn.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/time/time.js", + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/localcookie/localcookie.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-www.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-www.json new file mode 100644 index 000000000..51226e8e0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fis-pack-www.json @@ -0,0 +1,41 @@ +{ + "pkg/autopack_common_base.js": [ + "/static/lazyload.js", + "/static/mod.js", + "/static/BigPipe.js" + ], + "pkg/common_sync_pri1_js_0_www.js": [ + "/static/open-api/lazyload.js", + "/widget/ui/suggest/suggest.js" + ], + "pkg/common_sync_pri2_js_0_www.js": [ + "/widget/ui/cookieless/cookieless.js", + "/widget/ui/date/date.js", + "/widget/ui/helper/helper.js", + "/widget/ui/jquery/1.8.3/jquery.min.js", + "/widget/ui/jquery/jquery.cookie.js", + "/widget/ui/jquery/jquery.json.js", + "/widget/ui/jquery/jquery.mousewheel.js", + "/widget/ui/jquery/jquery.ui.core.js", + "/widget/ui/jquery/jquery.ui.widget.js", + "/widget/ui/md5/md5.js", + "/widget/ui/message/src/message.js", + "/widget/ui/ut/ut.js", + "/widget/ui/jquery/jquery.js", + "/widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js", + "/widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js", + "/widget/ui/localstorage/localstorage.js", + "/widget/ui/scrollable/scrollable.js", + "/widget/ui/slide/plugin/control.js", + "/widget/ui/slide/plugin/pagination.js", + "/widget/ui/slide/plugin/play.js", + "/widget/ui/slide/slide.js", + "/widget/ui/time/time.js", + "/widget/ui/cycletabs/cycletabs.js", + "/widget/ui/localcookie/localcookie.js", + "/widget/ui/slide/plugin/animate.js" + ], + "pkg/common_sync_pri2_js_1_www.js": [ + "/widget/ui/tpl/tpl.js" + ] +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fix-tpldir.sh b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fix-tpldir.sh new file mode 100755 index 000000000..8fadeed36 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/fix-tpldir.sh @@ -0,0 +1,4 @@ +find test/data -name data.php | xargs perl -pi -e "s|'tplDir' => 'page/lv2/|'tplDir' => 'lv2/page/|g" +find test/data -name data.php | xargs perl -pi -e "s|'tplDir' => 'page/home/|'tplDir' => 'home/page/|g" + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/json2php.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/json2php.php new file mode 100755 index 000000000..a279d2c0c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/json2php.php @@ -0,0 +1,32 @@ +' + ); + } + } +}else{ + +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/page/layout/base.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/page/layout/base.tpl new file mode 100755 index 000000000..73c2f245b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/page/layout/base.tpl @@ -0,0 +1,173 @@ +<%* FIS迁移后,将base.tpl/base-rtl.tpl合并为一个,因为它们最大的差别就是dir="ltr/rtl"的区别;后续,这个可以在cms的base中配置$head.dir *%> +<%assign var="head" value=$root.head%> +<%assign var="body" value=$root.body%> +<%assign var="html" value=$root.html%> +<%cdn url="<%$head.cdn%>"%> + +<%if empty($head.dir)%> + <%$head.dir='ltr'%> +<%/if%> + +<%$htmlParam = "xmlns:ie<%if !empty($head.dir)%> dir=\"<%$head.dir%>\"<%/if%><%if !empty($body.snsShare)%> itemscope itemtype=\"http://schema.org/Article\" xmlns:fb=\"http://ogp.me/ns/fb#\"<%/if%><%if !empty($head.lang)%> lang=\"<%$head.lang%>\"<%/if%><%if $head.flowLayout === "2"%> class=\"w960\"<%elseif $head.flowLayout === "3"%> class=\"w1020\"<%/if%>"%> + +<%html framework="common:static/mod.js" "<%$htmlParam%>" fid="globalhao123" smapleRate="1"%> + <%head%> + + <%* 预取dns*%> + <%if !empty($head.prefetch)%> + <%foreach $head.prefetch as $prefetch%> + dns-<%/if%>prefetch" href="<%$prefetch%>" /> + <%/foreach%> + <%if !empty($head.prefetchOff)%> + + <%/if%> + <%/if%> + + <%$head.title|escape:"html"%> + "> + "> + <%*巴西GOOGLE SEO meta*%> + <%if !empty($head.forGoogleSeo)%> + + <%/if%> + <%* 其它meta信息 *%> + <%if !empty($head.metas)%> + <%foreach $head.metas as $item%> + + <%/foreach%> + <%/if%> + <%* SEO canonical参数*%> + <%if !empty($head.canonical)%> + + <%/if%> + <%if !empty($body.snsShare)%> + + + + + <%/if%> + <%if !empty($html.prefetchContents)%><%$html.prefetchContents%><%/if%> + <%*Global var*%> + <%widget name="common:widget/global-conf/global-conf.tpl"%> + + <%block name="headInfo"%><%/block%> + <%if empty($head.noBaseCss)%> + <%widget name="common:widget/css-base/css-base.tpl"%> + <%/if%> + <%foreach $head.confCSS as $value%> + <%if !empty($value.href)%><%/if%> + <%/foreach%> + <%strip%> + + + + <%/strip%> + <%* 标示fis产出的 inline 、link css位置*%> + <%cssposition%> + <%if !empty($head.fontFamily) || !empty($head.fontSize)%> + <%style%> + <%if !empty($head.fontFamily)%> + html body {font-family:<%$head.fontFamily%>;} + <%/if%> + <%if !empty($head.fontSize)%> + body {font-size:<%$head.fontSize%>;} + <%/if%> + <%/style%> + <%/if%> + <%$html.head%> + <%$html.baseHead%> + <%$html.hotsiteMergeHead%> + <%/head%> + <%* web speed 打点*%> + <%block name="vsWebspeedHead"%><%/block%> + + <%body class="<%if !empty($head.flowLayout)%>flow-on<%/if%>"%> + <%if $head.pageLevel == 1 && !$head.noCssHook %> + <%csshook%> + <%/if%> + <%*Flow layout*%> + <%if !empty($head.flowLayout)%> + + <%*引入动态判断布局js*%> + + <%/if%> + <%* UT log *%> + + <%if !empty($head.trackSAction) && !empty($head.trackSAction.tnExp) && preg_match($head.trackSAction.tnExp, $root.urlparam['tn'])%> + <%* 特殊统计代码验证 *%> + <%$head.trackSAction.code%> + <%/if%> + + <%if !empty($head.effectiveMeature)%> + + <%/if%> + + <%if empty($head.noBaseUt)%> + <%widget name="common:widget/ut-log/ut-log.tpl"%> + <%/if%> + + <%block name="layout"%><%/block%> + + + <%if !empty($head.statusOK)%><%$head.statusOK%><%/if%> + <%* web speed 打点*%> + <%block name="vsWebspeedBody"%><%/block%> + <%/body%> + + <%foreach $head.confJS as $value%> + <%if !empty($value.src)%> + + <%/if%> + <%/foreach%> + <%$html.foot%> + <%$html.baseFoot%> +<%/html%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/block.widget_inline.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/block.widget_inline.php new file mode 100755 index 000000000..e3ea1c0df --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/block.widget_inline.php @@ -0,0 +1,26 @@ + $value){ + if($value instanceof Smarty_Variable){ + $tpl_vars[$key] = $value; + } else { + $tpl_vars[$key] = new Smarty_Variable($value); + } + } + } + public static function pop(&$tpl_vars){ + $tpl_vars = array_pop(self::$_vars); + } +} + +function smarty_block_widget_inline($params, $content, Smarty_Internal_Template $template, &$repeat){ + if(!$repeat){//block 定义结束 + FISBlockFisWidget::pop($template->tpl_vars); + return $content; + }else{//block 定义开始 + FISBlockFisWidget::push($params, $template->tpl_vars); + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.cdn.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.cdn.php new file mode 100755 index 000000000..e7b285c65 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.cdn.php @@ -0,0 +1,13 @@ +'; + return $strCode; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.csshook.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.csshook.php new file mode 100755 index 000000000..72fb929b2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.csshook.php @@ -0,0 +1,10 @@ +'; + return $strCode; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.cssposition.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.cssposition.php new file mode 100755 index 000000000..e299c15d5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.cssposition.php @@ -0,0 +1,10 @@ +'; + return $strCode; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.fis_require.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.fis_require.php new file mode 100755 index 000000000..bf3e0b474 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.fis_require.php @@ -0,0 +1,230 @@ + array('', ''), + 'symbols' => array() + ); + } + //如果是lib,先探测是否在common里 + if($info['is_lib']){ + if((isset(self::$map[$framework]['common']) || self::loadMap('common',$framework)) && isset(self::$map[$framework]['common']['resource'][$id])){ + $map = &self::$map[$framework]['common']; + $info = &$map['resource'][$id]; + } + } + $collections = &self::$collection[$ext]; + //加载依赖文件 + foreach($info['requires'] as &$require){ + //if(isset($collections['symbols'][$id])) continue; + self::addSymbol($require[0], $require[1], $framework); + } + //如果方案中已经有了,就退出 + if($collections['symbols'][$id]) return; + //获取包id + $pacakges_id = $map['resource'][$id]['packages']; + + if($pacakges_id){ + //如果有包,就用这个包 + $info = &$map['package'][$pacakges_id]; + $collections['symbols'] = array_merge($collections['symbols'], $info['symbols_map']); + } else { + //无包就用单独文件 + $collections['symbols'][$id] = 1; + } + $collections['html'] = self::renderResource($info, $collections['html']); + } + + private static function renderResource(&$info, $ret = array('', '')){ + $crlf = "\n"; + $html = ''; + if($info['ext'] == 'js'){ + if($info['is_sync']){ + $html = $crlf . ''; + } else { + if(isset($info['symbols'])){ + $html = $crlf . ''; + } else { + $html = $crlf . ''; + } + } + } else if($info['ext'] == 'css') { + $html = $crlf . ''; + } + if($info['module'] == 'common'){ + $ret[0] .= $html; + } else { + $ret[1] .= $html; + } + return $ret; + } + + public function registerResourceMap($map, $module, $key = 'pc2') { + self::$map[$key][$module] = &$map; + } + + public static function renderResponse($output){ + $ret = ''; + + $collection = &self::$collection['css']; + if($collection){ + $ret .= $collection['html'][0] . $collection['html'][1]; + } + + $collection = &self::$collection['js']; + if($collection){ + $ret .= $collection['html'][0] . $collection['html'][1]; + } + return str_replace('', $ret, $output); + } +} + + +function smarty_compiler_fis_require($params, Smarty $smarty){ + $static_path = array(); + if (isset($params['static'])) { + $static_path = $params['static']; + //在不修改smartysyntax的情况下,获取到的static_path为字符串而非php数组结构 + //array("/static/common/lib/fis/template/template.js") + $static_path = substr($static_path, 6, -1); + //如果以后传入的是多个元素的数组 + //array("/static/common/lib/fis/template/template.js","/static/common/lib/fis/template/template.js") + $static_path = str_replace(array('"','\''), '', $static_path); + $static_path = explode(',',$static_path); + }else{ + trigger_error('This params have no static params!',E_USER_WARNING); + } + if(isset($params['module'])){ + $require_module = $params['module']; + $require_module = substr($require_module, 1, -1); + }else{ + $static = implode(',', $static_path); + trigger_error("This params have no module params,when use $static", E_USER_WARNING); + } + if(isset($params['framework'])){ + $require_framework = $params['framework']; + $require_framework = substr($require_framework, 1, -1); + }else{ + $require_framework = null; + } + + /**@var ResourceAPI $api*/ + $return_code = 'smarty->getConfigDir(); + foreach($config_dir as $dir){ + if($require_module != 'common'){ + if($require_framework){ + $common_php = $dir . 'common/common_' . $require_framework .'_resource_map.php'; + if(is_file($common_php)){ + $return_code .= 'ResourceAPI::registerMapPath("'.$common_php.'", "common", "'.$require_framework.'");'; + } + }else{ + $common_php = $dir . 'common/common_resource_map.php'; + if(is_file($common_php)){ + $return_code .= 'ResourceAPI::registerMapPath("'.$common_php.'", "common");'; + + }else{ + trigger_error("Please use pc2-1.3.4 or later to compare common module!",E_USER_ERROR); + } + } + } + if($require_framework){ + $require_php = $dir . $require_module . '/' . $require_module . '_' . $require_framework . '_resource_map.php'; + if(is_file($require_php)){ + $return_code .= 'ResourceAPI::registerMapPath("'.$require_php.'", "'.$require_module.'", "'.$require_framework.'");'; + break; + } + }else{ + $require_php = $dir . $require_module . '/' . $require_module . '_resource_map.php'; + if(is_file($require_php)){ + $return_code .= 'ResourceAPI::registerMapPath("'.$require_php.'", "'.$require_module.'");'; + break; + } + } + } + } + foreach($static_path as $static){ + if($require_framework){ + $return_code .= 'ResourceAPI::addSymbol("'.$static.'", "'.$require_module.'", "'.$require_framework.'");'; + }else{ + $return_code .= 'ResourceAPI::addSymbol("'.$static.'", "'.$require_module.'");'; + } + } + $cdn = ''; + if($root = $smarty->smarty->getTemplateVars('root')){ + if($head = $root['head']){ + if($cdn = $head['cdn']){ + $cdn = rtrim($cdn, '/'); + } + } + } + $return_code .= 'ResourceAPI::setCdn("' . $cdn . '");' ; + $return_code .= ' + if(!ResourceAPI::$registered){ + $_smarty_tpl->registerFilter("output", array("ResourceAPI", "renderResponse")); + ResourceAPI::$registered = true; + }'; + $return_code .= '?>'; + return $return_code; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.setfs.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.setfs.php new file mode 100755 index 000000000..48c8c8a6a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.setfs.php @@ -0,0 +1,11 @@ +'; + return $strCode; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.style.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.style.php new file mode 100755 index 000000000..cca6f91d0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/compiler.style.php @@ -0,0 +1,31 @@ +'; + return $strCode; +} + +function smarty_compiler_styleclose($params, $smarty){ + $strResourceApiPath = preg_replace('/[\\/\\\\]+/', '/', dirname(__FILE__) . '/lib/FISPagelet.class.php'); + $strCode = ''; + return $strCode; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/function.fis_require.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/function.fis_require.php new file mode 100755 index 000000000..8b105fa26 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/function.fis_require.php @@ -0,0 +1,304 @@ +destroy(); + self::$instance = null; + } + + public function destroy(){ + unset($this->map); + unset($this->map_path); + unset($this->collection); + unset($this->processed_symbol); + unset($this->smarty); + } + + public function registerMapPath($path, $module, $key = 'pc2'){ + $this->map_path[$key][$module] = $path; + } + + private function loadMap($module, $key = 'pc2'){ + $map = &$this->map_path; + if(isset($map[$key][$module])){ + include($map[$key][$module]); + return true; + } else { + trigger_error("Unregistered module map [{$module}].", E_USER_WARNING); + return false; + } + } + + public function setSmarty(Smarty_Internal_Template $template){ + $this->smarty = $template->smarty; + } + + private function getPackages(&$info, &$map){ + $ret = array(); + $id = $info['id']; + $pacakges = &$map['resource'][$id]['packages']; + foreach($pacakges as $package){ + $ret[] = &$map['package'][$package]; + } + return $ret; + } + + public function addSymbol($id, $module, $framework = 'pc2'){ + if(isset($this->processed_symbol[$id])) return; + $this->processed_symbol[$id] = true; + if(!isset($this->map[$framework][$module]) && !$this->loadMap($module, $framework)){ + //加载模块map文件失败 + trigger_error("Unknown [{$module}] map.", E_USER_WARNING); + return; + } + if(!isset($this->map[$framework][$module]['resource'][$id])){ + trigger_error("Unknown resource [{$id}].", E_USER_WARNING); + return; + } + $map = &$this->map[$framework][$module]; + $info = &$map['resource'][$id]; + if($info['is_lib']){ + //如果是lib,先探测是否在common里 + if((isset($this->map[$framework]['common']) || $this->loadMap('common', $framework)) && isset($this->map[$framework]['common']['resource'][$id])){ + $map = &$this->map[$framework]['common']; + $info = &$map['resource'][$id]; + } + } + foreach($info['requires'] as &$require){ + $this->addSymbol($require[0], $require[1], $framework); + } + $ext = $info['ext']; + if(!isset($this->collection[$ext])){ + $this->collection[$ext] = array(); + } + $collections = &$this->collection[$ext]; + $packages = $this->getPackages($info, $map); + if(empty($collections)){ + $collections[] = array( + 'html' => $this->renderResource($info), + 'count' => 1, + 'size' => $info['size'], + 'pos' => 0, + 'symbols' => array($id => 1) + ); + foreach($packages as &$package){ + $collections[] = array( + 'html' => $this->renderResource($package), + 'count' => 1, + 'size' => $package['size'], + 'pos' => 0, + 'symbols' => $package['symbols_map'] + ); + } + } else { + $collections_new = array(); + $packages[] = &$info; + foreach($collections as &$collection){ + $add_fail = true; + foreach($packages as &$package){ + $symbols = $collection['symbols']; + if($package === $info){ + if(isset($symbols[$id])) { + continue; + } else { + $symbols[$id] = 1; + } + } else { + foreach($package['symbols'] as $symbol) { + if(isset($symbols[$symbol])){ + continue 2; + } else { + $symbols[$symbol] = 1; + } + } + } + $add_fail = false; + $collections_new[] = array( + 'html' => $this->renderResource($package, $collection['html']), + 'count' => $collection['count'] + 1, + 'size' => $collection['size'] + $package['size'], + 'pos' => $collection['pos'] + 0, + 'symbols' => $symbols + ); + } + if($add_fail) { + $collections_new[] = &$collection; + } + //if(count($collections_new) > 100) break; + } + $this->collection[$ext] = &$collections_new; + } + } + + private function renderResource(&$info, $ret = array('', '')){ + $crlf = "\n"; + $html = ''; + $cdn = ''; + if($root = $this->smarty->getTemplateVars('root')){ + if($head = $root['head']){ + if($cdn = $head['cdn']){ + $cdn = rtrim($cdn, '/'); + } + } + } + if($info['ext'] == 'js'){ + if($info['is_sync']){ + $html = $crlf . ''; + } else { + if(isset($info['symbols'])){ + $html = $crlf . ''; + } else { + $html = $crlf . ''; + } + } + } else if($info['ext'] == 'css') { + $html = $crlf . ''; + } + if($info['module'] == 'common'){ + $ret[0] .= $html; + } else { + $ret[1] .= $html; + } + return $ret; + } + + public function registerResourceMap($map, $module, $key = 'pc2') { + $this->map[$key][$module] = &$map; + } + + public function getCollection($type){ + return $this->collection[$type]; + } + + public function renderResponse($output, Smarty_Internal_Template $template){ + $ret = ''; + $collection = $this->calResultCollection('css'); + if($collection){ + $ret .= $collection['html'][0] . $collection['html'][1]; + } + $collection = $this->calResultCollection('js'); + if($collection){ + $ret .= $collection['html'][0] . $collection['html'][1]; + } + return str_replace('', $ret, $output); + } + + private function calResultCollection($type){ + if(empty($this->collection[$type])) return false; + $len = count($this->collection[$type]); + $ret = &$this->collection[$type][0]; + if($len > 1){ + $s1 = $ret; + for($i = 1 ; $i < $len ; $i++){ + $curr = &$this->collection[$type][$i]; + $s2 = &$curr ; + if($s1['count'] < $s2['count']) { + continue; + } elseif($s1['count'] > $s2['count']) { + $s1 = &$s2; + $ret = &$curr; + } else if($s1['pos'] < $s2['pos']) { + //count相等时, 比较postion + continue; + } else if($s1['pos'] > $s2['pos']) { + //count相等时, 比较postion + $s1 = &$s2; + $ret = &$curr; + } else if($s1['size'] < $s2['size']) { + //count、postion相等时, 比较size + continue; + } else if($s1['size'] > $s2['size']) { + //count、postion相等时, 比较size + $s1 = &$s2; + $ret = &$curr; + } + } + + } + return $ret; + } +} + +function smarty_function_fis_require($params, Smarty_Internal_Template $template){ + $static_path = array(); + if (isset($params['static'])) { + $static_path = $params['static']; + }else{ + trigger_error('This params have no static params!',E_USER_WARNING); + } + if(isset($params['module'])){ + $require_module = $params['module']; + }else{ + $static = implode(',', $static_path); + trigger_error("This params have no module params,when use $static", E_USER_WARNING); + } + if(isset($params['framework'])){ + $require_framework = $params['framework']; + }else{ + $require_framework = null; + } + + /**@var ResourceAPI $api*/ + $api = ResourceAPI::getInstance(); + //加载resource_map.php + $config_dir = $template->smarty->getConfigDir(); + foreach($config_dir as $dir){ + if($require_module != 'common'){ + if($require_framework){ + $common_php = $dir . 'common/common_' . $require_framework .'_resource_map.php'; + if(is_file($common_php)){ + $api->registerMapPath($common_php, 'common', $require_framework); + } + }else{ + $common_php = $dir . 'common/common_resource_map.php'; + if(is_file($common_php)){ + $api->registerMapPath($common_php, 'common'); + }else{ + trigger_error("Please use pc2-1.3.4 or later to compare common module!", E_USER_WARNING); + } + } + } + if($require_framework){ + $require_php = $dir . $require_module . '/' . $require_module . '_' . $require_framework . '_resource_map.php'; + if(is_file($require_php)){ + $api->registerMapPath($require_php, $require_module, $require_framework); + break; + } + }else{ + $require_php = $dir . $require_module . '/' . $require_module . '_resource_map.php'; + if(is_file($require_php)){ + $api->registerMapPath($require_php, $require_module); + break; + } + } + } + $api->setSmarty($template); + foreach($static_path as $static){ + if($require_framework){ + $api->addSymbol($static, $require_module, $require_framework); + }else{ + $api->addSymbol($static, $require_module); + } + + } + $template->smarty->registerFilter('output', array($api,'renderResponse')); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/function.http_header.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/function.http_header.php new file mode 100755 index 000000000..9fb307938 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/function.http_header.php @@ -0,0 +1,40 @@ + 'text/html', + 'json' => 'application/json', + 'javascript' => 'application/x-javascript', + 'js' => 'application/x-javascript', + 'xml' => 'text/xml', + 'stream' => 'application/octet-stream' + ); + if (array_key_exists($type, $mimeTypes)) { + $mime = $mimeTypes[$type]; + } else { + $mime = "text/plain"; + } + header("Content-Type:$mime; charset=$charset;"); +} + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/lib/FISAutoPack.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/lib/FISAutoPack.class.php new file mode 100755 index 000000000..4ecb418fb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/lib/FISAutoPack.class.php @@ -0,0 +1,104 @@ + array(),'other'=> array()); //静态资源数组 + + //设置fis id 一般为项目ID + public static function setFid($fid){ + self::$fid = $fid; + } + + //获取fis id + public static function getFid(){ + return self::$fid; + } + + //设置采样率 + public static function setSampleRate($rate){ + self::$sampleRate = $rate; + } + + //获取采样率 + public static function getSampleRate(){ + return self::$sampleRate; + } + + //根据采样率判断是否命中 + private static function isSample($sample){ + $tmp_sample = rand(1, 10000) / 10000; + return $sample >= $tmp_sample; + } + + //获取页面名称 + public static function getPageName(){ + return self::$pageName; + } + + //设置页面名称 + public static function setPageName($page){ + self::$pageName = $page; + } + + + public static function addHashTable($strId, $smarty){ + $staticInfo = FISResource::getStaticInfo($strId, $smarty); + if($staticInfo['hash']){ + self::addStatic($staticInfo['hash']); + } + } + + + //添加静态资源,首屏完成之后添加的资源标记为非首屏资源 + public static function addStatic($hash){ + $type = self::$fsFinish ? "other" : "first_screen"; //是否是首屏资源 + self::$usedStatics[$type][] = $hash; + } + + //设置是否已完成首屏 + public static function setFRender(){ + self::$fsFinish = true; + } + + //获取渲染到前端的js统计代码 + public static function getCountUrl(){ + $code = ""; + $sampleRate = self::getSampleRate(); + $fid = self::getFid(); + if(self::isSample($sampleRate) && $fid){ + $pageName = self::getPageName(); + //去重,另外如果资源同时存在于首屏与非首屏中,当成首屏资源 + $first_screen = array_filter(array_unique(self::$usedStatics['first_screen'])); + $other = array_filter(array_unique(self::$usedStatics['other'])); + if(count($other) >0){ + foreach ($other as $k => $val) { + if(in_array($val, $first_screen) ){ + unset($other[$k]); + } + } + } + + if (count($first_screen) >0 || count($other) >0 ) { + $timeStamp = time(); + $hashStr = ''; + $fsStr = implode(',', $first_screen); + $otherStr = implode(',', $other); + $hashStr .= ($fsStr . $otherStr); + + $code .= '(new Image()).src="http://static.tieba.baidu.com/tb/pms/img/st.gif?pid=242&v=' . self::$VER . '&fs=' . $fsStr . "&otherStr=" . $otherStr . "&page=" . $pageName . '&sid=' . $timeStamp . '&hash=' . '&fid=' . $fid . '";'; + $code = str_replace("", substr(md5($hashStr), 0, 10), $code); + } + } + return $code; + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/lib/FISPagelet.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/lib/FISPagelet.class.php new file mode 100755 index 000000000..063a9a07a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/lib/FISPagelet.class.php @@ -0,0 +1,581 @@ +'; + const JS_SCRIPT_HOOK = ''; + const CSS_STYLE_HOOK = ''; + //国际化特殊stylehook + const CSS_GLBAL_LINKS_HOOK = ''; + + static private $hide_link = false; + + static private $global_link = false; + + const MODE_NOSCRIPT = 0; + const MODE_QUICKLING = 1; + const MODE_BIGPIPE = 2; + + //缺省的textarea类 + const DEFAULT_TEXTAREA_CLASS = 'g_fis_bigrender'; + //缺省的textarea style + const DEFAULT_TEXTAREA_STYLE = 'visibility: hidden;'; + //是否自动输出容器 + static private $rend_div = true; + //传递group class,style + static private $group_class = ""; + static private $group_style = ""; + /** + * 收集widget内部使用的静态资源 + * array( + * 0: array(), 1: array(), 2: array() + * ) + * @var array + */ + static protected $inner_widget = array( + array(), + array(), + array() + ); + static private $_session_id = 0; + static private $_context = array(); + static private $_contextMap = array(); + static private $_pagelets = array(); + static private $_title = ''; + static private $_pagelet_group = array(); + /** + * 解析模式 + * @var number + */ + static protected $mode = null; + + static protected $default_mode = null; + + //url强迫模式 + static protected $force_mode = false; + + /** + * 某一个widget使用那种模式渲染 + * @var number + */ + static protected $widget_mode; + + static protected $filter; + + static public $cp; + static public $arrEmbeded = array(); + + static public function init() { + self::$default_mode = self::MODE_NOSCRIPT; + $is_ajax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) + && (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest'); + // url指定模式,暂时只能指定为default_mode + if( !empty( $_GET['fispagemode'] ) ){ + self::setMode(self::$default_mode); + self::$force_mode = self::$default_mode; + } else { + if ($is_ajax || $_GET['pagelets']) { + self::setMode(self::MODE_QUICKLING); + } else { + self::setMode(self::$default_mode); + } + } + + self::setFilter($_GET['pagelets']); + } + + static public function setCdn($url) { + FISResource::setCdn($url); + } + + static public function setMode($mode){ + if (self::$mode === null) { + self::$mode = isset($mode) ? intval($mode) : 1; + } + } + + static public function setFilter($ids) { + if (!is_array($ids)) { + $ids = array($ids); + } + foreach ($ids as $id) { + self::$filter[$id] = true; + } + } + + static public function setTitle($title) { + self::$_title = $title; + } + + static public function getUri($strName, $smarty) { + return FISResource::getUri($strName, $smarty); + } + + static public function addScript($code) { + if(self::$_context['hit'] || self::$mode == self::$default_mode){ + FISResource::addScriptPool($code); + } + } + + static public function addStyle($code) { + if(self::$_context['hit'] || self::$mode == self::$default_mode){ + FISResource::addStylePool($code); + } + } + + public static function cssHook() { + return self::CSS_LINKS_HOOK; + } + + public static function cssStyleHook() { + self::$hide_link = true; + return self::CSS_STYLE_HOOK; + } + + + //国际化定制化link,可定制位置 + public static function cssGlobalLinkHook(){ + self::$global_link = true; + return self::CSS_GLBAL_LINKS_HOOK; + } + + public static function jsHook() { + return self::JS_SCRIPT_HOOK; + } + + static function load($str_name, $smarty, $async = false) { + if(self::$_context['hit'] || self::$mode == self::$default_mode){ + FISResource::load($str_name, $smarty, $async); + } + } + + static private function _parseMode($str_mode) { + $str_mode = strtoupper($str_mode); + $mode = self::$mode; + //url强迫模式 + + switch($str_mode) { + case 'BIGPIPE': + $mode = self::MODE_BIGPIPE; + break; + case 'QUICKLING': + $mode = self::MODE_QUICKLING; + break; + case 'NOSCRIPT': + $mode = self::MODE_NOSCRIPT; + break; + } + + return $mode; + } + /** + * WIDGET START + * 解析参数,收集widget所用到的静态资源 + * @param $id + * @param $mode + * @param $group + * @param $class + * @return bool + */ + static public function start($id, $mode = null, $group = null, $class = null, $is_rend = 1, $textarea_style=null, $fetch_widget=null) { + $has_parent = !empty(self::$_context); + $special_flag = false; + if ($mode !== null) { + $special_flag = true; + } + + if ($mode) { + self::$widget_mode = self::_parseMode($mode); + } else { + self::$widget_mode = self::$mode; + } + + //是否渲染div + self::$rend_div = $is_rend; + $parent_id = $has_parent ? self::$_context['id'] : ''; + $qk_flag = self::$mode == self::MODE_QUICKLING ? '_qk_' : ''; + $id = empty($id) ? '__elm_' . $parent_id . '_' . $qk_flag . self::$_session_id ++ : $id; + $class = empty($class) ? self::DEFAULT_TEXTAREA_CLASS : $class; + $textarea_style = empty($textarea_style) ? self::DEFAULT_TEXTAREA_STYLE : $textarea_style; + //widget是否命中,没有指定fetch_widget默认命中,否则默认不命中 + $hit = empty($fetch_widget) ? true : false; + + + //url强迫模式,优先级最高 + if ( self::$force_mode !== false ) { + self::$widget_mode = self::$force_mode; + $hit = true; + } + + + switch(self::$widget_mode) { + case self::MODE_NOSCRIPT: + break; + case self::MODE_QUICKLING: + $hit = self::$filter[$id]; + case self::MODE_BIGPIPE: + $context = array( 'id' => $id, 'async' => false); + //widget调用时mode='quickling',so,打出异步加载代码 + if ($special_flag && !$hit) { + if (!$group) { + echo "'; + } else { + if (isset(self::$_pagelet_group[$group])) { + self::$_pagelet_group[$group]["ids"][] = $id; + self::$_pagelet_group[$group]["class"][] = $class; + self::$_pagelet_group[$group]["style"][] = $textarea_style; + } else { + self::$_pagelet_group[$group] = array( + "ids"=>array($id), + "class"=>array($class), + "style"=>array($textarea_style), + "url"=> $fetch_widget + ); + echo ""; + } + } + $context['async'] = true; + } + + $parent = self::$_context; + if(!empty($parent)) { + $parent_id = $parent['id']; + self::$_contextMap[$parent_id] = $parent; + $context['parent_id'] = $parent_id; + if($parent['hit']) { + $hit = true; + } else if($hit && self::$mode === self::MODE_QUICKLING){ + unset($context['parent_id']); + } + } + $context['hit'] = $hit; + + + self::$_context = $context; + + if (empty($parent) && $hit) { + FISResource::widgetStart(); + } else if (!empty($parent) && !$parent['hit'] && $hit) { + FISResource::widgetStart(); + } + //指定自动渲染div + if( !empty(self::$rend_div) ){ + echo '
'; + } + ob_start(); + break; + } + return $hit; + } + + /** + * WIDGET END + * 收集html,收集静态资源 + */ + static public function end() { + $ret = true; + if (self::$widget_mode !== self::MODE_NOSCRIPT) { + $html = ob_get_clean(); + $pagelet = self::$_context; + //end + if (isset($pagelet['parent_id'])) { + $parent = self::$_contextMap[$pagelet['parent_id']]; + if (!$parent['hit'] && $pagelet['hit']) { + self::$inner_widget[self::$widget_mode][] = FISResource::widgetEnd(); + + } + } else { + if ($pagelet['hit']) { + self::$inner_widget[self::$widget_mode][] = FISResource::widgetEnd(); + } + } + + if($pagelet['hit'] && !$pagelet['async']){ + unset($pagelet['hit']); + unset($pagelet['async']); + $pagelet['html'] = $html; + self::$_pagelets[] = &$pagelet; + unset($pagelet); + } else { + $ret = false; + } + $parent_id = self::$_context['parent_id']; + if(isset($parent_id)){ + self::$_context = self::$_contextMap[$parent_id]; + unset(self::$_contextMap[$parent_id]); + } else { + self::$_context = null; + } + self::$widget_mode = self::$mode; + //指定渲染的位置 + if( !empty(self::$rend_div) ){ + echo '
'; + } else{ + self::$rend_div = true; + } + } + return $ret; + } + + /** + * 渲染静态资源 + * @param $html + * @param $arr + * @param bool $clean_hook + * @return mixed + */ + static public function renderStatic($html, $arr, $clean_hook = false) { + if (!empty($arr)) { + $code = ''; + $resource_map = $arr['async']; + $loadModJs = (FISResource::getFramework() && ($arr['js'] || $resource_map)); + if ($loadModJs) { + foreach ($arr['js'] as $js) { + $code .= ''; + if ($js == FISResource::getFramework()) { + if ($resource_map) { + $code .= ''; + } + } + } + } + + if (!empty($arr['script'])) { + $code .= ''; + } + + /**************autopack getCountUrl for sending log*********************/ + $jsCode = FISAutoPack::getCountUrl($arr); + if($jsCode != ""){ + $code .= ''; + } + /**************autopack end*********************/ + + $html = str_replace(self::JS_SCRIPT_HOOK, $code . self::JS_SCRIPT_HOOK, $html); + //收集style和link + $code = ''; + //通过编译插件可控制inline,link的样式位置 + $linkPosition = self::$global_link ? self::CSS_GLBAL_LINKS_HOOK : self::CSS_LINKS_HOOK; + if (!empty($arr['style'])) { + $code .= ''; + } + //替换 + $html = str_replace($linkPosition, $code . $linkPosition, $html); + + + //国际化定制 + if (!empty($arr['css'])) { + $s_code = ''; + $s_code .= ''; + if (self::$hide_link) { + $s_code = ''; + $html = str_replace(self::CSS_STYLE_HOOK, $s_code . self::CSS_STYLE_HOOK, $html); + } else { + $html = str_replace($linkPosition, $s_code . $linkPosition, $html); + } + } + + + } + if ($clean_hook) { + $html = str_replace(array($linkPosition, self::JS_SCRIPT_HOOK, self::CSS_STYLE_HOOK), '', $html); + } + return $html; + } + + /** + * @param $html string html页面内容 + * @return mixed + */ + static public function insertPageletGroup($html) { + if (empty(self::$_pagelet_group)) { + return $html; + } + $search = array(); + $replace = array(); + foreach (self::$_pagelet_group as $group => $groupInfo) { + $search[] = ''; + $ids = $groupInfo['ids']; + $class = implode( " ", array_unique( $groupInfo["class"] ) ); + $style = implode( " ", array_unique( $groupInfo["style"] ) ); + $url = $groupInfo['url']; + $replace[] = ''; + } + return str_replace($search, $replace, $html); + } + + static public function display($html) { + $html = self::insertPageletGroup($html); + $pagelets = self::$_pagelets; + $mode = self::$mode; + $res = array( + 'js' => array(), + 'css' => array(), + 'script' => array(), + 'style' => array(), + 'async' => array( + 'res' => array(), + 'pkg' => array() + ) + ); + //{{{ + foreach (self::$inner_widget[$mode] as $item) { + foreach ($res as $key => $val) { + if (isset($item[$key]) && is_array($item[$key])) { + if ($key != 'async') { + $arr = array_merge($res[$key], $item[$key]); + $arr = array_merge(array_unique($arr)); + } else { + $arr = array( + 'res' => array_merge($res['async']['res'], (array)$item['async']['res']), + 'pkg' => array_merge($res['async']['pkg'], (array)$item['async']['pkg']) + ); + } + //合并收集 + $res[$key] = $arr; + } + } + } + //if empty, unset it! + foreach ($res as $key => $val) { + if (empty($val)) { + unset($res[$key]); + } + } + //}}} + //tpl信息没有必要打到页面 + switch($mode) { + case self::MODE_NOSCRIPT: + //渲染widget以外静态文件 + $all_static = FISResource::getArrStaticCollection(); + $html = self::renderStatic( + $html, + $all_static, + true + ); + break; + case self::MODE_QUICKLING: + header('Content-Type: text/plain;'); + if ($res['script']) { + $res['script'] = implode("\n", $res['script']); + } + if ($res['style']) { + $res['style'] = implode("\n", $res['style']); + } + foreach ($pagelets as &$pagelet) { + $pagelet['html'] = self::insertPageletGroup($pagelet['html']); + } + unset($pagelet); + + /*********************autopack *****************************/ + $jsCode = FISAutoPack::getCountUrl($res); + if($jsCode != "" && !$_GET['fis_widget']){ + $res['script'] = $res['script'] ? $res['script'] . $jsCode : $jsCode; + } + /*********************autopack end************************/ + + //开放api + if( $_GET["method"] === "jsonp" ){ + $html = "hao123.process(".json_encode(array( + 'title' => self::$_title, + 'pagelets' => $pagelets, + 'resource_map' => $res + )). ",'". $_GET['containerId'] ."')" ; + //正常模式 + } else { + $html = json_encode(array( + 'title' => self::$_title, + 'pagelets' => $pagelets, + 'resource_map' => $res + )); + } + break; + case self::MODE_BIGPIPE: + $external = FISResource::getArrStaticCollection(); + $page_script = $external['script']; + unset($external['script']); + $html = self::renderStatic( + $html, + $external, + true + ); + $html .= "\n"; + $html .= ''; + $html .= "\n"; + + if ($res['script']) { + $res['script'] = implode("\n", $res['script']); + } + if ($res['style']) { + $res['style'] = implode("\n", $res['style']); + } + $html .= "\n"; + foreach($pagelets as $index => $pagelet){ + $id = '__cnt_' . $index; + $html .= ''; + $html .= "\n"; + $html .= ''; + $html .= "\n"; + } + $html .= ''; + break; + } + + return $html; + } + + //smarty output filter + static function renderResponse($content, $smarty) { + return self::display($content); + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_callback.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_callback.php new file mode 100755 index 000000000..f3d91b318 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_callback.php @@ -0,0 +1,12 @@ + '<', + '>' => '>', + "'" => "\\'", + '"' => '\\"', + "\\" => "\\\\", + "\n" => "\\n", + "\r" => "\\r", + "/" => "\\/" + ); + $patterns = array_keys($arr_js_char); + $targets = array_values($arr_js_char); + $ret = str_replace($patterns, $targets, $str); + return $ret; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_event.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_event.php new file mode 100755 index 000000000..e366cae41 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_event.php @@ -0,0 +1,18 @@ + '&', + '<' => '<', + '>' => '>', + "\\" => "\\\\", + "'" => "\\'", + '"' => "\\"", + "\n" => "\\n", + "\r" => "\\r", + "/" => "\\/" + ); + $patterns = array_keys($char_map); + $targets = array_values($char_map); + return str_replace($patterns, $targets, $str); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_js.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_js.php new file mode 100755 index 000000000..e93e0d0df --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_js.php @@ -0,0 +1,15 @@ + "\\\\", + "'" => "\\x27", + "\"" => "\\x22", + "/" => "\\/", + "\n" => "\\n", + "\r" => "\\r" + ); + $patterns = array_keys($char_map); + $targets = array_values($char_map); + return str_replace($patterns, $targets, $str); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_path.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_path.php new file mode 100755 index 000000000..035f3fb37 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/plugin/modifier.f_escape_path.php @@ -0,0 +1,14 @@ +', '\'', '"'), + array('&', '<', '>', ''', '"'), + strval($str) + ); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/relay_list.conf b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/relay_list.conf new file mode 100755 index 000000000..809a3c861 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/relay_list.conf @@ -0,0 +1 @@ +flat-home diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/server.conf b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/server.conf new file mode 100755 index 000000000..f6090124b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/server.conf @@ -0,0 +1,9 @@ +rewrite ^\/resource(\/.*)$ test/common/resource.php +rewrite ^\/openapi\/?(\?.+)?$ test/common/route.php +rewrite ^\/fetchwidget\/?(\?.+)?$ test/common/route.php +rewrite ^\/hotsitecustom\/?(\?.+)?$ test/common/route.php +rewrite ^\/applistapi.*$ test/common/route.php +rewrite ^\/api\.php\/?(\?.+)?$ test/common/route.php +rewrite ^\/[a-z]{2}\/?(\?.+)?$ test/common/route.php +rewrite ^\/[a-z]{2}\/[^?]+(\?.+)?$ test/common/route.php +rewrite ^\/static304(\/.*)$ test/common/route.php \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/smarty.conf b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/smarty.conf new file mode 100755 index 000000000..d61ab79da --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/smarty.conf @@ -0,0 +1,2 @@ +left_delimiter=<% +right_delimiter=%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/BigPipe.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/BigPipe.js new file mode 100755 index 000000000..cf3612bd9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/BigPipe.js @@ -0,0 +1,172 @@ +var BigPipe = function() { + + function ajax(url, cb, data) { + var xhr = new XMLHttpRequest; + xhr.onreadystatechange = function() { + if (this.readyState == 4) { + cb(this.responseText); + } + }; + xhr.open(data?'POST':'GET', url + '&t=' + ~~(1e6 * Math.random()), true); + if (data) xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + xhr.send(data); + } + + + function renderPagelet(obj, pageletsMap, rendered, specificId) { + if (obj.id in rendered) { + return; + } + rendered[obj.id] = true; + + if (obj.parent_id) { + renderPagelet( + pageletsMap[obj.parent_id], pageletsMap, rendered); + } + + // + // 将pagelet填充到对应的DOM里 + // + + //有指定的id + + if( specificId ){ + var dom = document.getElementById(specificId), + fragment = document.createElement("div"); + fragment.innerHTML = obj.html; + dom.appendChild(fragment); + } else{ + var dom = document.getElementById(obj.id); + if (!dom) { + dom = document.createElement('div'); + dom.id = obj.id; + document.body.appendChild(dom); + } + dom.innerHTML = obj.html; + } + + var fragment = document.createElement("div"), + scriptText = [], + text = "", + node; + fragment.innerHTML = obj.html; + scriptText = fragment.getElementsByTagName("script"); + for (var i = scriptText.length - 1; i >= 0; i--) { + node = scriptText[i]; + text = node.text || node.textContent || node.innerHTML || ""; + window[ "eval" ].call( window, text ); + }; + } + + + function render(pagelets, specificId) { + var i, n = pagelets.length; + var pageletsMap = {}; + var rendered = {}; + + // + // 初始化 pagelet.id => pagelet 映射表 + // + for(i = 0; i < n; i++) { + var obj = pagelets[i]; + pageletsMap[obj.id] = obj; + } + + for(i = 0; i < n; i++) { + renderPagelet(pagelets[i], pageletsMap, rendered, specificId); + } + } + + + function process(data, specificId) { + var rm = data.resource_map; + + if (rm.async) { + require.resourceMap(rm.async); + } + + + if (rm.css) { + LazyLoad.css(rm.css, function() { + if (rm.style) { + var dom = document.createElement('style'); + dom["type"] = "text/css"; + if (dom.styleSheet) { // IE + dom.styleSheet.cssText = rm.style; + } else { + dom.innerHTML = rm.style; + } + document.getElementsByTagName('head')[0].appendChild(dom); + } + render(data.pagelets, specificId); + if (rm.js) { + LazyLoad.js(rm.js, function() { + rm.script && window.eval(rm.script); + }); + } + else { + rm.script && window.eval(rm.script); + } + }); + } else { + if (rm.style) { + var dom = document.createElement('style'); + dom["type"] = "text/css"; + if (dom.styleSheet) { // IE + dom.styleSheet.cssText = rm.style; + } else { + dom.innerHTML = rm.style; + } + document.getElementsByTagName('head')[0].appendChild(dom); + } + render(data.pagelets, specificId); + if (rm.js) { + LazyLoad.js(rm.js, function() { + rm.script && window.eval(rm.script); + }); + } + else { + rm.script && window.eval(rm.script); + } + } + } + + + function asyncLoad(arg, widgetPath, specificId) { + if (!(arg instanceof Array)) { + arg = [arg]; + } + var obj, arr = []; + for (var i = arg.length - 1; i >= 0; i--) { + obj = arg[i]; + if (!obj.id) { + throw new Error('missing pagelet id'); + } + arr.push('pagelets[]=' + obj.id); + } + var apiPath = "/fetchwidget", + //判断是否使用api接口获取widget内容 + url = widgetPath ? (location.protocol + "//" + location.host + apiPath + location.search) : location.href, + //判断是否传递参数给api + param = widgetPath ? ["&name="+ widgetPath] : []; + //过滤url中的锚点定位 + url = url.split("#")[0]; + //补全url + url = url + ( url.indexOf("?") > -1 ? "&" : "?") + arr.join('&') + param.join('&'); + //test ajax no debug's `mode=` + url=url.replace(/mode=\d*&/, ''); + + ajax(url, function(res) { + var data = window.JSON? + JSON.parse(res) : + eval('(' + res + ')'); + + process(data, specificId); + }); + } + + return { + asyncLoad: asyncLoad + } +}(); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/alog.min.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/alog.min.js new file mode 100755 index 000000000..6291a75b5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/alog.min.js @@ -0,0 +1 @@ +void function(e,t){function n(e){var n=ut.get("alias")||{},r=n[e]||e+".js";if(!it[r]){it[r]=!0;var i="script",a=t.createElement(i),o=t.getElementsByTagName(i)[0];a.async=!0,a.src=r,o.parentNode.insertBefore(a,o)}}function r(e){if(!e[g]){for(var t=!0,r=[],a=e[D],o=0;a&&a[y]>o;o++){var f=a[o],s=st[f]=st[f]||{};s[g]||s==e?r[L](s[P]):(t=!1,s[E]||n(f),s[N]=s[N]||{},s[N][e[b]]=e)}t&&(e[g]=!0,e[k]&&(e[P]=e[k][j](e,r)),i(e))}}function i(e){for(var t in e[N])r(e[N][t])}function a(e){return(e||new Date)-tt}function o(e,t,n){if(e){typeof e==S&&(n=t,t=e,e=at);try{if(e==at)return ot[t]=ot[t]||[],ot[t].unshift(n),void 0;e[U]?e[U](t,n,!1):e[m]&&e[m](J+t,n)}catch(r){}}}function f(e,t,n){if(e){typeof e==S&&(n=t,t=e,e=at);try{if(e==at){var r=ot[t];if(!r)return;for(var i=r[y];i--;)r[i]===n&&r.splice(i,1);return}e[x]?e[x](t,n,!1):e[C]&&e[C](J+t,n)}catch(a){}}}function s(e){var t=ot[e],n=0;if(t){for(var r=[],i=arguments,a=1;i[y]>a;a++)r[L](i[a]);for(var a=t[y];a--;)t[a][j](this,r)&&n++;return n}}function u(e,t){if(e&&t){var n=new Image(1,1),r=[],i="img_"+ +new Date;for(var a in t)t[a]&&r[L](a+"="+encodeURIComponent(t[a]));at[i]=n,n[I]=n[V]=function(){at[i]=n=n[I]=n[V]=null,delete at[i]},n.src=e+"?"+r.join("&")}}function c(e,t){if(!e)return t;var n={};for(var r in t)null!==e[r]&&(n[e[r]||r]=t[r]);return n}function l(){var e=arguments,t=e[0];if(this[$]||/^(on|un|set|get|create)$/.test(t)){for(var n=p[B][t],r=[],i=1,a=e[y];a>i;i++)r[L](e[i]);typeof n==G&&n[j](this,r)}else this[O][L](e)}function v(e,t){var n={};for(var r in e)e[T](r)&&(n[r]=e[r]);for(var r in t)t[T](r)&&(n[r]=t[r]);return n}function p(e){this[b]=e,this[_]={protocolParameter:{postUrl:null,protocolParameter:null}},this[O]=[],this[F]=at}function h(e){var t;if(e=e||"default","*"==e){t=[];for(var n in ft)t[L](ft[n]);return t}var r=ft[e];return r||(r=ft[e]=new p(e)),r}function d(){if(!(et&&50>new Date-Y||Z)){Z=!0;var e=0;for(var t in ft){var n=ft[t];n[$]&&(e+=n[A](Q))}if(e)for(var r=new Date;100>new Date-r;);}}var g="defined",m="attachEvent",w="toString",y="length",b="name",D="requires",k="creator",E="defining",j="apply",q="tracker",L="push",P="instance",N="waiting",U="addEventListener",x="removeEventListener",C="detachEvent",I="onload",V="onerror",$="created",B="prototype",O="argsList",T="hasOwnProperty",_="fields",A="fire",F="alog",M="define",R="require",S="string",z="object",G="function",H="send",J="on",K="protocolParameter",Q="unload",W=e.alogObjectName||F,X=e[W];if(!X||!X[g]){var Y,Z,et=t.all&&e[m],tt=X&&X.l||+new Date,nt=e.logId||(+new Date)[w](36)+Math.random()[w](36).substr(2,3),rt=0,it={},at=function(e){var t,n,i,a,o=arguments;if(e==M||e==R){for(var f=1;o[y]>f;f++)switch(typeof o[f]){case S:t=o[f];break;case z:i=o[f];break;case G:a=o[f]}return e==R&&(t&&!i&&(i=[t]),t=null),t=t?t:"#"+rt++,n=st[t]=st[t]||{},n[g]||(n[b]=t,n[D]=i,n[k]=a,e==M&&(n[E]=!0),r(n)),void 0}return typeof e==G?(e(at),void 0):((e+"").replace(/^(?:([\w$_]+)\.)?(\w+)$/,function(e,t,n){o[0]=n,l[j](at[q](t),o)}),void 0)},ot={},ft={},st={alog:{name:F,defined:!0,instance:at}};p[B].create=function(e){if(!this[$]){typeof e==z&&this.set(e),this[$]=new Date,this[A]("create",this);for(var t;t=this[O].shift();)l[j](this,t)}},p[B][H]=function(e,t){var n=v({ts:a()[w](36),t:e,sid:nt},this[_]);if(typeof t==z)n=v(n,t);else{var r=arguments;switch(e){case"pageview":r[1]&&(n.page=r[1]),r[2]&&(n.title=r[2]);break;case"event":r[1]&&(n.eventCategory=r[1]),r[2]&&(n.eventAction=r[2]),r[3]&&(n.eventLabel=r[3]),r[4]&&(n.eventValue=r[4]);break;case"timing":r[1]&&(n.timingCategory=r[1]),r[2]&&(n.timingVar=r[2]),r[3]&&(n.timingValue=r[3]),r[4]&&(n.timingLabel=r[4]);break;case"exception":r[1]&&(n.exDescription=r[1]),r[2]&&(n.exFatal=r[2]);break;default:return}}this[A](H,n),u(this[_].postUrl,c(this[_][K],n))},p[B].set=function(e,t){if(typeof e==S)e==K&&(t=v({postUrl:null,protocolParameter:null},t)),this[_][e]=t;else if(typeof e==z)for(var n in e)this.set(n,e[n])},p[B].get=function(e,t){var n=this[_][e];return typeof t==G&&t(n),n},p[B][A]=function(e,t){return at[A](this[b]+"."+e,t)},p[B][J]=function(e,t){at[J](this[b]+"."+e,t)},p[B].un=function(e,t){at.un(this[b]+"."+e,t)},at[b]=F,at.sid=nt,at[g]=!0,at.timestamp=a,at.un=f,at[J]=o,at[A]=s,at[q]=h,at("init");var ut=h();if(ut.set(K,{alias:null}),X){var ct=[].concat(X.p||[],X.q||[]);X.p=X.q=null;for(var lt in at)at[T](lt)&&(X[lt]=at[lt]);at.p=at.q={push:function(e){at[j](at,e)}};for(var vt=0;ct[y]>vt;vt++)at[j](at,ct[vt])}e[W]=at,et&&o(t,"mouseup",function(e){var t=e.target||e.srcElement;1==t.nodeType&&/^ajavascript:/i.test(t.tagName+t.href)&&(Y=new Date)}),o(e,"beforeunload",d),o(e,Q,d)}}(window,document); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/ar_hao123_sug.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/ar_hao123_sug.js new file mode 100755 index 000000000..78b72880e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/ar_hao123_sug.js @@ -0,0 +1,47 @@ +(function(){function G(id){return document.getElementById(id)}function C(tagName){return document.createElement(tagName)}function TagQ(tag,obj){obj=obj?obj:document;return obj.getElementsByTagName(tag)}var Cookie={set:function(name,value,domain,path,expires,not_escape){if(typeof expires=="undefined"){expires=new Date(new Date().getTime()+365*24*3600*100)}document.cookie=name+"="+(not_escape?value:escape(value))+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"; path=/")+((domain)?"; domain="+domain:"")},get:function(name,_default){var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr!=null){return unescape(arr[2])}return _default},clear:function(name,path,domain){if(this.get(name)){document.cookie=name+"="+((path)?"; path="+path:"; path=/")+((domain)?"; domain="+domain:"")+";expires=Fri, 02-Jan-1970 00:00:00 GMT"}}};function isAr(str){var code=str.charCodeAt(0);if(code>1536&&code<1791){return true}if(code>65136&&code<65279){return true}return false +}function autoltr(val){var language=(window.bds&&bds.comm.language)||window.__language||{ar:"ar-EG",th:"th-TH",br:"pt-BR"}[location.host.split(".")[0]]||"pt-BR";if(val===undefined){return""}return language=="ar-EG"&&!isAr(val)?" dir='ltr' ":""}if(!String.prototype.trim){String.prototype.trim=function(){var str=this.replace(/^\s+/,""),end=str.length-1,ws=/\s/;while(ws.test(str.charAt(end))){end--}return str.slice(0,end+1)}}String.prototype.escapeHTML=function(){return this.replace(/&/g,"&").replace(//g,">")};String.prototype.hashCode=function(){var hash=0,i,c;if(this.length==0){return hash}for(i=0,l=this.length;i0){done[1]=otherArgs}dones.push(done)}if(stat=="resolve"){while(dones.length>0){done=dones.shift(); +if(!done[1]){done[0].call()}else{var i,lib;for(i=0;i0){var func=arr.shift();try{func()}catch(e){if(window.console&&console.debug){console.debug(e)}}}}}};var TrimPath;(function(){if(TrimPath==null){TrimPath=new Object()}if(TrimPath.evalEx==null){TrimPath.evalEx=function(src){return eval(src)}}var UNDEFINED;if(Array.prototype.pop==null){Array.prototype.pop=function(){if(this.length===0){return UNDEFINED}return this[--this.length] +}}if(Array.prototype.push==null){Array.prototype.push=function(){for(var i=0;i/g,">")},capitalize:function(s){return String(s).toUpperCase()},"default":function(s,d){return s!=null?s:d}};TrimPath.parseTemplate_etc.modifierDef.h=TrimPath.parseTemplate_etc.modifierDef.escape;TrimPath.parseTemplate_etc.Template=function(tmplName,tmplContent,funcSrc,func,etc){this.process=function(context,flags){if(context==null){context={}}if(context._MODIFIERS==null){context._MODIFIERS={}}if(context.defined==null){context.defined=function(str){return(context[str]!=undefined)}}for(var k in etc.modifierDef){if(context._MODIFIERS[k]==null){context._MODIFIERS[k]=etc.modifierDef[k]}}if(flags==null){flags={}}var resultArr=[];var resultOut={write:function(m){resultArr.push(m)}};try{func(resultOut,context,flags)}catch(e){if(flags.throwExceptions==true){throw e +}var result=new String(resultArr.join("")+"[ERROR: "+e.toString()+(e.message?"; "+e.message:"")+"]");result.exception=e;return result}return resultArr.join("")};this.name=tmplName;this.source=tmplContent;this.sourceFunc=funcSrc;this.toString=function(){return"TrimPath.Template ["+tmplName+"]"}};TrimPath.parseTemplate_etc.ParseError=function(name,line,message){this.name=name;this.line=line;this.message=message};TrimPath.parseTemplate_etc.ParseError.prototype.toString=function(){return("TrimPath template ParseError in "+this.name+": line "+this.line+", "+this.message)};var parse=function(body,tmplName,etc){body=cleanWhiteSpace(body);var funcText=["var TrimPath_Template_TEMP = function(_OUT, _CONTEXT, _FLAGS) { with (_CONTEXT) {"];var state={stack:[],line:1};var endStmtPrev=-1;while(endStmtPrev+1=0){var endStmt=body.indexOf("}",begStmt+1);var stmt=body.substring(begStmt,endStmt);var blockrx=stmt.match(/^\{(cdata|minify|eval)/); +if(blockrx){var blockType=blockrx[1];var blockMarkerBeg=begStmt+blockType.length+1;var blockMarkerEnd=body.indexOf("}",blockMarkerBeg);if(blockMarkerEnd>=0){var blockMarker;if(blockMarkerEnd-blockMarkerBeg<=0){blockMarker="{/"+blockType+"}"}else{blockMarker=body.substring(blockMarkerBeg+1,blockMarkerEnd)}var blockEnd=body.indexOf(blockMarker,blockMarkerEnd+1);if(blockEnd>=0){emitSectionText(body.substring(endStmtPrev+1,begStmt),funcText);var blockText=body.substring(blockMarkerEnd+1,blockEnd);if(blockType=="cdata"){emitText(blockText,funcText)}else{if(blockType=="minify"){emitText(scrubWhiteSpace(blockText),funcText)}else{if(blockType=="eval"){if(blockText!=null&&blockText.length>0){funcText.push("_OUT.write( (function() { "+blockText+" })() );")}}}}begStmt=endStmtPrev=blockEnd+blockMarker.length-1}}}else{if(body.charAt(begStmt-1)!="$"&&body.charAt(begStmt-1)!="\\"){var offset=(body.charAt(begStmt+1)=="/"?2:1);if(body.substring(begStmt+offset,begStmt+10+offset).search(TrimPath.parseTemplate_etc.statementTag)==0){break +}}}begStmt=body.indexOf("{",begStmt+1)}if(begStmt<0){break}var endStmt=body.indexOf("}",begStmt+1);if(endStmt<0){break}emitSectionText(body.substring(endStmtPrev+1,begStmt),funcText);emitStatement(body.substring(begStmt,endStmt+1),state,funcText,tmplName,etc);endStmtPrev=endStmt}emitSectionText(body.substring(endStmtPrev+1),funcText);if(state.stack.length!=0){throw new etc.ParseError(tmplName,state.line,"unclosed, unmatched statement(s): "+state.stack.join(","))}funcText.push("}}; TrimPath_Template_TEMP");return funcText.join("")};var emitStatement=function(stmtStr,state,funcText,tmplName,etc){var parts=stmtStr.slice(1,-1).split(" ");var stmt=etc.statementDef[parts[0]];if(stmt==null){emitSectionText(stmtStr,funcText);return}if(stmt.delta<0){if(state.stack.length<=0){throw new etc.ParseError(tmplName,state.line,"close tag does not match any previous statement: "+stmtStr)}state.stack.pop()}if(stmt.delta>0){state.stack.push(stmtStr)}if(stmt.paramMin!=null&&stmt.paramMin>=parts.length){throw new etc.ParseError(tmplName,state.line,"statement needs more parameters: "+stmtStr) +}if(stmt.prefixFunc!=null){funcText.push(stmt.prefixFunc(parts,state,tmplName,etc))}else{funcText.push(stmt.prefix)}if(stmt.suffix!=null){if(parts.length<=1){if(stmt.paramDefault!=null){funcText.push(stmt.paramDefault)}}else{for(var i=1;i1){funcText.push(" ")}funcText.push(parts[i])}}funcText.push(stmt.suffix)}};var emitSectionText=function(text,funcText){if(text.length<=0){return}var nlPrefix=0;var nlSuffix=text.length-1;while(nlPrefix=0&&(text.charAt(nlSuffix)==" "||text.charAt(nlSuffix)=="\t")){nlSuffix--}if(nlSuffix0){funcText.push('if (_FLAGS.keepWhitespace == true) _OUT.write("');var s=text.substring(0,nlPrefix).replace("\n","\\n");if(s.charAt(s.length-1)=="\n"){s=s.substring(0,s.length-1)}funcText.push(s);funcText.push('");')}var lines=text.substring(nlPrefix,nlSuffix+1).split("\n");for(var i=0;i1){funcText.push(",");funcText.push(parts[1])}funcText.push(")")};var cleanWhiteSpace=function(result){result=result.replace(/\t/g," ");result=result.replace(/\r\n/g,"\n");result=result.replace(/\r/g,"\n");result=result.replace(/^(\s*\S*(\s+\S+)*)\s*$/,"$1");return result};var scrubWhiteSpace=function(result){result=result.replace(/^\s+/g,"");result=result.replace(/\s+$/g,""); +result=result.replace(/\s+/g," ");result=result.replace(/^(\s*\S*(\s+\S+)*)\s*$/,"$1");return result};TrimPath.parseDOMTemplate=function(elementId,optDocument,optEtc){if(optDocument==null){optDocument=document}var element=optDocument.getElementById(elementId);var content=element.value;if(content==null){content=element.innerHTML}content=content.replace(/</g,"<").replace(/>/g,">");return TrimPath.parseTemplate(content,elementId,optEtc)};TrimPath.parseDataTemplate=function(content,data){content=content.replace(/</g,"<").replace(/>/g,">");return TrimPath.parseTemplate(content,"everyid",undefined).process(data,undefined)};TrimPath.processDOMTemplate=function(elementId,context,optFlags,optDocument,optEtc){return TrimPath.parseDOMTemplate(elementId,optDocument,optEtc).process(context,optFlags)}})();var STORE=(function(){var l={},h=window,k=h.document,c="localStorage",o="globalStorage",d="__storejs__",g;l.disabled=false;l.set=function(e,p){};l.get=function(e){};l.remove=function(e){}; +l.clear=function(){};l.transact=function(e,r,p){var q=l.get(e);if(p==null){p=r;r=null}if(typeof q=="undefined"){q=r||{}}p(q);l.set(e,q)};l.getAll=function(){};l.serialize=function(e){return String(e)};l.deserialize=function(e){if(typeof e!="string"){return undefined}return e};function b(){try{return(c in h&&h[c])}catch(e){return false}}function n(){try{return(o in h&&h[o]&&h[o][h.location.hostname])}catch(e){return false}}if(b()){g=h[c];l.set=function(e,p){if(p===undefined){return l.remove(e)}g.setItem(e,l.serialize(p))};l.get=function(e){return l.deserialize(g.getItem(e))};l.remove=function(e){g.removeItem(e)};l.clear=function(){g.clear()};l.getAll=function(){var e={};for(var q=0;qdocument.w=window<\/script>");f.close();j=f.w.frames[0].document;g=j.createElement("div")}catch(i){g=k.createElement("div");j=k.body}function a(e){return function(){var q=Array.prototype.slice.call(arguments,0);q.unshift(g);j.appendChild(g);g.addBehavior("#default#userData");g.load(c);var p=e.apply(l,q);j.removeChild(g);return p}}function m(e){return"_"+e}l.set=a(function(q,e,p){e=m(e);if(p===undefined){return l.remove(e)}q.setAttribute(e,l.serialize(p));q.save(c)});l.get=a(function(p,e){e=m(e);return l.deserialize(p.getAttribute(e))});l.remove=a(function(p,e){e=m(e);p.removeAttribute(e);p.save(c)});l.clear=a(function(r){var p=r.XMLDocument.documentElement.attributes;r.load(c);for(var q=0,e;e=p[q];q++){r.removeAttribute(e.name)}r.save(c)});l.getAll=a(function(s){var p=s.XMLDocument.documentElement.attributes; +s.load(c);var q={};for(var r=0,e;e=p[r];++r){q[e]=l.get(e)}return q})}}}try{l.set(d,d);if(l.get(d)!=d){l.disabled=true}l.remove(d)}catch(i){l.disabled=true}return l})();function bdsug(opts){var me=this,opts=me.opts=opts||{};me.form=opts.form||document.forms[0]||null;me.input=opts.input||me.form.wd||null;me.storestr=me.storestr||"";me.storearr=me.storearr||[];me.query=me.input&&me.input.value||"";me.inputValue=me.query;me.showValue=me.query;me.sugValue="";me.queryValue="";me.reqValue="";me.value=me.query;me._curSelect=-1;me.dataCached={};me.data_cache={};me.dataArray=[];me.dataStored=[];me.dataAladdin=[];me.timer;me.sideRenderTimeout;me.SIDE_TIMEOUT=300;me.sideHideTimeout;me.container;me.side_container=null;me.container_wrap=null;me.async_started;me.spData={};me.side_current_keyword="";me.bindResultLog=window.bindResultLog||null;me.submitType="";me.rsv_crdisp=0;me.rsv_hisdisp=0;me.sugT=0;me.jqXhr=null;me.language=opts.language||(window.bds&&bds.comm&&bds.comm.language)||"";me.clear=opts.clear||$("#clear"); +me.emptySugWord="baiduhotrs4ar";me.empty_data;me.dataDefer=new Deferred();me.sug_template=sug_template(me)}bdsug.prototype={updateInitData:function(){var me=this;me.query=bds.comm.query;me.pinyin=bds.comm.pinyin||"";me.value=me.showValue=me.input.value;try{me.writeStore()}catch(e){}},startCircle:function(){var me=this;if(me.timer){return}me.timer=setTimeout(function(){if(me.value!=me.input.value&&me.showValue!=me.input.value){me.showValue=me.value=me.input.value;me.request()}me.timer=setTimeout(arguments.callee,20)},20)},stopCircle:function(){var me=this;if(me.timer){clearTimeout(me.timer);me.timer=null}},sug_callback:function(data){var me=this;if(data.q){if(window.submit_to){me.data_cache[window.submit_to]=me.data_cache[window.submit_to]||{};me.data_cache[window.submit_to][data.q]=data}else{me.data_cache[data.q]=data}}me.dataArray=me.changeData(data);me.render(me.dataArray)},isZh:function(str){var code=str.charCodeAt(0);if(code>19968&&code<40895){return true}return false},buildUrl:function(val){var me=this; +var requestUrl=bds.comm.sugHost||"http://suggestion.baidu.com/su";var lang={"th-TH":"thai","ar-EG":"eg","pt-BR":"br"}[me.language];if(window.submit_to=="images"){lang={"th-TH":"image_thai","ar-EG":"image_eg","pt-BR":"image_brazil"}[me.language];requestUrl={"th-TH":"http://sugimg.hao123.co.th/su","ar-EG":"http://sugimg.hao123.com.eg/su","pt-BR":"http://sugimg.hao123.com.br/su"}[me.language]}else{lang=(lang&&bds&&bds.comm&&(bds.comm.gvideo=="1"||window.submit_to=="videos")?"video_":"")+lang}if(lang){me.addTj({req_prod:lang})}lang=lang?"&prod="+lang:"";var getCookieSwitch=function(){var _switch=Cookie.get("sug",3);getCookieSwitch=function(){return _switch};return _switch};return requestUrl+"?wd="+encodeURIComponent(val)+lang+"&p="+getCookieSwitch()+"&sid="+bds.comm.sid+"&t="+new Date().getTime()},request:function(){var me=this;if(me.value.trim()==""){if(me.clear){me.clear.hide()}me.inputClick();return}else{me.clear&&me.clear.css("display","block")}if(window.submit_to&&me.data_cache[window.submit_to]&&me.data_cache[window.submit_to][me.value]){me.sug_callback(me.data_cache[window.submit_to][me.value]); +return}if(me.data_cache[me.value]){me.sug_callback(me.data_cache[me.value]);return}if(me.jqXhr){me.jqXhr.abort()}var val=me.reqValue=me.value;me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:me.buildUrl(me.value),jsonp:"cb",timeout:5000,success:function(data){if(me.reqValue==val){me.sug_callback(data)}},always:function(){me.jqXhr=null}})},writeStore:function(pinyin,query){var me=this;pinyin=(pinyin||me.pinyin||"").toLowerCase();query=(query||me.query||"").toLowerCase();if(query&&query.length>2&&query.length<65){me.getStore();var q=encodeURIComponent(query);var p=encodeURIComponent(pinyin);$.each(me.storearr,function(i,a){if(a&&a.q==q){me.storearr.splice(i,1)}});me.storearr.push({q:q,p:p});if(me.storearr.length>50){me.storearr.shift()}me.setStore()}},checkStore:function(){var me=this;me.dataStored=[];if(me.value.length>2){me.getStore();$.each(me.storearr,function(i,a){var q=decodeURIComponent(a.q).toLowerCase();var p=decodeURIComponent(a.p).toLowerCase();if(q.indexOf(me.value.toLowerCase())==0||p.indexOf(me.value.toLowerCase())==0){me.dataStored.unshift({value:q,pinyin:p}) +}})}},getStore:function(){var me=this;me.storestr=STORE.get("BDSUGSTORED");me.storearr=(me.storestr&&$.parseJSON(me.storestr))||[]},setStore:function(){var me=this;var str="";$.each(me.storearr,function(i,a){str+=(i==0?"":",")+'{"q":"'+a.q+'","p":"'+a.p+'"}'});me.storestr="["+str+"]";STORE.set("BDSUGSTORED",me.storestr)},mergeData:function(data){var me=this;me.checkStore();var his_arr=me.dataStored.slice(0,2);var start=0;$.each(his_arr,function(index,item){for(var i=0;i0){input.val(o[p])}else{$(me.form).append('')}}}},rmTj:function(o){var me=this;for(var i in o){var input=$("input[name="+i+"]",me.form);if(i=="f"&&input.length){if(input[0].id=="bdsug_ipt_f"){input.remove() +}else{input.val("8")}}else{input.remove()}}},inputClick:function(e){var me=this,url=me.buildUrl(me.emptySugWord);me.inputEmptySug(url,me.changeData).call(this,e)},setBold:function(q,str,data){if(data&&data.showValue){return data.showValue}if(q&&str){q=q.trim();str=""+str+""}return str},ct:function(){var me=this;me.lis&&me.lis.removeClass("cur")},hide:function(){var me=this;me.container_wrap&&me.container_wrap.hide();me.hideSideContainer();me.btn_down&&me.btn_down()},hideSideContainer:function(){var me=this;if(me.side_container){me.side_container.hide();me.lis&&me.lis.removeClass("cur_side")}if(me.container_wrap){me.container.removeClass("side_show")}},keydown:function(e){var me=this;if(me.sugT==0){me.sugT=new Date().getTime()}if(e.keyCode==9||e.keyCode==27){me.hide()}if(e.keyCode==13){if(me.container_wrap&&me.container_wrap.css("display")=="block"&&me._curSelect>0){me.submitType="sug_enter"}else{me.submitType="key_enter"}}if(me.container_wrap&&me.container_wrap.css("display")!="none"){if(e.keyCode==38){e.preventDefault(); +me.input.focus();me.select_prev()}if(e.keyCode==40){me.select_next();me.input.focus()}}else{if(e.keyCode==38||e.keyCode==40){me.showValue=me.value=me.input.value;me.request()}}},select:function(i,updateInput){var me=this;me.ct();me._curSelect=i;if(me._curSelect>0){if(updateInput){me.showValue=me.input.value=me.dataArray[me._curSelect-1].value}me.lis.eq(me._curSelect-1).addClass("cur")}else{if(updateInput){me.showValue=me.input.value=me.value}}},renderRightSide:function(data,i){var me=this;if(!me.dataArray[i]||!me.dataArray[i].value||!data||!data.template||me.dataArray[i].from=="history"||me.dataArray[i].from=="url"){return false}var keyword=me.dataArray[i].value;me.side_container.attr("data-click","{'fm':'se','rsv_richsug':'"+(data.template?data.template:"")+"','wd':'"+keyword+"','rsp':'"+i+"',rsv_sugtype:'rsr'}");c({fm:"inlo",rsv_richsug:data.template,rsp:""+i,rsv_sugtype:"rsl"});me.lis.eq(i).addClass("cur_side");if(keyword!=me.side_current_keyword){if(me.sug_template[data.template]&&me.sug_template[data.template].render){me.sug_template[data.template].render(data,i) +}else{return}me.side_current_keyword=keyword}me.side_container.show();me.container.addClass("side_show")},side_container_mouseover:function(){var me=this;me.stop_hide_side();clearTimeout(me.sideRenderTimeout);me.sideRenderTimeout=null;for(var i=0;i0&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].from=="url"&&me.submitType=="sug_enter"){me.submitType="url_click";e.stopPropagation();e.preventDefault(); +is_url=true}if(me.dataArray&&me._curSelect>0&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].from=="history"){me.addTj({rsv_sugtype:"his"})}else{me.rmTj({rsv_sugtype:0})}if(me.submitType=="url_click"){c({fm:"se",st:"3",rsv_crdisp:me.rsv_crdisp,rsv_sugtype:"cr",wd:me.dataArray[me._curSelect-1].value,title:me.dataArray[me._curSelect-1].value,url:me.dataArray[me._curSelect-1].url,rsp:""+(me._curSelect-1),prefixsug:me.value})}if(me.submitType&&me.submitType.indexOf("sug")==0){me.addTj({st:3,rsp:""+(me._curSelect-1),prefixsug:(me.value=="")?me.emptySugWord:me.value})}else{me.rmTj({st:0,rsp:0,prefixsug:(me.value=="")?me.emptySugWord:me.value,rsv_sugtype:0})}if(me.submitType&&!me.submitType.indexOf("sug")==0&&window.bds&&window.bds.comm&&window.bds.comm.query){me.addTj({st:8})}me.rmTj({rsv_richsug:0});if(me.spData&&me.dataArray&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].from!="history"&&me.spData[me.dataArray[me._curSelect-1].value]&&me.spData[me.dataArray[me._curSelect-1].value].template){me.addTj({rsv_sugtype:"rsl",rsv_richsug:me.spData[me.dataArray[me._curSelect-1].value].template}) +}me.addTj({input_t:me.sugT>0?(new Date().getTime()-me.sugT):0});me.sugT=0;$.each(["rsv_crdisp","rsv_hisdisp"],function(index,item){var o={};if(me[item]=="1"){o[item]=me[item];me.addTj(o);me[item]="0"}else{o[item]=0;me.rmTj(o)}});if(me.dataArray&&me.spData){var sp_disp={},sp_disp_arr=[];$.each(me.dataArray,function(index,item){if(item.from==0&&me.spData[item.value]&&!sp_disp[me.spData[item.value].template]){sp_disp[me.spData[item.value].template]=1;sp_disp_arr.push(me.spData[item.value].template)}});if(sp_disp_arr.length){me.addTj({rsv_richdisp:sp_disp_arr.join()})}else{me.rmTj({rsv_richdisp:0})}}me.submitType=null;if(me.dataArray&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].value){me.showValue=me.value=me.input.value=me.dataArray[me._curSelect-1].value}else{me.showValue=me.value=me.input.value}me._curSelect=0;if(is_url){return false}if(window.submit_to){return webSubmit(e)}else{if(window.form_submit_result){return form_submit_result.call(me.form)}else{return true}}},keypress:function(e){var me=this; +if(me.dataArray&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].from=="url"&&e.keyCode==13){window.open(me.dataArray[me._curSelect-1].url)}},searchBtn_mouseup:function(){var me=this;me.submitType="clk_submit"},document_click:function(e){var me=this,node=e.target,hideFlag=true;do{if(node==me.form){hideFlag=false;break}}while(node=node.parentNode);if(hideFlag){me.hide()}},insertSug:function(){var me=this;me.form.insertBefore(me.container_wrap[0],me.form.firstChild)},createContainer:function(){var me=this,container=$('');me.container=$(".sg",container);me.side_container=$(".sg_side",container);me.container_wrap=container;me.side_container.on("mouseover",function(e){me.side_container_mouseover(e)}).on("mouseout",function(e){me.side_container_mouseout(e)}).on("click",function(e){var nd=e.target;do{if(nd!=me.side_container&&nd.nodeName=="A"){me.hide();me.stopCircle();break}}while(nd=nd.parentNode) +});me.container.delegate("a.history_delete","click",function(e){var _this=$(this).parent(),index=me.lis.index(_this),q=encodeURIComponent(_this.attr("data-q")),p=encodeURIComponent(_this.attr("data-p"));for(var i=0,len=me.storearr.length;i0){return}loadedData=true;me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:url,jsonp:"cb",timeout:5000,success:function(data){me.empty_data=data;if(me.empty_data&&me.empty_data.s.length>0){me.dataDefer.resolve()}},always:function(){me.jqXhr=null}})};return function(type_str){if(window.submit_to=="images"||window.submit_to=="videos"){me.hide();return}if(type_str!="triangle"&&me.input.value!=""){return}loadData();me.dataDefer.done(function(){if(me.reqValue==me.emptySugWord){var data=dataProcess.call(me,me.empty_data);me.render(data);if(data.length<=0&&me.container){me.container[0].innerHTML=""}}})}},keyword2url:function(){var me=this;$("a",me.side_container).each(function(){var a=this;if(a.getAttribute("keyword")){a.href=(me.build_search_url||window.build_search_url).call(me,{params:{wd:a.getAttribute("keyword")},exclude:["pn"]}) +}})},init:function(){var me=this;me.updateInitData();$(me.input).on("keydown",function(e){me.keydown(e)}).on("focus",function(){me.startCircle()}).on("blur",function(){me.stopCircle()}).on("click",function(){me.inputClick()}).on("keypress",function(e){me.keypress(e)});$("#su").on("mouseup",function(){me.searchBtn_mouseup()});$(document).bind("mousedown",function(e){me.document_click(e)}).bind("document_reload",function(){me.updateInitData()});$(me.form).on("submit",function(e){me.form_submit(e)});if(me.clear){}}};function sug_template(me){return{right1:{html:'

{if d.url} ${d.title} {else} ${d.title} {/if}

{if d.rate_flag}
${d.rate}
{/if} {if d.attr} {for p in d.attr} {if p.value && p.name}

${p.name}

${p.value}

{if p.link}

{for lk in p.link} ${lk.text} &bnsp; {/for}

{/if}
{/if} {/for} {/if}
',render:function(data){data.wid=""; +data.hei="";if(data.img_width){data.wid="width:"+data.img_width+"px;"}if(data.img_height){data.hei="height:"+data.img_height+"px;"}data.img_style=data.wid+data.hei;if(data.rate&&data.rate_all){var percentage=data.rate/data.rate_all;var star_width="width:"+Math.round(73*percentage)+"px;"}var backgroundx="";if(me.language=="ar-EG"){backgroundx=data.rate/data.rate_all-Math.round(data.rate/data.rate_all*5)/5;backgroundx=backgroundx*73;backgroundx=backgroundx?"background-position:"+backgroundx+"px 0;":"";data.backgroundx=backgroundx+star_width}if(data.img_height){data.img_height20=data.img_height-20+"px";data.img_height18=data.img_height-18+"px"}if(data.img_width){data.img_width5=data.img_width-5+"px";data.img_width_px=data.img_width+"px"}if(data.rate&&data.rate_all){data.rate_flag=true}me.side_container[0].innerHTML=process_rich(TrimPath.parseDataTemplate(this.html,{d:data}));me.keyword2url();function process_rich(str){var re=/<([^>]*)>/g;re=/\[(\/?(a|br)[^\]]*)\]/g;str=str.replace(re,"<$1>"); +return str}}},sug_freebase_basic:{html:'',render:function(data,i){if(!data.abs){data.abs=data.attr.pop().value}data.keyword=me.dataArray[i].value;me.side_container[0].innerHTML=TrimPath.parseDataTemplate(this.html,{d:data});me.keyword2url()}},url:{render:function(data){var str=me.setBold(me.value,data.value,data);var title=data.icon?'
':'
'; +return'
  • '+title+str+'
  • "}},normal:{render:function(data){var str=me.setBold(me.value,data.value,data),className=false,ret="";ret+=""+str;if(me.spData&&me.spData[data.value]&&me.spData[data.value].template&&me.sug_template[me.spData[data.value].template]){ret+=" "}ret+="";return ret}},history:{render:function(data){return'
  • '+data.value+'حذف
  • '}}}}var $=window.$||window.jQuery;var language;language={ar:"ar-EG",th:"th-TH",br:"pt-BR"}[location.host.split(".")[0]];if(!language){language="pt-BR"}var mode="google";var domain={"ar-EG":"search.hao123.com.eg","pt-BR":"search.hao123.com.br","th-TH":"search.hao123.co.th"}[language];language=window.__language?window.__language:language;domain=window.__domain?window.__domain:domain; +var ubsurl="http://"+domain+"/r/cl/i18n.gif";var addedTj={};var statusOn=false;function _baidu_sug(opts){var me=this,opts=me.opts=opts||{};bdsug.apply(me);$.extend(true,me,{form:$("#searchGroupForm")[0],input:$("#searchGroupInput").attr("autocomplete","off").get(0),searchBtn:$("#searchGroupBtn"),data_cache:{baidu:{},google:{}},containerClassName:"baidu_sug",language:language,upDown:null,tip_num:null,sug_template:{"new":{render:function(data){var hl=data._index<4?"hl":"";return'
  • '+data._index+""+data.value+'‏الأحدث
  • '}},sequence:{render:function(data){var hl=data._index<4?"hl":"";return'
  • '+data._index+""+data.value+"
  • "}}},modeConfig:{baidu:{dataProcess:function(data){if(data.q){me.data_cache.baidu[data.q]=data}return me.changeData(data)},buildRequestUrl:function(value){var requestUrl="http://"+domain+"/r/su";var lang={"th-TH":"thai","ar-EG":"eg","pt-BR":"br"}[me.language]; +me.addTj({req_prod:lang});lang=lang?"&prod="+lang:"";requestUrl=requestUrl+"?wd="+encodeURIComponent(value)+lang+"&haobd="+encodeURIComponent(Cookie.get("BAIDUID"))+"&t="+new Date().getTime();return requestUrl}},google:{dataProcess:function(data){me.spData={};var dataArray=[],temp;if(data[0]){me.data_cache.google[data[0]]=data}if(data[1]&&data[1].length){for(var i=0;i","").replace("","");temp.showValue=data[1][i][0];temp.from=0;dataArray.push(temp)}}return me.dataArray=dataArray.slice(0,10)},buildRequestUrl:function(value){var requestUrl="http://"+{"ar-EG":"clients1.google.com.eg","th-TH":"clients1.google.co.th","pt-BR":"clients1.google.com.br"}[me.language]+"/complete/search?q="+encodeURIComponent(value)+"&client=hp&hl="+me.language+"&authuser=0&t="+new Date().getTime();return requestUrl}}}})}function f(){}f.prototype=bdsug.prototype;_baidu_sug.prototype=new f();_baidu_sug.prototype.constructor=_baidu_sug;$.extend(_baidu_sug.prototype,{build_search_url:function(OPTIONS){var me=this; +var params=OPTIONS.params||{};var exlcudes=OPTIONS.exclude||[];var param,exclude;var url="http://"+domain+"/s?";var results={ie:"utf-8",tn:me.form.tn.value};for(param in params){if(params.hasOwnProperty(param)){results[param]=params[param]}}for(param in results){if(results.hasOwnProperty(param)){url+=param+"="+encodeURIComponent(results[param])+"&"}}return url.replace(/&*$/g,"")},appendStyle:function(){var me=this,div=C("div");var cssText='.sg_wrap{position:absolute;overflow:hidden;display:none;margin:28px 0 0 0;_margin:28px 1px 0 0;border:1px solid #b6b6b6;z-index:100;background:#fff;width:533px}.sg_wrap .sg_side{position:absolute;left:0;z-index:101;background:#fafafa;width:300px;height:100%;_height:280px;display:none;font-size:13px;border-right:1px solid #e8e8e8}.sg_wrap.ltr .sg{text-align:left;margin:3px 0}.sg_wrap.ltr .sg li{direction:ltr}.sg_wrap .sg i{width:30px;display:inline-block;background:url(http://s1.f.shifen.com/r/www/cache/i18n/ar-EG/www/images/sprite_da88b3b8.png) no-repeat -65px -35px;*overflow:hidden}.sg_wrap .sg .cur i{background-position:-35px -35px}.sg_wrap.rtl .sg i{background-position:-128px -35px}.sg_wrap.rtl .sg .cur i{background-position:-95px -35px}.sg_wrap.ltr .sg_side{right:0;border-right:0;border-left:1px solid #e8e8e8}.sg_wrap .sg li{height:25px;font-size:16px;line-height:25px;padding:0 8px;cursor:pointer;overflow:hidden}.sg_wrap .sg li span{font-weight:normal}.sg_wrap .sg .url{height:45px;border-bottom:1px solid #e1e1e1}.sg_wrap .sg .url a{display:block;text-decoration:none}.sg_wrap .sg .url .title{height:25px;text-decoration:underline}.sg_wrap .sg .url .title.favicon{background-position:left center;background-repeat:no-repeat;padding-right:20px;zoom:1}.sg_wrap.ltr .sg .url .title.favicon{padding-left:20px}.sg_wrap.rtl .sg .url .title.favicon{padding-right:20px;background-position:right center}.sg_wrap .sg .url .title span{font-weight:bold}.sg_wrap .sg .url .show_url{line-height:16px;font-size:13px;color:green}.sg_wrap .sg .cur{background-color:#f2f2f2}.sg_wrap .side_show{min-height:250px;*height:250px}.sg_wrap .sg .history{color:#551a8b}.sg_wrap .sg .history .history_delete{font-size:13px;color:#666;float:left;display:none;text-decoration:none}.sg_wrap .sg .history .history_delete:hover{text-decoration:underline}.sg_wrap .sg .history.cur .history_delete{display:inline}.sg_wrap.ltr .sg .history .history_delete{float:right}.sg_wrap.rtl .sg .history .history_delete{float:left}.sg_wrap .sg_side .play_bar{position:absolute;margin:117px 0 0 0;width:99px;height:20px;background:#000;opacity:.3;filter:alpha(opacity=30)}.sg_wrap .sg_side .duration{position:absolute;margin:119px 0 0 0;width:94px;height:20px;text-align:left;padding:0 0 0 5px;color:#fff}.sg_wrap .sg_side .play_icon{position:absolute;margin:119px 3px 0 0;width:20px;height:20px;padding:0 0 0 5px;background:url("http://s1.f.shifen.com/r/www/cache/i18n/ar-EG/ala/img/renming.png") no-repeat -100px 0}.sg_wrap .sg_side .btn{display:block;width:99px;height:25px;line-height:25px;border:1px solid #5e8ed5;text-align:center;background-color:#77a4e8;background-image:-moz-linear-gradient(top,#80aff4,#77a4e8);background-image:-ms-linear-gradient(top,#80aff4,#77a4e8);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#80aff4),color-stop(100%,#77a4e8));background-image:-webkit-linear-gradient(top,#80aff4,#77a4e8);background-image:-o-linear-gradient(top,#80aff4,#77a4e8);background-image:linear-gradient(top,#80aff4,#77a4e8);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff80aff4",endColorstr="#ff77a4e8",GradientType=0);border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;color:#fff;font-size:16px;margin-top:10px}.sg_wrap .sg_side .btn:hover{text-decoration:none;border:1px solid #3c72c1;background-color:#6294df;background-image:-moz-linear-gradient(top,#6da0eb,#6294df);background-image:-ms-linear-gradient(top,#6da0eb,#6294df);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#6da0eb),color-stop(100%,#6294df));background-image:-webkit-linear-gradient(top,#6da0eb,#6294df);background-image:-o-linear-gradient(top,#6da0eb,#6294df);background-image:linear-gradient(top,#6da0eb,#6294df);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff6da0eb",endColorstr="#ff6294df",GradientType=0)}.sg_wrap .sg_side .sg_side_title{margin:10px 17px 4px;padding:3px;font-size:16px;color:#454545}.sg_wrap .sg_side a:hover{text-decoration:underline}.sg_wrap .sg_side a{text-decoration:none}.sg_wrap .sg_side .image{width:99px;float:right;margin-right:20px;*display:inline}.sg_wrap .sg_side .image img{width:99px;height:137px}.sg_wrap .sg_side .stars,.sg_wrap .sg_side .stars .star{width:73px;height:12px;background:url(http://s1.f.shifen.com/r/www/cache/i18n/ar-EG/www/images/star_94b13508.png);background-repeat:repeat-x;background-position:0 -28px}.sg_wrap .sg_side .stars .star{background-position:0 0}.sg_wrap .sg_side .info{float:right;margin-right:20px;width:140px;height:195px;overflow:hidden;*display:inline}.sg_wrap .sg_side .score{*zoom:1}.sg_wrap .sg_side .score:after{content:"\0020";display:block;height:0;clear:both;overflow:hidden;visibility:hidden}.sg_wrap .sg_side .stars,.sg_wrap .sg_side .points{float:right}.sg_wrap .sg_side .points{color:#f56f2f;margin-right:10px;line-height:10px;width:50px}.sg_wrap .sg_side .attrs{margin-top:4px}.sg_wrap .sug_freebase_basic{height:100%;padding:5px;background:#fff;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.sg_wrap .sug_freebase_basic:hover{background:#f2f2f2}.sg_wrap .sug_freebase_basic a{display:block;background:#fff;text-decoration:none;height:100%;overflow:hidden;padding:2px 15px;color:#333;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.sg_wrap .sug_freebase_basic a:hover{text-decoration:none}.sg_wrap .sug_freebase_basic a h3{font-size:16px;margin-bottom:15px;font-weight:bold}.sg_wrap .sug_freebase_basic a .cc{margin-bottom:10px;*zoom:1}.sg_wrap .sug_freebase_basic a .cc:after{content:"\0020";display:block;height:0;clear:both;overflow:hidden;visibility:hidden}.sg_wrap .sug_freebase_basic a .img{float:right;width:90px;height:100px;display:table}.sg_wrap .sug_freebase_basic a .img .cell{display:table-cell;vertical-align:middle}.sg_wrap .sug_freebase_basic a .img .cell img{width:75px}.sg_wrap .sug_freebase_basic a .abs{_height:108px;max-height:108px;line-height:18px;overflow:hidden;text-align:right}.sg_wrap .sug_freebase_basic a .has_img .abs{width:170px;float:right}.sg_wrap .sug_freebase_basic a .attr{margin-bottom:5px;line-height:18px;_height:18px;height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:260px}.sg_wrap .sug_freebase_basic a .attr .key{color:#999}.sg_wrap{margin:27px -1px 0 0;_margin:27px 0 0 0;width:528px;font:12px Arial,Helvetica,sans-serif;*margin-right:-529px;overflow:inherit}.sg_wrap .sg_side{_height:100%}.sg_wrap a{color:#12c;text-decoration:none}.sg_wrap .sg_side h4{font-weight:bold;font-size:13px}.sg_wrap.ltr .sg_side{left:0}.sg_wrap .sg_side .sg_side_title{font-weight:bold;margin:13px 20px 7px;padding:0}.sg_wrap .sg_side .info{width:145px}.sg_wrap .sg_side .points{line-height:15px;margin-top:-2px}.sg_wrap .sg_side .descrip{text-align:right}.sg_wrap .side_show{min-height:252px;*height:252px}.sg_wrap li{padding:3px 10px;cursor:pointer}.sg_wrap li b{font-weight:bold;display:inline;font-size:1em;font-family:Arial,Tahoma,Helvetica,sans-serif}.sg_wrap .sg .url .title{line-height:25px}.sg_wrap .sg .url .title span{color:#00e}.sg_wrap .sg .sg_li_new i{background-position:-195px -35px}.sg_wrap .sg .sg_li_new .new{padding-right:5px;font-size:10px;color:#f00;font-size:13px}.sg_wrap.rtl .sg .sg_li_new i{background-position:-200px -35px}.sg_wrap.ltr .sg .sg_li_new .new{padding-left:5px}.sg_wrap.rtl .sg .sg_li_new .new{padding-right:5px}.sg_tri{background:#fff}.sg_tri input{width:450px!important;width:420px!important;*width:416px!important;margin-left:30px}.sg_tri .sg_btn{cursor:pointer;position:absolute;display:inline}.sg_tri .sg_btn i{position:absolute;left:10px;top:10px;width:0;height:0;border-top:6px solid #999;border-left:6px solid transparent;border-right:6px solid transparent;_border-left-color:pink;_border-right-color:pink;_filter:chroma(color=pink);font-size:0;line-height:0}.sg_tri .sg_btn.sg_up i{top:4px;width:0;height:0;border-top:6px solid #999;border-left:6px solid transparent;border-right:6px solid transparent;_border-left-color:pink;_border-right-color:pink;_filter:chroma(color=pink);font-size:0;line-height:0;border-bottom:6px solid #999;border-top:6px solid transparent}.sg_tri .sg_btn .sg_new_num{display:none;width:17px;height:17px;position:absolute;text-align:center;left:7px;top:-9px;font-size:11px;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;background:#f66f2e;color:#fff}.sg_btn{display:none}.sg_wrap .sg .sg_li_seq .num,.sg_wrap .sg .sg_li_new .num{display:block;float:right;width:15px;height:15px;line-height:16px;color:#fff;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;font-size:12px;background:#b3b3b3;text-align:center;margin:5px 0 0 10px}.sg_wrap .sg .sg_li_seq.hl .num,.sg_wrap .sg .sg_li_new.hl .num{background:#ff6c00}.sg_wrap.ltr .sg .sg_li_seq .num,.sg_wrap.ltr .sg .sg_li_new .num{margin:5px 10px 0 0;float:left}.sg_wrap.rtl .sg .sg_li_seq .num,.sg_wrap.rtl .sg .sg_li_new .num{float:right;margin:5px 0 0 10px}'.replace(/sg_wrap/g,me.containerClassName);if(me.language=="ar-EG"){cssText+="."+me.containerClassName+" .sg_side .duration {text-align:left; padding:0 0 0 5px;}";cssText+="."+me.containerClassName+".ltr .sg{ text-align:left; }";cssText+="."+me.containerClassName+".ltr .sg li{direction:ltr;}";cssText+="."+me.containerClassName+".ltr .sg_side{border-right:0;border-left: 1px solid #e8e8e8;}";cssText+="."+me.containerClassName+"{ margin:27px -1px 0 0;_margin:27px 0 0 0 }"; +cssText+="."+me.containerClassName+".ltr .sg_side{right:0px;}"}div.innerHTML='_";div.removeChild(div.firstChild);document.getElementsByTagName("head")[0].appendChild(div.firstChild)},sug_callback:function(data){var me=this;data=me.modeConfig[mode].dataProcess(data);me.render(data);if(data.q!=me.emptySugWord){me.btn_down&&me.btn_down()}if(data.length<=0&&me.container){me.container[0].innerHTML=""}},btn_click:function(){var me=this;me.input.focus();if(me.upDown.hasClass("sg_up")){me.hide()}else{me.inputClick("triangle")}},setBtn:function(){var me=this;var ck=Cookie.get("psSugUp");if(ck){ck=ck.split("|");if(ck[1]=="0"){Cookie.set("psSugUp",ck[0]+"|1")}}me.tip_num.hide()},request:function(){var me=this;if(me.value.trim()==""){me.inputClick();return}if(me.data_cache[mode][me.value]){me.sug_callback(me.data_cache[mode][me.value]);return}var requestUrl=me.modeConfig[mode].buildRequestUrl(me.value);if(me.jqXhr){me.jqXhr.abort()}var val=me.reqValue=me.value; +me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:requestUrl,jsonp:mode=="baidu"?"cb":"jsonp",timeout:5000,success:function(data){if(me.reqValue==val){me.sug_callback(data)}},always:function(){me.jqXhr=null}})},inputClick:function(type_str){if(mode!="baidu"){return}var me=this,url=me.modeConfig.baidu.buildRequestUrl(me.emptySugWord),dataProcess=me.modeConfig.baidu.dataProcess;me.inputEmptySug(url,dataProcess).call(me,type_str);me.setBtn()},insertSug:function(){var me=this;me.input.parentNode.insertBefore(me.container_wrap[0],me.input.parentNode.firstChild)},createContainer:function(){var me=this;bdsug.prototype.createContainer.call(me);bindLogEvent(me.side_container[0],"se");me.container_wrap[0].className=me.containerClassName},btn_up:function(){var me=this;me.upDown&&me.upDown.addClass("sg_up")},btn_down:function(){var me=this;me.upDown&&me.upDown.removeClass("sg_up")},renderTip:function(data){var me=this;if(data&&data.n&&data.n.c&&data.n.sugUp){var ck=Cookie.get("psSugUp"),num=data.n.c; +if(!ck||ck.split("|")[0]!=data.n.sugUp){ck=data.n.sugUp+"|0";Cookie.set("psSugUp",ck)}if(ck.split("|")[1]=="1"){return}if(num){me.tip_num[0].innerHTML=num;me.tip_num[0].style.display="inline"}}},createBtn:function(){var me=this;me.appendStyle();var _tri=$('10');me.upDown=_tri;me.tip_num=$("span",_tri);$(me.input).parent().addClass("sg_tri").end().after(me.upDown);var url=me.modeConfig.baidu.buildRequestUrl(me.emptySugWord);me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:url,jsonp:"cb",timeout:5000,success:function(data){me.renderTip(data)},always:function(){me.jqXhr=null}});me.upDown.click(function(){me.btn_click()})},showBtn:function(){var me=this;$(me.input.parentNode).addClass("sg_tri")},hideBtn:function(){var me=this;$(me.input.parentNode).removeClass("sg_tri")},addTj:function(o){var me=this;for(var i in o){addedTj[i]=o[i]}if(mode=="baidu"){bdsug.prototype.addTj.call(me,o)}},rmTj:function(o){var me=this; +for(var i in o){$("input[name="+i+"]",me.form).remove()}},form_submit:function(e){var me=this;me.hide();var type=(me.submitType!="sug_enter"&&me.submitType!="key_enter"&&me.submitType!="clk_submit");var oldSubmitType=me.submitType;var res=bdsug.prototype.form_submit.call(me,e);if(mode=="baidu"&&res&&me.value.length<48){try{me.writeStore("",$.trim(me.value))}catch(e){}}if(res&&type){haoc()}return res},toggle:function(on){var me=this;if(on){if(!statusOn){$(me.input).bind("keydown.sugEvent",function(e){me.keydown(e)}).bind("focus.sugEvent",function(e){me.startCircle(e)}).bind("blur.sugEvent",function(e){me.stopCircle(e)}).bind("click.sugEvent",function(e){me.inputClick(e)}).bind("keypress.sugEvent",function(e){me.keypress(e)});me.searchBtn.bind("mouseup.sugEvent",function(e){me.searchBtn_mouseup(e)});$(document).bind("click.sugEvent",function(e){me.document_click(e)});$(me.form).bind("submit.sugEvent",function(e){me.form_submit(e)});if(!me.upDown){me.createBtn();me.hideBtn()}}if(mode=="baidu"){me.showBtn() +}else{me.hideBtn()}me._curSelect=0}else{$.each([$(me.input),me.searchBtn,$(document),$(me.form)],function(index,item){item.unbind(".sugEvent")});me.hide();me.hideBtn();me.stopCircle()}statusOn=on},setMode:function(m){var me=this;if({baidu:1,google:1}[m]){mode=m}if(mode=="baidu"){me.addTj(addedTj)}else{me.rmTj(addedTj)}}});function bindLogEvent(wrap,fm){$(wrap).on("mousedown",function(e){var t=e.srcElement||e.target;try{var xpath=getXPath(t,wrap);log(xpath,t,wrap,fm)}catch(e){}})}function getXPath(node,wrap,path){path=path||[];wrap=wrap||document;if(node===wrap){return path}if(node.parentNode!==wrap){path=getXPath(node.parentNode,wrap,path)}if(node.previousSibling){var count=1;var sibling=node.previousSibling;do{if(sibling.nodeType==1&&sibling.nodeName==node.nodeName){count++}sibling=sibling.previousSibling}while(sibling)}if(node.nodeType==1){path.push(node.nodeName.toLowerCase()+(count>1?count:""))}return path}function getType(xpath,t,wrap){var LOG_CLASS=["TITLE","LINK","IMG","BTN","OTHERS"]; +var node=t,cs=LOG_CLASS,cl=cs.length,xstr=xpath.join(" ");while(node!==wrap){for(var i=0;i1){l--;if(/^a\d*\b/.test(xpath[l])){url=p.href;title=p.innerHTML.replace(/<[^>]*>/g,"");adata=p.getAttribute("data-click");if(p.getAttribute("data-nolog")!=null){return}break}else{p=p.parentNode}}if(!url){url=""}var data={fm:fm,p1:wrap.getAttribute("p1")||0,xpath:xpath.join("-")+"("+type+")",title:title||"",url:url};var click_data;if(click_data=wrap.getAttribute("data-click")){try{click_data=(new Function("return "+click_data))(); +$.extend(data,click_data)}catch(e){}}if(adata){try{adata=(new Function("return "+adata))();$.extend(data,adata)}catch(e){}}for(var i in data){if(data[i]===null){delete data[i]}}c(data)}function c(q){haoc(q);var sQ="",img=window["BD_PS_C"+(new Date()).getTime()]=new Image();for(v in q){if(q.hasOwnProperty(v)&&q[v].length>0){sQ+=(sQ?"&":"")+v+"="+encodeURIComponent(q[v])}}var imgsrc=ubsurl+"?";if(q.rsv_sugtype=="cr"){imgsrc+="q="+encodeURIComponent(q.title)+"&"}imgsrc+=sQ+"&lang="+language+"&haobd="+encodeURIComponent(Cookie.get("BAIDUID"))+"&path="+encodeURIComponent(location.href)+"_r="+new Date().getTime();img.src=imgsrc;return true}function haoc(q){var engine=$("#searchGroupLogo").attr("data-id");var input=$("#searchGroupInput").get(0),engine=engine?engine:"";var imgsrc="/img/gut.gif?type=click&element=sug&modId=search&position=search&engine="+engine+"&value="+encodeURIComponent(input.value)+"&r="+new Date().getTime();if(q&&q.rsv_sugtype=="cr"){imgsrc+="&url="+encodeURIComponent(q.url) +}if(window.conf&&conf.UT&&conf.UT.params){imgsrc+="&country="+conf.UT.params.country+"&level="+conf.UT.params.level+"&page="+conf.UT.params.page}if(document.body.className.match(/header-fixed-up/)){imgsrc+="&sort=header"}var img=window["BD_HAO123_C"+(new Date()).getTime()]=new Image();img.src=imgsrc}window.baidu_sug=(function(){var me=new _baidu_sug();return{setMode:function(){me.setMode.apply(me,arguments)},toggle:function(){me.toggle.apply(me,arguments)}}})()})(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/br_hao123_sug.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/br_hao123_sug.js new file mode 100755 index 000000000..e60bf804b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/br_hao123_sug.js @@ -0,0 +1,47 @@ +(function(){function G(id){return document.getElementById(id)}function C(tagName){return document.createElement(tagName)}function TagQ(tag,obj){obj=obj?obj:document;return obj.getElementsByTagName(tag)}var Cookie={set:function(name,value,domain,path,expires,not_escape){if(typeof expires=="undefined"){expires=new Date(new Date().getTime()+365*24*3600*100)}document.cookie=name+"="+(not_escape?value:escape(value))+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"; path=/")+((domain)?"; domain="+domain:"")},get:function(name,_default){var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr!=null){return unescape(arr[2])}return _default},clear:function(name,path,domain){if(this.get(name)){document.cookie=name+"="+((path)?"; path="+path:"; path=/")+((domain)?"; domain="+domain:"")+";expires=Fri, 02-Jan-1970 00:00:00 GMT"}}};function isAr(str){var code=str.charCodeAt(0);if(code>1536&&code<1791){return true}if(code>65136&&code<65279){return true}return false +}function autoltr(val){var language=(window.bds&&bds.comm.language)||window.__language||{ar:"ar-EG",th:"th-TH",br:"pt-BR"}[location.host.split(".")[0]]||"pt-BR";if(val===undefined){return""}return language=="ar-EG"&&!isAr(val)?" dir='ltr' ":""}if(!String.prototype.trim){String.prototype.trim=function(){var str=this.replace(/^\s+/,""),end=str.length-1,ws=/\s/;while(ws.test(str.charAt(end))){end--}return str.slice(0,end+1)}}String.prototype.escapeHTML=function(){return this.replace(/&/g,"&").replace(//g,">")};String.prototype.hashCode=function(){var hash=0,i,c;if(this.length==0){return hash}for(i=0,l=this.length;i0){done[1]=otherArgs}dones.push(done)}if(stat=="resolve"){while(dones.length>0){done=dones.shift(); +if(!done[1]){done[0].call()}else{var i,lib;for(i=0;i0){var func=arr.shift();try{func()}catch(e){if(window.console&&console.debug){console.debug(e)}}}}}};var TrimPath;(function(){if(TrimPath==null){TrimPath=new Object()}if(TrimPath.evalEx==null){TrimPath.evalEx=function(src){return eval(src)}}var UNDEFINED;if(Array.prototype.pop==null){Array.prototype.pop=function(){if(this.length===0){return UNDEFINED}return this[--this.length] +}}if(Array.prototype.push==null){Array.prototype.push=function(){for(var i=0;i/g,">")},capitalize:function(s){return String(s).toUpperCase()},"default":function(s,d){return s!=null?s:d}};TrimPath.parseTemplate_etc.modifierDef.h=TrimPath.parseTemplate_etc.modifierDef.escape;TrimPath.parseTemplate_etc.Template=function(tmplName,tmplContent,funcSrc,func,etc){this.process=function(context,flags){if(context==null){context={}}if(context._MODIFIERS==null){context._MODIFIERS={}}if(context.defined==null){context.defined=function(str){return(context[str]!=undefined)}}for(var k in etc.modifierDef){if(context._MODIFIERS[k]==null){context._MODIFIERS[k]=etc.modifierDef[k]}}if(flags==null){flags={}}var resultArr=[];var resultOut={write:function(m){resultArr.push(m)}};try{func(resultOut,context,flags)}catch(e){if(flags.throwExceptions==true){throw e +}var result=new String(resultArr.join("")+"[ERROR: "+e.toString()+(e.message?"; "+e.message:"")+"]");result.exception=e;return result}return resultArr.join("")};this.name=tmplName;this.source=tmplContent;this.sourceFunc=funcSrc;this.toString=function(){return"TrimPath.Template ["+tmplName+"]"}};TrimPath.parseTemplate_etc.ParseError=function(name,line,message){this.name=name;this.line=line;this.message=message};TrimPath.parseTemplate_etc.ParseError.prototype.toString=function(){return("TrimPath template ParseError in "+this.name+": line "+this.line+", "+this.message)};var parse=function(body,tmplName,etc){body=cleanWhiteSpace(body);var funcText=["var TrimPath_Template_TEMP = function(_OUT, _CONTEXT, _FLAGS) { with (_CONTEXT) {"];var state={stack:[],line:1};var endStmtPrev=-1;while(endStmtPrev+1=0){var endStmt=body.indexOf("}",begStmt+1);var stmt=body.substring(begStmt,endStmt);var blockrx=stmt.match(/^\{(cdata|minify|eval)/); +if(blockrx){var blockType=blockrx[1];var blockMarkerBeg=begStmt+blockType.length+1;var blockMarkerEnd=body.indexOf("}",blockMarkerBeg);if(blockMarkerEnd>=0){var blockMarker;if(blockMarkerEnd-blockMarkerBeg<=0){blockMarker="{/"+blockType+"}"}else{blockMarker=body.substring(blockMarkerBeg+1,blockMarkerEnd)}var blockEnd=body.indexOf(blockMarker,blockMarkerEnd+1);if(blockEnd>=0){emitSectionText(body.substring(endStmtPrev+1,begStmt),funcText);var blockText=body.substring(blockMarkerEnd+1,blockEnd);if(blockType=="cdata"){emitText(blockText,funcText)}else{if(blockType=="minify"){emitText(scrubWhiteSpace(blockText),funcText)}else{if(blockType=="eval"){if(blockText!=null&&blockText.length>0){funcText.push("_OUT.write( (function() { "+blockText+" })() );")}}}}begStmt=endStmtPrev=blockEnd+blockMarker.length-1}}}else{if(body.charAt(begStmt-1)!="$"&&body.charAt(begStmt-1)!="\\"){var offset=(body.charAt(begStmt+1)=="/"?2:1);if(body.substring(begStmt+offset,begStmt+10+offset).search(TrimPath.parseTemplate_etc.statementTag)==0){break +}}}begStmt=body.indexOf("{",begStmt+1)}if(begStmt<0){break}var endStmt=body.indexOf("}",begStmt+1);if(endStmt<0){break}emitSectionText(body.substring(endStmtPrev+1,begStmt),funcText);emitStatement(body.substring(begStmt,endStmt+1),state,funcText,tmplName,etc);endStmtPrev=endStmt}emitSectionText(body.substring(endStmtPrev+1),funcText);if(state.stack.length!=0){throw new etc.ParseError(tmplName,state.line,"unclosed, unmatched statement(s): "+state.stack.join(","))}funcText.push("}}; TrimPath_Template_TEMP");return funcText.join("")};var emitStatement=function(stmtStr,state,funcText,tmplName,etc){var parts=stmtStr.slice(1,-1).split(" ");var stmt=etc.statementDef[parts[0]];if(stmt==null){emitSectionText(stmtStr,funcText);return}if(stmt.delta<0){if(state.stack.length<=0){throw new etc.ParseError(tmplName,state.line,"close tag does not match any previous statement: "+stmtStr)}state.stack.pop()}if(stmt.delta>0){state.stack.push(stmtStr)}if(stmt.paramMin!=null&&stmt.paramMin>=parts.length){throw new etc.ParseError(tmplName,state.line,"statement needs more parameters: "+stmtStr) +}if(stmt.prefixFunc!=null){funcText.push(stmt.prefixFunc(parts,state,tmplName,etc))}else{funcText.push(stmt.prefix)}if(stmt.suffix!=null){if(parts.length<=1){if(stmt.paramDefault!=null){funcText.push(stmt.paramDefault)}}else{for(var i=1;i1){funcText.push(" ")}funcText.push(parts[i])}}funcText.push(stmt.suffix)}};var emitSectionText=function(text,funcText){if(text.length<=0){return}var nlPrefix=0;var nlSuffix=text.length-1;while(nlPrefix=0&&(text.charAt(nlSuffix)==" "||text.charAt(nlSuffix)=="\t")){nlSuffix--}if(nlSuffix0){funcText.push('if (_FLAGS.keepWhitespace == true) _OUT.write("');var s=text.substring(0,nlPrefix).replace("\n","\\n");if(s.charAt(s.length-1)=="\n"){s=s.substring(0,s.length-1)}funcText.push(s);funcText.push('");')}var lines=text.substring(nlPrefix,nlSuffix+1).split("\n");for(var i=0;i1){funcText.push(",");funcText.push(parts[1])}funcText.push(")")};var cleanWhiteSpace=function(result){result=result.replace(/\t/g," ");result=result.replace(/\r\n/g,"\n");result=result.replace(/\r/g,"\n");result=result.replace(/^(\s*\S*(\s+\S+)*)\s*$/,"$1");return result};var scrubWhiteSpace=function(result){result=result.replace(/^\s+/g,"");result=result.replace(/\s+$/g,""); +result=result.replace(/\s+/g," ");result=result.replace(/^(\s*\S*(\s+\S+)*)\s*$/,"$1");return result};TrimPath.parseDOMTemplate=function(elementId,optDocument,optEtc){if(optDocument==null){optDocument=document}var element=optDocument.getElementById(elementId);var content=element.value;if(content==null){content=element.innerHTML}content=content.replace(/</g,"<").replace(/>/g,">");return TrimPath.parseTemplate(content,elementId,optEtc)};TrimPath.parseDataTemplate=function(content,data){content=content.replace(/</g,"<").replace(/>/g,">");return TrimPath.parseTemplate(content,"everyid",undefined).process(data,undefined)};TrimPath.processDOMTemplate=function(elementId,context,optFlags,optDocument,optEtc){return TrimPath.parseDOMTemplate(elementId,optDocument,optEtc).process(context,optFlags)}})();var STORE=(function(){var l={},h=window,k=h.document,c="localStorage",o="globalStorage",d="__storejs__",g;l.disabled=false;l.set=function(e,p){};l.get=function(e){};l.remove=function(e){}; +l.clear=function(){};l.transact=function(e,r,p){var q=l.get(e);if(p==null){p=r;r=null}if(typeof q=="undefined"){q=r||{}}p(q);l.set(e,q)};l.getAll=function(){};l.serialize=function(e){return String(e)};l.deserialize=function(e){if(typeof e!="string"){return undefined}return e};function b(){try{return(c in h&&h[c])}catch(e){return false}}function n(){try{return(o in h&&h[o]&&h[o][h.location.hostname])}catch(e){return false}}if(b()){g=h[c];l.set=function(e,p){if(p===undefined){return l.remove(e)}g.setItem(e,l.serialize(p))};l.get=function(e){return l.deserialize(g.getItem(e))};l.remove=function(e){g.removeItem(e)};l.clear=function(){g.clear()};l.getAll=function(){var e={};for(var q=0;qdocument.w=window<\/script>");f.close();j=f.w.frames[0].document;g=j.createElement("div")}catch(i){g=k.createElement("div");j=k.body}function a(e){return function(){var q=Array.prototype.slice.call(arguments,0);q.unshift(g);j.appendChild(g);g.addBehavior("#default#userData");g.load(c);var p=e.apply(l,q);j.removeChild(g);return p}}function m(e){return"_"+e}l.set=a(function(q,e,p){e=m(e);if(p===undefined){return l.remove(e)}q.setAttribute(e,l.serialize(p));q.save(c)});l.get=a(function(p,e){e=m(e);return l.deserialize(p.getAttribute(e))});l.remove=a(function(p,e){e=m(e);p.removeAttribute(e);p.save(c)});l.clear=a(function(r){var p=r.XMLDocument.documentElement.attributes;r.load(c);for(var q=0,e;e=p[q];q++){r.removeAttribute(e.name)}r.save(c)});l.getAll=a(function(s){var p=s.XMLDocument.documentElement.attributes; +s.load(c);var q={};for(var r=0,e;e=p[r];++r){q[e]=l.get(e)}return q})}}}try{l.set(d,d);if(l.get(d)!=d){l.disabled=true}l.remove(d)}catch(i){l.disabled=true}return l})();function bdsug(opts){var me=this,opts=me.opts=opts||{};me.form=opts.form||document.forms[0]||null;me.input=opts.input||me.form.wd||null;me.storestr=me.storestr||"";me.storearr=me.storearr||[];me.query=me.input&&me.input.value||"";me.inputValue=me.query;me.showValue=me.query;me.sugValue="";me.queryValue="";me.reqValue="";me.value=me.query;me._curSelect=-1;me.dataCached={};me.data_cache={};me.dataArray=[];me.dataStored=[];me.dataAladdin=[];me.timer;me.sideRenderTimeout;me.SIDE_TIMEOUT=300;me.sideHideTimeout;me.container;me.side_container=null;me.container_wrap=null;me.async_started;me.spData={};me.side_current_keyword="";me.bindResultLog=window.bindResultLog||null;me.submitType="";me.rsv_crdisp=0;me.rsv_hisdisp=0;me.sugT=0;me.jqXhr=null;me.language=opts.language||(window.bds&&bds.comm&&bds.comm.language)||"";me.clear=opts.clear||$("#clear"); +me.emptySugWord="baiduhotrs4ar";me.empty_data;me.dataDefer=new Deferred();me.sug_template=sug_template(me)}bdsug.prototype={updateInitData:function(){var me=this;me.query=bds.comm.query;me.pinyin=bds.comm.pinyin||"";me.value=me.showValue=me.input.value;try{me.writeStore()}catch(e){}},startCircle:function(){var me=this;if(me.timer){return}me.timer=setTimeout(function(){if(me.value!=me.input.value&&me.showValue!=me.input.value){me.showValue=me.value=me.input.value;me.request()}me.timer=setTimeout(arguments.callee,20)},20)},stopCircle:function(){var me=this;if(me.timer){clearTimeout(me.timer);me.timer=null}},sug_callback:function(data){var me=this;if(data.q){if(window.submit_to){me.data_cache[window.submit_to]=me.data_cache[window.submit_to]||{};me.data_cache[window.submit_to][data.q]=data}else{me.data_cache[data.q]=data}}me.dataArray=me.changeData(data);me.render(me.dataArray)},isZh:function(str){var code=str.charCodeAt(0);if(code>19968&&code<40895){return true}return false},buildUrl:function(val){var me=this; +var requestUrl=bds.comm.sugHost||"http://suggestion.baidu.com/su";var lang={"th-TH":"thai","ar-EG":"eg","pt-BR":"br"}[me.language];if(window.submit_to=="images"){lang={"th-TH":"image_thai","ar-EG":"image_eg","pt-BR":"image_brazil"}[me.language];requestUrl={"th-TH":"http://sugimg.hao123.co.th/su","ar-EG":"http://sugimg.hao123.com.eg/su","pt-BR":"http://sugimg.hao123.com.br/su"}[me.language]}else{lang=(lang&&bds&&bds.comm&&(bds.comm.gvideo=="1"||window.submit_to=="videos")?"video_":"")+lang}if(lang){me.addTj({req_prod:lang})}lang=lang?"&prod="+lang:"";var getCookieSwitch=function(){var _switch=Cookie.get("sug",3);getCookieSwitch=function(){return _switch};return _switch};return requestUrl+"?wd="+encodeURIComponent(val)+lang+"&p="+getCookieSwitch()+"&sid="+bds.comm.sid+"&t="+new Date().getTime()},request:function(){var me=this;if(me.value.trim()==""){if(me.clear){me.clear.hide()}me.inputClick();return}else{me.clear&&me.clear.css("display","block")}if(window.submit_to&&me.data_cache[window.submit_to]&&me.data_cache[window.submit_to][me.value]){me.sug_callback(me.data_cache[window.submit_to][me.value]); +return}if(me.data_cache[me.value]){me.sug_callback(me.data_cache[me.value]);return}if(me.jqXhr){me.jqXhr.abort()}var val=me.reqValue=me.value;me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:me.buildUrl(me.value),jsonp:"cb",timeout:5000,success:function(data){if(me.reqValue==val){me.sug_callback(data)}},always:function(){me.jqXhr=null}})},writeStore:function(pinyin,query){var me=this;pinyin=(pinyin||me.pinyin||"").toLowerCase();query=(query||me.query||"").toLowerCase();if(query&&query.length>2&&query.length<65){me.getStore();var q=encodeURIComponent(query);var p=encodeURIComponent(pinyin);$.each(me.storearr,function(i,a){if(a&&a.q==q){me.storearr.splice(i,1)}});me.storearr.push({q:q,p:p});if(me.storearr.length>50){me.storearr.shift()}me.setStore()}},checkStore:function(){var me=this;me.dataStored=[];if(me.value.length>2){me.getStore();$.each(me.storearr,function(i,a){var q=decodeURIComponent(a.q).toLowerCase();var p=decodeURIComponent(a.p).toLowerCase();if(q.indexOf(me.value.toLowerCase())==0||p.indexOf(me.value.toLowerCase())==0){me.dataStored.unshift({value:q,pinyin:p}) +}})}},getStore:function(){var me=this;me.storestr=STORE.get("BDSUGSTORED");me.storearr=(me.storestr&&$.parseJSON(me.storestr))||[]},setStore:function(){var me=this;var str="";$.each(me.storearr,function(i,a){str+=(i==0?"":",")+'{"q":"'+a.q+'","p":"'+a.p+'"}'});me.storestr="["+str+"]";STORE.set("BDSUGSTORED",me.storestr)},mergeData:function(data){var me=this;me.checkStore();var his_arr=me.dataStored.slice(0,2);var start=0;$.each(his_arr,function(index,item){for(var i=0;i0){input.val(o[p])}else{$(me.form).append('')}}}},rmTj:function(o){var me=this;for(var i in o){var input=$("input[name="+i+"]",me.form);if(i=="f"&&input.length){if(input[0].id=="bdsug_ipt_f"){input.remove() +}else{input.val("8")}}else{input.remove()}}},inputClick:function(e){var me=this,url=me.buildUrl(me.emptySugWord);me.inputEmptySug(url,me.changeData).call(this,e)},setBold:function(q,str,data){if(data&&data.showValue){return data.showValue}if(q&&str){q=q.trim();str=""+str+""}return str},ct:function(){var me=this;me.lis&&me.lis.removeClass("cur")},hide:function(){var me=this;me.container_wrap&&me.container_wrap.hide();me.hideSideContainer();me.btn_down&&me.btn_down()},hideSideContainer:function(){var me=this;if(me.side_container){me.side_container.hide();me.lis&&me.lis.removeClass("cur_side")}if(me.container_wrap){me.container.removeClass("side_show")}},keydown:function(e){var me=this;if(me.sugT==0){me.sugT=new Date().getTime()}if(e.keyCode==9||e.keyCode==27){me.hide()}if(e.keyCode==13){if(me.container_wrap&&me.container_wrap.css("display")=="block"&&me._curSelect>0){me.submitType="sug_enter"}else{me.submitType="key_enter"}}if(me.container_wrap&&me.container_wrap.css("display")!="none"){if(e.keyCode==38){e.preventDefault(); +me.input.focus();me.select_prev()}if(e.keyCode==40){me.select_next();me.input.focus()}}else{if(e.keyCode==38||e.keyCode==40){me.showValue=me.value=me.input.value;me.request()}}},select:function(i,updateInput){var me=this;me.ct();me._curSelect=i;if(me._curSelect>0){if(updateInput){me.showValue=me.input.value=me.dataArray[me._curSelect-1].value}me.lis.eq(me._curSelect-1).addClass("cur")}else{if(updateInput){me.showValue=me.input.value=me.value}}},renderRightSide:function(data,i){var me=this;if(!me.dataArray[i]||!me.dataArray[i].value||!data||!data.template||me.dataArray[i].from=="history"||me.dataArray[i].from=="url"){return false}var keyword=me.dataArray[i].value;me.side_container.attr("data-click","{'fm':'se','rsv_richsug':'"+(data.template?data.template:"")+"','wd':'"+keyword+"','rsp':'"+i+"',rsv_sugtype:'rsr'}");c({fm:"inlo",rsv_richsug:data.template,rsp:""+i,rsv_sugtype:"rsl"});me.lis.eq(i).addClass("cur_side");if(keyword!=me.side_current_keyword){if(me.sug_template[data.template]&&me.sug_template[data.template].render){me.sug_template[data.template].render(data,i) +}else{return}me.side_current_keyword=keyword}me.side_container.show();me.container.addClass("side_show")},side_container_mouseover:function(){var me=this;me.stop_hide_side();clearTimeout(me.sideRenderTimeout);me.sideRenderTimeout=null;for(var i=0;i0&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].from=="url"&&me.submitType=="sug_enter"){me.submitType="url_click";e.stopPropagation();e.preventDefault(); +is_url=true}if(me.dataArray&&me._curSelect>0&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].from=="history"){me.addTj({rsv_sugtype:"his"})}else{me.rmTj({rsv_sugtype:0})}if(me.submitType=="url_click"){c({fm:"se",st:"3",rsv_crdisp:me.rsv_crdisp,rsv_sugtype:"cr",wd:me.dataArray[me._curSelect-1].value,title:me.dataArray[me._curSelect-1].value,url:me.dataArray[me._curSelect-1].url,rsp:""+(me._curSelect-1),prefixsug:me.value})}if(me.submitType&&me.submitType.indexOf("sug")==0){me.addTj({st:3,rsp:""+(me._curSelect-1),prefixsug:(me.value=="")?me.emptySugWord:me.value})}else{me.rmTj({st:0,rsp:0,prefixsug:(me.value=="")?me.emptySugWord:me.value,rsv_sugtype:0})}if(me.submitType&&!me.submitType.indexOf("sug")==0&&window.bds&&window.bds.comm&&window.bds.comm.query){me.addTj({st:8})}me.rmTj({rsv_richsug:0});if(me.spData&&me.dataArray&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].from!="history"&&me.spData[me.dataArray[me._curSelect-1].value]&&me.spData[me.dataArray[me._curSelect-1].value].template){me.addTj({rsv_sugtype:"rsl",rsv_richsug:me.spData[me.dataArray[me._curSelect-1].value].template}) +}me.addTj({input_t:me.sugT>0?(new Date().getTime()-me.sugT):0});me.sugT=0;$.each(["rsv_crdisp","rsv_hisdisp"],function(index,item){var o={};if(me[item]=="1"){o[item]=me[item];me.addTj(o);me[item]="0"}else{o[item]=0;me.rmTj(o)}});if(me.dataArray&&me.spData){var sp_disp={},sp_disp_arr=[];$.each(me.dataArray,function(index,item){if(item.from==0&&me.spData[item.value]&&!sp_disp[me.spData[item.value].template]){sp_disp[me.spData[item.value].template]=1;sp_disp_arr.push(me.spData[item.value].template)}});if(sp_disp_arr.length){me.addTj({rsv_richdisp:sp_disp_arr.join()})}else{me.rmTj({rsv_richdisp:0})}}me.submitType=null;if(me.dataArray&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].value){me.showValue=me.value=me.input.value=me.dataArray[me._curSelect-1].value}else{me.showValue=me.value=me.input.value}me._curSelect=0;if(is_url){return false}if(window.submit_to){return webSubmit(e)}else{if(window.form_submit_result){return form_submit_result.call(me.form)}else{return true}}},keypress:function(e){var me=this; +if(me.dataArray&&me.dataArray[me._curSelect-1]&&me.dataArray[me._curSelect-1].from=="url"&&e.keyCode==13){window.open(me.dataArray[me._curSelect-1].url)}},searchBtn_mouseup:function(){var me=this;me.submitType="clk_submit"},document_click:function(e){var me=this,node=e.target,hideFlag=true;do{if(node==me.form){hideFlag=false;break}}while(node=node.parentNode);if(hideFlag){me.hide()}},insertSug:function(){var me=this;me.form.insertBefore(me.container_wrap[0],me.form.firstChild)},createContainer:function(){var me=this,container=$('');me.container=$(".sg",container);me.side_container=$(".sg_side",container);me.container_wrap=container;me.side_container.on("mouseover",function(e){me.side_container_mouseover(e)}).on("mouseout",function(e){me.side_container_mouseout(e)}).on("click",function(e){var nd=e.target;do{if(nd!=me.side_container&&nd.nodeName=="A"){me.hide();me.stopCircle();break}}while(nd=nd.parentNode) +});me.container.delegate("a.history_delete","click",function(e){var _this=$(this).parent(),index=me.lis.index(_this),q=encodeURIComponent(_this.attr("data-q")),p=encodeURIComponent(_this.attr("data-p"));for(var i=0,len=me.storearr.length;i0){return}loadedData=true;me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:url,jsonp:"cb",timeout:5000,success:function(data){me.empty_data=data;if(me.empty_data&&me.empty_data.s.length>0){me.dataDefer.resolve()}},always:function(){me.jqXhr=null}})};return function(type_str){if(window.submit_to=="images"||window.submit_to=="videos"){me.hide();return}if(type_str!="triangle"&&me.input.value!=""){return}loadData();me.dataDefer.done(function(){if(me.reqValue==me.emptySugWord){var data=dataProcess.call(me,me.empty_data);me.render(data);if(data.length<=0&&me.container){me.container[0].innerHTML=""}}})}},keyword2url:function(){var me=this;$("a",me.side_container).each(function(){var a=this;if(a.getAttribute("keyword")){a.href=(me.build_search_url||window.build_search_url).call(me,{params:{wd:a.getAttribute("keyword")},exclude:["pn"]}) +}})},init:function(){var me=this;me.updateInitData();$(me.input).on("keydown",function(e){me.keydown(e)}).on("focus",function(){me.startCircle()}).on("blur",function(){me.stopCircle()}).on("click",function(){me.inputClick()}).on("keypress",function(e){me.keypress(e)});$("#su").on("mouseup",function(){me.searchBtn_mouseup()});$(document).bind("mousedown",function(e){me.document_click(e)}).bind("document_reload",function(){me.updateInitData()});$(me.form).on("submit",function(e){me.form_submit(e)});if(me.clear){}}};function sug_template(me){return{right1:{html:'

    {if d.url} ${d.title} {else} ${d.title} {/if}

    {if d.rate_flag}
    ${d.rate}
    {/if} {if d.attr} {for p in d.attr} {if p.value && p.name}

    ${p.name}

    ${p.value}

    {if p.link}

    {for lk in p.link} ${lk.text} &bnsp; {/for}

    {/if}
    {/if} {/for} {/if}
    ',render:function(data){data.wid=""; +data.hei="";if(data.img_width){data.wid="width:"+data.img_width+"px;"}if(data.img_height){data.hei="height:"+data.img_height+"px;"}data.img_style=data.wid+data.hei;if(data.rate&&data.rate_all){var percentage=data.rate/data.rate_all;var star_width="width:"+Math.round(73*percentage)+"px;"}var backgroundx="";if(me.language=="ar-EG"){backgroundx=data.rate/data.rate_all-Math.round(data.rate/data.rate_all*5)/5;backgroundx=backgroundx*73;backgroundx=backgroundx?"background-position:"+backgroundx+"px 0;":"";data.backgroundx=backgroundx+star_width}if(data.img_height){data.img_height20=data.img_height-20+"px";data.img_height18=data.img_height-18+"px"}if(data.img_width){data.img_width5=data.img_width-5+"px";data.img_width_px=data.img_width+"px"}if(data.rate&&data.rate_all){data.rate_flag=true}me.side_container[0].innerHTML=process_rich(TrimPath.parseDataTemplate(this.html,{d:data}));me.keyword2url();function process_rich(str){var re=/<([^>]*)>/g;re=/\[(\/?(a|br)[^\]]*)\]/g;str=str.replace(re,"<$1>"); +return str}}},sug_freebase_basic:{html:'',render:function(data,i){if(!data.abs){data.abs=data.attr.pop().value}data.keyword=me.dataArray[i].value;me.side_container[0].innerHTML=TrimPath.parseDataTemplate(this.html,{d:data});me.keyword2url()}},url:{render:function(data){var str=me.setBold(me.value,data.value,data);var title=data.icon?'
    ':'
    '; +return'
  • '+title+str+'
  • "}},normal:{render:function(data){var str=me.setBold(me.value,data.value,data),className=false,ret="";ret+=""+str;if(me.spData&&me.spData[data.value]&&me.spData[data.value].template&&me.sug_template[me.spData[data.value].template]){ret+=" "}ret+="";return ret}},history:{render:function(data){return'
  • '+data.value+'Excluir
  • '}}}}var $=window.$||window.jQuery;var language;language={ar:"ar-EG",th:"th-TH",br:"pt-BR"}[location.host.split(".")[0]];if(!language){language="pt-BR"}var mode="google";var domain={"ar-EG":"search.hao123.com.eg","pt-BR":"search.hao123.com.br","th-TH":"search.hao123.co.th"}[language];language=window.__language?window.__language:language;domain=window.__domain?window.__domain:domain; +var ubsurl="http://"+domain+"/r/cl/i18n.gif";var addedTj={};var statusOn=false;function _baidu_sug(opts){var me=this,opts=me.opts=opts||{};bdsug.apply(me);$.extend(true,me,{form:$("#searchGroupForm")[0],input:$("#searchGroupInput").attr("autocomplete","off").get(0),searchBtn:$("#searchGroupBtn"),data_cache:{baidu:{},google:{}},containerClassName:"baidu_sug",language:language,upDown:null,tip_num:null,sug_template:{"new":{render:function(data){var hl=data._index<4?"hl":"";return'
  • '+data._index+""+data.value+'‏NEW
  • '}},sequence:{render:function(data){var hl=data._index<4?"hl":"";return'
  • '+data._index+""+data.value+"
  • "}}},modeConfig:{baidu:{dataProcess:function(data){if(data.q){me.data_cache.baidu[data.q]=data}return me.changeData(data)},buildRequestUrl:function(value){var requestUrl="http://"+domain+"/r/su";var lang={"th-TH":"thai","ar-EG":"eg","pt-BR":"br"}[me.language]; +me.addTj({req_prod:lang});lang=lang?"&prod="+lang:"";requestUrl=requestUrl+"?wd="+encodeURIComponent(value)+lang+"&haobd="+encodeURIComponent(Cookie.get("BAIDUID"))+"&t="+new Date().getTime();return requestUrl}},google:{dataProcess:function(data){me.spData={};var dataArray=[],temp;if(data[0]){me.data_cache.google[data[0]]=data}if(data[1]&&data[1].length){for(var i=0;i","").replace("","");temp.showValue=data[1][i][0];temp.from=0;dataArray.push(temp)}}return me.dataArray=dataArray.slice(0,10)},buildRequestUrl:function(value){var requestUrl="http://"+{"ar-EG":"clients1.google.com.eg","th-TH":"clients1.google.co.th","pt-BR":"clients1.google.com.br"}[me.language]+"/complete/search?q="+encodeURIComponent(value)+"&client=hp&hl="+me.language+"&authuser=0&t="+new Date().getTime();return requestUrl}}}})}function f(){}f.prototype=bdsug.prototype;_baidu_sug.prototype=new f();_baidu_sug.prototype.constructor=_baidu_sug;$.extend(_baidu_sug.prototype,{build_search_url:function(OPTIONS){var me=this; +var params=OPTIONS.params||{};var exlcudes=OPTIONS.exclude||[];var param,exclude;var url="http://"+domain+"/s?";var results={ie:"utf-8",tn:me.form.tn.value};for(param in params){if(params.hasOwnProperty(param)){results[param]=params[param]}}for(param in results){if(results.hasOwnProperty(param)){url+=param+"="+encodeURIComponent(results[param])+"&"}}return url.replace(/&*$/g,"")},appendStyle:function(){var me=this,div=C("div");var cssText='.sg_wrap{position:absolute;overflow:hidden;display:none;margin:28px 0 0 0;_margin:28px 0 0 1px;border:1px solid #b6b6b6;z-index:100;background:#fff;width:533px}.sg_wrap .sg_side{position:absolute;right:0;z-index:101;background:#fafafa;width:300px;height:100%;_height:280px;display:none;font-size:13px;border-left:1px solid #e8e8e8}.sg_wrap.ltr .sg{text-align:right;margin:3px 0}.sg_wrap.ltr .sg li{direction:ltr}.sg_wrap .sg i{width:30px;display:inline-block;background:url(http://s1.f.shifen.com/r/www/cache/i18n/pt-BR/www/images/sprite_da88b3b8.png) no-repeat -65px -35px;*overflow:hidden}.sg_wrap .sg .cur i{background-position:-35px -35px}.sg_wrap.rtl .sg i{background-position:-128px -35px}.sg_wrap.rtl .sg .cur i{background-position:-95px -35px}.sg_wrap.ltr .sg_side{left:0;border-left:0;border-right:1px solid #e8e8e8}.sg_wrap .sg li{height:25px;font-size:16px;line-height:25px;padding:0 8px;cursor:pointer;overflow:hidden}.sg_wrap .sg li span{font-weight:normal}.sg_wrap .sg .url{height:45px;border-bottom:1px solid #e1e1e1}.sg_wrap .sg .url a{display:block;text-decoration:none}.sg_wrap .sg .url .title{height:25px;text-decoration:underline}.sg_wrap .sg .url .title.favicon{background-position:left center;background-repeat:no-repeat;padding-left:20px;zoom:1}.sg_wrap.ltr .sg .url .title.favicon{padding-right:20px}.sg_wrap.rtl .sg .url .title.favicon{padding-left:20px;background-position:right center}.sg_wrap .sg .url .title span{font-weight:bold}.sg_wrap .sg .url .show_url{line-height:16px;font-size:13px;color:green}.sg_wrap .sg .cur{background-color:#f2f2f2}.sg_wrap .side_show{min-height:250px;*height:250px}.sg_wrap .sg .history{color:#551a8b}.sg_wrap .sg .history .history_delete{font-size:13px;color:#666;float:right;display:none;text-decoration:none}.sg_wrap .sg .history .history_delete:hover{text-decoration:underline}.sg_wrap .sg .history.cur .history_delete{display:inline}.sg_wrap.ltr .sg .history .history_delete{float:left}.sg_wrap.rtl .sg .history .history_delete{float:right}.sg_wrap .sg_side .play_bar{position:absolute;margin:117px 0 0 0;width:99px;height:20px;background:#000;opacity:.3;filter:alpha(opacity=30)}.sg_wrap .sg_side .duration{position:absolute;margin:119px 0 0 0;width:94px;height:20px;text-align:right;padding:0 5px 0 0;color:#fff}.sg_wrap .sg_side .play_icon{position:absolute;margin:119px 0 0 3px;width:20px;height:20px;padding:0 5px 0 0;background:url("http://s1.f.shifen.com/r/www/cache/i18n/pt-BR/ala/img/renming.png") no-repeat -100px 0}.sg_wrap .sg_side .btn{display:block;width:99px;height:25px;line-height:25px;border:1px solid #5e8ed5;text-align:center;background-color:#77a4e8;background-image:-moz-linear-gradient(top,#80aff4,#77a4e8);background-image:-ms-linear-gradient(top,#80aff4,#77a4e8);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#80aff4),color-stop(100%,#77a4e8));background-image:-webkit-linear-gradient(top,#80aff4,#77a4e8);background-image:-o-linear-gradient(top,#80aff4,#77a4e8);background-image:linear-gradient(top,#80aff4,#77a4e8);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff80aff4",endColorstr="#ff77a4e8",GradientType=0);border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;color:#fff;font-size:16px;margin-top:10px}.sg_wrap .sg_side .btn:hover{text-decoration:none;border:1px solid #3c72c1;background-color:#6294df;background-image:-moz-linear-gradient(top,#6da0eb,#6294df);background-image:-ms-linear-gradient(top,#6da0eb,#6294df);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#6da0eb),color-stop(100%,#6294df));background-image:-webkit-linear-gradient(top,#6da0eb,#6294df);background-image:-o-linear-gradient(top,#6da0eb,#6294df);background-image:linear-gradient(top,#6da0eb,#6294df);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff6da0eb",endColorstr="#ff6294df",GradientType=0)}.sg_wrap .sg_side .sg_side_title{margin:10px 17px 4px;padding:3px;font-size:16px;color:#454545}.sg_wrap .sg_side a:hover{text-decoration:underline}.sg_wrap .sg_side a{text-decoration:none}.sg_wrap .sg_side .image{width:99px;float:left;margin-left:20px;*display:inline}.sg_wrap .sg_side .image img{width:99px;height:137px}.sg_wrap .sg_side .stars,.sg_wrap .sg_side .stars .star{width:73px;height:12px;background:url(http://s1.f.shifen.com/r/www/cache/i18n/pt-BR/www/images/star_94b13508.png);background-repeat:repeat-x;background-position:0 -28px}.sg_wrap .sg_side .stars .star{background-position:0 0}.sg_wrap .sg_side .info{float:left;margin-left:20px;width:140px;height:195px;overflow:hidden;*display:inline}.sg_wrap .sg_side .score{*zoom:1}.sg_wrap .sg_side .score:after{content:"\0020";display:block;height:0;clear:both;overflow:hidden;visibility:hidden}.sg_wrap .sg_side .stars,.sg_wrap .sg_side .points{float:left}.sg_wrap .sg_side .points{color:#f56f2f;margin-left:10px;line-height:10px;width:50px}.sg_wrap .sg_side .attrs{margin-top:4px}.sg_wrap .sug_freebase_basic{height:100%;padding:5px;background:#fff;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.sg_wrap .sug_freebase_basic:hover{background:#f2f2f2}.sg_wrap .sug_freebase_basic a{display:block;background:#fff;text-decoration:none;height:100%;overflow:hidden;padding:2px 15px;color:#333;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.sg_wrap .sug_freebase_basic a:hover{text-decoration:none}.sg_wrap .sug_freebase_basic a h3{font-size:16px;margin-bottom:15px;font-weight:bold}.sg_wrap .sug_freebase_basic a .cc{margin-bottom:10px;*zoom:1}.sg_wrap .sug_freebase_basic a .cc:after{content:"\0020";display:block;height:0;clear:both;overflow:hidden;visibility:hidden}.sg_wrap .sug_freebase_basic a .img{float:left;width:90px;height:100px;display:table}.sg_wrap .sug_freebase_basic a .img .cell{display:table-cell;vertical-align:middle}.sg_wrap .sug_freebase_basic a .img .cell img{width:75px}.sg_wrap .sug_freebase_basic a .abs{_height:108px;max-height:108px;line-height:18px;overflow:hidden;text-align:left}.sg_wrap .sug_freebase_basic a .has_img .abs{width:170px;float:left}.sg_wrap .sug_freebase_basic a .attr{margin-bottom:5px;line-height:18px;_height:18px;height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:260px}.sg_wrap .sug_freebase_basic a .attr .key{color:#999}.sg_wrap{margin:27px 0 0 -1px;_margin:27px 0 0 0;width:528px;font:12px Arial,Helvetica,sans-serif;*margin-left:-529px;overflow:inherit}.sg_wrap .sg_side{_height:100%}.sg_wrap a{color:#12c;text-decoration:none}.sg_wrap .sg_side h4{font-weight:bold;font-size:13px}.sg_wrap.ltr .sg_side{right:0}.sg_wrap .sg_side .sg_side_title{font-weight:bold;margin:13px 20px 7px;padding:0}.sg_wrap .sg_side .info{width:145px}.sg_wrap .sg_side .points{line-height:15px;margin-top:-2px}.sg_wrap .sg_side .descrip{text-align:left}.sg_wrap .side_show{min-height:252px;*height:252px}.sg_wrap li{padding:3px 10px;cursor:pointer}.sg_wrap li b{font-weight:bold;display:inline;font-size:1em;font-family:Arial,Tahoma,Helvetica,sans-serif}.sg_wrap .sg .url .title{line-height:25px}.sg_wrap .sg .url .title span{color:#00e}.sg_wrap .sg .sg_li_new i{background-position:-195px -35px}.sg_wrap .sg .sg_li_new .new{padding-left:5px;font-size:10px;color:#f00}.sg_wrap.rtl .sg .sg_li_new i{background-position:-200px -35px}.sg_wrap.ltr .sg .sg_li_new .new{padding-right:5px}.sg_wrap.rtl .sg .sg_li_new .new{padding-left:5px}.sg_tri{background:#fff}.sg_tri input{width:450px!important;margin-right:30px}.sg_tri .sg_btn{cursor:pointer;position:absolute;display:inline}.sg_tri .sg_btn i{position:absolute;right:10px;top:10px;width:0;height:0;border-top:6px solid #999;border-right:6px solid transparent;border-left:6px solid transparent;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink);font-size:0;line-height:0}.sg_tri .sg_btn.sg_up i{top:4px;width:0;height:0;border-top:6px solid #999;border-right:6px solid transparent;border-left:6px solid transparent;_border-right-color:pink;_border-left-color:pink;_filter:chroma(color=pink);font-size:0;line-height:0;border-bottom:6px solid #999;border-top:6px solid transparent}.sg_tri .sg_btn .sg_new_num{display:none;width:17px;height:17px;position:absolute;text-align:center;right:7px;top:-9px;font-size:11px;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;background:#f66f2e;color:#fff}.sg_btn{display:none}.sg_wrap .sg .sg_li_seq .num,.sg_wrap .sg .sg_li_new .num{display:block;float:left;width:15px;height:15px;line-height:16px;color:#fff;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;font-size:12px;background:#b3b3b3;text-align:center;margin:5px 10px 0 0}.sg_wrap .sg .sg_li_seq.hl .num,.sg_wrap .sg .sg_li_new.hl .num{background:#ff6c00}.sg_wrap.ltr .sg .sg_li_seq .num,.sg_wrap.ltr .sg .sg_li_new .num{margin:5px 0 0 10px;float:right}.sg_wrap.rtl .sg .sg_li_seq .num,.sg_wrap.rtl .sg .sg_li_new .num{float:left;margin:5px 10px 0 0}'.replace(/sg_wrap/g,me.containerClassName);if(me.language=="ar-EG"){cssText+="."+me.containerClassName+" .sg_side .duration {text-align:left; padding:0 0 0 5px;}";cssText+="."+me.containerClassName+".ltr .sg{ text-align:left; }";cssText+="."+me.containerClassName+".ltr .sg li{direction:ltr;}";cssText+="."+me.containerClassName+".ltr .sg_side{border-right:0;border-left: 1px solid #e8e8e8;}";cssText+="."+me.containerClassName+"{ margin:27px -1px 0 0;_margin:27px 0 0 0 }"; +cssText+="."+me.containerClassName+".ltr .sg_side{right:0px;}"}div.innerHTML='_";div.removeChild(div.firstChild);document.getElementsByTagName("head")[0].appendChild(div.firstChild)},sug_callback:function(data){var me=this;data=me.modeConfig[mode].dataProcess(data);me.render(data);if(data.q!=me.emptySugWord){me.btn_down&&me.btn_down()}if(data.length<=0&&me.container){me.container[0].innerHTML=""}},btn_click:function(){var me=this;me.input.focus();if(me.upDown.hasClass("sg_up")){me.hide()}else{me.inputClick("triangle")}},setBtn:function(){var me=this;var ck=Cookie.get("psSugUp");if(ck){ck=ck.split("|");if(ck[1]=="0"){Cookie.set("psSugUp",ck[0]+"|1")}}me.tip_num.hide()},request:function(){var me=this;if(me.value.trim()==""){me.inputClick();return}if(me.data_cache[mode][me.value]){me.sug_callback(me.data_cache[mode][me.value]);return}var requestUrl=me.modeConfig[mode].buildRequestUrl(me.value);if(me.jqXhr){me.jqXhr.abort()}var val=me.reqValue=me.value; +me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:requestUrl,jsonp:mode=="baidu"?"cb":"jsonp",timeout:5000,success:function(data){if(me.reqValue==val){me.sug_callback(data)}},always:function(){me.jqXhr=null}})},inputClick:function(type_str){if(mode!="baidu"){return}var me=this,url=me.modeConfig.baidu.buildRequestUrl(me.emptySugWord),dataProcess=me.modeConfig.baidu.dataProcess;me.inputEmptySug(url,dataProcess).call(me,type_str);me.setBtn()},insertSug:function(){var me=this;me.input.parentNode.insertBefore(me.container_wrap[0],me.input.parentNode.firstChild)},createContainer:function(){var me=this;bdsug.prototype.createContainer.call(me);bindLogEvent(me.side_container[0],"se");me.container_wrap[0].className=me.containerClassName},btn_up:function(){var me=this;me.upDown&&me.upDown.addClass("sg_up")},btn_down:function(){var me=this;me.upDown&&me.upDown.removeClass("sg_up")},renderTip:function(data){var me=this;if(data&&data.n&&data.n.c&&data.n.sugUp){var ck=Cookie.get("psSugUp"),num=data.n.c; +if(!ck||ck.split("|")[0]!=data.n.sugUp){ck=data.n.sugUp+"|0";Cookie.set("psSugUp",ck)}if(ck.split("|")[1]=="1"){return}if(num){me.tip_num[0].innerHTML=num;me.tip_num[0].style.display="inline"}}},createBtn:function(){var me=this;me.appendStyle();var _tri=$('10');me.upDown=_tri;me.tip_num=$("span",_tri);$(me.input).parent().addClass("sg_tri").end().after(me.upDown);var url=me.modeConfig.baidu.buildRequestUrl(me.emptySugWord);me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:url,jsonp:"cb",timeout:5000,success:function(data){me.renderTip(data)},always:function(){me.jqXhr=null}});me.upDown.click(function(){me.btn_click()})},showBtn:function(){var me=this;$(me.input.parentNode).addClass("sg_tri")},hideBtn:function(){var me=this;$(me.input.parentNode).removeClass("sg_tri")},addTj:function(o){var me=this;for(var i in o){addedTj[i]=o[i]}if(mode=="baidu"){bdsug.prototype.addTj.call(me,o)}},rmTj:function(o){var me=this; +for(var i in o){$("input[name="+i+"]",me.form).remove()}},form_submit:function(e){var me=this;me.hide();var type=(me.submitType!="sug_enter"&&me.submitType!="key_enter"&&me.submitType!="clk_submit");var oldSubmitType=me.submitType;var res=bdsug.prototype.form_submit.call(me,e);if(mode=="baidu"&&res&&me.value.length<48){try{me.writeStore("",$.trim(me.value))}catch(e){}}if(res&&type){haoc()}return res},toggle:function(on){var me=this;if(on){if(!statusOn){$(me.input).bind("keydown.sugEvent",function(e){me.keydown(e)}).bind("focus.sugEvent",function(e){me.startCircle(e)}).bind("blur.sugEvent",function(e){me.stopCircle(e)}).bind("click.sugEvent",function(e){me.inputClick(e)}).bind("keypress.sugEvent",function(e){me.keypress(e)});me.searchBtn.bind("mouseup.sugEvent",function(e){me.searchBtn_mouseup(e)});$(document).bind("click.sugEvent",function(e){me.document_click(e)});$(me.form).bind("submit.sugEvent",function(e){me.form_submit(e)});if(!me.upDown){me.createBtn();me.hideBtn()}}if(mode=="baidu"){me.showBtn() +}else{me.hideBtn()}me._curSelect=0}else{$.each([$(me.input),me.searchBtn,$(document),$(me.form)],function(index,item){item.unbind(".sugEvent")});me.hide();me.hideBtn();me.stopCircle()}statusOn=on},setMode:function(m){var me=this;if({baidu:1,google:1}[m]){mode=m}if(mode=="baidu"){me.addTj(addedTj)}else{me.rmTj(addedTj)}}});function bindLogEvent(wrap,fm){$(wrap).on("mousedown",function(e){var t=e.srcElement||e.target;try{var xpath=getXPath(t,wrap);log(xpath,t,wrap,fm)}catch(e){}})}function getXPath(node,wrap,path){path=path||[];wrap=wrap||document;if(node===wrap){return path}if(node.parentNode!==wrap){path=getXPath(node.parentNode,wrap,path)}if(node.previousSibling){var count=1;var sibling=node.previousSibling;do{if(sibling.nodeType==1&&sibling.nodeName==node.nodeName){count++}sibling=sibling.previousSibling}while(sibling)}if(node.nodeType==1){path.push(node.nodeName.toLowerCase()+(count>1?count:""))}return path}function getType(xpath,t,wrap){var LOG_CLASS=["TITLE","LINK","IMG","BTN","OTHERS"]; +var node=t,cs=LOG_CLASS,cl=cs.length,xstr=xpath.join(" ");while(node!==wrap){for(var i=0;i1){l--;if(/^a\d*\b/.test(xpath[l])){url=p.href;title=p.innerHTML.replace(/<[^>]*>/g,"");adata=p.getAttribute("data-click");if(p.getAttribute("data-nolog")!=null){return}break}else{p=p.parentNode}}if(!url){url=""}var data={fm:fm,p1:wrap.getAttribute("p1")||0,xpath:xpath.join("-")+"("+type+")",title:title||"",url:url};var click_data;if(click_data=wrap.getAttribute("data-click")){try{click_data=(new Function("return "+click_data))(); +$.extend(data,click_data)}catch(e){}}if(adata){try{adata=(new Function("return "+adata))();$.extend(data,adata)}catch(e){}}for(var i in data){if(data[i]===null){delete data[i]}}c(data)}function c(q){haoc(q);var sQ="",img=window["BD_PS_C"+(new Date()).getTime()]=new Image();for(v in q){if(q.hasOwnProperty(v)&&q[v].length>0){sQ+=(sQ?"&":"")+v+"="+encodeURIComponent(q[v])}}var imgsrc=ubsurl+"?";if(q.rsv_sugtype=="cr"){imgsrc+="q="+encodeURIComponent(q.title)+"&"}imgsrc+=sQ+"&lang="+language+"&haobd="+encodeURIComponent(Cookie.get("BAIDUID"))+"&path="+encodeURIComponent(location.href)+"_r="+new Date().getTime();img.src=imgsrc;return true}function haoc(q){var engine=$("#searchGroupLogo").attr("data-id");var input=$("#searchGroupInput").get(0),engine=engine?engine:"";var imgsrc="/img/gut.gif?type=click&element=sug&modId=search&position=search&engine="+engine+"&value="+encodeURIComponent(input.value)+"&r="+new Date().getTime();if(q&&q.rsv_sugtype=="cr"){imgsrc+="&url="+encodeURIComponent(q.url) +}if(window.conf&&conf.UT&&conf.UT.params){imgsrc+="&country="+conf.UT.params.country+"&level="+conf.UT.params.level+"&page="+conf.UT.params.page}if(document.body.className.match(/header-fixed-up/)){imgsrc+="&sort=header"}var img=window["BD_HAO123_C"+(new Date()).getTime()]=new Image();img.src=imgsrc}window.baidu_sug=(function(){var me=new _baidu_sug();return{setMode:function(){me.setMode.apply(me,arguments)},toggle:function(){me.toggle.apply(me,arguments)}}})()})(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/close.html b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/close.html new file mode 100755 index 000000000..bb1052993 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/close.html @@ -0,0 +1,11 @@ + + + + + Document + + + + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/dp.min.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/dp.min.js new file mode 100755 index 000000000..df595564c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/dp.min.js @@ -0,0 +1 @@ +void function(a){function b(a,b){function c(a,c,d){d=d||15;var e=new Date;e.setTime((new Date).getTime()+1e3*d),b.cookie=a+"="+escape(c)+";path=/;expires="+e.toGMTString()}function d(){for(var a=alog.tracker&&alog.tracker("speed").get("options")||{},b=a.random=Math.random(),c=a.special_pages||[],d=[],e=0;e=4)return null}return null}function g(a){b.attachEvent?b.attachEvent("onclick",a):b.addEventListener("click",a,!1)}var h=!1;e(),alog.fire&&alog.fire("mark"),g(function(b){var b=b||a.event,d=b.target||b.srcElement,e=f("a",d);if(e){var g=e.getAttribute("href");/^#|javascript:/.test(g)||c("PMS_JT",'({"s":'+ +new Date+',"r":"'+document.URL.replace(/#.*/,"")+'"})')}})}if(a){alog("set","alias",{monkey:"http://img.baidu.com/hunter/alog/monkey.min.js",element:"http://img.baidu.com/hunter/alog/element.min.js?v=140626",speed:"http://static.tieba.baidu.com/tb/pms/wpo_alog_speed.js",feature:"http://img.baidu.com/hunter/alog/feature.min.js?v=140522",csp:"http://img.baidu.com/hunter/alog/dp.csp.min.js?v=140804"});var c=a.product,d=a.page,e=a.monkey_page,f=a.speed_page,g=Math.random,h="http://nsclick.baidu.com/u.gif",i="http://static.tieba.baidu.com/tb/pms/img/st.gif",j=a.speed,k=a.monkey,l=a.exception,m=a.feature,n=a.csp,o=a.cus;j&&(j.product_id=c,j.page_id=f?f:d,alog("speed.set","options",j),b(window,document)),k&&k.sample&&g()0&&/^z_/.test(e)&&(d=!0,c[e]=b)):c.page=a[e];d&&alog("cus.send","time",c)}}),alog("cus.on","count",function(a){var b={},c=!1;if("string"==typeof a&&(a=[a]),a instanceof Array)for(var d=0;d= +queries[0].k) return 0; + for(var l = queries.length, q; q = +queries[--l].k;) { + if(width > q) return l; + } + }(body.clientWidth || WIN.innerWidth || 0, (queries || []).sort(function(a, b) { + return +b.k - +a.k; + })); + if (match >= 0 && !~className.indexOf(prefix + queries[match].v)) { + /*conf.curLayout:页面当前使用布局的宽度*/ + conf.curLayout = +queries[match].v; + body.className = className.replace(new RegExp("\\s*" + prefix + "\\d+\\s*", "g"), "") + " " + prefix + conf.curLayout; + /*通知其它模块layout变化的message频道名称为"module.flow.switch",发送通信时传递的参数是当前页面对应的宽度,示例如下:message.send("module.flow.switch",width);接收通信的模块需要添加代码示例如下:message.on("module.flow.switch",function(width){});*/ + window.Gl && Gl.message && Gl.message.send("module.flow.switch", conf.curLayout) + } + } + respond(); + setTimeout(function() { + (addEventListener ? addEventListener : WIN.attachEvent)((addEventListener ? "" : "on") + "resize", function() { + resizing = 1; + }); + }, 0); + !function() { + if(resizing) { + resizing = 0; + respond(); + } + setTimeout(arguments.callee, speed || 200) + }(); + }/*参数可配*/( + // the prefix of class name + "w" + + // queries list + , conf.flowConf || [{k: 1, v: "960"}, {k: 1024, v: "1020"}] + + // switch speed, default: 200 + // , 200 + ); +}else{ + /*页面当前使用布局的宽度*/ + conf.curLayout = conf.flowLayout == 3 ? 1020 : 960; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/img/blank.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/img/blank.gif new file mode 100755 index 000000000..8f3807cad Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/img/blank.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/img/gut.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/img/gut.gif new file mode 100755 index 000000000..3c288bd84 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/img/gut.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/gmonkey.min.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/gmonkey.min.js new file mode 100755 index 000000000..d24894225 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/gmonkey.min.js @@ -0,0 +1 @@ +var ALog=ALog||{};void function(t){function e(t){S[t]=+new Date}function n(){y||(y={},"AdivBliCaDulEdlFddGspanHtableIbodyJtrKsectionLtdMolNpOarticlePdtQformRimgSh3TinputUasideViWbXthYemZfont".replace(/([A-Z])([a-z]+)/g,function(t,e,n){y[y[e]=n]=e}))}function r(t,e,n,o){if(!t||1!=t.nodeType)return"";var i=/^[^u]/.test(typeof t.getAttribute)&&t.getAttribute(e)||"";return"#"==i?i="[id]":"."==i&&(i="[class]"),i.replace(/\[([\w-_]+)\]/,function(e,n){i=t.getAttribute(n)}),o&&(o.target=t),i||n&&r(t.parentNode,e,1,o)||""}function o(t,e,i){if(i&&n(),e=e||k.body,!t||t==e||/^body$/i.test(t.tagName))return"";if(1!=t.nodeType||/html/i.test(t.tagName))return t.tagName||"";for(var a=r(t,T.alias),c=1,u=t.previousSibling,s=t.nodeName.toLowerCase();u;)c+=u.nodeName==t.nodeName,u=u.previousSibling;return a=(i&&y[s]||s)+(2>c?"":c)+(a&&"("+a+")"),t.parentNode==e?a:o(t.parentNode,e,i)+(/^[A-Z]/.test(a)?"":"-")+a}function i(t,e){return o(t,e,1)}function a(e,n){if(e&&n){c("report",n);var r=new Image(1,1),o=[],i="img_"+ +new Date;for(var a in n)n[a]&&o.push(a+"="+encodeURIComponent(n[a]));t[i]=r,r.onload=r.onerror=function(){t[i]=r=r.onload=r.onerror=null,delete t[i]},r.src=e+"?"+o.join("&")}}function c(t,e){var n=I[t],r=0;if(n){for(var o=n.length;o--;)n[o](e,t)&&r++;return r}}function u(e,n,r,o){if(e)try{if(o&&o.push([e,n,r]),e==t)return I[n]=I[n]||[],I[n].unshift(r),void 0;e.addEventListener?e.addEventListener(n,r,!1):e.attachEvent&&e.attachEvent("on"+n,r)}catch(i){}}function s(e,n,r){if(e)try{if(e instanceof Array){for(var o;o=e.pop();)s.apply(this,o);return}if(e==t){var i=I[n];if(!i)return;for(var a=i.length;a--;)i[a]===r&&i.splice(a,1);return}e.removeEventListener?e.removeEventListener(n,r,!1):e.detachEvent&&e.detachEvent("on"+n,r)}catch(c){}}function f(t){return n(),t.replace(/\(([^)]+)\)/g,"").replace(/[A-Z]/g,function(t){return"-"+y[t]}).replace(/^-/,"")}function l(t,e){return e?(C[t]=C[t]||[],e instanceof Array?C=C[t].concat(e):C[t].push(e),void 0):C[t]}function d(t,e){function n(t,e){return(+L.min(L.max(t/e,0),1).toFixed(36>e?1:351>e?2:3)+"").replace(/^0\./g,".")}if(!t.getBoundingClientRect)return[0,0];var r=t.getBoundingClientRect(),o=p(t);return[n(e[0]-r.left,o[0]),n(e[1]-r.top,o[1])]}function p(t){if(!t.getBoundingClientRect)return[t.offsetWidth,t.offsetWidth];var e=t.getBoundingClientRect();return[x(e.right-e.left),x(e.bottom-e.top)]}function g(){var t=p(k.documentElement),e=p(k.body);return[L.max(t[0],e[0],E.innerWidth||0,k.documentElement.scrollWidth||0),L.max(t[1],e[1],E.innerHeight||0,k.documentElement.scrollHeight||0)]}function m(){return[L.max(k.documentElement.scrollLeft||0,k.body.scrollLeft||0,k.defaultView&&k.defaultView.pageXOffset||0),L.max(k.documentElement.scrollTop||0,k.body.scrollTop||0,k.defaultView&&k.defaultView.pageYOffset||0),E.innerWidth||k.documentElement.clientWidth||k.body.clientWidth||0,E.innerHeight||k.documentElement.clientHeight||k.body.clientHeight||0]}function v(t,e){T[t]=e}function h(){if(!(N&&50>new Date-D)&&!A&&(A=!0,e("ult"),c("unload")))for(isSleep=new Date;100>new Date-isSleep;);}function b(t){var e=t.target||t.srcElement;1==e.nodeType&&/^ajavascript:/i.test(e.tagName+e.href)&&(D=new Date)}function w(t,e,n){M.count++,9>=M.items.length&&M.items.push([t,e,n,+new Date]),c("error",M)}var y,A,k=document,E=window,L=Math,x=parseInt,N=k.all&&E.attachEvent,D=0,T={},S={},M={count:0,items:[]},I={},C=t.configs||{},B=(+new Date).toString(36)+L.random().toString(36).substr(2,5);t.errors=M,t.configs=C,t.times=S,t.sid=B,t.mark=e,t.getXPath=i,"Group1Action1Extra1AliasParamText".replace(/([A-Z][a-z]+)(1|0)?/g,function(e,n,o){var i=n.toLowerCase();T[i]="alog-"+i,t["get"+n]=function(t,e){return r(t,T[i],o,e)}}),t.report=a,t.fire=c,t.on=u,t.un=s,t.epath=f,t.config=l,t.ep=d,t.ps=g,t.vr=m,t.an=v,N&&u(k,"mouseup",b),u(E,"beforeunload",h),u(E,"unload",h),t.error=w,u(E,"error",w)}(ALog);var Monkey=Monkey||{};void function(t){function e(t){if(t){var e,n={ts:i().toString(36)};for(e in P)n[e]=P[e];for(e in t)n[e]=t[e];l("report",n),W.report(p.postUrl,n)}}function n(t,n){if(t){var r={cmd:"action",ac:t,param:n};l("action",r),e(r)}}function r(t,e){t&&(P[t]=e)}function o(t,e,n){W.on(W,M+"."+t,e,n)}function i(){return new Date-m}function a(t){for(;t;){if(/^(a|button)$/i.test(t.tagName))return t;t=t.parentNode}}function c(){switch(g.refer){case 1:case!0:return S.referrer;case 2:var t=S.referrer;if(!t)return;var e="";return t.replace(/(^\w+:\/\/)?([^\/]+)/,function(t,n){e=n}),S.location.host==e?S.referrer:e}}function u(t,n,r){var o=n.target||n.srcElement;switch(t){case"d":if(!o)return;b++;var c={},u=a(o),s=W.getAction(o,c),f="",d=W.getText(o);if(u?(/^a$/i.test(u.tagName)?(g.click&&(f=u.getAttribute("href",2),/^(javascript|#)/i.test(f)&&(f="")),w++):y++,g.click&&(d=d||W.getText(u)||u.title||u.innerHTML.replace(/<[^>]*>|\s/g,""))):/input/i.test(o.tagName)&&/button|radio|checkbox|submit/i.test(o.type)&&(u=o,y++,d=d||o.value),/img/i.test(o.tagName)&&(k++,d=d||o.alt||o.title||o.src),!u&&!s||!g.click)break;if(g.onlylink&&/input|button/i.test(o.tagName))break;A++;var p=r?r.path+"/"+D(o,r.doc):D(o),m=W.getGroup(o),v=W.getExtra(o),h=W.getParam(c.target),E=W.ep(o,[n.clientX,n.clientY]),T=o.ownerDocument,S=T.body,M=[0,0];n.pageX||n.pageY?M=[n.pageX,n.pageY]:(n.clientX||n.clientY)&&(M=[n.clientX+(T&&T.scrollLeft||S&&S.scrollLeft||0)-(T&&T.clientLeft||S&&S.clientLeft||0),n.clientY+(T&&T.scrollTop||S&&S.scrollTop||0)-(T&&T.clientTop||S&&S.clientTop||0)]);var I={xp:p,g:m,gx:v,ac:s,ep:E,ci:A,pp:M,ps:W.ps(),param:h,u:((f||"none")+"").substr(0,200),txt:((d||"none")+"").substr(0,30)};g.vr&&(I.vr=W.vr()),l("click",I),e(I);break;case"o":L=i(),x=1;break;case"i":N+=i()-L,L=i(),x=0;break;case"s":case"e":var C=W.vr();B=Math.max(C[1]+C[3],B)}}function s(n){if(window.ALog&&!m){W=ALog,n=n||[],n instanceof Array||(n=[n]);for(var r,a,s,E=[].concat(n);(p=E.pop())&&!(p.page=p.page||p.getPage()););if(p){p.page instanceof Array&&(p.mid=p.mid||p.page[1],p.page=p.page[0]),g=p.reports,W.on(W,"unload",f,C),W.on(W,"error",d,C),D=W.getXPath,b=w=y=A=k=L=x=N=0,m=W.times&&W.times.ht||new Date,v=W.sid||(+m).toString(36)+(+Math.random().toFixed(8).substr(2)).toString(36),h="_e_"+v,P={pid:p.pid||241,sid:v,hid:p.hid,mid:p.mid,page:p.page,ver:5,p:p.product,px:T.screen.width+"*"+T.screen.height,ref:c()};for(r in p)/^on(\w+)$/.test(r)&&o(r.substr(2),p[r],C);for(l("start",t),L=i(),S.body&&(s=W.vr(),B=s[1]+s[3]),g.pv&&e({cmd:"open"}),r=0;(a=I[r++])&&(W.on(a[2]||S,a[0],function(t){return function(e){m&&u(t,e)}}(a[1]),C),g.staytime););}}}function f(){if(m){if(l("close",t),x&&(N+=i()-L),g.staytime){var n={cmd:"close",tc:b,lc:w,bc:y,pc:k,pd:B,ft:(i()-N).toString(36),ec:E};e(n)}return m=0,W.un(C),g.staytime}}function l(t,e){W.fire(M+"."+t,e)}function d(t){if(E=t.count,g.error){g.error=0;var n=t.items[0];n&&e({cmd:"error",et:(n[3]-m).toString(36),url:n[1],msg:n[0],line:n[2]})}}var p,g,m,v,h,b,w,y,A,k,E,L,x,N,D,T=window,S=document,M="monkey",I=[["mousedown","d"],["focusout","o"],["blur","o",T],["focusin","i"],["focus","i",T],["scroll","s",T],["resize","e",T]],C=[],B=0,P={},W=T.ALog;t.push=n,t.set=r,t.on=o,t.start=s,t.stop=f,W&&W.configs&&W.configs[M]&&s(W.configs[M])}(Monkey),Monkey.start({getPage:function(){return window.pageId},postUrl:window.monkeyPost||window.conf&&window.conf.monkeyPost||"http://nsclick.baidu.com/h.gif",p:113,pid:241,hid:809,onstart:function(){document.cookie.replace(/(?:^| )BAIDUID=([^;]*)(;|$)/,function(t,e){e&&Monkey.set("hao123_baiduid",decodeURIComponent(e.split(":")[0]))}),ALog.an("group","monkey");for(var t=["top","addFavBar","weatherMoreWrap","fbMod","customTip","snsShareBox","fb-root"],e=0;t.length>e;e++){var n=document.getElementById(t[e]);n&&n.setAttribute&&n.setAttribute("alog-alias",t[e])}},onreport:function(t){document.cookie.replace(/(?:^| )FLASHID=([^;]*)(;|$)/,function(e,n){n&&(t.hao123_flashid=decodeURIComponent(n.split(":")[0]))})},reports:{click:1,pv:1}}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/js_speed.min.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/js_speed.min.js new file mode 100755 index 000000000..b45a7c453 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/js_speed.min.js @@ -0,0 +1,53 @@ +(function(window) { + /** + * 上报Timing数据 + * 函数必须在页面加载完成之后才能执行,一般可以放在window.onload里调用, + * 或者在其他页面加载完成之后才执行的函数里调用 + */ + + var sendReport = function(){ + var uaqTaskID = window.conf.uaq.uaqTaskID; + var _p = (window.webkitPerformance ? window.webkitPerformance : window.msPerformance); + _p = (_p ? _p : window.performance); + + var _t, _sa = [], _ti = ["navigationStart","unloadEventStart","unloadEventEnd", + "redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd", + "connectStart","connectEnd","secureConnectionStart","requestStart","responseStart", + "responseEnd","domLoading","domInteractive","domContentLoadedEventStart", + "domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"]; + + if (_p && (_t = _p.timing)) { + for (var i in _ti){ + var _tmp = _t[_ti[i]]; + _tmp = (_tmp ? _tmp : 0); + _sa.push(_ti[i] + "=" + _tmp); + } + + var uaqReportUrl = "http://uaqport.baidu.com/jsspeed.php"; + uaqReportUrl += "?id=" + uaqTaskID + "&" + _sa.join("&"); + + var _img = new Image(); + setTimeout(function(){ + _img.src = uaqReportUrl; + },1000); + } + }; + window.sendTimeToUAQ = function(){ + var sendProbability = window.conf.uaq.sendProbability; + if (Math.random() <= sendProbability) { + sendReport(); + } + }; +})(window); + +/** + *以下代码用户将数据上报函数注册在window的onload事件中 + *您也可以使用其他方式执行window.sendTimeToUAQ函数, + *但是要保证该函数一定在页面的onload的事件发生之后执行, + *否则会造成回传数据不准确 +*/ +if (window.addEventListener) { + window.addEventListener("load", window.sendTimeToUAQ, false); +} else { + window.attachEvent("onload",window.sendTimeToUAQ); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.pda.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.pda.js new file mode 100755 index 000000000..4a657cea8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.pda.js @@ -0,0 +1,2 @@ +(function(){function a(e,c,h){if(e.length===+e.length){for(var g=0,d=e.length;g0&&this._metrics.push("wtt="+e)}this._measureTime(d,c)};b.prototype._measureTime=function(d,e){var c=0;a(e,function(f,g){c=(""+g).length<8?g:g-d;this._metrics.push(f+"="+c)},this)};b.prototype._measureRenderTime=function(){if(window.performance&&window.performance.timing){var c=window.performance.timing;this._performance_timing=c;this._render_timing.lt=c.loadEventStart;if(c.loadEventEnd>0){this._render_timing.let=c.loadEventEnd}}if(this.getFPT()){this._render_timing.fpt=this.getFPT()}if(this._render_timing.fvt==0){this._render_timing.fvt=this._render_timing.crt=this._render_timing.let}this._measureTime(this._render_start,this._render_timing)};b.prototype._browser=function(){var e=this._uaMatch(navigator.userAgent);var c=e.browser;if(c=="msie"){if(document.documentMode){var f=e.version.substring(0,1);if(window.performance){c+="9.0";this._metrics.push("ebrowser="+f+"9"+document.documentMode)}else{c+="8.0";this._metrics.push("ebrowser="+f+"8"+document.documentMode)}}else{c+=e.version}}var d={"msie6.0":16,"msie7.0":17,"msie8.0":18,"msie9.0":19,chrome:20,mozilla:30,safari:40,opera:50};this._metrics.push("browser="+(d[c]||0))};b.prototype._uaMatch=function(d){var j=/(chrome)\/(\d+\.\d)/,f=/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/,c=/(opera)(?:.*version)?[ \/]([\w.]+)/,e=/(msie) ([\w.]+)/,g=/(mozilla)(?:.*? rv:([\w.]+))?/,d=d.toLowerCase(),h={};var i=j.exec(d)||c.exec(d)||e.exec(d)||d.indexOf("compatible")<0&&g.exec(d)||[];if(f.test(d)&&!/chrome/.test(d)){i[1]="safari";i[2]=RegExp["$1"]||RegExp["$2"]}return{browser:i[1]||"unknown",version:i[2]||"0"}};b.prototype.send=function(){if(b._is_send){return}b._is_send=true;var f=this._data.env,c=this._metrics,d=this._connection_num;a(f,function(g,h){c.push(g+"="+h)});if(window._trace_page_logid){c.push("logid="+_trace_page_logid)}c.push("pf="+navigator.platform);c.push("_t="+new Date()*1);var e=document.createElement("img");e.src=this._conf.log_path+"?"+c.join("&");window["___pms_img_"+new Date()*1]=e};b.prototype._unload_send=function(){if(b._is_unload_send){return}b._is_unload_send=true;var g=this._data.env,c=[];if(window.F&&F.fisMark){var d=this._render_start,f=[];a(F.fisMark,function(i,j){var h=[];a(j,function(l,k){h.push('"'+l+'":'+(k-d))},this);f.push('"'+i+'":{'+h.join(",")+"}")},this);c.push("fis_timing={"+f.join(",")+"}")}if(c.length>0){a(g,function(h,i){c.push(h+"="+i)});var e=document.createElement("img");e.src=this._conf.log_path+"?"+c.join("&");window["___pms_img_"+new Date()*1]=e}};if(!window.WPO_PDA){window.WPO_PDA=new b(PDC.metadata())}})(); +if (window["PDC"] && PDC.oldNetTest) {! function() {window.__wpo = {}, __wpo.util = {extend: function(a, b) {for (var c in b) a[c] = b[c]; return a }, now: function() {return (new Date).getTime() } }, __wpo.util.param = function(a) {var d, b = [], c = ""; for (d in a) c = "undefined" == typeof a[d] ? "" : a[d], b.push(d + "=" + c); return b.join("&") }, __wpo.log = {_opt: {log_path: "http://static.tieba.baidu.com/tb/pms/img/st.gif"}, _data: {}, setOpt: function(a) {__wpo.util.extend(this._opt, a) }, push: function(a) {__wpo.util.extend(this._data, a) }, send: function() {var a = document.createElement("img"), b = (new Date).getTime(); this._data._t = b, a.src = this._opt.log_path + "?" + __wpo.util.param(this._data), window["___pms_img_" + b] = a, this._data = {} } }, __wpo.network = {_opt: {}, test: function(a, b) {var c = new __wpo.NetworkTester(a, b); c.run() } }, __wpo.NetworkTester = function(a, b) {this._END_NUM = 5, this._START_NUM = 2, this._IMG_OPT = {img_1: ["img/1.jpg", 0], img_2: ["img/2.gif", 0], img_3: ["img/3.gif", 0], img_4: ["img/4.jpg", 10583 / 1024], img_5: ["img/5.jpg", 59906 / 1024] }, this._timecost = {}, this._ext_data = b || {}, this._img_path = a }, __wpo.NetworkTester.prototype.run = function() {this._loadTestImg(this._START_NUM) }, __wpo.NetworkTester.prototype._report = function() {var h, a = this._timecost.t3, b = this._IMG_OPT.img_4[1], c = this._IMG_OPT.img_5[1], d = this._timecost.t4, e = this._timecost.t5, f = 0, g = 0; d > a && (f = b / ((d - a) / 1e3)), g = (c - b) / ((e - d) / 1e3), h = {rtt: a, bw1: f.toFixed(1), bw2: g.toFixed(1) }, h.c_rtt = h.rtt, h.c_bw1 = h.bw1, h.c_bw2 = h.bw2, __wpo.log.push(this._ext_data), __wpo.log.push(h), __wpo.log.send() }, __wpo.NetworkTester.prototype._loadTestImg = function(a) {var b = document.createElement("img"), c = this, d = (new Date).getTime(), e = "" + this._img_path + this._IMG_OPT["img_" + a][0] + "?t=" + d + "&index=" + a; b.onload = function() {var e, b = (new Date).getTime(); c._timecost["t" + a] = b - d, e = a + 1, e <= c._END_NUM ? c._loadTestImg(e) : c._report() }, b.src = e, window["___pms_img_net_" + d] = b } }(), function() {var g, h, a = {product_id: 10, page_id: PDC.idforWebSpeed, sample: PDC.oldNetTest.sample, domains: PDC.oldNetTest.domains }, b = Math.random(), c = a.domains.length, d = a.sample, e = {product_id: a.product_id, page_id: a.page_id, domain: ""}, f = ""; d > b && (g = Math.floor(b / (d / c)), c > g && (h = a.domains[g], f = h.img_path, e.domain = h.domain), "" != f && setTimeout(function() {__wpo.network.test(f, e) }, 1e3)) }(); } \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.timing.pda.hao123.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.timing.pda.hao123.js new file mode 100755 index 000000000..0b5a10706 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.timing.pda.hao123.js @@ -0,0 +1 @@ +(function(){__wpo.util.param=function(d){var a=[],c="";for(var b in d){c=(typeof d[b]=="undefined"?"":d[b]);a.push(b+"="+c)}return a.join("&")};__wpo.util.uaMatch=function(b){b=b.toLowerCase();var a=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||b.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||[];return{browser:a[1]||"",version:a[2]||"0"}};__wpo.pda={_opt:{},setOpt:function(a){__wpo.util.extend(this._opt,a)},_metrics:{},_addMetric:function(a,b){if(typeof a==="object"){__wpo.util.extend(this._metrics,a)}else{this._metrics[a]=b}},_metadata:{},_render_start:0,_measureEnvInfo:function(){var a=__wpo.util.uaMatch(window.navigator.userAgent);var b=a.browser;if(b==="msie"){b+=a.version}var c={"msie9.0":19,"msie10.0":110,chrome:20,mozilla:30,safari:40,opera:50};this._addMetric("browser",(c[b]||0));if(window.screen){this._addMetric("_screen",window.screen.width+"*"+window.screen.height+"|"+window.screen.availWidth+"*"+window.screen.availHeight)}},_measurePerformanceTiming:function(){function g(){var i;if(window.performance&&performance.timing&&performance.timing.msFirstPaint){i=performance.timing.msFirstPaint}else{if(window.chrome&&chrome.loadTimes){i=parseInt(chrome.loadTimes().firstPaintTime*1000)}}return i}var b={},c={},e=window.performance.timing;var h=e.fetchStart;if(e.connectStart>=e.domainLookupStart){b.dns=e.domainLookupEnd}b.ct=e.connectEnd;b.st=e.responseStart;b.tt=e.responseEnd;this._measureTime(h,b);var d={c_dnslookup:e.domainLookupEnd-e.domainLookupStart,c_connecting:e.connectEnd-e.connectStart,c_waiting:e.responseStart-e.requestStart,c_receiving:e.responseEnd-e.responseStart,c_fetch_dns:e.domainLookupStart-e.fetchStart,c_nav_dns:e.domainLookupStart-e.navigationStart,c_nav_fetch:e.fetchStart-e.navigationStart};this._addMetric(d);var a=e.navigationStart;c.drt=e.domContentLoadedEventStart;c.drt_end=e.domContentLoadedEventEnd;c.lt=e.loadEventStart;var f=g();if(f){c.c_nfpt=f;c.p_nfpt=c.c_nfpt}this._measureTime(a,c)},_measurePerformanceNavigation:function(){var a=window.performance.navigation;if(typeof a=="object"){this._addMetric("nav_type",a.type);this._addMetric("redirect_count",a.redirectCount)}},_measureLoadTiming:function(){this._addMetric("wt",1);var c=this._metadata.timing,a=this._metadata.render_start;this._measureTime(a,this._metadata.timing);var b=c.ht-this._metadata.time_to_title;this._addMetric("c_head_time",b)},_measureTime:function(d,b){var c=0;for(var a in b){c=b[a]-d;if(c>=0){this._addMetric(a,c)}}},_measureHtmlContent:function(d,c){var h=[],b={},j=null;var a=0;h=document.getElementsByTagName("img");for(var g=0,e=h.length;gb){g=h/((d-b)/1000)}e=(f-h)/((c-d)/1000);var a={product_id:this._product_id,rtt:b,bw1:g.toFixed(1),bw2:e.toFixed(1)};a.cus_rtt=a.rtt;a.cus_bw1=a.bw1;a.cus_bw2=a.bw2;__wpo.log.push(a);__wpo.log.send()};__wpo.NetworkTester.prototype._loadTestImg=function(e){var c=document.createElement("img");var b=this;var a=new Date().getTime();var d=""+this._img_path+this._IMG_OPT["img_"+e][0]+"?t="+a+"&index="+e;c.onload=function(){var g=new Date().getTime();b._timecost["t"+e]=g-a;var f=e+1;if(f<=b._END_NUM){b._loadTestImg(f)}else{console.log(b._timecost);b._report()}};c.src=d;window["___pms_img_net_"+a]=c}})(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.timing.pda.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.timing.pda.js new file mode 100755 index 000000000..5e19e288d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/js/wpo.timing.pda.js @@ -0,0 +1 @@ +(function(){__wpo.util.param=function(d){var a=[],c="";for(var b in d){c=(typeof d[b]=="undefined"?"":d[b]);a.push(b+"="+c)}return a.join("&")};__wpo.util.uaMatch=function(b){b=b.toLowerCase();var a=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||b.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||[];return{browser:a[1]||"",version:a[2]||"0"}};__wpo.pda={_opt:{},setOpt:function(a){__wpo.util.extend(this._opt,a)},_metrics:{},_addMetric:function(a,b){if(typeof a==="object"){__wpo.util.extend(this._metrics,a)}else{this._metrics[a]=b}},_metadata:{},_render_start:0,_measureEnvInfo:function(){var a=__wpo.util.uaMatch(window.navigator.userAgent);var b=a.browser;if(b==="msie"){b+=a.version}var c={"msie9.0":19,"msie10.0":110,chrome:20,mozilla:30,safari:40,opera:50};this._addMetric("browser",(c[b]||0));if(window.screen){this._addMetric("_screen",window.screen.width+"*"+window.screen.height+"|"+window.screen.availWidth+"*"+window.screen.availHeight)}},_measurePerformanceTiming:function(){function g(){var i;if(window.performance&&performance.timing&&performance.timing.msFirstPaint){i=performance.timing.msFirstPaint}else{if(window.chrome&&chrome.loadTimes){i=parseInt(chrome.loadTimes().firstPaintTime*1000)}}return i}var b={},c={},e=performance.timing;var h=e.fetchStart;if(e.domainLookupStart>e.connectStart){b.dns=e.domainLookupEnd}b.ct=e.connectEnd;b.st=e.responseStart;b.tt=e.responseEnd;this._measureTime(h,b);var d={c_dnslookup:e.domainLookupEnd-e.domainLookupStart,c_connecting:e.connectEnd-e.connectStart,c_waiting:e.responseStart-e.requestStart,c_receiving:e.responseEnd-e.responseStart};this._addMetric(d);var a=e.navigationStart;c.drt=e.domContentLoadedEventStart;c.drt_end=e.domContentLoadedEventEnd;c.lt=e.loadEventStart;var f=g();if(f){c.c_nfpt=f}this._measureTime(a,c)},_measureLoadTiming:function(){this._addMetric("wt",1);var c=this._metadata.timing,a=this._metadata.render_start;this._measureTime(a,this._metadata.timing);var b=c.ht-this._metadata.time_to_title;this._addMetric("c_head_time",b)},_measureTime:function(d,b){var c=0;for(var a in b){c=b[a]-d;if(c>=0){this._addMetric(a,c)}}},_measureHtmlContent:function(d,c){var h=[],b={},j=null;var a=0;h=document.getElementsByTagName("img");for(var g=0,e=h.length;g + + + + + + + +
    + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/lazyload.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/lazyload.js new file mode 100755 index 000000000..8dbff5246 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/static/lazyload.js @@ -0,0 +1,425 @@ +/*jslint browser: true, eqeqeq: true, bitwise: true, newcap: true, immed: true, regexp: false */ + +/** +LazyLoad makes it easy and painless to lazily load one or more external +JavaScript or CSS files on demand either during or after the rendering of a web +page. + +Supported browsers include Firefox 2+, IE6+, Safari 3+ (including Mobile +Safari), Google Chrome, and Opera 9+. Other browsers may or may not work and +are not officially supported. + +Visit https://github.com/rgrove/lazyload/ for more info. + +Copyright (c) 2011 Ryan Grove +All rights reserved. + +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. + +@module lazyload +@class LazyLoad +@static +@version 2.0.3 (git) +*/ + +LazyLoad = (function (doc) { + // -- Private Variables ------------------------------------------------------ + + // User agent and feature test information. + var env, + + // Reference to the element (populated lazily). + head, + + // Requests currently in progress, if any. + pending = {}, + + // Number of times we've polled to check whether a pending stylesheet has + // finished loading. If this gets too high, we're probably stalled. + pollCount = 0, + //ie 7,8,9 bug,http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/internet-explorer-stylesheet-rule-selector-import-sheet-limit-maximum.aspx + IE7_8_9_StylesheetLimit = 25, + + // Queued requests. + queue = {css: [], js: []}; + + // Reference to the browser's list of stylesheets. + //styleSheets = doc.styleSheets; + + // -- Private Methods -------------------------------------------------------- + + /** + Creates and returns an HTML element with the specified name and attributes. + + @method createNode + @param {String} name element name + @param {Object} attrs name/value mapping of element attributes + @return {HTMLElement} + @private + */ + function createNode(name, attrs) { + var node = doc.createElement(name), attr; + + for (attr in attrs) { + if (attrs.hasOwnProperty(attr)) { + node.setAttribute(attr, attrs[attr]); + } + } + + return node; + } + + /** + Called when the current pending resource of the specified type has finished + loading. Executes the associated callback (if any) and loads the next + resource in the queue. + + @method finish + @param {String} type resource type ('css' or 'js') + @private + */ + function finish(type) { + var p = pending[type], + callback, + urls; + + if (p) { + callback = p.callback; + urls = p.urls; + + urls.shift(); + pollCount = 0; + + // If this is the last of the pending URLs, execute the callback and + // start the next request in the queue (if any). + if (!urls.length) { + callback && callback.call(p.context, p.obj); + pending[type] = null; + queue[type].length && load(type); + } + } + } + + /** + Populates the env variable with user agent and feature test + information. + + @method getEnv + @private + */ + function getEnv() { + var ua = navigator.userAgent; + + env = { + // True if this browser supports disabling async mode on dynamically + // created script nodes. See + // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order + async: doc.createElement('script').async === true + }; + + (env.webkit = /AppleWebKit\//.test(ua)) + || (env.ie = ua.match(/MSIE\s([^ ;]*)/)) + || (env.opera = /Opera/.test(ua)) + || (env.gecko = /Gecko\//.test(ua)) + || (env.unknown = true); + } + + /** + Loads the specified resources, or the next resource of the specified type + in the queue if no resources are specified. If a resource of the specified + type is already being loaded, the new request will be queued until the + first request has been finished. + + When an array of resource URLs is specified, those URLs will be loaded in + parallel if it is possible to do so while preserving execution order. All + browsers support parallel loading of CSS, but only Firefox and Opera + support parallel loading of scripts. In other browsers, scripts will be + queued and loaded one at a time to ensure correct execution order. + + @method load + @param {String} type resource type ('css' or 'js') + @param {String|Array} urls (optional) URL or array of URLs to load + @param {Function} callback (optional) callback function to execute when the + resource is loaded + @param {Object} obj (optional) object to pass to the callback function + @param {Object} context (optional) if provided, the callback function will + be executed in this object's context + @private + */ + function load(type, urls, callback, obj, context) { + var _finish = function () { finish(type); }, + isCSS = type === 'css', + charset = "utf-8", + className = "lazyload", + nodes = [], + i, len, node, p, pendingUrls, url; + + env || getEnv(); + + if (urls) { + // If urls is a string, wrap it in an array. Otherwise assume it's an + // array and create a copy of it so modifications won't be made to the + // original. + urls = typeof urls === 'string' ? [urls] : urls.concat(); + + // Create a request object for each URL. If multiple URLs are specified, + // the callback will only be executed after all URLs have been loaded. + // + // Sadly, Firefox and Opera are the only browsers capable of loading + // scripts in parallel while preserving execution order. In all other + // browsers, scripts must be loaded sequentially. + // + // All browsers respect CSS specificity based on the order of the link + // elements in the DOM, regardless of the order in which the stylesheets + // are actually downloaded. + if (isCSS || env.async || env.gecko || env.opera) { + // Load in parallel. + queue[type].push({ + urls : urls, + callback: callback, + obj : obj, + context : context + }); + } else { + // Load sequentially. + for (i = 0, len = urls.length; i < len; ++i) { + queue[type].push({ + urls : [urls[i]], + callback: i === len - 1 ? callback : null, // callback is only added to the last URL + obj : obj, + context : context + }); + } + } + } + + // If a previous load request of this type is currently in progress, we'll + // wait our turn. Otherwise, grab the next item in the queue. + if (pending[type] || !(p = pending[type] = queue[type].shift())) { + return; + } + + head || (head = doc.head || doc.getElementsByTagName('head')[0]); + pendingUrls = p.urls.slice(); + for (i = 0, len = pendingUrls.length; i < len; ++i) { + url = pendingUrls[i]; + + if (isCSS) { + // 旧lazyload需要区分 firfox 为了检测css是否onload事件,新lazyload直接使用 innerHTML link的方式,不需要区分了 + /*node = env.gecko ? createNode('style') : createNode('link', { + href: url, + rel : 'stylesheet' + });*/ + + node = createNode('link', { + href: url, + rel : 'stylesheet' + }); + } else { + node = createNode('script', {src: url}); + node.async = false; + } + + node.className = className; + node.setAttribute('charset', charset); + + if (env.ie && !isCSS) { + node.onreadystatechange = function () { + if (/loaded|complete/.test(node.readyState)) { + node.onreadystatechange = null; + _finish(); + } + }; + } else if (isCSS && (env.gecko || env.webkit)) { + // Gecko and WebKit don't support the onload event on link nodes. + /*if (env.webkit) { + // In WebKit, we can poll for changes to document.styleSheets to + // figure out when stylesheets have loaded. + p.urls[i] = node.href; // resolve relative URLs (or polling won't work) + pollWebKit(); + } else { + // In Gecko, we can import the requested URL into a ";div.removeChild(div.firstChild);document.getElementsByTagName("head")[0].appendChild(div.firstChild)},sug_callback:function(data){var me=this;data=me.modeConfig[mode].dataProcess(data);me.render(data);if(data.q!=me.emptySugWord){me.btn_down&&me.btn_down()}if(data.length<=0&&me.container){me.container[0].innerHTML=""}},btn_click:function(){var me=this;me.input.focus();if(me.upDown.hasClass("sg_up")){me.hide()}else{me.inputClick("triangle")}},setBtn:function(){var me=this;var ck=Cookie.get("psSugUp");if(ck){ck=ck.split("|");if(ck[1]=="0"){Cookie.set("psSugUp",ck[0]+"|1")}}me.tip_num.hide()},request:function(){var me=this;if(me.value.trim()==""){me.inputClick();return}if(me.data_cache[mode][me.value]){me.sug_callback(me.data_cache[mode][me.value]);return}var requestUrl=me.modeConfig[mode].buildRequestUrl(me.value);if(me.jqXhr){me.jqXhr.abort()}var val=me.reqValue=me.value; +me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:requestUrl,jsonp:mode=="baidu"?"cb":"jsonp",timeout:5000,success:function(data){if(me.reqValue==val){me.sug_callback(data)}},always:function(){me.jqXhr=null}})},inputClick:function(type_str){if(mode!="baidu"){return}var me=this,url=me.modeConfig.baidu.buildRequestUrl(me.emptySugWord),dataProcess=me.modeConfig.baidu.dataProcess;me.inputEmptySug(url,dataProcess).call(me,type_str);me.setBtn()},insertSug:function(){var me=this;me.input.parentNode.insertBefore(me.container_wrap[0],me.input.parentNode.firstChild)},createContainer:function(){var me=this;bdsug.prototype.createContainer.call(me);bindLogEvent(me.side_container[0],"se");me.container_wrap[0].className=me.containerClassName},btn_up:function(){var me=this;me.upDown&&me.upDown.addClass("sg_up")},btn_down:function(){var me=this;me.upDown&&me.upDown.removeClass("sg_up")},renderTip:function(data){var me=this;if(data&&data.n&&data.n.c&&data.n.sugUp){var ck=Cookie.get("psSugUp"),num=data.n.c; +if(!ck||ck.split("|")[0]!=data.n.sugUp){ck=data.n.sugUp+"|0";Cookie.set("psSugUp",ck)}if(ck.split("|")[1]=="1"){return}if(num){me.tip_num[0].innerHTML=num;me.tip_num[0].style.display="inline"}}},createBtn:function(){var me=this;me.appendStyle();var _tri=$('10');me.upDown=_tri;me.tip_num=$("span",_tri);$(me.input).parent().addClass("sg_tri").end().after(me.upDown);var url=me.modeConfig.baidu.buildRequestUrl(me.emptySugWord);me.jqXhr=$.ajax({dataType:"jsonp",async:true,scriptCharset:"utf-8",url:url,jsonp:"cb",timeout:5000,success:function(data){me.renderTip(data)},always:function(){me.jqXhr=null}});me.upDown.click(function(){me.btn_click()})},showBtn:function(){var me=this;$(me.input.parentNode).addClass("sg_tri")},hideBtn:function(){var me=this;$(me.input.parentNode).removeClass("sg_tri")},addTj:function(o){var me=this;for(var i in o){addedTj[i]=o[i]}if(mode=="baidu"){bdsug.prototype.addTj.call(me,o)}},rmTj:function(o){var me=this; +for(var i in o){$("input[name="+i+"]",me.form).remove()}},form_submit:function(e){var me=this;me.hide();var type=(me.submitType!="sug_enter"&&me.submitType!="key_enter"&&me.submitType!="clk_submit");var oldSubmitType=me.submitType;var res=bdsug.prototype.form_submit.call(me,e);if(mode=="baidu"&&res&&me.value.length<48){try{me.writeStore("",$.trim(me.value))}catch(e){}}if(res&&type){haoc()}return res},toggle:function(on){var me=this;if(on){if(!statusOn){$(me.input).bind("keydown.sugEvent",function(e){me.keydown(e)}).bind("focus.sugEvent",function(e){me.startCircle(e)}).bind("blur.sugEvent",function(e){me.stopCircle(e)}).bind("click.sugEvent",function(e){me.inputClick(e)}).bind("keypress.sugEvent",function(e){me.keypress(e)});me.searchBtn.bind("mouseup.sugEvent",function(e){me.searchBtn_mouseup(e)});$(document).bind("click.sugEvent",function(e){me.document_click(e)});$(me.form).bind("submit.sugEvent",function(e){me.form_submit(e)});if(!me.upDown){me.createBtn();me.hideBtn()}}if(mode=="baidu"){me.showBtn() +}else{me.hideBtn()}me._curSelect=0}else{$.each([$(me.input),me.searchBtn,$(document),$(me.form)],function(index,item){item.unbind(".sugEvent")});me.hide();me.hideBtn();me.stopCircle()}statusOn=on},setMode:function(m){var me=this;if({baidu:1,google:1}[m]){mode=m}if(mode=="baidu"){me.addTj(addedTj)}else{me.rmTj(addedTj)}}});function bindLogEvent(wrap,fm){$(wrap).on("mousedown",function(e){var t=e.srcElement||e.target;try{var xpath=getXPath(t,wrap);log(xpath,t,wrap,fm)}catch(e){}})}function getXPath(node,wrap,path){path=path||[];wrap=wrap||document;if(node===wrap){return path}if(node.parentNode!==wrap){path=getXPath(node.parentNode,wrap,path)}if(node.previousSibling){var count=1;var sibling=node.previousSibling;do{if(sibling.nodeType==1&&sibling.nodeName==node.nodeName){count++}sibling=sibling.previousSibling}while(sibling)}if(node.nodeType==1){path.push(node.nodeName.toLowerCase()+(count>1?count:""))}return path}function getType(xpath,t,wrap){var LOG_CLASS=["TITLE","LINK","IMG","BTN","OTHERS"]; +var node=t,cs=LOG_CLASS,cl=cs.length,xstr=xpath.join(" ");while(node!==wrap){for(var i=0;i1){l--;if(/^a\d*\b/.test(xpath[l])){url=p.href;title=p.innerHTML.replace(/<[^>]*>/g,"");adata=p.getAttribute("data-click");if(p.getAttribute("data-nolog")!=null){return}break}else{p=p.parentNode}}if(!url){url=""}var data={fm:fm,p1:wrap.getAttribute("p1")||0,xpath:xpath.join("-")+"("+type+")",title:title||"",url:url};var click_data;if(click_data=wrap.getAttribute("data-click")){try{click_data=(new Function("return "+click_data))(); +$.extend(data,click_data)}catch(e){}}if(adata){try{adata=(new Function("return "+adata))();$.extend(data,adata)}catch(e){}}for(var i in data){if(data[i]===null){delete data[i]}}c(data)}function c(q){haoc(q);var sQ="",img=window["BD_PS_C"+(new Date()).getTime()]=new Image();for(v in q){if(q.hasOwnProperty(v)&&q[v].length>0){sQ+=(sQ?"&":"")+v+"="+encodeURIComponent(q[v])}}var imgsrc=ubsurl+"?";if(q.rsv_sugtype=="cr"){imgsrc+="q="+encodeURIComponent(q.title)+"&"}imgsrc+=sQ+"&lang="+language+"&haobd="+encodeURIComponent(Cookie.get("BAIDUID"))+"&path="+encodeURIComponent(location.href)+"_r="+new Date().getTime();img.src=imgsrc;return true}function haoc(q){var engine=$("#searchGroupLogo").attr("data-id");var input=$("#searchGroupInput").get(0),engine=engine?engine:"";var imgsrc="/img/gut.gif?type=click&element=sug&modId=search&position=search&engine="+engine+"&value="+encodeURIComponent(input.value)+"&r="+new Date().getTime();if(q&&q.rsv_sugtype=="cr"){imgsrc+="&url="+encodeURIComponent(q.url) +}if(window.conf&&conf.UT&&conf.UT.params){imgsrc+="&country="+conf.UT.params.country+"&level="+conf.UT.params.level+"&page="+conf.UT.params.page}if(document.body.className.match(/header-fixed-up/)){imgsrc+="&sort=header"}var img=window["BD_HAO123_C"+(new Date()).getTime()]=new Image();img.src=imgsrc}window.baidu_sug=(function(){var me=new _baidu_sug();return{setMode:function(){me.setMode.apply(me,arguments)},toggle:function(){me.toggle.apply(me,arguments)}}})()})(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/BaseController.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/BaseController.php new file mode 100755 index 000000000..f7a0a251d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/BaseController.php @@ -0,0 +1,34 @@ +cmsdata['head']['tplDir']; + header("Content-type:text/html;charset=UTF-8"); + if( !empty( $this->cmsdata['head']['forceCompile'] ) ){ + $smarty->force_compile = true; + } + $this->smarty->display($tplDir); + } + } + + $controller = new DefaultController(); + $controller->index(); + + + +/*$sysData['templateRoot'] = $smarty->getTemplateDir(0)."/"; +if(isset($_GET['debug'])){ + if($_GET['debug'] == 'on'){ + $smarty->debugging = true; + } +}*/ +/*if( !empty( $rootData['head']['forceCompile'] ) ){ + $smarty->force_compile = true; +} +$smarty->assign('root',$rootData); +$smarty->assign('sysInfo',$sysData); + +$smarty->display($tplDir);*/ + + + +?> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/adapterUi.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/adapterUi.php new file mode 100755 index 000000000..f442d11af --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/adapterUi.php @@ -0,0 +1,55 @@ +_before(); + } + function _before(){ + $this->smarty = SimpleTemplate::getInstance(); + $this->urlParam = array_merge($_GET, $_POST); + //重置country + $host = $_SERVER['HTTP_HOST']; + $host = explode( '.', $host); + if( !preg_match('/\d/', $host[0]) ){ + $this->country = $host[0]; + } + //cms数据merge + $this->cmsData(); + } + + function cmsData(){ + $cmsData = Cms::get(); + $rootData = $cmsData['root']; + $sysData = $cmsData['sysInfo']; + if(!is_array($rootData)){ + $rootData = json_decode($rootData,true); + } + + if(!is_array($sysData)){ + $sysData = json_decode($sysData,true); + } + $this->smarty->cmsdata = $rootData; + $this->cmsdata = $rootData; + $this->smarty->assign('root',$rootData); + $this->smarty->assign('body',$rootData['body']); + $this->smarty->assign('head',$rootData['head']); + $this->smarty->assign('foot',$rootData['foot']); + $this->smarty->assign('sysInfo',$sysData); + } + + +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/api.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/api.php new file mode 100755 index 000000000..16e2380f0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/api.php @@ -0,0 +1,34 @@ + "http://api.gus.hao123.com", + "ar" => "http://api.gar.hao123.com", + "id" => "http://api.gid.hao123.com", + "vn" => "http://api.gid.hao123.com", + "tw" => "http://api.gid.hao123.com", + "th" => "http://api.gid.hao123.com", + "jp" => "http://api.gid.hao123.com", + ); + $path_url = $_SERVER['SCRIPT_URL'] ? $_SERVER['SCRIPT_URL'] : $_SERVER['REQUEST_URI']; + $reffer = $_SERVER['HTTP_REFERER']; + $reffer = parse_url( $reffer ); + $reffer_path = explode("/", $reffer['path']); + $country = $reffer_path[1]; + $api_url = $apiMap[$country]; + $api_file_name = parse_url($path_url); + $api_file_name = $api_file_name['query']; + //过滤去掉jsonp字段和_ + $api_file_name = preg_replace('/&(jsonp|_)=[^&]+/i','',$api_file_name) ; + //检测本地是否有数据 + if( is_file( $root_dir . $api_file_name.".json") ){ + echo file_get_contents( $root_dir . $api_file_name.".json" ); + } else { + $data = file_get_contents( $api_url.$path_url ); + //如果目录不存在 + if( !is_dir( $root_dir ) ){ + //建立目录 + mkdir($root_dir,0777,true); + } + file_put_contents( $root_dir . $api_file_name.".json" , $data); + echo $data; + } diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/applistapi.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/applistapi.php new file mode 100755 index 000000000..5bda109c5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/applistapi.php @@ -0,0 +1,150 @@ + array('status'=>401,'info'=>'param error'), + //未知文件处理类型(前端不能处理) + '402' => array('status'=>402,'info'=>'don\'t handle file type'), + //读取文件不存在 + '404' => array("status"=>404,"info"=>'file not find'), + //获取成功,返回的数据格式 + '200' => array('status'=>200,"info"=>'success',) + ); + public function _before(){ + //参数校验 + $this->statusCode = $this->_check_param(); + //校验错误退出 + if ( $this->statusCode !== 200 ){ + $this->_error( $statusCode ); + } + } + public function index(){ + + //格式化cms数据 + $idToAppInfo = $this->_idToAppInfo(); + $appInfo = array(); + //根据pm或者用户指定的id获取对应的app信息 + foreach ($this->appIds as $id) { + $appInfo[$id] = $this->idToAppInfo[$id]; + } + //通过defaulApp字段区分1,2期,设置了为2期 + if( !empty( $this->version ) ){ + //取代applist列表信息 + $this->data['sidebar']['list'] = $appInfo; + } + + $this->_success( $this->data ); + } + + public function getAllInfo(){ + $idToAppInfo = $this->_idToAppInfo(); + //取代applist列表信息 + //取代applist列表信息 + $this->data['sidebar']['list'] = $idToAppInfo; + $this->_success( $this->data ); + } + /* + * 参数校验 + */ + private function _check_param(){ + //获取widget所在根路径 + $this->callBack = $_GET['callback']; + $this->country = $_GET['country']; + $this->module = $_GET['module']; + $this->version = $_GET['version']; + //参数校验 + if( empty($this->callBack) || empty($this->country) || empty($this->module) || !preg_match('/^\w+$/', $this->callBack) ){ + return 401; + } + $path = "applist/{$this->country}/{$this->module}/data.php"; + $localAppListDataPath = DATA_ROOT."data/".$path; + //检测数据是否存在 + + $this->data = CmsDataAdapter::saveAndGetOrMergeData($localAppListDataPath, $path); + if( empty( $this->data ) ){ + return 404; + + } + //合并mis数据 + $misDataPath = DATA_ROOT."applist/{$this->country}/mis/data.php"; + if( file_exists( $misDataPath ) ) { + include_once $misDataPath; + // 合并sidebar list数据 + foreach ($root['sidebar']['list'] as $item) { + $this->data['sidebar']['list'][]= $item; + } + // 合并sidebar气泡数据 + foreach ($root['sidebar']['guideBubble']['list'] as $item) { + $this->data['sidebar']['guideBubble']['list'][]= $item; + } + } + //是否获取用户app信息,否则获取pm配置的app信息 + $ids = empty( $_GET['appids'] ) ? $this->data['defaultApp']['list'] : $_GET['appids']; + $this->appIds = explode( ",", $ids); + + return 200; + } + + /* + * 转换cms中的applist信息列表,cms(方便pm配数据)中配的方式为array( array(id=>"1" )) => array(1=>array(id=>'1')) + */ + private function _idToAppInfo( $statusCode ){ + $idToAppInfo = array(); + foreach ($this->data['sidebar']['list'] as $val) { + $idToAppInfo[ $val['id'] ] = $val; + } + $this->idToAppInfo = $idToAppInfo; + return $this->idToAppInfo; + } + + /* + * 错误反馈 + */ + private function _error( $statusCode ){ + echo json_encode( $this->infoList[$statusCode] ); + exit; + } + + /* + * 成功反馈 + */ + private function _success( $content ){ + echo $this->callBack."(". json_encode( $content ) .")"; + exit; + } + } +$route_url = $_SERVER['SCRIPT_URL'] ? $_SERVER['SCRIPT_URL'] : $_SERVER['REQUEST_URI']; +$index = new AppListApi(); +if( preg_match("/getAllInfo/",$route_url)){ + $index->getAllInfo(); +} else{ + $index->index(); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/dispath.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/dispath.php new file mode 100755 index 000000000..c7a67cc7c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/dispath.php @@ -0,0 +1,343 @@ + 2){ + $reffer = parse_url( $reffer ); + $reffer_path = explode("/", $reffer['path']); + $pathseg[0] = $reffer_path[1]; + } + $pageRoot = $dataDir = $hostType."/".$pathseg[0]."/"; + $country = $pathseg[0]; + //$dataDir = $hostType."/".$dataDir; + $pathseg = array_slice($pathseg, 1); + $count = count($pathseg); + + $pageFound = is_dir( $uiPath.$pageRoot); + + } + $dataRoot = $dataDir; + } + $dataDir = rtrim( $dataDir.implode("/", $pathseg), "/")."/"; + //如果是首页,放到目录/index中 + $dataDir = $count>0 ? $dataDir : $dataDir."index/"; + //为controller设置属性isTestEnv,以便别是否是测试环境 + //记录对应的data.json所在的Template路径,默认与ui对应 + self::$dataDir = rtrim( $dataDir, "/")."/"; + self::$dataPrivate = ""; + //测试环境使用url,线上环境使用host + self::$country = $country; + self::$host = $host; + self::$dataRoot = rtrim( $dataRoot, "/")."/"; + + self::getCms(); + + return self::$cmsData; + } + //检测是否开启smarty调试模式 + static function isSmartyDebug(){ + //是否开启smarty调试模式 + $smarty_debug_id = "debug"; + if (false !== strpos(self::$_query_string, $smarty_debug_id)) { + if (false !== strpos(self::$_query_string, $smarty_debug_id . '=on')) { + // enable debugging for this browser session + setcookie('FIS_DEBUG', "YlwtSmt",time()+3600*24*356); + } elseif (false !== strpos(self::$_query_string, $smarty_debug_id . '=off')) { + // disable debugging for this browser session + setcookie('FIS_DEBUG', "",time()+3600*24*356); + } + } + } + + static function array_merge_recursive_new() { + $arrays = func_get_args(); + $base = array_shift($arrays); + foreach ($arrays as $array) { + reset($base); //important + while (list($key, $value) = @each($array)) { + if (is_array($value) && @is_array($base[$key])) { + $base[$key] = self::array_merge_recursive_new($base[$key], $value); + } + else { + $base[$key] = $value; + } + } + } + return $base; + } + static function getCms(){ + $dataRoot = dirname(__FILE__)."/"; + + + $privateDataDir = DATA_ROOT.self::$dataDir; + $publicDataDir = DATA_ROOT.rtrim(self::$dataRoot,"/")."/base/"; + $dataName = "data.php"; + + //指定data的路径(仅能指定同目录下私有数据) + $assignDataName = $_GET["data"]; + if( !empty( $assignDataName ) ){ + $dataName = $assignDataName.".php"; + } + //复制url的参数值到$root.urlparam中 + $arr = array( "urlparam"=>array_merge($_GET,$_POST) ); + //set smarty + $sysInfo = array( + "baseDataDir" => $publicDataDir."data\.php", + "privateDataDir" => $privateDataDir."data\.php", + "templateRoot" => TEMPLATE_PATH, + "country" => self::$country, + "host" => self::$host + ); + //获取query_string以便判断是否开启smarty或者data调试模式 + if (isset($_SERVER['QUERY_STRING'])) { + self::$_query_string = $_SERVER['QUERY_STRING']; + } + //判断是否启动smarty调试 + self::isSmartyDebug(); + + + + + //所有data都有一个公共data,先把公共的data加载到cmsdata中 + $severBaseDataPath = rtrim(self::$dataRoot,"/")."/base/". self::$serverDataName; + $localBaseDataPath = $publicDataDir.self::$dataName; + $arr = CmsDataAdapter::saveAndGetOrMergeData( $localBaseDataPath, $severBaseDataPath, $arr ); + + //如果指定私有数据路径使用私有数据 + if( strpos(self::$dataDir, 'fetchwidget') !== false ){ + $assignDir = $_GET['dataDir']; + if( !$assignDir ){ + $assignDir = "index"; + } + $privateDataDir = DATA_ROOT.self::$dataRoot.$assignDir."/"; + } + + $severPrivateDataPath = self::$dataDir.self::$serverDataName; + $localPrivateDataPath = $privateDataDir.self::$dataName; + + $arrTmp = CmsDataAdapter::saveAndGetOrMergeData( $localPrivateDataPath, $severPrivateDataPath, $arrTmp ); + + if( !empty( $arrTmp['head']['privateBaseData'] ) ){ + $serverPrivateBaseDataPath = $arrTmp["head"]["privateBaseData"]; + $localPrivateBaseDataPath =DATA_ROOT.$arrTmp["head"]["privateBaseData"]; + + $arr = CmsDataAdapter::saveAndGetOrMergeData( $localPrivateBaseDataPath, $serverPrivateBaseDataPath, $arr ); + + } + $arr = self::array_merge_recursive_new($arr,$arrTmp); + //这个数据流程为总base-》指定base-》页面数据 + $severPrivateDataPath = self::$dataDir.self::$serverDataName; + $localPrivateDataPath = $privateDataDir.self::$dataName; + + //支持选择性的三层数据继承 遗留bug ,这个数据流程为总base->页面数据-》指定base + if( !empty($arr["head"]["baseData"]) ){ + $baseData = $sysInfo["privateDataDir"] = DATA_ROOT.$arr["head"]["baseData"]; + $severPrivateDataPath = $arr["head"]["baseData"]; + $arr = CmsDataAdapter::saveAndGetOrMergeData( $baseData, $severPrivateDataPath, $arr ); + } + + + //支持第三层数据继承,为了抽样 + $sample = empty($_GET['sample']) ? "" : $_GET['sample']; + if( !empty($sample) && !empty($arr["head"]["sample"][$sample])) { + //////////////////////////// + //支持子通道(返回功能) + $sub_channel_cookie = 'sample_channel_'.$sample;//=back'; + $sub_sample_name = $_COOKIE[$sub_channel_cookie]; + if(!empty($sub_sample_name)){ + $sample = $sample.'_'.$sub_sample_name; //'searchtest' => 'searchtest_back' + } + ///////////////// + + $sampleDir = ltrim($arr["head"]["sample"][$sample],"/"); + $sampleDataPath = $sysInfo["privateDataDir"] = DATA_ROOT.$sampleDir; + //fis需要转移"."为"\." + $sysInfo["privateDataDir"] = str_replace('data.php','data\\.php',$sysInfo["privateDataDir"]); + $baseData = $sysInfo["privateDataDir"] = DATA_ROOT.$arr["head"]["baseData"]; + $serverSampleDataPath = $sampleDir; + $arr = CmsDataAdapter::saveAndGetOrMergeData( $sampleDataPath, $serverSampleDataPath, $arr ); + } + + /////////////////////////////////////////////////////// + //支持读取外部数据的插件机制 + if(isset($arr['body']['extendDataPlugin']) && $arr['body']['extendDataPlugin']['on']){ + $extend_data_plugins = $arr['body']['extendDataPlugin']['plugins']; // + /*array( + array( + 'start' => 0, + 'end' => 2395212684, + 'sample_name' => '', + 'params' => '{}', + 'name' => 'recommendhottab' + ) + );*/ + + $action_time = time(); + foreach($extend_data_plugins as $api_plugin){ + if($api_plugin['need_baiduid'] && empty($_COOKIE['BAIDUID'])){ //判断是否有baiduid + continue; + } + if($api_plugin['start'] <= $action_time && $action_time <= $api_plugin['end']){ //判断插件生效时间,用timestamp + //正式开始引入插件处理 + $params = $api_plugin['params']; + if(!empty($params)) { + try{ + $params = json_decode($params, true); + }catch(Exception $e){ + $params = array(); + } + } else { + $params = array(); + } + $api_plugin_name = $api_plugin['name']; + $api_plugin_class = ucfirst($api_plugin_name); + try{ + $api_plugin_config = include_once($dataRoot . 'plugin/'. $api_plugin_name .'/'. $api_plugin_class. '.inc.php'); + } catch(Exception $e){ + //TODO LOG + continue; + } + if(empty($api_plugin_config)){ + continue; //配置不合法,退出 + } + try{ + include_once $dataRoot . '/plugin/'.$api_plugin_name .'/'.$api_plugin_class .'.class.php'; + } catch(Exception $e){ + //TODO LOG + continue; + } + if(!class_exists($api_plugin_class)){ + continue; //类加载有问题,退出 + } + $api_plugin_instance = new $api_plugin_class($api_plugin_config, $sysInfo['country']); + if(empty($api_plugin_instance)){ + continue; //初始化失败,退出 + } + $ret = $api_plugin_instance->process($arr['body'], $params); //执行数据干预 + if($ret === false){ + //LOG + } + } + } + } + + //smarty extend(为了选择布局)不能用条件判断语句,但是可以使用变量 + $layoutRoot = "web/base/layout/"; + $sysInfo['layout'] = empty( $arr["head"]["layout"] ) ? "home/page/layout/layout-index.tpl" :$arr["head"]["layout"]; + // 把cookie记录到smarty变量中,方便前端模板调用 + $baiduId = $sysInfo["baiduid"] = isset($_COOKIE["FLASHID"]) ? $_COOKIE["FLASHID"]: (isset($_COOKIE["BAIDUID"]) ? $_COOKIE["BAIDUID"]:""); + $sysInfo["serverTime"] = time(); + + //测试环境,需要置空cdn + $arr["head"]["cdn"] = ""; + if ( !empty($baiduId) && extension_loaded("decodecookie") ){ + $sysInfo["baiduidCt"] = decodecookie($baiduId); + } else{ + $sysInfo["baiduidCt"] = $sysInfo["serverTime"]; + } + self::$cmsData = array( + "sysInfo" => $sysInfo, + "root"=> $arr + ); + } + + + } + + +?> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/env/SimpleTemplate.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/env/SimpleTemplate.class.php new file mode 100755 index 000000000..254ffb476 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/env/SimpleTemplate.class.php @@ -0,0 +1,62 @@ + TEMPLATE_PATH, + 'config_dir' => CONFIG_PATH, + 'plugins_dir' => array( SMARTY_PLUGINS_DIR, FIS_SMARTY_PLUGINS_DIR ), + 'left_delimiter' => '<%', + 'right_delimiter' => '%>' + ); + if(file_exists(WEBROOT_PATH . 'smarty.conf')){ + $user_conf = parse_ini_file($this->normalize(WEBROOT_PATH . 'smarty.conf')); + if(!empty($user_conf)){ + $default_conf = array_merge($default_conf, $user_conf); + } + } + $this->setTemplateDir($this->normalize($default_conf['template_dir'])); + $this->setConfigDir($this->normalize($default_conf['config_dir'])); + foreach ($default_conf['plugins_dir'] as $dir) { + $this->addPluginsDir($this->normalize($dir)); + } + $this->setLeftDelimiter($default_conf['left_delimiter']); + $this->setRightDelimiter($default_conf['right_delimiter']); + } + public function show($tpl_name,$arrData = array(), $cache_id = null, $compile_id = null, $parent = null){ + $arrData = array_merge($arrData,$this->cmsdata); + $this->assign('root',$arrData); + $this->display($tpl_name, $cache_id, $compile_id , $parent ); + } + public function cacheShow($tpl_name,$arrData = array(), $cache_id = null, $compile_id = null, $parent = null, $cache_lifetime = -1){ + $this->caching = true; + $this->cache_lifetime = $cache_lifetime; + $this->show($tpl_name,$arrData, $cache_id , $compile_id , $parent); + } + + public function normalize($path) { + $normal_path = preg_replace( + array('/[\/\\\\]+/', '/\/\.\//', '/^\.\/|\/\.$/', '/\/$/'), + array('/', '/', '', ''), + $path + ); + $path = $normal_path; + do { + $normal_path = $path; + $path = preg_replace('/[^\\/\\.]+\\/\\.\\.(?:\\/|$)/', '', $normal_path); + } while ($path != $normal_path); + $path = preg_replace('/\/$/', '', $path); + return $path; + } +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/env/env_init.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/env/env_init.php new file mode 100755 index 000000000..1da796bf2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/env/env_init.php @@ -0,0 +1,33 @@ + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/fetchwidget.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/fetchwidget.php new file mode 100755 index 000000000..47071dd7c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/fetchwidget.php @@ -0,0 +1,21 @@ +cmsdata['head']['forceCompile'] ) ){ + $smarty->force_compile = true; + } + $this->smarty->display($path); + } + } + + $controller = new FetchWidget(); + $controller->index(); + + +?> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/hotsitecustom.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/hotsitecustom.php new file mode 100755 index 000000000..a5198d9d7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/hotsitecustom.php @@ -0,0 +1,175 @@ + array("status" => 200, "info" => "success"), + //数据没有改变 + '304' => array("status" => 304, "info" => "data not modified"), + //参数传递错误 + '401' => array("status" => 401, "info" => "wrong parameters"), + //读取文件不存在 + '404' => array("status" => 404, "info" => "file not found") + ); + public function _before(){ + //参数校验 + $this->statusCode = $this->_check_param(); + //校验错误退出 + if ( $this->statusCode !== 200 ){ + $this->_error( $this->statusCode ); + } + } + public function index(){ + // 格式化数据 + $this->data = $this->_format($this->data); + + // 将md5值合入数据中 + $this->data = array_merge_recursive($this->infoList[$this->statusCode], array("md5" => $this->md5), array("data" => $this->data)); + + $this->_success($this->data); + } + + /* + * 参数校验 + */ + private function _check_param(){ + $this->country = $_GET['country']; + $this->callback = $_GET['callback']; + // PC版访问类型为web,移动版为m,用作数据路径拼接 + $this->hostType = $_GET['ismobile'] == true ? 'm' : 'web'; + + //参数校验 + if(empty($this->country) || !empty($this->callback) && !preg_match('/^\w+$/', $this->callback)){ + return 401; + } + + $dataPath = DATA_ROOT . "{$this->hostType}/{$this->country}/" . self::MODULE_NAME . "/data.php"; + //检测数据是否存在 + if( !file_exists( $dataPath ) ){ + return 404; + //读取数据 + } else{ + include_once $dataPath; + $this->data = $root; + return $this->_check_md5($dataPath); + } + } + + /* + * md5校验 + */ + private function _check_md5($dataPath) { + $md5 = $_GET['md5']; + // 获取data.php文件md5值,并截取中间16位以缩短请求 + $this->md5 = substr(md5_file($dataPath),8,16); + if ($md5 === $this->md5) { + return 304; + } + return 200; + } + + /* + * 格式化数据 + */ + private function _format($data) { + if (!empty($data['body'])) { + $data = $data['body']; + // 自定义网址映射数据格式化 + if (!empty($data['customSites'])) { + $customData = array(); + foreach ($data['customSites'] as $value) { + // 用host值做key + $customData[trim($value['host'], '/')] = $value; + unset($customData[$value['host']]['host']); + } + $data['customSites'] = $customData; + } + // 推荐网址列表数据格式化 + if (!empty($data['recommendList'])) { + $recommendData = array(); + foreach ($data['recommendList'] as $value) { + // 用category值做为key,以list数组内容作为值 + $recommendData[$value['category']] = $value['list']; + } + $data['recommendList'] = $recommendData; + } + // 去掉注释字段 + $this->_removeComments($data); + } + return $data; + } + + /* + * 清除数据中以下划线开头的注释,例如:'_img' => '这是图片' + * 支持递归 + */ + private function _removeComments(&$arr) { + if (!is_array($arr)) { + return false; + } + foreach ($arr as $key => $value) { + if (is_array($arr[$key])) { + $this->_removeComments($arr[$key]); + } else if ($key[0] === '_') { + unset($arr[$key]); + } + } + } + + /* + * 错误反馈 + */ + private function _error( $statusCode ){ + // 支持json|jsonp格式返回结果 + if(empty($this->callback)) { + echo json_encode( $this->infoList[$statusCode] ); + } else { + echo $this->callback."(". json_encode( $this->infoList[$statusCode] ) .")"; + } + exit; + } + + /* + * 成功反馈 + */ + private function _success( $content ){ + // 支持json|jsonp格式返回结果 + if(empty($this->callback)) { + echo json_encode( $content ); + } else { + echo $this->callback."(". json_encode( $content ) .")"; + } + exit; + } + } + + $controller = new HotSiteCustom(); + $controller->index(); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsData.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsData.class.php new file mode 100755 index 000000000..8c759ce91 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsData.class.php @@ -0,0 +1,72 @@ +",var_export(json_decode( $content,true),true)); + //建立目录 + mkdir( dirname( $dataPath ) , 0777, true ); + //建立文件 + file_put_contents( $dataPath, $phpData ); + } + } + + /** + * 递归合并数组把b合并到a + * @param array 合并的base 数组(a) + * @param array 需合并的数组(b) + * @return array + */ + static function array_merge_recursive_new() { + $arrays = func_get_args(); + $base = array_shift($arrays); + foreach ($arrays as $array) { + reset($base); //important + while (list($key, $value) = @each($array)) { + if (is_array($value) && @is_array($base[$key])) { + $base[$key] = self::array_merge_recursive_new($base[$key], $value); + } + else { + $base[$key] = $value; + } + } + } + return $base; + } +} + + +?> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsDataAdapter.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsDataAdapter.class.php new file mode 100755 index 000000000..816dae87b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsDataAdapter.class.php @@ -0,0 +1,163 @@ + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsJsondata.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsJsondata.class.php new file mode 100755 index 000000000..c0313eff3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/cmsdata/cmsJsondata.class.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/jsonformat/jsonformat.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/jsonformat/jsonformat.class.php new file mode 100755 index 000000000..39f1779d7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/lib/jsonformat/jsonformat.class.php @@ -0,0 +1,70 @@ + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/openapi.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/openapi.php new file mode 100755 index 000000000..54122de34 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/openapi.php @@ -0,0 +1,216 @@ + array('status'=>401,'info'=>'param error'), + //未知文件处理类型(前端不能处理) + '402' => array('status'=>402,'info'=>'don\'t handle file type'), + //读取文件不存在 + '404' => array("status"=>404,"info"=>'file not find'), + //获取成功,返回的数据格式 + '200' => array('status'=>200,"info"=>'success', + //静态资源 + 'resource_map'=>array( + 'style' => '', + 'script' => '', + ), + //html片段 + 'pagelets'=>'' + ) + ); + + //不同的文件类型对应前端不同字段(前端需要根据不同的字段进行不同的处理) + protected $frontHandlerList = array( + 'html' => 'pagelets', + 'tpl' => 'pagelets', + 'css' => 'style', + 'js' => 'script' + ); + protected $frontHandler = ''; + + //处理句柄函数 + public $handler = array( + //js处理方式 + 'js' => 'file_get_contents' + ); + + //主站fis tpl内置echo ,所以不需要返回值 + public $notReturn = array('fis'); + //初始化controller + function _before(){ + parent::_before(); + //tpl的处理方式 + $this->handler['tpl'] = array($this->smarty,"fetch"); + //fis的处理方式 + $this->handler['fis'] = array($this->smarty,"display"); + //私有数据merge + if( $_GET['dataDir'] ){ + $this->privateDataDir = $_GET['dataDir']; + } + $dataDir = DATA_ROOT."web/{$this->country}/".rtrim( $this->privateDataDir,"/" ) . "/data.php"; + $baseDataDir = DATA_ROOT."web/{$this->country}/base/data.php"; + // + if( !preg_match('/\d/',$this->country ) ){ + if ( file_exists($baseDataDir) ) { + include_once $baseDataDir; + $this->smarty->cmsdata = $this->merge_data($this->smarty->cmsdata,$root); + } + if ( file_exists($dataDir) ) { + include_once $dataDir; + $this->smarty->cmsdata = $this->merge_data($this->smarty->cmsdata,$root); + } + } + $this->cmsData = $this->smarty->cmsdata ; + $this->smarty->assign('root',$this->cmsData); + $this->smarty->assign('body',$this->cmsData['body']); + $this->smarty->assign('head',$this->cmsData['head']); + $this->smarty->assign('foot',$this->cmsData['foot']); + $this->smarty->assign('urlparam',$this->cmsData['urlparam']); + $this->urlParam = $this->cmsData['urlparam']; + } + //入口函数 + function index(){ + + //参数校验 + $statusCode = $this->_check_param(); + if ( $statusCode !== 200 ){ + $this->_error( $statusCode ); + } + + //初始化 + $this->_Init(); + + //根据文件后缀或者参数选择不同的处理方式 + $handler = $this->isFis ? 'fis' : $this->handlerFileType; + //获取请求内容 + $content = call_user_func_array($this->handler[$handler], array($this->path)); + //是否需要返回值 + if( !in_array($handler, $this->notReturn) ){ + $this->_success( $content ); + } + + } + /* + * fis widget初始化函数 + */ + function _init(){ + //是否需要fis模块的初始化 + $fisWidget = $this->urlParam['pagelets']; + //主站模块需初始化fis widget + if( $fisWidget && $this->handlerFileType === 'tpl' ){ + //根据参数pagelets判断是否是fis模块 + $this->isFis = true; + require_once FIS_SMARTY_PLUGINS_DIR."lib/FISPagelet.class.php"; + FISPagelet::init(); + $this->smarty->assign('openApi',array( + 'widgetPathRoot'=> $this->fisWidgetRootPath, + 'widgetId'=> $fisWidget + )); + $this->smarty->registerFilter('output', array('FISPagelet', 'renderResponse')); + } + + } + /* + * 参数校验 + */ + function _check_param(){ + //获取widget所在根路径 + $modulePath = $this->urlParam['module']; + //获取widgetname + $widgetName = $this->urlParam['widgetName']; + //是否指定文件类型 + if( $this->urlParam['fileType'] ){ + $this->handlerFileType = $this->urlParam['fileType']; + } + //检测参数是否可用 + if ( !$widgetName || !$modulePath ){ + return 401; + } + + $widgetPath = WEBROOT_PATH."template/{$modulePath}/{$this->widgetPrefix}//{$widgetName}/{$widgetName}.{$this->handlerFileType}"; + $this->fisWidgetRootPath = "{$modulePath}:{$this->widgetPrefix}"; + //检测模板是否存在 + if( !file_exists( $widgetPath ) ){ + return 404; + } + $this->frontHandler = $this->frontHandlerList[ $this->handlerFileType ]; + //检测前端是否有对应的handler处理对应的文件类型 + if( !$this->frontHandler ){ + return 402; + } + $this->path = $widgetPath; + + return 200; + } + + /* + * 错误反馈 + */ + private function _error( $statusCode ){ + echo json_encode( $this->infoList[$statusCode] ); + exit; + } + + /* + * 成功反馈 + */ + private function _success( $content ){ + //检测前端是否有对应的方式处理对应的文件类型 + //html + if( $this->frontHandler === 'pagelets' ){ + $this->infoList['200'][$this->frontHandler] = $content; + //静态资源 + } else{ + $this->infoList['200']['resource_map'][$this->frontHandler] = $content; + } + echo json_encode( $this->infoList['200'] ); + exit; + } + private function merge_data() { + $arrays = func_get_args(); + $base = array_shift($arrays); + foreach ($arrays as $array) { + reset($base); //important + while (list($key, $value) = @each($array)) { + if (is_array($value) && @is_array($base[$key])) { + $base[$key] = $this->merge_data($base[$key], $value); + } + else { + $base[$key] = $value; + } + } + } + return $base; + } + } + +$sidebar = new OpenApi(); +$sidebar->index(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/page/index.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/page/index.json new file mode 100755 index 000000000..9e26dfeeb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/page/index.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/hotsitesextra/Hotsitesextra.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/hotsitesextra/Hotsitesextra.class.php new file mode 100755 index 000000000..07f02d7e4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/hotsitesextra/Hotsitesextra.class.php @@ -0,0 +1,40 @@ +_mod_data_key = $config['mod']; + $this->_mod_data_sub_key = $config['dataKey']; + } + public function process(&$origin_data, $params){ + //加载用于merge的干预数据 + $data_path = dirname(__FILE__)."/../../"; + $data_prefix_path = $data_path."data/"; + if(empty($params) || empty($params['datapath'])){ + return false; + } + $data_path = $data_prefix_path . ltrim($params['datapath'], '/'); + include $data_path; //$root + if(empty($root) || empty($root['body']) || empty($root['body'][$this->_mod_data_key])){ //plugin 不负责创建结构,只负责merge数据,必须要提前保证结构存在 + return false; + } + + //对数据进行合并,只做单层的merge + if(!empty($this->_mod_data_sub_key)){ + if(empty($origin_data[$this->_mod_data_key][$this->_mod_data_sub_key])){ + $origin_data[$this->_mod_data_key][$this->_mod_data_sub_key] = array(); + } + $mod_data = &$origin_data[$this->_mod_data_key][$this->_mod_data_sub_key]; + $api_data = $root['body'][$this->_mod_data_key][$this->_mod_data_sub_key]; + } else { //hotsites这里,暂时没有用到这块 + $mod_data = &$origin_data[$this->_mod_data_key]; + $api_data = $root['body'][$this->_mod_data_key]; + } + foreach($api_data as $key=>$value){ + $mod_data[$key] = $value; + } + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/hotsitesextra/Hotsitesextra.inc.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/hotsitesextra/Hotsitesextra.inc.php new file mode 100755 index 000000000..7fc3b08d6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/hotsitesextra/Hotsitesextra.inc.php @@ -0,0 +1,14 @@ + 'hotsitsextra', + 'type' => 'common', //personal,common,sample 用于标识插件的类别,方便后续框架做统一化处理 + 'mod' => 'hotSites', //声明需要干预的模块及数据标识,一般跟CMS中的$root.body.{$mod}对应 + 'dataKey' => 'extra', //特殊情况需要干预的是子key + //'dataProcess' => 'edit', //add,del,edit,merge 描述数据获得后,处理方式; 本插件中是edit + 'dataSource' => array('file'), //db,redis,memcached,file,api 用于注册数据获取源,方便后续框架做统一初始化 + //'actionChain' => array('process'), //执行行为序列,便用组合操作 + 'cache' => false //5(s), 0(s) 执行缓存的逻辑 +); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacerequestsigner.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacerequestsigner.class.php new file mode 100755 index 000000000..4c03ce1b7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacerequestsigner.class.php @@ -0,0 +1,88 @@ +token = $token; + } + + public function getSignature($queryTerm) { + $value = $this->getFormattedDateString() . $this->token . $queryTerm; + return $this->hashValue($value); + } + + /** + * Gets the date/time to the nearest minute as YYYYMMDDHHMM + * + * @return string + */ + private function getFormattedDateString() { + // Save the current timezone, get a date as GMT and reset timezone + $timezone = date_default_timezone_get(); + date_default_timezone_set('GMT'); + $datetime = date('YmdHi', $this->getTimeToNearestMinute()); + date_default_timezone_set($timezone); + + return $datetime; + } + + /** + * Gets the date/time +30 seconds as a unix timestamp + * + * @return int + */ + private function getTimeToNearestMinute() { + return time() + 30; + } + + /** + * Gets a base64 encoded SHA1 hash + * + * @param string $input + * + * @return string + */ + private function hashValue($input) { + $bytes = $this->hashSHA1($input); + + return $this->encodeUrlSafeBase64($bytes); + } + + /** + * Gets a SHA1 hash + * + * @param string $input + * + * @return string + */ + private function hashSHA1($input) { + // Trial and error shows this must be binary result + return sha1($input, true); + } + + /** + * Creates a URL safe base64 encoded string + * + * @param string $input + * + * @return string + */ + private function encodeUrlSafeBase64($input) { + // Apache code replaces + with -, / with _ and trims padding (=) + return str_replace(array('+', '/'), array('-', '_'), trim(base64_encode($input), '==')); + } +} +?> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacetoken.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacetoken.class.php new file mode 100755 index 000000000..c4fd99fdf --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacetoken.class.php @@ -0,0 +1,36 @@ +getSignature($query); + + if(empty($signer) || !empty($origin_data['infoSpaceSigner'])) { + return false; + } + + // 将获取到的signer merge进cms数据中 + $origin_data['infoSpaceSigner'] = $signer; + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacetoken.inc.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacetoken.inc.php new file mode 100755 index 000000000..9c278e715 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/infospacetoken/Infospacetoken.inc.php @@ -0,0 +1,14 @@ + 'infospacetoken', + 'type' => 'common', //personal,common,sample 用于标识插件的类别,方便后续框架做统一化处理 + 'mod' => 'body', //声明需要干预的模块及数据标识,一般跟CMS中的$root.body.{$mod}对应 + 'dataKey' => '', //特殊情况需要干预的是子key + //'dataProcess' => 'edit', //add,del,edit,merge 描述数据获得后,处理方式; 本插件中是edit + 'dataSource' => array('api'), //db,redis,memcached,file,api 用于注册数据获取源,方便后续框架做统一初始化 + //'actionChain' => array('process'), //执行行为序列,便用组合操作 + 'cache' => false //5(s), 0(s) 执行缓存的逻辑 +); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/recommendhottab/Recommendhottab.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/recommendhottab/Recommendhottab.class.php new file mode 100755 index 000000000..99112c760 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/recommendhottab/Recommendhottab.class.php @@ -0,0 +1,105 @@ +initRecomRedis($suite)){ + //todo error + } + //]]]]]]]]]] + $this->_redis_key_user = self::KEY_PREFIX . $country .'_'. $baiduid; + $this->_mod_data_key = $config['mod']; + $this->_mod_data_sub_key = $config['dataKey']; + } + /** + * @params $origin_data {array} 用于干预的源数据 + * @params $params {array} 配置的行为参数 + */ + public function process(&$origin_data, $params){ + if(!is_object($this->recomRedis)){ + return; + } + try{ + $read_redis = $this->recomRedis->getRedis(false); //选slave读 + //从推荐中获取数据 + $recom_data_list = $read_redis->zRevRange($this->_redis_key_user, 0, -1); + //避免Redis上不了 + }catch(Exception $e){ + return; + } + //$recom_data_list = array('games'); //TODO!!!!!!!!!!!!!!!! + if(empty($recom_data_list)){ + return; + } + //根据推荐的数据,调整TAB数据的排序 + if(!empty($this->_mod_data_sub_key)){ + $mod_data = &$origin_data[$this->_mod_data_key][$this->_mod_data_sub_key]; + } else { + $mod_data = &$origin_data[$this->_mod_data_key]; + } + $tmp_data = $mod_data; + $mod_data = array(); //重置 + $mod_key_list = array(); + //根据权重选出排序 + foreach($recom_data_list as $mod_key){ + foreach($tmp_data as $mod){ + if($mod['type'] === $mod_key){ //TODO: game --> games + $mod_data[] = $mod; + $mod_key_list[] = $mod_key; + } + } + } + foreach($tmp_data as $mod){ + if(!in_array($mod['type'], $mod_key_list)){ //未处理的才加入 + $mod_data[] = $mod; + $mod_key_list[] = $mod['type']; + } + } + unset($tmp_data); + unset($mod_data); + unset($origin_data); + } + /** + * 个性化推荐用的Redis; 这个配置跟其他的不一样,是多个Redis组的 + * @params {Number} $suite 选择哪个组 + */ + protected function initRecomRedis($suite=0) { + $env = GlobalEnv::Env; + $redisConfig = GlobalConfig::$recomRedisConfig[$env]; + try { + $redis_source = new Air_Redis($redisConfig[$suite]); + } catch (Exception $error) { + return false; + } + $this->recomRedis = $redis_source; //TODO 奇怪,如果这里直接getRedis,后面的操作会反馈closed,立即操作则可心 + return true; + } + function __destruct() { + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/recommendhottab/Recommendhottab.inc.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/recommendhottab/Recommendhottab.inc.php new file mode 100755 index 000000000..5fa327f86 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/recommendhottab/Recommendhottab.inc.php @@ -0,0 +1,14 @@ + 'recommendhottab', + 'type' => 'personal', //personal,common,sample 用于标识插件的类别,方便后续框架做统一化处理 + 'mod' => 'recommand', //声明需要干预的模块及数据标识,一般跟CMS中的$root.body.{$mod}对应 + 'dataKey' => 'mods', //特殊情况需要干预的是子key + //'dataProcess' => 'edit', //add,del,edit,merge 描述数据获得后,处理方式; 本插件中是edit + 'dataSource' => array('redis'), //db,redis,memcached,file,api 用于注册数据获取源,方便后续框架做统一初始化 + //'actionChain' => array('process'), //执行行为序列,便用组合操作 + 'cache' => false //5(s), 0(s) 执行缓存的逻辑,这里因针对个人,是不需要的 +); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/sidebarapplist/Sidebarapplist.class.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/sidebarapplist/Sidebarapplist.class.php new file mode 100755 index 000000000..9ef3678f8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/sidebarapplist/Sidebarapplist.class.php @@ -0,0 +1,61 @@ + $value) { + $mod_data[$key] = $value; + } + } + + public function process(&$origin_data, $params){ + $data_path = dirname(__FILE__)."/../../"; + $data_prefix_path = $data_path."data/"; + if(empty($params) || empty($params['datapath'])){ + return false; + } + $data_path = $data_prefix_path . ltrim($params['datapath'], '/'); + + // root + if( !file_exists( $data_path ) ) { + return false; + } + include_once $data_path; + + if(empty($root) || empty($root['sidebar'])){ //只针对sidebar的applist数据,保证其中有sidebar字段 + return false; + } + + //将sidebar字段merge进$root.body + $this->_data_merge($origin_data['sidebar'], $root['sidebar']); + + //如果有defaultApp字段,则merge进$root.body + if(!empty($params['datakey'])) { + foreach ($params['datakey'] as $value) { + $this->_data_merge($origin_data[$value], $root[$value]); + } + } + + //合并mis数据 + if(!empty($params['misdatapath'])) { + $mis_data_path = $data_prefix_path . ltrim($params['misdatapath'], '/'); + if( file_exists( $mis_data_path ) ) { + include_once $mis_data_path; + // 合并sidebar list数据 + foreach ($root['sidebar']['list'] as $item) { + $origin_data['sidebar']['list'][]= $item; + } + // 合并sidebar气泡数据 + foreach ($root['sidebar']['guideBubble']['list'] as $item) { + $origin_data['sidebar']['guideBubble']['list'][]= $item; + } + } + } + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/sidebarapplist/Sidebarapplist.inc.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/sidebarapplist/Sidebarapplist.inc.php new file mode 100755 index 000000000..e2a292f14 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/plugin/sidebarapplist/Sidebarapplist.inc.php @@ -0,0 +1,14 @@ + 'sidebarapplist', + 'type' => 'common', //personal,common,sample 用于标识插件的类别,方便后续框架做统一化处理 + 'mod' => 'sidebar', //声明需要干预的模块及数据标识,一般跟CMS中的$root.body.{$mod}对应 + 'dataKey' => '', //特殊情况需要干预的是子key + //'dataProcess' => 'edit', //add,del,edit,merge 描述数据获得后,处理方式; 本插件中是edit + 'dataSource' => array('file'), //db,redis,memcached,file,api 用于注册数据获取源,方便后续框架做统一初始化 + //'actionChain' => array('process'), //执行行为序列,便用组合操作 + 'cache' => false //5(s), 0(s) 执行缓存的逻辑 +); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/resource.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/resource.php new file mode 100755 index 000000000..9382264c2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/resource.php @@ -0,0 +1,42 @@ +"image/png", + ".jpg"=>"image/jpeg", + ".swf"=>"application/x-shockwave-flash", + ".gif"=>"image/gif"); + /*重定向resorce*/ + $url = $_SERVER['SCRIPT_URL'] ? $_SERVER['SCRIPT_URL'] : $_SERVER['REQUEST_URI']; + $url = preg_replace( '/\?.*/', "", $url); + $resource_url = "http://br.hao123.com{$url}"; + $resourceDir = dirname(__FILE__).$url; + if ( !is_file($resourceDir) ){ + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $resource_url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); + $result = curl_exec($ch); + if( $result != false ){ + //建立目录 + $lastPos = strrpos($resourceDir, "/"); + $dir = substr($resourceDir, 0, $lastPos); + mkdir($dir,0777,true); + //建立文件 + file_put_contents($resourceDir, $result); + echo $result; + exit; + } + + //建立目录 + + } else{ + $result = file_get_contents($resourceDir); + $type = substr( $resourceDir, strrpos( $resourceDir, "." ) ); + $type = $contentType[$type]; + header( "Content-Type:$type;" ); + echo $result; + exit; + } + + +?> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/route.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/route.php new file mode 100755 index 000000000..db5c182d3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/route.php @@ -0,0 +1,20 @@ +php路由映射 + $routeMap = array( + "fetchwidget"=>"fetchwidget", + "api"=>"api", + "openapi"=>"openapi", + "applistapi"=>"applistapi", + "hotsitecustom"=>"hotsitecustom", + "static304"=>"static304/static304", + ); + + if( preg_match("/".implode('|', array_keys($routeMap ) )."/",$route_url,$matchArray)){ + require_once $route_root_dir. $routeMap[ $matchArray[0] ] .".php"; + } else{ + require_once $route_root_dir."BaseController.php"; + } \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/static304/static304.php b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/static304/static304.php new file mode 100755 index 000000000..18d7d7d58 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/test/static304/static304.php @@ -0,0 +1,20 @@ +"image/png", + ".jpg"=>"image/jpeg", + ".swf"=>"application/x-shockwave-flash", + ".gif"=>"image/gif", + ".js"=>"text/javascript"); + /*重定向resorce*/ + $url = $_SERVER['SCRIPT_URL'] ? $_SERVER['SCRIPT_URL'] : $_SERVER['REQUEST_URI']; + $url = preg_replace( '/\?.*/', "", $url); + $resourceDir = WEBROOT_PATH.$url; + $result = file_get_contents($resourceDir); + $type = substr( $resourceDir, strrpos( $resourceDir, "." ) ); + $type = $contentType[$type]; + header( "Content-Type:$type;" ); + echo $result; + exit; + + +?> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/upload.py b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/upload.py new file mode 100755 index 000000000..2de41e1d1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/upload.py @@ -0,0 +1,278 @@ +#!/usr/bin/env python +# -*- encoding:utf-8 -*- +""" +upload外壳脚本 +Created on 2014-1-27 +@author: wangtaize@baidu.com +@copyright: www.baidu.com +""" +import logging +import os +import shutil +import socket +import subprocess +import sys +import tempfile +import urllib +import urllib2 +import zipfile + + +# 用户目录 +USER_FOLDER = os.path.expanduser('~') + +# 更新接口 +UPDATE_HTTP_HOST = "http://fatcat.baidu.com/ota/update" +# 更新接口 +VERSION_HTTP_HOST = "http://fatcat.baidu.com/ota/version" +# module save path +MODULE_ROOT_PATH = os.sep.join([USER_FOLDER, ".cooder"]) +if not os.path.exists(MODULE_ROOT_PATH): + os.mkdir(MODULE_ROOT_PATH) +VERSION_FILE = os.sep.join([MODULE_ROOT_PATH, "version.txt"]) +USE_SHELL = sys.platform.startswith("win") + + +def run_shell_with_returncode(command, universal_newlines=True, + useshell=None, env=None): + """执行本地系统命令函数 + + args: + command: 执行命令list + universal_newlines, + useshell + env: 环境变量 + return: + returncode: 进程退出状态码 + output: 标准输出 + errout: 错误输出 + """ + useshell = USE_SHELL + env = env or os.environ + try: + p = subprocess.Popen(command, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=useshell, + universal_newlines=universal_newlines, + env=env) + output, errout = p.communicate() + return p.returncode, output, errout + except Exception as e: + return -1, None, str(e) + + +class HttpService(object): + """http工具类,支持get post 以及上传文件 + """ + def __init__(self, logger=None): + self.logger = logger or logging.getLogger(__name__) + + def post(self, url, params): + """post method 函数 + + args: + url: 请求的url + parame: 请求参数,支持dict以及tuple + return: + content: 返回的文本内容 + status: 请求成功与否 + """ + return self.__service(url, params) + + def get(self, url): + """get method 函数 + + args: + url: 请求的url + return: + content: 返回的文本内容 + status: 请求成功与否 + """ + return self.__service(url) + + def __service(self, url, params=None, timeout=50): + old_timeout = socket.getdefaulttimeout() + socket.setdefaulttimeout(timeout) + try: + # POST + if params: + self.logger.debug('post %s params[%s]' % (url, params)) + request = urllib2.Request(url, urllib.urlencode(params)) + # GET + else: + self.logger.debug('get %s params[%s]' % (url, params)) + request = urllib2.Request(url) + request.add_header('Accept-Language', 'zh-cn') + response = urllib2.urlopen(request) + content = response.read() + response.close() + self.logger.debug('content->%s, code->%d' + % (content, response.code)) + if response.code == 200: + return content, True + return content, False + except Exception as ex: + return str(ex), False + finally: + socket.setdefaulttimeout(old_timeout) + + +class ImportModuleException(Exception): + """导入模块异常 + """ + pass + + +class CheckVersionException(Exception): + """检查模块版本异常 + """ + pass + + +class PythonVersionException(Exception): + """检查python版本不符合运行要求异常 + """ + pass + + +class DownloadModuleException(Exception): + """下载模块失败异常 + """ + pass + + +class UploadManager(object): + """upload 模块更新管家 + """ + def __init__(self, http_service): + self.http_service = http_service + + def need_update(self, version_file_path, version_url): + """检查是否需要更新模块 + + args: + version_file_path: 本地存放version.txt位置 + version_url + return: + need_update: False|True, 是否需要更新 + change_list: 更新列表 + exception: + CheckVersionException: 获取更新状态失败时抛出 + """ + if not os.path.exists(version_file_path): + raise CheckVersionException("version file(%s) does not exist" + % VERSION_FILE) + fd = open(version_file_path, "rb") + content_str = fd.readline() + fd.close() + content_old = eval(content_str) + response_content_str, status = self.http_service.get(version_url) + if not status: + raise CheckVersionException("fail to fetch the lastest version") + response_content = eval(response_content_str) + if response_content['status'] != 1: + raise CheckVersionException("fail to fetch the lastest version") + content_new = response_content['data'] + if content_old["function_version"] == content_new["function_version"]\ + and content_old["bug_version"] == content_new["bug_version"]: + return False, None + return True, content_new['change_list'] + + def update(self, module_path, update_url): + """更新模块操作,先删除本地缓存的模块代码,再从服务端获取最新模块代码 + + args: + module_path: 本地模块代码存储路径 + update_url: 下载模块代码url + """ + tmp_path = tempfile.mkdtemp() + tmp_module_path = ".cooder" + sb_tmp_module_path = os.sep.join([tmp_path, tmp_module_path]) + os.mkdir(sb_tmp_module_path) + update_zip_path = self._download_module(update_url, sb_tmp_module_path) + update_zip = zipfile.ZipFile(update_zip_path, 'r') + update_zip.extractall(path=sb_tmp_module_path) + update_zip.close() + os.remove(update_zip_path) + if os.path.exists(module_path): + shutil.rmtree(module_path) + shutil.copytree(sb_tmp_module_path, module_path) + + def _download_module(self, update_url, + save_path, file_name="update.zip"): + """实际下载代码逻辑 + """ + response_content, status = self.http_service.get(update_url) + if not status: + raise DownloadModuleException("fail to download module," + " please try again :(") + if save_path.endswith(os.sep): + save_path = save_path[:-1] + try: + full_path = os.sep.join([save_path, file_name]) + fd = open(full_path, "wb") + fd.write(response_content) + fd.close() + return full_path + except: + raise DownloadModuleException("fail to download module," + " please try again :(") + + def import_module(self, module_path): + """导入模块,就模块路径加入到系统path, 注意添加方式 + args: + module_path,模块代码路径 + exceptions: + ImportModuleException,当出入路径不存在时抛出 + """ + if not os.path.exists(module_path): + raise ImportModuleException("module(%s) does not exit" + % module_path) + sys.path = [module_path] + sys.path + + def has_cached_module(self, version_file_path): + """检查本地是否有缓存的模块代码 + """ + if os.path.exists(version_file_path): + return True + return False + + def check_py_version(self): + """检查本地python版本 + """ + version = sys.version + if version and version.startswith("2.7"): + return + raise PythonVersionException("upload needs python with version 2.7" + " as it's runtime :(") + + +if __name__ == "__main__": + http_service = HttpService() + upload_manager = UploadManager(http_service) + try: + upload_manager.check_py_version() + if not upload_manager.has_cached_module(VERSION_FILE): + print "initializing ... :~" + upload_manager.update(MODULE_ROOT_PATH, UPDATE_HTTP_HOST) + else: + change_list = [] + try: + need_update, change_list = upload_manager.need_update( + VERSION_FILE, VERSION_HTTP_HOST) + except CheckVersionException as _: + need_update = False + if need_update: + print "updating ... :~" + upload_manager.update(MODULE_ROOT_PATH, UPDATE_HTTP_HOST) + print "upload has following updates:" + for index, change in enumerate(change_list): + print "%d.%s" % (index + 1, change) + upload_manager.import_module(MODULE_ROOT_PATH) + from client import main as MAIN + MAIN.main() + except KeyboardInterrupt: + sys.exit(-1) + except Exception as ex: + print str(ex) diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/banner-frame/banner-frame.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/banner-frame/banner-frame.tpl new file mode 100755 index 000000000..18b6048bd --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/banner-frame/banner-frame.tpl @@ -0,0 +1,16 @@ + + + +<%script%> +require.async("common:widget/ui/jquery/jquery.js", function($){ + $(function(){ + var wrap = $(".banner-frame-wrap"); + wrap.html($("textarea", wrap).text()); + }); +}); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/Gruntfile.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/Gruntfile.js new file mode 100755 index 000000000..830839bfb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/Gruntfile.js @@ -0,0 +1,170 @@ +/*jshint camelcase: false*/ +'use strict'; +var mountFolder = function(connect, dir) { + return connect.static(require('path').resolve(dir)); +}; + +var makeFilesMap = function(src, dist, match, replace) { + var ret = {}; + grunt.file.recurse(src, function(abspath, rootdir, subdir, filename) { + console.log(filename) + }); + return ret; +} + +module.exports = function(grunt) { + + require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); + + grunt.initConfig({ + app: { + src: 'src', + dist: 'dist', + test: 'test' + }, + watch: { + options: { + spawn: false + }, + + css: { + files: ['<%= app.src %>/*.css'], + tasks: ['build', 'shell:refresh'] + } + }, + connect: { + server: { + options: { + port: 8011, + hostname: '127.0.0.1', + base: '<%= app.test %>', + keepalive: true, + middleware: function (connect, options) { + return [ + // Serve static files. + connect.static(options.base), + // Make empty directories browsable. + connect.directory(options.base), + ]; + } + } + } + }, + copy: { + test: { + files: [{ + expand: true, + dot: true, + cwd: '<%= app.dist %>', + dest: '<%= app.test %>/dist', + src: [ + '*.css' + ] + }] + } + }, + shell: { + refresh: { + // command: "osascript -e 'tell application \"Google Chrome Canary\" to activate' -e 'tell app \"System Events\" to keystroke \"r\" using {command down}'" + command: "osascript -e 'tell application \"Google Chrome\" to activate' -e 'tell app \"System Events\" to keystroke \"r\" using {command down}'" + } + }, + clean: { + dist: { + files: [{ + dot: true, + src: [ + '<%= app.dist %>' + ] + }] + }, + test: { + files: [{ + dot: true, + src: [ + '<%= app.test %>/dist' + ] + }] + } + }, + cssmin: { + dist: { + files: { + '<%= app.dist %>/base.ltr.css': [ + '<%= app.src %>/reset.css' + , '<%= app.src %>/layout.css' + , '<%= app.src %>/tool.css' + , '<%= app.src %>/default.css' + , '<%= app.src %>/link.css' + // , '<%= app.src %>/icon.css' + ], + '<%= app.dist %>/base.rtl.css': [ + '<%= app.src %>/reset.css' + , '<%= app.src %>/layout.rtl.css' + , '<%= app.src %>/tool.css' + , '<%= app.src %>/default.css' + , '<%= app.src %>/link.css' + // , '<%= app.src %>/icon.rtl.css' + ], + '<%= app.dist %>/base.rtl.ie.css': [ + '<%= app.src %>/reset.css' + , '<%= app.src %>/reset.ie.css' + , '<%= app.src %>/layout.rtl.css' + , '<%= app.src %>/layout.rtl.ie.css' + , '<%= app.src %>/tool.css' + , '<%= app.src %>/tool.ie.css' + , '<%= app.src %>/default.css' + , '<%= app.src %>/link.css' + // , '<%= app.src %>/icon.rtl.css' + // , '<%= app.src %>/icon.rtl.ie.css' + ], + '<%= app.dist %>/base.ltr.ie.css': [ + '<%= app.src %>/reset.css' + , '<%= app.src %>/reset.ie.css' + , '<%= app.src %>/layout.css' + , '<%= app.src %>/layout.ie.css' + , '<%= app.src %>/tool.css' + , '<%= app.src %>/tool.ie.css' + , '<%= app.src %>/default.css' + , '<%= app.src %>/link.css' + // , '<%= app.src %>/icon.css' + // , '<%= app.src %>/icon.ie.css' + ] + } + } + /*, theme: { + files: function(src, dist, match) { + var ret = {}; + grunt.file.recurse(src, function(abspath, rootdir, subdir, filename) { + if(match.test(filename)) { + ret[dist + filename] = src + filename; + } + }); + return ret; + }('app/styles/theme/', 'dist/styles/theme/', /\.css$/) + }*/ + } + }); + +/*var connect = require('grunt-contrib-connect'); +grunt.registerTask('connect', 'Start a custom static web server.', function() { + grunt.log.writeln('Starting static web server in "test" on port 9001.'); + connect(connect.static('test')).listen(9001); +});*/ + + grunt.registerTask('test', [ + 'build', + 'clean:test', + 'copy:test', + 'connect' + ]); + + grunt.registerTask('build', [ + 'clean:dist', + 'cssmin' + ]); + + grunt.registerTask('default', [ + 'build' + ]); +}; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/README.md b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/README.md new file mode 100755 index 000000000..2c8c296b0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/README.md @@ -0,0 +1,165 @@ +# base-css + +完整版在 master 分支维护, 首页优化精简在 mini 分支维护 + +`git checkout mini` + +经过压缩精简, 同样功能 base-css 从 **9K** 减少到 **5K** + +## USAGE + +为保持主流浏览器体积最小, 拆分 IE6-8 为独立版本(`base.ie.css`) + +```html + + + + + +``` + +## BUILD & OUTPUT + +* 安装依赖 +`npm i` + +* 编译打包 +`grunt` + +* 测试(默认访问: 127.0.0.1:8011) +`grunt test` + +最终产出在 dist 目录, 分为 4 份文件 + +- base.rtl.css + +- base.ltr.css + +- base.rtl.ie.css + +- base.ltr.ie.css + +## COMPACT DETAIL + +### 1. 不常用的 form 控件 reset + +```css +input[type="search"] { + -webkit-appearance: textfield; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +``` + +### 2. html5 标签兼容 + +```css +audio,canvas,video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +audio:not([controls]) { + display: none; + height: 0; +} +``` + +### 3. 过旧的样式属性兼容 + +```css +.unselect,i,.i,.icon { + -moz-user-select: -moz-none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; +} +``` + +### 4. IE Hack + +```css +_zoom:expression(function(el) { + document.execCommand('BackgroundImageCache',false,true);el.style.zoom = "1"; +}(this)); +``` + +### 5. kill jQuery-UI + +待定, 依赖自定义网址重构 + +### 6. 不常用的工具类 + +```css +sup,.sup { + top: -0.5em; +} + +sub,.sub { + bottom: -0.25em; +} +``` + +### 7. 冗余代码 + +```css +@charset "utf-8"; +... +@charset "utf-8"; +``` + +### 8. 抽象继承冗余部分 + +```css +.icon-hot{ + display: inline-block; + width: 30px; + height: 11px; + margin-left: 3px; + cursor: pointer; + background: url(../img/i-rtl-hot.png?m=z) no-repeat; + _position: absolute; + font-size:0; +} +.icon-new{ + display: inline-block; + width: 30px; + height: 11px; + margin-left: 3px; + cursor: pointer; + background: url(../img/i-rtl-new.png?m=z) no-repeat; + _position: absolute; + font-size:0; +} +``` + +调整为: + +```css +.icon-hot, .icon-new, .icon-new_red{ +} +``` + +另外: base.css 中提供了很多常用工具类, 比如: + +```css +.hide{} /*隐藏*/ +.s-ptn{} /*通用margin/padding设置*/ +.unselect{} /*禁止文本选择*/ +.fl{} /*浮动*/ +.g /*grid 布局相关*/ +``` +请在源码或文档中熟悉, 避免业务代码冗余 + +## TEST + +`/test/index.html` diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/css-base.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/css-base.tpl new file mode 100755 index 000000000..0d0863432 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/css-base.tpl @@ -0,0 +1,16 @@ +<%* 声明对ltr/rtl的css依赖 *%> + +<%* *.ie.css 包含 IE 6-8 的支持, *.css 则对这部分进行了精简 *%> +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/css-base/dist/base.ltr.ie.css?__inline'); + <%if !empty($head.flowLayout)%> + @import url('/widget/css-base/dist/base.ltr.ie.flow.css?__inline'); + <%/if%> + <%else%> + @import url('/widget/css-base/dist/base.rtl.ie.css?__inline'); + <%if !empty($head.flowLayout)%> + @import url('/widget/css-base/dist/base.rtl.ie.flow.css?__inline'); + <%/if%> + <%/if%> +<%/style%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.css new file mode 100755 index 000000000..72ec4c7a8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.css @@ -0,0 +1 @@ +@charset "utf-8";*{margin:0;padding:0}fieldset,img,iframe{border:0}address,caption,cite,code,dfn,em,i,th,var{font-style:normal;font-weight:400}ul,li,ol{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}html{font-size:100%}body{vertical-align:baseline;background-color:transparent;-webkit-backface-visibility:hidden;}a:focus,a:hover,a:active,input:focus,textarea:focus{outline:0}img{vertical-align:middle}table{font-size:inherit;font:100%;border-collapse:collapse;border-spacing:0}td{vertical-align:top}th{text-align:inherit}iframe{display:block}textarea{resize:none;overflow:auto;vertical-align:top}button,input,select,textarea{font-size:100%;vertical-align:baseline}button,input{*overflow:visible;line-height:normal;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}button{cursor:pointer}button[disabled],input[disabled]{cursor:default}abbr,acronym{border:0;font-variant:normal}strong,.strong{font-weight:700}.l-fl{float:left}.l-fr{float:right}.l-ff,.l-g0{overflow:hidden}.l-wrap{width:960px;margin:0 auto}.l-g{width:100%}.l-g:before,.l-g:after{content:'';display:table}.l-g:after{clear:both}.l-g1-1{float:none}.l-g1-2{width:50%}.l-g1-3{width:33.33333%}.l-g2-3{width:66.66666%}.l-g1-4{width:25%}.l-g3-4{width:75%}.l-g1-5{width:20%}.l-g2-5{width:40%}.l-g3-5{width:60%}.l-g4-5{width:80%}.l-g1-8{width:12.5%}.l-g3-8{width:37.5%}.l-g5-8{width:62.5%}.l-g7-8{width:87.5%}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{float:left}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{float:left;margin-left:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[class*=l-g]:first-child{margin-left:0}.l-g1{width:70px}.l-g2{width:150px}.l-g3{width:230px}.l-g4{width:310px}.l-g5{width:390px}.l-g6{width:470px}.l-g7{width:550px}.l-g8{width:630px}.l-g9{width:710px}.l-g10{width:790px}.l-g11{width:870px}.l-g12{width:950px}.l-g_1{margin-left:80px!important}.l-g_2{margin-left:160px!important}.l-g_3{margin-left:240px!important}.l-g_4{margin-left:320px!important}.l-g_5{margin-left:400px!important}.l-g_6{margin-left:480px!important}.l-g_7{margin-left:560px!important}.l-g_8{margin-left:640px!important}.l-g_9{margin-left:720px!important}.l-g_10{margin-left:800px!important}.l-g_11{margin-left:880px!important}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{margin-right:10px}.unselect,i,.i,.icon{-moz-user-select:-moz-none;-webkit-user-select:none;-o-user-select:none;user-select:none}b,.b,.border{display:block;font:0/0 a}.s-ptn,.s-pvn,.s-pan{padding-top:0!important}.s-pts,.s-pvs,.s-pas{padding-top:5px!important}.s-ptm,.s-pvm,.s-pam{padding-top:10px!important}.s-ptl,.s-pvl,.s-pal{padding-top:20px!important}.s-prn,.s-phn,.s-pan{padding-right:0!important}.s-prs,.s-phs,.s-pas{padding-right:5px!important}.s-prm,.s-phm,.s-pam{padding-right:10px!important}.s-prl,.s-phl,.s-pal{padding-right:20px!important}.s-pbn,.s-pvn,.s-pan{padding-bottom:0!important}.s-pbs,.s-pvs,.s-pas{padding-bottom:5px!important}.s-pbm,.s-pvm,.s-pam{padding-bottom:10px!important}.s-pbl,.s-pvl,.s-pal{padding-bottom:20px!important}.s-pln,.s-phn,.s-pan{padding-left:0!important}.s-pls,.s-phs,.s-pas{padding-left:5px!important}.s-plm,.s-phm,.s-pam{padding-left:10px!important}.s-pll,.s-phl,.s-pal{padding-left:20px!important}.s-mtn,.s-mvn,.s-man{margin-top:0!important}.s-mts,.s-mvs,.s-mas{margin-top:5px!important}.s-mtm,.s-mvm,.s-mam{margin-top:10px!important}.s-mtl,.s-mvl,.s-mal{margin-top:20px!important}.s-mrn,.s-mhn,.s-man{margin-right:0!important}.s-mrs,.s-mhs,.s-mas{margin-right:5px!important}.s-mrm,.s-mhm,.s-mam{margin-right:10px!important}.s-mrl,.s-mhl,.s-mal{margin-right:20px!important}.s-mbn,.s-mvn,.s-man{margin-bottom:0!important}.s-mbs,.s-mvs,.s-mas{margin-bottom:5px!important}.s-mbm,.s-mvm,.s-mam{margin-bottom:10px!important}.s-mbl,.s-mvl,.s-mal{margin-bottom:20px!important}.s-mln,.s-mhn,.s-man{margin-left:0!important}.s-mls,.s-mhs,.s-mas{margin-left:5px!important}.s-mlm,.s-mhm,.s-mam{margin-left:10px!important}.s-mll,.s-mhl,.s-mal{margin-left:20px!important}.g-area-lazyload{visibility:hidden}.hide{display:none!important;visibility:hidden}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}.fl{float:left}.fr{float:right}.ibw{word-spacing:-.35em;letter-spacing:-.32em}.ib,.ibw .ib,s,.s,.space,.btn{display:inline-block}.ibw .ib{word-spacing:normal;letter-spacing:normal;vertical-align:top}.mod{overflow:hidden}.triangle{width:0;height:0;overflow:hidden;font-size:0;line-height:0;border-color:transparent;border-style:dashed;border-width:5px}html{background:#edf0ef}body{font:12px/1.231 arial,Tahoma,helvetica,clean,sans-serif;position:relative}a{text-decoration:none;color:#333}a:hover{text-decoration:none}.orange,.orange a{color:#f56f2f!important}.red,.red a{color:red!important}.green,.green a{color:green!important}.bold,.bold a{font-weight:600!important} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.ie.css new file mode 100755 index 000000000..eed7f8703 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.ie.css @@ -0,0 +1,470 @@ +@charset "utf-8"; +* { + margin: 0; + padding: 0 +} +fieldset, img, iframe { + border: 0 +} +address, caption, cite, code, dfn, em, i, th, var { + font-style: normal; + font-weight: 400 +} +ul, li, ol { + list-style: none +} +caption, th { + text-align: left +} +h1, h2, h3, h4, h5, h6 { + font-size: 100%; + font-weight: 400 +} +html { + font-size: 100% +} +body { + vertical-align: baseline; + background-color: transparent; + -webkit-backface-visibility: hidden; +} +a:focus, a:hover, a:active, input:focus, textarea:focus { + outline: 0 +} +img { + vertical-align: middle +} +table { + font-size: inherit; + font: 100%; + border-collapse: collapse; + border-spacing: 0 +} +td { + vertical-align: top +} +th { + text-align: inherit +} +iframe { + display: block +} +textarea { + resize: none; + overflow: auto; + vertical-align: top +} +button, input, select, textarea { + font-size: 100%; + vertical-align: baseline +} +button, input { + /**overflow: visible;*/ + line-height: normal; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box +} +button { + cursor: pointer +} +button[disabled], input[disabled] { + cursor: default +} +abbr, acronym { + border: 0; + font-variant: normal +} +strong, .strong { + font-weight: 700 +} +/*body { + _zoom:expression(function(el) { + document.execCommand('BackgroundImageCache', false, true); + el.style.zoom="1" + } + (this)) +}*/ +img { + -ms-interpolation-mode: bicubic +} +/*button, input, select, textarea { + *vertical-align: middle +} +button, input { + *overflow: visible +}*/ +.l-fl { + float: left +} +.l-fr { + float: right +} +.l-ff, .l-g0 { + overflow: hidden +} +.l-wrap { + width: 960px; + margin: 0 auto +} +.l-g { + width: 100% +} +.l-g:before, .l-g:after { + content: ''; + display: table +} +.l-g:after { + clear: both +} +.l-g1-1 { + float: none +} +.l-g1-2 { + width: 50% +} +.l-g1-3 { + width: 33.33333% +} +.l-g2-3 { + width: 66.66666% +} +.l-g1-4 { + width: 25% +} +.l-g3-4 { + width: 75% +} +.l-g1-5 { + width: 20% +} +.l-g2-5 { + width: 40% +} +.l-g3-5 { + width: 60% +} +.l-g4-5 { + width: 80% +} +.l-g1-8 { + width: 12.5% +} +.l-g3-8 { + width: 37.5% +} +.l-g5-8 { + width: 62.5% +} +.l-g7-8 { + width: 87.5% +} +.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + float: left +} +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + float: left; + margin-left: 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box +} +[class*=l-g]:first-child { + margin-left: 0 +} +.l-g1 { + width: 70px +} +.l-g2 { + width: 150px +} +.l-g3 { + width: 230px +} +.l-g4 { + width: 310px +} +.l-g5 { + width: 390px +} +.l-g6 { + width: 470px +} +.l-g7 { + width: 550px +} +.l-g8 { + width: 630px +} +.l-g9 { + width: 710px +} +.l-g10 { + width: 790px +} +.l-g11 { + width: 870px +} +.l-g12 { + width: 950px +} +.l-g_1 { + margin-left: 80px !important +} +.l-g_2 { + margin-left: 160px !important +} +.l-g_3 { + margin-left: 240px !important +} +.l-g_4 { + margin-left: 320px !important +} +.l-g_5 { + margin-left: 400px !important +} +.l-g_6 { + margin-left: 480px !important +} +.l-g_7 { + margin-left: 560px !important +} +.l-g_8 { + margin-left: 640px !important +} +.l-g_9 { + margin-left: 720px !important +} +.l-g_10 { + margin-left: 800px !important +} +.l-g_11 { + margin-left: 880px !important +} +.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + margin-right: 10px +} +/*.l-fl { + _margin-right: -3px +} +.l-fr { + _margin-left: -3px +}*/ +.l-ff, .l-g0 { + zoom: 1 +} +.l-g { + zoom: 1; + /*_zoom:expression(function(el) { + el.firstChild.style.marginLeft=0; + el.style.zoom="1" + } + (this))*/ +} +/*.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + _margin-right: -3px +}*/ +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + display: inline +} +/*.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + _zoom:expression(function(el) { + if(!el.nextSibling || el.nextSibling.nodeType!==1) el.style.marginRight=0; + el.style.zoom="1" + } + (this)) +}*/ +.unselect, i, .i, .icon { + -moz-user-select: -moz-none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none +} +b, .b, .border { + display: block; + font: 0/0 a +} +.s-ptn, .s-pvn, .s-pan { + padding-top: 0 !important +} +.s-pts, .s-pvs, .s-pas { + padding-top: 5px !important +} +.s-ptm, .s-pvm, .s-pam { + padding-top: 10px !important +} +.s-ptl, .s-pvl, .s-pal { + padding-top: 20px !important +} +.s-prn, .s-phn, .s-pan { + padding-right: 0 !important +} +.s-prs, .s-phs, .s-pas { + padding-right: 5px !important +} +.s-prm, .s-phm, .s-pam { + padding-right: 10px !important +} +.s-prl, .s-phl, .s-pal { + padding-right: 20px !important +} +.s-pbn, .s-pvn, .s-pan { + padding-bottom: 0 !important +} +.s-pbs, .s-pvs, .s-pas { + padding-bottom: 5px !important +} +.s-pbm, .s-pvm, .s-pam { + padding-bottom: 10px !important +} +.s-pbl, .s-pvl, .s-pal { + padding-bottom: 20px !important +} +.s-pln, .s-phn, .s-pan { + padding-left: 0 !important +} +.s-pls, .s-phs, .s-pas { + padding-left: 5px !important +} +.s-plm, .s-phm, .s-pam { + padding-left: 10px !important +} +.s-pll, .s-phl, .s-pal { + padding-left: 20px !important +} +.s-mtn, .s-mvn, .s-man { + margin-top: 0 !important +} +.s-mts, .s-mvs, .s-mas { + margin-top: 5px !important +} +.s-mtm, .s-mvm, .s-mam { + margin-top: 10px !important +} +.s-mtl, .s-mvl, .s-mal { + margin-top: 20px !important +} +.s-mrn, .s-mhn, .s-man { + margin-right: 0 !important +} +.s-mrs, .s-mhs, .s-mas { + margin-right: 5px !important +} +.s-mrm, .s-mhm, .s-mam { + margin-right: 10px !important +} +.s-mrl, .s-mhl, .s-mal { + margin-right: 20px !important +} +.s-mbn, .s-mvn, .s-man { + margin-bottom: 0 !important +} +.s-mbs, .s-mvs, .s-mas { + margin-bottom: 5px !important +} +.s-mbm, .s-mvm, .s-mam { + margin-bottom: 10px !important +} +.s-mbl, .s-mvl, .s-mal { + margin-bottom: 20px !important +} +.s-mln, .s-mhn, .s-man { + margin-left: 0 !important +} +.s-mls, .s-mhs, .s-mas { + margin-left: 5px !important +} +.s-mlm, .s-mhm, .s-mam { + margin-left: 10px !important +} +.s-mll, .s-mhl, .s-mal { + margin-left: 20px !important +} +.g-area-lazyload { + visibility: hidden +} +.hide { + display: none !important; + visibility: hidden +} +.cf:before, .cf:after { + content: ''; + display: table +} +.cf:after { + clear: both +} +.fl { + float: left +} +.fr { + float: right +} +.ibw { + word-spacing: -.35em; + letter-spacing: -.32em +} +.ib, .ibw .ib, s, .s, .space, .btn { + display: inline-block +} +.ibw .ib { + word-spacing: normal; + letter-spacing: normal; + vertical-align: top +} +.mod { + overflow: hidden +} +.triangle { + width: 0; + height: 0; + overflow: hidden; + font-size: 0; + line-height: 0; + border-color: transparent; + border-style: dashed; + border-width: 5px +} +/*.unselect, i, .i, .icon { + -khtml-user-select: none +}*/ +.cf { + zoom: 1 +} +.fl, .fr { + display: inline +} +.mod { + /**overflow: visible;*/ + zoom: 1 +} +.ib, .ibw .ib, s, .s, .space, .btn { + /**display: inline;*/ + zoom: 1 +} +html { + background: #edf0ef +} +body { + font: 12px/1.231 arial, Tahoma, helvetica, clean, sans-serif; + position: relative +} +a { + text-decoration: none; + color: #333 +} +a:hover { + text-decoration: none +} +.orange, .orange a { + color: #f56f2f !important +} +.red, .red a { + color: red !important +} +.green, .green a { + color: green !important +} +.bold, .bold a { + font-weight: 600 !important +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.ie.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.ie.flow.css new file mode 100755 index 000000000..79ef69d87 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.ltr.ie.flow.css @@ -0,0 +1,72 @@ +.w960{ + min-width: 960px; +} +.w1020{ + min-width: 1020px; +} +.l-flow-side{ + width: 300px; + float: left; +} +.l-flow-main{ + float: left; + width: 720px; +} +.w1020 .l-wrap{ + width: 1020px; +} +.w960 .l-flow-main{ + width: 660px; +} +.w1120 { + min-width: 1120px; +} +.w1120 .l-wrap { + width: 1120px; +} +.w1120 .l-flow-main { + width: 820px; +} +/* .flow-on .l-flow-side{ + width: 300px; + float: left; +} +.flow-on .l-flow-main{ + float: left; + width: 720px; +} +@media(min-width: 1024px){ + .flow-on .l-wrap{ + width: 1020px; + } +} +@media(max-width: 1024px){ + .flow-on .l-flow-main{ + width: 660px; + } +} */ +/* +1020px styles +.mixin-1020 (@prefix) { + @prefix { + .l-wrap{ + width: 1020px; + } + } +} +@media (min-width: 1024px) {支持@media + .mixin-1020 (".flow-on"); +} +.mixin-1020 (".flow-on.w-1020"); IE <= 8 +960px styles +.mixin-960 (@prefix) { + @prefix { + .l-flow-main{ + width: 660px; + } + } +} +@media (max-width: 1024px) {支持@media + .mixin-960 (".flow-on"); +} +.mixin-960 (".flow-on.w-960"); IE <= 8 */ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.css new file mode 100755 index 000000000..854666be3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.css @@ -0,0 +1 @@ +@charset "utf-8";*{margin:0;padding:0}fieldset,img,iframe{border:0}address,caption,cite,code,dfn,em,i,th,var{font-style:normal;font-weight:400}ul,li,ol{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}html{font-size:100%}body{vertical-align:baseline;background-color:transparent;-webkit-backface-visibility:hidden;}a:focus,a:hover,a:active,input:focus,textarea:focus{outline:0}img{vertical-align:middle}table{font-size:inherit;font:100%;border-collapse:collapse;border-spacing:0}td{vertical-align:top}th{text-align:inherit}iframe{display:block}textarea{resize:none;overflow:auto;vertical-align:top}button,input,select,textarea{font-size:100%;vertical-align:baseline}button,input{*overflow:visible;line-height:normal;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}button{cursor:pointer}button[disabled],input[disabled]{cursor:default}abbr,acronym{border:0;font-variant:normal}strong,.strong{font-weight:700}.l-fl{float:left}.l-fr{float:right}.l-ff,.l-g0{overflow:hidden}.l-wrap{width:960px;margin:0 auto}.l-g{width:100%}.l-g:before,.l-g:after{content:'';display:table}.l-g:after{clear:both}.l-g1-1{float:none}.l-g1-2{width:50%}.l-g1-3{width:33.33333%}.l-g2-3{width:66.66666%}.l-g1-4{width:25%}.l-g3-4{width:75%}.l-g1-5{width:20%}.l-g2-5{width:40%}.l-g3-5{width:60%}.l-g4-5{width:80%}.l-g1-8{width:12.5%}.l-g3-8{width:37.5%}.l-g5-8{width:62.5%}.l-g7-8{width:87.5%}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{float:right;_margin-left:-3px!important}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{display:inline;float:right;margin-right:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[class*=l-g]:first-child{margin-right:0}.l-g1{width:70px}.l-g2{width:150px}.l-g3{width:230px}.l-g4{width:310px}.l-g5{width:390px}.l-g6{width:470px}.l-g7{width:550px}.l-g8{width:630px}.l-g9{width:710px}.l-g10{width:790px}.l-g11{width:870px}.l-g12{width:950px}.l-g_1{margin-right:80px!important}.l-g_2{margin-right:160px!important}.l-g_3{margin-right:240px!important}.l-g_4{margin-right:320px!important}.l-g_5{margin-right:400px!important}.l-g_6{margin-right:480px!important;margin-left:0!important}.l-g_7{margin-right:560px!important}.l-g_8{margin-right:640px!important}.l-g_9{margin-right:720px!important}.l-g_10{margin-right:800px!important}.l-g_11{margin-right:880px!important}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{margin-left:10px}.unselect,i,.i,.icon{-moz-user-select:-moz-none;-webkit-user-select:none;-o-user-select:none;user-select:none}b,.b,.border{display:block;font:0/0 a}.s-ptn,.s-pvn,.s-pan{padding-top:0!important}.s-pts,.s-pvs,.s-pas{padding-top:5px!important}.s-ptm,.s-pvm,.s-pam{padding-top:10px!important}.s-ptl,.s-pvl,.s-pal{padding-top:20px!important}.s-prn,.s-phn,.s-pan{padding-right:0!important}.s-prs,.s-phs,.s-pas{padding-right:5px!important}.s-prm,.s-phm,.s-pam{padding-right:10px!important}.s-prl,.s-phl,.s-pal{padding-right:20px!important}.s-pbn,.s-pvn,.s-pan{padding-bottom:0!important}.s-pbs,.s-pvs,.s-pas{padding-bottom:5px!important}.s-pbm,.s-pvm,.s-pam{padding-bottom:10px!important}.s-pbl,.s-pvl,.s-pal{padding-bottom:20px!important}.s-pln,.s-phn,.s-pan{padding-left:0!important}.s-pls,.s-phs,.s-pas{padding-left:5px!important}.s-plm,.s-phm,.s-pam{padding-left:10px!important}.s-pll,.s-phl,.s-pal{padding-left:20px!important}.s-mtn,.s-mvn,.s-man{margin-top:0!important}.s-mts,.s-mvs,.s-mas{margin-top:5px!important}.s-mtm,.s-mvm,.s-mam{margin-top:10px!important}.s-mtl,.s-mvl,.s-mal{margin-top:20px!important}.s-mrn,.s-mhn,.s-man{margin-right:0!important}.s-mrs,.s-mhs,.s-mas{margin-right:5px!important}.s-mrm,.s-mhm,.s-mam{margin-right:10px!important}.s-mrl,.s-mhl,.s-mal{margin-right:20px!important}.s-mbn,.s-mvn,.s-man{margin-bottom:0!important}.s-mbs,.s-mvs,.s-mas{margin-bottom:5px!important}.s-mbm,.s-mvm,.s-mam{margin-bottom:10px!important}.s-mbl,.s-mvl,.s-mal{margin-bottom:20px!important}.s-mln,.s-mhn,.s-man{margin-left:0!important}.s-mls,.s-mhs,.s-mas{margin-left:5px!important}.s-mlm,.s-mhm,.s-mam{margin-left:10px!important}.s-mll,.s-mhl,.s-mal{margin-left:20px!important}.g-area-lazyload{visibility:hidden}.hide{display:none!important;visibility:hidden}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}.fl{float:left}.fr{float:right}.ibw{word-spacing:-.35em;letter-spacing:-.32em}.ib,.ibw .ib,s,.s,.space,.btn{display:inline-block}.ibw .ib{word-spacing:normal;letter-spacing:normal;vertical-align:top}.mod{overflow:hidden}.triangle{width:0;height:0;overflow:hidden;font-size:0;line-height:0;border-color:transparent;border-style:dashed;border-width:5px}html{background:#edf0ef}body{font:12px/1.231 arial,Tahoma,helvetica,clean,sans-serif;position:relative}a{text-decoration:none;color:#333}a:hover{text-decoration:none}.orange,.orange a{color:#f56f2f!important}.red,.red a{color:red!important}.green,.green a{color:green!important}.bold,.bold a{font-weight:600!important} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.ie.css new file mode 100755 index 000000000..3f54a81a4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.ie.css @@ -0,0 +1,467 @@ +@charset "utf-8"; +* { + margin: 0; + padding: 0 +} +fieldset, img, iframe { + border: 0 +} +address, caption, cite, code, dfn, em, i, th, var { + font-style: normal; + font-weight: 400 +} +ul, li, ol { + list-style: none +} +caption, th { + text-align: left +} +h1, h2, h3, h4, h5, h6 { + font-size: 100%; + font-weight: 400 +} +html { + font-size: 100% +} +body { + vertical-align: baseline; + background-color: transparent; + -webkit-backface-visibility: hidden; +} +a:focus, a:hover, a:active, input:focus, textarea:focus { + outline: 0 +} +img { + vertical-align: middle +} +table { + font-size: inherit; + font: 100%; + border-collapse: collapse; + border-spacing: 0 +} +td { + vertical-align: top +} +th { + text-align: inherit +} +iframe { + display: block +} +textarea { + resize: none; + overflow: auto; + vertical-align: top +} +button, input, select, textarea { + font-size: 100%; + vertical-align: baseline +} +button, input { + /**overflow: visible;*/ + line-height: normal; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box +} +button { + cursor: pointer +} +button[disabled], input[disabled] { + cursor: default +} +abbr, acronym { + border: 0; + font-variant: normal +} +strong, .strong { + font-weight: 700 +} +/*body { + _zoom:expression(function(el) { + document.execCommand('BackgroundImageCache', false, true); + el.style.zoom="1" + } + (this)) +}*/ +img { + -ms-interpolation-mode: bicubic +} +/*button, input, select, textarea { + *vertical-align: middle +} +button, input { + *overflow: visible +}*/ +.l-fl { + float: left +} +.l-fr { + float: right +} +.l-ff, .l-g0 { + overflow: hidden +} +.l-wrap { + width: 960px; + margin: 0 auto +} +.l-g { + width: 100% +} +.l-g:before, .l-g:after { + content: ''; + display: table +} +.l-g:after { + clear: both +} +.l-g1-1 { + float: none +} +.l-g1-2 { + width: 50% +} +.l-g1-3 { + width: 33.33333% +} +.l-g2-3 { + width: 66.66666% +} +.l-g1-4 { + width: 25% +} +.l-g3-4 { + width: 75% +} +.l-g1-5 { + width: 20% +} +.l-g2-5 { + width: 40% +} +.l-g3-5 { + width: 60% +} +.l-g4-5 { + width: 80% +} +.l-g1-8 { + width: 12.5% +} +.l-g3-8 { + width: 37.5% +} +.l-g5-8 { + width: 62.5% +} +.l-g7-8 { + width: 87.5% +} +.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + float: right; + /*_margin-left: -3px !important*/ +} +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + display: inline; + float: right; + margin-right: 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box +} +[class*=l-g]:first-child { + margin-right: 0 +} +.l-g1 { + width: 70px +} +.l-g2 { + width: 150px +} +.l-g3 { + width: 230px +} +.l-g4 { + width: 310px +} +.l-g5 { + width: 390px +} +.l-g6 { + width: 470px +} +.l-g7 { + width: 550px +} +.l-g8 { + width: 630px +} +.l-g9 { + width: 710px +} +.l-g10 { + width: 790px +} +.l-g11 { + width: 870px +} +.l-g12 { + width: 950px +} +.l-g_1 { + margin-right: 80px !important +} +.l-g_2 { + margin-right: 160px !important +} +.l-g_3 { + margin-right: 240px !important +} +.l-g_4 { + margin-right: 320px !important +} +.l-g_5 { + margin-right: 400px !important +} +.l-g_6 { + margin-right: 480px !important; + margin-left: 0 !important +} +.l-g_7 { + margin-right: 560px !important +} +.l-g_8 { + margin-right: 640px !important +} +.l-g_9 { + margin-right: 720px !important +} +.l-g_10 { + margin-right: 800px !important +} +.l-g_11 { + margin-right: 880px !important +} +.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + margin-left: 10px +} +.l-ff, .l-g0 { + zoom: 1 +} +.l-g { + zoom: 1; + /*_zoom:expression(function(el) { + el.firstChild.style.marginRight=0; + el.style.zoom="1" + } + (this))*/ +} +/*.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + _margin-left: -3px +}*/ +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + display: inline +} +/*.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + _zoom:expression(function(el) { + if(!el.nextSibling || el.nextSibling.nodeType!==1) el.style.marginLeft=0; + el.style.zoom="1" + } + (this)) +}*/ +.unselect, i, .i, .icon { + -moz-user-select: -moz-none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none +} +b, .b, .border { + display: block; + font: 0/0 a +} +.s-ptn, .s-pvn, .s-pan { + padding-top: 0 !important +} +.s-pts, .s-pvs, .s-pas { + padding-top: 5px !important +} +.s-ptm, .s-pvm, .s-pam { + padding-top: 10px !important +} +.s-ptl, .s-pvl, .s-pal { + padding-top: 20px !important +} +.s-prn, .s-phn, .s-pan { + padding-right: 0 !important +} +.s-prs, .s-phs, .s-pas { + padding-right: 5px !important +} +.s-prm, .s-phm, .s-pam { + padding-right: 10px !important +} +.s-prl, .s-phl, .s-pal { + padding-right: 20px !important +} +.s-pbn, .s-pvn, .s-pan { + padding-bottom: 0 !important +} +.s-pbs, .s-pvs, .s-pas { + padding-bottom: 5px !important +} +.s-pbm, .s-pvm, .s-pam { + padding-bottom: 10px !important +} +.s-pbl, .s-pvl, .s-pal { + padding-bottom: 20px !important +} +.s-pln, .s-phn, .s-pan { + padding-left: 0 !important +} +.s-pls, .s-phs, .s-pas { + padding-left: 5px !important +} +.s-plm, .s-phm, .s-pam { + padding-left: 10px !important +} +.s-pll, .s-phl, .s-pal { + padding-left: 20px !important +} +.s-mtn, .s-mvn, .s-man { + margin-top: 0 !important +} +.s-mts, .s-mvs, .s-mas { + margin-top: 5px !important +} +.s-mtm, .s-mvm, .s-mam { + margin-top: 10px !important +} +.s-mtl, .s-mvl, .s-mal { + margin-top: 20px !important +} +.s-mrn, .s-mhn, .s-man { + margin-right: 0 !important +} +.s-mrs, .s-mhs, .s-mas { + margin-right: 5px !important +} +.s-mrm, .s-mhm, .s-mam { + margin-right: 10px !important +} +.s-mrl, .s-mhl, .s-mal { + margin-right: 20px !important +} +.s-mbn, .s-mvn, .s-man { + margin-bottom: 0 !important +} +.s-mbs, .s-mvs, .s-mas { + margin-bottom: 5px !important +} +.s-mbm, .s-mvm, .s-mam { + margin-bottom: 10px !important +} +.s-mbl, .s-mvl, .s-mal { + margin-bottom: 20px !important +} +.s-mln, .s-mhn, .s-man { + margin-left: 0 !important +} +.s-mls, .s-mhs, .s-mas { + margin-left: 5px !important +} +.s-mlm, .s-mhm, .s-mam { + margin-left: 10px !important +} +.s-mll, .s-mhl, .s-mal { + margin-left: 20px !important +} +.g-area-lazyload { + visibility: hidden +} +.hide { + display: none !important; + visibility: hidden +} +.cf:before, .cf:after { + content: ''; + display: table +} +.cf:after { + clear: both +} +.fl { + float: left +} +.fr { + float: right +} +.ibw { + word-spacing: -.35em; + letter-spacing: -.32em +} +.ib, .ibw .ib, s, .s, .space, .btn { + display: inline-block +} +.ibw .ib { + word-spacing: normal; + letter-spacing: normal; + vertical-align: top +} +.mod { + overflow: hidden +} +.triangle { + width: 0; + height: 0; + overflow: hidden; + font-size: 0; + line-height: 0; + border-color: transparent; + border-style: dashed; + border-width: 5px +} +/*.unselect, i, .i, .icon { + -khtml-user-select: none +}*/ +.cf { + zoom: 1 +} +.fl, .fr { + display: inline +} +.mod { + /**overflow: visible;*/ + zoom: 1 +} +.ib, .ibw .ib, s, .s, .space, .btn { + /**display: inline;*/ + zoom: 1 +} +html { + background: #edf0ef +} +body { + font: 12px/1.231 arial, Tahoma, helvetica, clean, sans-serif; + position: relative +} +a { + text-decoration: none; + color: #333 +} +a:hover { + text-decoration: none +} +.orange, .orange a { + color: #f56f2f !important +} +.red, .red a { + color: red !important +} +.green, .green a { + color: green !important +} +.bold, .bold a { + font-weight: 600 !important +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.ie.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.ie.flow.css new file mode 100755 index 000000000..e06f6d18d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/dist/base.rtl.ie.flow.css @@ -0,0 +1,30 @@ +.w960{ + min-width: 960px; +} +.w1020{ + min-width: 1020px; +} +.l-flow-side{ + width: 300px; + float: right; +} +.l-flow-main{ + float: right; + width: 720px; +} +.w1020 .l-wrap{ + width: 1020px; +} +.w960 .l-flow-main{ + width: 660px; +} + +.w1120 { + min-width: 1120px; +} +.w1120 .l-wrap { + width: 1120px; +} +.w1120 .l-flow-main { + width: 820px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/old/module_common.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/old/module_common.css new file mode 100755 index 000000000..d933832bf --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/old/module_common.css @@ -0,0 +1,1375 @@ +@charset "utf-8"; + +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,figure,blockquote,th,td { + margin: 0; + padding: 0; +} + +fieldset,img,iframe { + border: 0; +} + +address,caption,cite,code,dfn,em,i,th,var { + font-style: normal; + font-weight: normal; +} + +ul,li,ol { + list-style: none; +} + +caption,th { + text-align: left; +} + +h1,h2,h3,h4,h5,h6 { + font-size: 100%; + font-weight: normal; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +body { + -webkit-text-size-adjust: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -o-tap-highlight-color: rgba(0,0,0,0); + -moz-tap-highlight-color: rgba(0,0,0,0); + vertical-align: baseline; + background-color: transparent; + _zoom: expression(function(el){document.execCommand('BackgroundImageCache',false,true); + el.style.zoom = "1"; +}(this)); +} + +a { +text-decoration: none; +color: #333; +} + +a:hover { +text-decoration: none; +} + +a:focus,a:hover,a:active,input:focus,textarea:focus { +outline: 0; +} + +a::-moz-focus-inner,input::-moz-focus-inner,button::-moz-focus-inner { +border: 0; +} + +button::-moz-focus-inner,input::-moz-focus-inner { +padding: 0; +border: 0; +} + +img { +-ms-interpolation-mode: bicubic; +vertical-align: middle; +} + +table { +font-size: inherit; +font: 100%; +border-collapse: collapse; +border-spacing: 0; +} + +td { +vertical-align: top; +} + +th { +text-align: inherit; +} + +iframe { +display: block; +} + +svg:not(:root) { +overflow: hidden; +} + +textarea { +resize: none; +overflow: auto; +vertical-align: top; +} + +button,input,select,textarea { +font-size: 100%; +vertical-align: baseline; +*vertical-align: middle; +} + +button,input { +*overflow: visible; +line-height: normal; +-webkit-box-sizing: content-box; +-moz-box-sizing: content-box; +box-sizing: content-box; +} + +button { +cursor: pointer; +} + +input[type="button"],input[type="reset"],input[type="submit"] { +-webkit-appearance: button; +} + +input[type="search"] { +-webkit-appearance: textfield; +-webkit-box-sizing: content-box; +-moz-box-sizing: content-box; +box-sizing: content-box; +} + +input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button { +-webkit-appearance: none; +} + +input[type="checkbox"],input[type="radio"] { +box-sizing: border-box; +padding: 0; +*width: 13px; +*height: 13px; +} + +button[disabled],input[disabled] { +cursor: default; +} + +q { +quotes: none; +} + +q:before,q:after { +content: ''; +content: none; +} + +abbr,acronym { +border: 0; +font-variant: normal; +} + +strong,.strong { +font-weight: bold; +} + +pre,.pre { +white-space: pre; +white-space: pre-wrap; +white-space: pre-line; +word-wrap: break-word; +} + +h1,.h1 { +font-size: 1.8em; +} + +h2,.h2 { +font-size: 1.6em; +} + +h3,.h3 { +font-size: 1.4em; +} + +h4,.h4 { +font-size: 1.2em; +} + +h5,.h5 { +font-size: 1em; +} + +h6,.h6 { +font-size: 1em; +} + +small,.small { +font-size: 75%; +} + +sub,.sub,sup,.sup { +font-size: 75%; +line-height: 0; +position: relative; +vertical-align: baseline; +} + +sup,.sup { +top: -0.5em; +} + +sub,.sub { +bottom: -0.25em; +} + +@charset "utf-8"; + +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary { +display: block; +} + +audio,canvas,video { +display: inline-block; +*display: inline; +*zoom: 1; +} + +audio:not([controls]) { +display: none; +height: 0; +} + +[hidden] { +display: none; +} + +@charset "utf-8"; + +.unselect,i,.i,.icon { +-moz-user-select: -moz-none; +-khtml-user-select: none; +-webkit-user-select: none; +-o-user-select: none; +user-select: none; +} + +b,.b,.border { +display: block; +font: 0/0 a; +} + +.s-ptn,.s-pvn,.s-pan { +padding-top: 0!important; +} + +.s-pts,.s-pvs,.s-pas { +padding-top: 5px!important; +} + +.s-ptm,.s-pvm,.s-pam { +padding-top: 10px!important; +} + +.s-ptl,.s-pvl,.s-pal { +padding-top: 20px!important; +} + +.s-prn,.s-phn,.s-pan { +padding-right: 0!important; +} + +.s-prs,.s-phs,.s-pas { +padding-right: 5px!important; +} + +.s-prm,.s-phm,.s-pam { +padding-right: 10px!important; +} + +.s-prl,.s-phl,.s-pal { +padding-right: 20px!important; +} + +.s-pbn,.s-pvn,.s-pan { +padding-bottom: 0!important; +} + +.s-pbs,.s-pvs,.s-pas { +padding-bottom: 5px!important; +} + +.s-pbm,.s-pvm,.s-pam { +padding-bottom: 10px!important; +} + +.s-pbl,.s-pvl,.s-pal { +padding-bottom: 20px!important; +} + +.s-pln,.s-phn,.s-pan { +padding-left: 0!important; +} + +.s-pls,.s-phs,.s-pas { +padding-left: 5px!important; +} + +.s-plm,.s-phm,.s-pam { +padding-left: 10px!important; +} + +.s-pll,.s-phl,.s-pal { +padding-left: 20px!important; +} + +.s-mtn,.s-mvn,.s-man { +margin-top: 0!important; +} + +.s-mts,.s-mvs,.s-mas { +margin-top: 5px!important; +} + +.s-mtm,.s-mvm,.s-mam { +margin-top: 10px!important; +} + +.s-mtl,.s-mvl,.s-mal { +margin-top: 20px!important; +} + +.s-mrn,.s-mhn,.s-man { +margin-right: 0!important; +} + +.s-mrs,.s-mhs,.s-mas { +margin-right: 5px!important; +} + +.s-mrm,.s-mhm,.s-mam { +margin-right: 10px!important; +} + +.s-mrl,.s-mhl,.s-mal { +margin-right: 20px!important; +} + +.s-mbn,.s-mvn,.s-man { +margin-bottom: 0!important; +} + +.s-mbs,.s-mvs,.s-mas { +margin-bottom: 5px!important; +} + +.s-mbm,.s-mvm,.s-mam { +margin-bottom: 10px!important; +} + +.s-mbl,.s-mvl,.s-mal { +margin-bottom: 20px!important; +} + +.s-mln,.s-mhn,.s-man { +margin-left: 0!important; +} + +.s-mls,.s-mhs,.s-mas { +margin-left: 5px!important; +} + +.s-mlm,.s-mhm,.s-mam { +margin-left: 10px!important; +} + +.s-mll,.s-mhl,.s-mal { +margin-left: 20px!important; +} + +.g-area-lazyload { +visibility: hidden; +} + +.hide { +display: none!important; +visibility: hidden; +} + +.hide-layout { +visibility: hidden; +} + +.hide-text { +border: 0; +font: 0/0 a; +text-shadow: none; +color: transparent; +background-color: transparent; +} + +.hide-read,.hide-focus { +border: 0; +clip: rect(0 0 0 0); +height: 1px; +margin: -1px; +overflow: hidden; +padding: 0; +position: absolute; +width: 1px; +} + +.hide-focus:active,.hide-focus:focus { +clip: auto; +height: auto; +margin: 0; +overflow: visible; +position: static; +width: auto; +} + +.cf { +zoom: 1; +} + +.cf:before,.cf:after { +content: ''; +display: table; +} + +.cf:after { +clear: both; +} + +.fl,.fr { +display: inline; +} + +.fl { +float: left; +} + +.fr { +float: right; +} + +.ibw,.ibw-span { +word-spacing: -0.35em; +letter-spacing: -.32em; +} + +.ib,.ibw .ib,.ibw-span span,s,.s,.space,.btn { +display: -moz-inline-box; +display: inline-block; +*display: inline; +*zoom: 1; +} + +.ibw .ib,.ibw-span span { +word-spacing: normal; +letter-spacing: normal; +vertical-align: top; +} + +.mod { +overflow: hidden; +*overflow: visible; +zoom: 1; +} + +.mod .img { +float: left; +} + +.mod .img img { +display: block; +} + +.transparent { +filter: alpha(opacity=50); +-moz-opacity: .5; +-khtml-opacity: .5; +opacity: .5; +} + +.triangle { +width: 0; +height: 0; +overflow: hidden; +font-size: 0; +line-height: 0; +border-color: transparent; +border-style: dashed; +border-width: 5px; +} + +body { +background: #edf0ef; +font: 12px/1.231 arial,Tahoma,helvetica,clean,sans-serif; +position: relative; +} + +.l-fl { +float: left; +_margin-right: -3px; +} + +.l-fr { +float: right; +_margin-left: -3px; +} + +.l-ff,.l-g0 { +overflow: hidden; +zoom: 1; +} + +.l-wrap { +width: 960px; +margin: 0 auto; +} + +.l-g { +width: 100%; +zoom: 1; +_zoom: expression(function(el){el.firstChild.style.marginLeft = 0; +el.style.zoom = "1"; +}(this)); +} + +.l-g:before,.l-g:after { +content: ''; +display: table; +} + +.l-g:after { +clear: both; +} + +.l-g1-1 { +float: none; +} + +.l-g1-2 { +width: 50%; +} + +.l-g1-3 { +width: 33.33333%; +} + +.l-g2-3 { +width: 66.66666%; +} + +.l-g1-4 { +width: 25%; +} + +.l-g3-4 { +width: 75%; +} + +.l-g1-5 { +width: 20%; +} + +.l-g2-5 { +width: 40%; +} + +.l-g3-5 { +width: 60%; +} + +.l-g4-5 { +width: 80%; +} + +.l-g1-8 { +width: 12.5%; +} + +.l-g3-8 { +width: 37.5%; +} + +.l-g5-8 { +width: 62.5%; +} + +.l-g7-8 { +width: 87.5%; +} + +.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8 { +float: left; +_margin-right: -3px; +} + +.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12 { +display: inline; +float: left; +margin-left: 10px; +-webkit-box-sizing: border-box; +-moz-box-sizing: border-box; +box-sizing: border-box; +background: #aaa; +} + +[class*="l-g"]:first-child { +margin-left: 0; +} + +.l-g1 { +width: 70px; +} + +.l-g2 { +width: 150px; +} + +.l-g3 { +width: 230px; +} + +.l-g4 { +width: 310px; +} + +.l-g5 { +width: 390px; +} + +.l-g6 { +width: 470px; +} + +.l-g7 { +width: 550px; +} + +.l-g8 { +width: 630px; +} + +.l-g9 { +width: 710px; +} + +.l-g10 { +width: 790px; +} + +.l-g11 { +width: 870px; +} + +.l-g12 { +width: 950px; +} + +.l-g_1 { +margin-left: 80px!important; +} + +.l-g_2 { +margin-left: 160px!important; +} + +.l-g_3 { +margin-left: 240px!important; +} + +.l-g_4 { +margin-left: 320px!important; +} + +.l-g_5 { +margin-left: 400px!important; +} + +.l-g_6 { +margin-left: 480px!important; +} + +.l-g_7 { +margin-left: 560px!important; +} + +.l-g_8 { +margin-left: 640px!important; +} + +.l-g_9 { +margin-left: 720px!important; +} + +.l-g_10 { +margin-left: 800px!important; +} + +.l-g_11 { +margin-left: 880px!important; +} + +.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11 { +margin-right: 10px; +_zoom: expression(function(el){if(!el.nextSibling || el.nextSibling.nodeType!== 1) el.style.marginRight = 0; +el.style.zoom = "1"; +}(this)); +} + +.l-wrap_l .l-wrap { +width: 1130px; +} + +.l-wrap_l .l-g1 { +width: 85px; +} + +.l-wrap_l .l-g2 { +width: 180px; +} + +.l-wrap_l .l-g3 { +width: 275px; +} + +.l-wrap_l .l-g4 { +width: 370px; +} + +.l-wrap_l .l-g5 { +width: 465px; +} + +.l-wrap_l .l-g6 { +width: 560px; +} + +.l-wrap_l .l-g7 { +width: 655px; +} + +.l-wrap_l .l-g8 { +width: 750px; +} + +.l-wrap_l .l-g9 { +width: 845px; +} + +.l-wrap_l .l-g10 { +width: 940px; +} + +.l-wrap_l .l-g11 { +width: 1035px; +} + +.l-wrap_l .l-g12 { +width: 1130px; +} + +.l-wrap_l .l-g_1 { +margin-left: 95px!important; +} + +.l-wrap_l .l-g_2 { +margin-left: 190px!important; +} + +.l-wrap_l .l-g_3 { +margin-left: 285px!important; +} + +.l-wrap_l .l-g_4 { +margin-left: 380px!important; +} + +.l-wrap_l .l-g_5 { +margin-left: 475px!important; +} + +.l-wrap_l .l-g_6 { +margin-left: 570px!important; +} + +.l-wrap_l .l-g_7 { +margin-left: 665px!important; +} + +.l-wrap_l .l-g_8 { +margin-left: 760px!important; +} + +.l-wrap_l .l-g_9 { +margin-left: 855px!important; +} + +.l-wrap_l .l-g_10 { +margin-left: 950px!important; +} + +.l-wrap_l .l-g_11 { +margin-left: 1045px!important; +} + +.box-prompt { +background: #ebfcf7; +border: 1px solid #ceded9; +border-bottom: 1px solid #beccc7; +position: absolute; +color: #454545; +-moz-border-radius: 2px; +-webkit-border-radius: 2px; +-o-border-radius: 2px; +border-radius: 2px; +z-index: 100; +} + +.box-prompt-inner { +border: 1px solid #FFF; +border-bottom: 0; +padding: 8px; +overflow: hidden; +} + +.sug-search { +position: absolute; +top: 28px; +left: -1px; +border: 1px solid #e3e4e6; +border-top: 0 none; +background: #fff; +width: 528px; +color: #454545; +z-index: 999; +white-space: nowrap; +overflow: hidden; +} + +.sug-shim { +position: absolute; +top: -1px; +left: -1px; +z-index: -1; +filter: alpha(opacity="0"); +width: 430px; +height: 250px; +} + +.sug-search ol { +font: bold 12px/23px Tahoma,arial,helvetica,clean,sans-serif; +cursor: default; +} + +.sug-search li { +padding: 3px 10px; +cursor: pointer; +} + +.sug-search li b { +font: inherit; +display: inline; +} + +.sug-search .sug-select { +background: #f5f7f7; +} + +.sug-search .top { +font-weight: normal; +color: #999; +height: 21px; +line-height: 21px; +background: #eee; +padding: 0 2px; +} + +.sug-search .bot { +position: relative; +height: 19px; +line-height: 19px; +font-weight: normal; +border-top: 1px solid #666; +} + +.sug-search .sug-query { +font-weight: normal; +} + +.sug-search font { +font-weight: normal!important; +color: #333!important; +} + +.ui-autocomplete { +position: absolute; +cursor: default; +border: 1px solid #e3e4e6; +} + +* html .ui-autocomplete { +width: 1px; +} + +.ui-menu { +list-style: none; +padding: 2px 0; +margin: 0; +display: block; +float: left; +} + +.ui-menu .ui-menu { +margin-top: -3px; +} + +.ui-menu .ui-menu-item { +margin: 0; +padding: 0; +zoom: 1; +float: left; +clear: left; +width: 100%; +} + +.ui-menu .ui-menu-item a { +text-decoration: none; +display: block; +line-height: 1.5; +zoom: 1; +} + +.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active { +font-weight: normal; +border: 0; +background-color: #f5f7f7; +width: 100%; +} + +.ui-widget-content { +background-color: #fff; +} + +.select_theme { +display: block; +clear: both; +overflow: hidden; +border-top: 1px solid #bee2d6; +padding: 5px 15px; +zoom: 1; +} + +.select_theme li { +width: 20px; +height: 20px; +background: #f00; +float: left; +margin-right: 5px; +cursor: pointer; +} + +.select_theme span { +width: 20px; +height: 20px; +} + +.select_theme .skin_cur { +background: #ff0; +cursor: default; +} + +.select_theme .skin_cur span { +display: inline-block; +} + +.select_theme .skin_1 { +background: no-repeat; +background-position: 0 0; +} + +.select_theme .skin_1 span { +background: no-repeat; +background-position: -50px -25px; +} + +.select_theme .skin_2 { +background: no-repeat; +background-position: -50px 0; +} + +.select_theme .skin_2 span { +background: no-repeat; +background-position: 0 -25px; +} + +.select_theme .skin_3 { +background: no-repeat; +background-position: -25px -25px; +} + +.select_theme .skin_3 span { +background: no-repeat; +background-position: -25px 0; +} + +.box-search_keyboard { +cursor: pointer; +padding: 1px; +} + +#kbd { +position: absolute!important; +top: 130px; +} + +.outerbox { +max-height: 152px; +} + +#kbd input.goog-button,#kbd button.goog-button { +height: 16px; +} + +.vt { +vertical-align: top; +} + +.pr { +position: relative; +} + +.grey { +color: #bfbfbf; +} + +.tc { +text-align: center; +} + +.s-pa15 { +padding: 15px; +} + +.mod-lottery { +font-size: 14px; +} + +.mod-lottery input,.mod-lottery textarea,.lottery-dropdownlist { +border: 1px solid #d9d9d9; +width: 142px; +line-height: 24px; +font-size: 12px; +} + +.mod-lottery input { +height: 24px; +padding-left: 5px; +padding-right: 25px; +width: 112px; +} + +#citypicker { +cursor: pointer; +} + +.mod-lottery textarea { +width: 132px; +height: 70px; +line-height: 20px; +padding: 2px 5px; +} + +.mod-lottery label { +display: inline-block; +width: 58px; +text-align: right; +margin-right: 4px; +} + +.lottery-search,.gradient-bg-green { +width: 100%; +height: 29px; +line-height: 29px; +display: block; +color: #fff; +font-weight: 600; +text-align: center; +background-color: #10b47d; +background-image: -moz-linear-gradient(top,#10b47d,#3dc094 100.0%); +background-image: -webkit-linear-gradient(top,#10b47d,#3dc094 100.0%); +background-image: -o-linear-gradient(top,#10b47d,#3dc094 100.0%); +background-image: -ms-linear-gradient(top,#10b47d,#3dc094 100.0%); +background-image: linear-gradient(top,#10b47d,#3dc094 100.0%); +-moz-border-radius: 2px; +-webkit-border-radius: 2px; +border-radius: 2px; +} + +.mod-lottery .lottery-search { +color: #fff; +} + +.lottery-search:hover { +background-color: #0fa875; +background-image: -moz-linear-gradient(top,#0fa875,#3cba90 100.0%); +background-image: -webkit-linear-gradient(top,#0fa875,#3cba90 100.0%); +background-image: -o-linear-gradient(top,#0fa875,#3cba90 100.0%); +background-image: -ms-linear-gradient(top,#0fa875,#3cba90 100.0%); +background-image: linear-gradient(top,#0fa875,#3cba90 100.0%); +-webkit-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +-moz-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +-o-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +-ms-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +} + +.lottery-search:active { +background-color: #0fa875; +background-image: -moz-linear-gradient(top,#3cba90,#0fa875 100.0%); +background-image: -webkit-linear-gradient(top,#3cba90,#0fa875 100.0%); +background-image: -o-linear-gradient(top,#3cba90,#0fa875 100.0%); +background-image: -ms-linear-gradient(top,#3cba90,#0fa875 100.0%); +background-image: linear-gradient(top,#3cba90,#0fa875 100.0%); +} + +.mod-lottery .lottery-result a,.gradient-bg-gray { +height: 20px; +line-height: 20px; +display: inline-block; +color: #fff; +text-align: center; +padding: 0 10px; +background-color: #b8b8b8; +background-image: -moz-linear-gradient(top,#b8b8b8,#c9c9c9 100.0%); +background-image: -webkit-linear-gradient(top,#b8b8b8,#c9c9c9 100.0%); +background-image: -o-linear-gradient(top,#b8b8b8,#c9c9c9 100.0%); +background-image: -ms-linear-gradient(top,#b8b8b8,#c9c9c9 100.0%); +background-image: linear-gradient(top,#b8b8b8,#c9c9c9 100.0%); +-moz-border-radius: 2px 2px 0 0; +-webkit-border-radius: 2px 2px 0 0; +border-radius: 2px 2px 0 0; +} + +.mod-lottery .lottery-result a:hover { +background-color: #8b8b8b; +background-image: -moz-linear-gradient(top,#8b8b8b,#ababab 100.0%); +background-image: -webkit-linear-gradient(top,#8b8b8b,#ababab 100.0%); +background-image: -o-linear-gradient(top,#8b8b8b,#ababab 100.0%); +background-image: -ms-linear-gradient(top,#8b8b8b,#ababab 100.0%); +background-image: linear-gradient(top,#8b8b8b,#ababab 100.0%); +-webkit-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +-moz-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +-o-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +-ms-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); +} + +.mod-lottery .lottery-result a:active { +background-color: #ababab; +background-image: -moz-linear-gradient(top,#ababab,#8b8b8b 100.0%); +background-image: -webkit-linear-gradient(top,#ababab,#8b8b8b 100.0%); +background-image: -o-linear-gradient(top,#ababab,#8b8b8b 100.0%); +background-image: -ms-linear-gradient(top,#ababab,#8b8b8b 100.0%); +background-image: linear-gradient(top,#ababab,#8b8b8b 100.0%); +} + +.mod-lottery .lottery-result-win a,.gradient-bg-orange { +background-color: #f56f2f; +background-image: -moz-linear-gradient(top,#f56f2f,#f88249 100.0%); +background-image: -webkit-linear-gradient(top,#f56f2f,#f88249 100.0%); +background-image: -o-linear-gradient(top,#f56f2f,#f88249 100.0%); +background-image: -ms-linear-gradient(top,#f56f2f,#f88249 100.0%); +background-image: linear-gradient(top,#f56f2f,#f88249 100.0%); +} + +.mod-lottery .lottery-result-win a:hover { +background-color: #f45e16; +background-image: -moz-linear-gradient(top,#f45e16,#f77334 100.0%); +background-image: -webkit-linear-gradient(top,#f45e16,#f77334 100.0%); +background-image: -o-linear-gradient(top,#f45e16,#f77334 100.0%); +background-image: -ms-linear-gradient(top,#f45e16,#f77334 100.0%); +background-image: linear-gradient(top,#f45e16,#f77334 100.0%); +} + +.mod-lottery .lottery-result-win a:active { +background-color: #f45e16; +background-image: -moz-linear-gradient(top,#f77334,#f45e16 100.0%); +background-image: -webkit-linear-gradient(top,#f77334,#f45e16 100.0%); +background-image: -o-linear-gradient(top,#f77334,#f45e16 100.0%); +background-image: -ms-linear-gradient(top,#f77334,#f45e16 100.0%); +background-image: linear-gradient(top,#f77334,#f45e16 100.0%); +} + +.lottery-trigger,.ui-datepicker-trigger { +background-color: #f5f7f7; +background-image: -moz-linear-gradient(top,#f5f7f7,#fff 100.0%); +background-image: -webkit-linear-gradient(top,#f5f7f7,#fff 100.0%); +background-image: -o-linear-gradient(top,#f5f7f7,#fff 100.0%); +background-image: -ms-linear-gradient(top,#f5f7f7,#fff 100.0%); +background-image: linear-gradient(top,#f5f7f7,#fff 100.0%); +border: 0; +border-left: 1px solid #ebebeb; +width: 23px; +height: 24px; +position: absolute; +right: 1px; +top: 1px; +_top: 3px; +cursor: pointer; +} + +.lottery-trigger i,.ui-datepicker-trigger i { +background: no-repeat; +background-position: -16px -50px; +display: block; +width: 11px; +height: 6px; +position: relative; +font-size: 0; +} + +.lottery-trigger i { +top: 9px; +left: 6px; +} + +.ui-datepicker-trigger { +_overflow: hidden; +} + +.ui-datepicker-trigger i { +top: 0; +*top: 7px; +left: 6px; +*left: -1px; +} + +.lottery-dropdownlist { +position: absolute; +top: 26px; +_top: 28px; +right: 0; +background: #fff; +border-top: 0; +text-indent: 5px; +display: none; +text-align: left; +z-index: 2; +} + +.lottery-dropdownlist li { +cursor: pointer; +} + +.lottery-dropdownlist li:hover { +background: #e8eaeb; +} + +.dropdown { +position: relative; +_zoom: 1; +} + +.dropdown-trigger { +border: 1px solid #d9d9d9; +display: inline-block; +} + +.dropdown-input { +cursor: pointer; +line-height: 24px; +height: 24px; +font-size: 12px; +border: 0; +} + +.dropdown-ltr .dropdown-input { +padding-right: 25px; +padding-left: 5px; +} + +.dropdown-rtl .dropdown-input { +padding-right: 5px; +padding-left: 25px; +} + +.dropdown-arrow { +background-color: #f5f7f7; +background-image: -moz-linear-gradient(top,#f5f7f7,#fff 100.0%); +background-image: -webkit-linear-gradient(top,#f5f7f7,#fff 100.0%); +background-image: -o-linear-gradient(top,#f5f7f7,#fff 100.0%); +background-image: -ms-linear-gradient(top,#f5f7f7,#fff 100.0%); +background-image: linear-gradient(top,#f5f7f7,#fff 100.0%); +border: 0; +width: 23px; +height: 24px; +position: absolute; +top: 1px; +_top: 2px; +cursor: pointer; +} + +.dropdown-ltr .dropdown-arrow { +right: 1px; +border-left: 1px solid #ebebeb; +} + +.dropdown-rtl .dropdown-arrow { +left: 1px; +border-right: 1px solid #ebebeb; +} + +.dropdown-arrow i { +background: no-repeat; +background-position: -32px -50px; +display: block; +width: 11px; +height: 6px; +position: relative; +font-size: 0; +top: 9px; +} + +.dropdown-ltr .dropdown-arrow i { +right: -6px; +} + +.dropdown-rtl .dropdown-arrow i { +left: -6px; +} + +.dropdown-arrow-up i { +background-position: 0 -50px; +} + +.dropdown-list { +position: absolute; +top: 26px; +_top: 27px; +left: 0; +background: #fff; +border-top: 0; +text-indent: 5px; +display: none; +z-index: 2; +border: 1px solid #d9d9d9; +border-top: 0; +line-height: 24px; +font-size: 12px; +} + +.dropdown-list ul { +max-height: 144px; +overflow-y: auto; +overflow-x: hidden; +} + +.dropdown-list li { +cursor: pointer; +text-overflow: ellipsis; +overflow: hidden; +_width: 100%; +white-space: nowrap; +} + +.dropdown-list li:hover { +background: #e8eaeb; +} + +.select_theme .skin_1,.select_theme .skin_1 span,.select_theme .skin_2,.select_theme .skin_2 span,.select_theme .skin_3,.select_theme .skin_3 span,.lottery-trigger i,.ui-datepicker-trigger i,.dropdown-arrow i,.dropdown-arrow-up i { +background-image: url("/static/common/pkg/module_common_zf89b3a17.png"); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/old/module_common.min.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/old/module_common.min.css new file mode 100755 index 000000000..a86fec2ae --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/old/module_common.min.css @@ -0,0 +1 @@ +@charset "utf-8";body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,figure,blockquote,th,td{margin:0;padding:0}fieldset,img,iframe{border:0}address,caption,cite,code,dfn,em,i,th,var{font-style:normal;font-weight:normal}ul,li,ol{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{-webkit-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-o-tap-highlight-color:rgba(0,0,0,0);-moz-tap-highlight-color:rgba(0,0,0,0);vertical-align:baseline;background-color:transparent;_zoom:expression(function(el){document.execCommand('BackgroundImageCache',false,true);el.style.zoom = "1"}(this))}a{text-decoration:none;color:#333}a:hover{text-decoration:none}a:focus,a:hover,a:active,input:focus,textarea:focus{outline:0}a::-moz-focus-inner,input::-moz-focus-inner,button::-moz-focus-inner{border:0}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}img{-ms-interpolation-mode:bicubic;vertical-align:middle}table{font-size:inherit;font:100%;border-collapse:collapse;border-spacing:0}td{vertical-align:top}th{text-align:inherit}iframe{display:block}svg:not(:root){overflow:hidden}textarea{resize:none;overflow:auto;vertical-align:top}button,input,select,textarea{font-size:100%;vertical-align:baseline;*vertical-align:middle}button,input{*overflow:visible;line-height:normal;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}button{cursor:pointer}input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*width:13px;*height:13px}button[disabled],input[disabled]{cursor:default}q{quotes:none}q:before,q:after{content:'';content:none}abbr,acronym{border:0;font-variant:normal}strong,.strong{font-weight:bold}pre,.pre{white-space:pre;white-space:pre-wrap;white-space:pre-line;word-wrap:break-word}h1,.h1{font-size:1.8em}h2,.h2{font-size:1.6em}h3,.h3{font-size:1.4em}h4,.h4{font-size:1.2em}h5,.h5{font-size:1em}h6,.h6{font-size:1em}small,.small{font-size:75%}sub,.sub,sup,.sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup,.sup{top:-0.5em}sub,.sub{bottom:-0.25em}@charset "utf-8";article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}@charset "utf-8";.unselect,i,.i,.icon{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}b,.b,.border{display:block;font:0/0 a}.s-ptn,.s-pvn,.s-pan{padding-top:0!important}.s-pts,.s-pvs,.s-pas{padding-top:5px!important}.s-ptm,.s-pvm,.s-pam{padding-top:10px!important}.s-ptl,.s-pvl,.s-pal{padding-top:20px!important}.s-prn,.s-phn,.s-pan{padding-right:0!important}.s-prs,.s-phs,.s-pas{padding-right:5px!important}.s-prm,.s-phm,.s-pam{padding-right:10px!important}.s-prl,.s-phl,.s-pal{padding-right:20px!important}.s-pbn,.s-pvn,.s-pan{padding-bottom:0!important}.s-pbs,.s-pvs,.s-pas{padding-bottom:5px!important}.s-pbm,.s-pvm,.s-pam{padding-bottom:10px!important}.s-pbl,.s-pvl,.s-pal{padding-bottom:20px!important}.s-pln,.s-phn,.s-pan{padding-left:0!important}.s-pls,.s-phs,.s-pas{padding-left:5px!important}.s-plm,.s-phm,.s-pam{padding-left:10px!important}.s-pll,.s-phl,.s-pal{padding-left:20px!important}.s-mtn,.s-mvn,.s-man{margin-top:0!important}.s-mts,.s-mvs,.s-mas{margin-top:5px!important}.s-mtm,.s-mvm,.s-mam{margin-top:10px!important}.s-mtl,.s-mvl,.s-mal{margin-top:20px!important}.s-mrn,.s-mhn,.s-man{margin-right:0!important}.s-mrs,.s-mhs,.s-mas{margin-right:5px!important}.s-mrm,.s-mhm,.s-mam{margin-right:10px!important}.s-mrl,.s-mhl,.s-mal{margin-right:20px!important}.s-mbn,.s-mvn,.s-man{margin-bottom:0!important}.s-mbs,.s-mvs,.s-mas{margin-bottom:5px!important}.s-mbm,.s-mvm,.s-mam{margin-bottom:10px!important}.s-mbl,.s-mvl,.s-mal{margin-bottom:20px!important}.s-mln,.s-mhn,.s-man{margin-left:0!important}.s-mls,.s-mhs,.s-mas{margin-left:5px!important}.s-mlm,.s-mhm,.s-mam{margin-left:10px!important}.s-mll,.s-mhl,.s-mal{margin-left:20px!important}.g-area-lazyload{visibility:hidden}.hide{display:none!important;visibility:hidden}.hide-layout{visibility:hidden}.hide-text{border:0;font:0/0 a;text-shadow:none;color:transparent;background-color:transparent}.hide-read,.hide-focus{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.hide-focus:active,.hide-focus:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.cf{zoom:1}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}.fl,.fr{display:inline}.fl{float:left}.fr{float:right}.ibw,.ibw-span{word-spacing:-0.35em;letter-spacing:-.32em}.ib,.ibw .ib,.ibw-span span,s,.s,.space,.btn{display:-moz-inline-box;display:inline-block;*display:inline;*zoom:1}.ibw .ib,.ibw-span span{word-spacing:normal;letter-spacing:normal;vertical-align:top}.mod{overflow:hidden;*overflow:visible;zoom:1}.mod .img{float:left}.mod .img img{display:block}.transparent{filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}.triangle{width:0;height:0;overflow:hidden;font-size:0;line-height:0;border-color:transparent;border-style:dashed;border-width:5px}body{background:#edf0ef;font:12px/1.231 arial,Tahoma,helvetica,clean,sans-serif;position:relative}.l-fl{float:left;_margin-right:-3px}.l-fr{float:right;_margin-left:-3px}.l-ff,.l-g0{overflow:hidden;zoom:1}.l-wrap{width:960px;margin:0 auto}.l-g{width:100%;zoom:1;_zoom:expression(function(el){el.firstChild.style.marginLeft = 0;el.style.zoom = "1"}(this))}.l-g:before,.l-g:after{content:'';display:table}.l-g:after{clear:both}.l-g1-1{float:none}.l-g1-2{width:50%}.l-g1-3{width:33.33333%}.l-g2-3{width:66.66666%}.l-g1-4{width:25%}.l-g3-4{width:75%}.l-g1-5{width:20%}.l-g2-5{width:40%}.l-g3-5{width:60%}.l-g4-5{width:80%}.l-g1-8{width:12.5%}.l-g3-8{width:37.5%}.l-g5-8{width:62.5%}.l-g7-8{width:87.5%}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{float:left;_margin-right:-3px}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{display:inline;float:left;margin-left:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#aaa}[class*="l-g"]:first-child{margin-left:0}.l-g1{width:70px}.l-g2{width:150px}.l-g3{width:230px}.l-g4{width:310px}.l-g5{width:390px}.l-g6{width:470px}.l-g7{width:550px}.l-g8{width:630px}.l-g9{width:710px}.l-g10{width:790px}.l-g11{width:870px}.l-g12{width:950px}.l-g_1{margin-left:80px!important}.l-g_2{margin-left:160px!important}.l-g_3{margin-left:240px!important}.l-g_4{margin-left:320px!important}.l-g_5{margin-left:400px!important}.l-g_6{margin-left:480px!important}.l-g_7{margin-left:560px!important}.l-g_8{margin-left:640px!important}.l-g_9{margin-left:720px!important}.l-g_10{margin-left:800px!important}.l-g_11{margin-left:880px!important}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{margin-right:10px;_zoom:expression(function(el){if(!el.nextSibling || el.nextSibling.nodeType!== 1) el.style.marginRight = 0;el.style.zoom = "1"}(this))}.l-wrap_l .l-wrap{width:1130px}.l-wrap_l .l-g1{width:85px}.l-wrap_l .l-g2{width:180px}.l-wrap_l .l-g3{width:275px}.l-wrap_l .l-g4{width:370px}.l-wrap_l .l-g5{width:465px}.l-wrap_l .l-g6{width:560px}.l-wrap_l .l-g7{width:655px}.l-wrap_l .l-g8{width:750px}.l-wrap_l .l-g9{width:845px}.l-wrap_l .l-g10{width:940px}.l-wrap_l .l-g11{width:1035px}.l-wrap_l .l-g12{width:1130px}.l-wrap_l .l-g_1{margin-left:95px!important}.l-wrap_l .l-g_2{margin-left:190px!important}.l-wrap_l .l-g_3{margin-left:285px!important}.l-wrap_l .l-g_4{margin-left:380px!important}.l-wrap_l .l-g_5{margin-left:475px!important}.l-wrap_l .l-g_6{margin-left:570px!important}.l-wrap_l .l-g_7{margin-left:665px!important}.l-wrap_l .l-g_8{margin-left:760px!important}.l-wrap_l .l-g_9{margin-left:855px!important}.l-wrap_l .l-g_10{margin-left:950px!important}.l-wrap_l .l-g_11{margin-left:1045px!important}.box-prompt{background:#ebfcf7;border:1px solid #ceded9;border-bottom:1px solid #beccc7;position:absolute;color:#454545;-moz-border-radius:2px;-webkit-border-radius:2px;-o-border-radius:2px;border-radius:2px;z-index:100}.box-prompt-inner{border:1px solid #FFF;border-bottom:0;padding:8px;overflow:hidden}.sug-search{position:absolute;top:28px;left:-1px;border:1px solid #e3e4e6;border-top:0 none;background:#fff;width:528px;color:#454545;z-index:999;white-space:nowrap;overflow:hidden}.sug-shim{position:absolute;top:-1px;left:-1px;z-index:-1;filter:alpha(opacity="0");width:430px;height:250px}.sug-search ol{font:bold 12px/23px Tahoma,arial,helvetica,clean,sans-serif;cursor:default}.sug-search li{padding:3px 10px;cursor:pointer}.sug-search li b{font:inherit;display:inline}.sug-search .sug-select{background:#f5f7f7}.sug-search .top{font-weight:normal;color:#999;height:21px;line-height:21px;background:#eee;padding:0 2px}.sug-search .bot{position:relative;height:19px;line-height:19px;font-weight:normal;border-top:1px solid #666}.sug-search .sug-query{font-weight:normal}.sug-search font{font-weight:normal!important;color:#333!important}.ui-autocomplete{position:absolute;cursor:default;border:1px solid #e3e4e6}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px 0;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;border:0;background-color:#f5f7f7;width:100%}.ui-widget-content{background-color:#fff}.select_theme{display:block;clear:both;overflow:hidden;border-top:1px solid #bee2d6;padding:5px 15px;zoom:1}.select_theme li{width:20px;height:20px;background:#f00;float:left;margin-right:5px;cursor:pointer}.select_theme span{width:20px;height:20px}.select_theme .skin_cur{background:#ff0;cursor:default}.select_theme .skin_cur span{display:inline-block}.select_theme .skin_1{background: no-repeat;background-position:0 0 }.select_theme .skin_1 span{background: no-repeat;background-position:-50px -25px }.select_theme .skin_2{background: no-repeat;background-position:-50px 0 }.select_theme .skin_2 span{background: no-repeat;background-position:0 -25px }.select_theme .skin_3{background: no-repeat;background-position:-25px -25px }.select_theme .skin_3 span{background: no-repeat;background-position:-25px 0 }.box-search_keyboard{cursor:pointer;padding:1px}#kbd{position:absolute!important;top:130px}.outerbox{max-height:152px}#kbd input.goog-button,#kbd button.goog-button{height:16px}.vt{vertical-align:top}.pr{position:relative}.grey{color:#bfbfbf}.tc{text-align:center}.s-pa15{padding:15px}.mod-lottery{font-size:14px}.mod-lottery input,.mod-lottery textarea,.lottery-dropdownlist{border:1px solid #d9d9d9;width:142px;line-height:24px;font-size:12px}.mod-lottery input{height:24px;padding-left:5px;padding-right:25px;width:112px}#citypicker{cursor:pointer}.mod-lottery textarea{width:132px;height:70px;line-height:20px;padding:2px 5px}.mod-lottery label{display:inline-block;width:58px;text-align:right;margin-right:4px}.lottery-search,.gradient-bg-green{width:100%;height:29px;line-height:29px;display:block;color:#fff;font-weight:600;text-align:center;background-color:#10b47d;background-image:-moz-linear-gradient(top,#10b47d,#3dc094 100.0%);background-image:-webkit-linear-gradient(top,#10b47d,#3dc094 100.0%);background-image:-o-linear-gradient(top,#10b47d,#3dc094 100.0%);background-image:-ms-linear-gradient(top,#10b47d,#3dc094 100.0%);background-image:linear-gradient(top,#10b47d,#3dc094 100.0%);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.mod-lottery .lottery-search{color:#fff}.lottery-search:hover{background-color:#0fa875;background-image:-moz-linear-gradient(top,#0fa875,#3cba90 100.0%);background-image:-webkit-linear-gradient(top,#0fa875,#3cba90 100.0%);background-image:-o-linear-gradient(top,#0fa875,#3cba90 100.0%);background-image:-ms-linear-gradient(top,#0fa875,#3cba90 100.0%);background-image:linear-gradient(top,#0fa875,#3cba90 100.0%);-webkit-box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3);-moz-box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3);-o-box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3);-ms-box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3);box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3)}.lottery-search:active{background-color:#0fa875;background-image:-moz-linear-gradient(top,#3cba90,#0fa875 100.0%);background-image:-webkit-linear-gradient(top,#3cba90,#0fa875 100.0%);background-image:-o-linear-gradient(top,#3cba90,#0fa875 100.0%);background-image:-ms-linear-gradient(top,#3cba90,#0fa875 100.0%);background-image:linear-gradient(top,#3cba90,#0fa875 100.0%)}.mod-lottery .lottery-result a,.gradient-bg-gray{height:20px;line-height:20px;display:inline-block;color:#fff;text-align:center;padding:0 10px;background-color:#b8b8b8;background-image:-moz-linear-gradient(top,#b8b8b8,#c9c9c9 100.0%);background-image:-webkit-linear-gradient(top,#b8b8b8,#c9c9c9 100.0%);background-image:-o-linear-gradient(top,#b8b8b8,#c9c9c9 100.0%);background-image:-ms-linear-gradient(top,#b8b8b8,#c9c9c9 100.0%);background-image:linear-gradient(top,#b8b8b8,#c9c9c9 100.0%);-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.mod-lottery .lottery-result a:hover{background-color:#8b8b8b;background-image:-moz-linear-gradient(top,#8b8b8b,#ababab 100.0%);background-image:-webkit-linear-gradient(top,#8b8b8b,#ababab 100.0%);background-image:-o-linear-gradient(top,#8b8b8b,#ababab 100.0%);background-image:-ms-linear-gradient(top,#8b8b8b,#ababab 100.0%);background-image:linear-gradient(top,#8b8b8b,#ababab 100.0%);-webkit-box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3);-moz-box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3);-o-box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3);-ms-box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3);box-shadow:1px 1px 2px 0 rgba(0,0,0,0.3)}.mod-lottery .lottery-result a:active{background-color:#ababab;background-image:-moz-linear-gradient(top,#ababab,#8b8b8b 100.0%);background-image:-webkit-linear-gradient(top,#ababab,#8b8b8b 100.0%);background-image:-o-linear-gradient(top,#ababab,#8b8b8b 100.0%);background-image:-ms-linear-gradient(top,#ababab,#8b8b8b 100.0%);background-image:linear-gradient(top,#ababab,#8b8b8b 100.0%)}.mod-lottery .lottery-result-win a,.gradient-bg-orange{background-color:#f56f2f;background-image:-moz-linear-gradient(top,#f56f2f,#f88249 100.0%);background-image:-webkit-linear-gradient(top,#f56f2f,#f88249 100.0%);background-image:-o-linear-gradient(top,#f56f2f,#f88249 100.0%);background-image:-ms-linear-gradient(top,#f56f2f,#f88249 100.0%);background-image:linear-gradient(top,#f56f2f,#f88249 100.0%)}.mod-lottery .lottery-result-win a:hover{background-color:#f45e16;background-image:-moz-linear-gradient(top,#f45e16,#f77334 100.0%);background-image:-webkit-linear-gradient(top,#f45e16,#f77334 100.0%);background-image:-o-linear-gradient(top,#f45e16,#f77334 100.0%);background-image:-ms-linear-gradient(top,#f45e16,#f77334 100.0%);background-image:linear-gradient(top,#f45e16,#f77334 100.0%)}.mod-lottery .lottery-result-win a:active{background-color:#f45e16;background-image:-moz-linear-gradient(top,#f77334,#f45e16 100.0%);background-image:-webkit-linear-gradient(top,#f77334,#f45e16 100.0%);background-image:-o-linear-gradient(top,#f77334,#f45e16 100.0%);background-image:-ms-linear-gradient(top,#f77334,#f45e16 100.0%);background-image:linear-gradient(top,#f77334,#f45e16 100.0%)}.lottery-trigger,.ui-datepicker-trigger{background-color:#f5f7f7;background-image:-moz-linear-gradient(top,#f5f7f7,#fff 100.0%);background-image:-webkit-linear-gradient(top,#f5f7f7,#fff 100.0%);background-image:-o-linear-gradient(top,#f5f7f7,#fff 100.0%);background-image:-ms-linear-gradient(top,#f5f7f7,#fff 100.0%);background-image:linear-gradient(top,#f5f7f7,#fff 100.0%);border:0;border-left:1px solid #ebebeb;width:23px;height:24px;position:absolute;right:1px;top:1px;_top:3px;cursor:pointer}.lottery-trigger i,.ui-datepicker-trigger i{background: no-repeat;background-position:-16px -50px ;display:block;width:11px;height:6px;position:relative;font-size:0}.lottery-trigger i{top:9px;left:6px}.ui-datepicker-trigger{_overflow:hidden}.ui-datepicker-trigger i{top:0;*top:7px;left:6px;*left:-1px}.lottery-dropdownlist{position:absolute;top:26px;_top:28px;right:0;background:#fff;border-top:0;text-indent:5px;display:none;text-align:left;z-index:2}.lottery-dropdownlist li{cursor:pointer}.lottery-dropdownlist li:hover{background:#e8eaeb}.dropdown{position:relative;_zoom:1}.dropdown-trigger{border:1px solid #d9d9d9;display:inline-block}.dropdown-input{cursor:pointer;line-height:24px;height:24px;font-size:12px;border:0}.dropdown-ltr .dropdown-input{padding-right:25px;padding-left:5px}.dropdown-rtl .dropdown-input{padding-right:5px;padding-left:25px}.dropdown-arrow{background-color:#f5f7f7;background-image:-moz-linear-gradient(top,#f5f7f7,#fff 100.0%);background-image:-webkit-linear-gradient(top,#f5f7f7,#fff 100.0%);background-image:-o-linear-gradient(top,#f5f7f7,#fff 100.0%);background-image:-ms-linear-gradient(top,#f5f7f7,#fff 100.0%);background-image:linear-gradient(top,#f5f7f7,#fff 100.0%);border:0;width:23px;height:24px;position:absolute;top:1px;_top:2px;cursor:pointer}.dropdown-ltr .dropdown-arrow{right:1px;border-left:1px solid #ebebeb}.dropdown-rtl .dropdown-arrow{left:1px;border-right:1px solid #ebebeb}.dropdown-arrow i{background: no-repeat;background-position:-32px -50px ;display:block;width:11px;height:6px;position:relative;font-size:0;top:9px}.dropdown-ltr .dropdown-arrow i{right:-6px}.dropdown-rtl .dropdown-arrow i{left:-6px}.dropdown-arrow-up i{background-position:0 -50px }.dropdown-list{position:absolute;top:26px;_top:27px;left:0;background:#fff;border-top:0;text-indent:5px;display:none;z-index:2;border:1px solid #d9d9d9;border-top:0;line-height:24px;font-size:12px}.dropdown-list ul{max-height:144px;overflow-y:auto;overflow-x:hidden}.dropdown-list li{cursor:pointer;text-overflow:ellipsis;overflow:hidden;_width:100%;white-space:nowrap}.dropdown-list li:hover{background:#e8eaeb}.select_theme .skin_1,.select_theme .skin_1 span,.select_theme .skin_2,.select_theme .skin_2 span,.select_theme .skin_3,.select_theme .skin_3 span,.lottery-trigger i,.ui-datepicker-trigger i,.dropdown-arrow i,.dropdown-arrow-up i{background-image:url("/static/common/pkg/module_common_zf89b3a17.png")} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/package.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/package.json new file mode 100755 index 000000000..d8ebb4e75 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/package.json @@ -0,0 +1,31 @@ +{ + "name": "base-css", + "version": "0.0.1", + "description": "base-css", + "dependencies": {}, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-copy": "~0.4.1", + "grunt-contrib-concat": "~0.1.3", + "grunt-contrib-uglify": "~0.2.0", + "grunt-contrib-cssmin": "~0.6.0", + "grunt-contrib-connect": "~0.2.0", + "grunt-contrib-clean": "~0.4.0", + "grunt-contrib-htmlmin": "~0.1.3", + "grunt-contrib-watch": "~0.4.0", + "grunt-usemin": "~0.1.12", + "grunt-mocha": "~0.3.0", + "grunt-open": "~0.2.0", + "grunt-svgmin": "~0.1.0", + "grunt-concurrent": "~0.1.0", + "grunt-contrib-stylus": "~0.5.1", + "grunt-shell": "~0.3.0", + "matchdep": "~0.1.1" + }, + "scripts": { + "build": "grunt build" + }, + "engines": { + "node": ">=0.8.0" + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/default.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/default.css new file mode 100755 index 000000000..c642f485e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/default.css @@ -0,0 +1,14 @@ +html { + background: #edf0ef; +} +body { + font: 12px/1.231 arial,Tahoma,helvetica,clean,sans-serif; + position: relative; +} +a { + text-decoration: none; + color: #333 +} +a:hover { + text-decoration: none +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.css new file mode 100755 index 000000000..29809f099 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.css @@ -0,0 +1,34 @@ +/** from common.css +常用的命名样式,方便PM在CMS中配置 */ + +/*special status of links*/ + +/*large*/ +/*.i-l{}*/ +/*media*/ +/*.i-m{} */ +/*small*/ +/*.i-s{}*/ + +.icon-hot, .icon-new, .icon-new_red{ + display: inline-block; + margin-left: 3px; + cursor: pointer; + _position: absolute; + font-size:0; +} +.icon-hot{ + width: 30px; + height: 11px; + background: url(../img/i-hot.png?__sprite) no-repeat; +} +.icon-new{ + width: 30px; + height: 11px; + background: url(../img/i-new.png?__sprite) no-repeat; +} +.icon-new_red{ + width: 25px; + height: 15px; + background: url(../img/i-big-new.png?__sprite) no-repeat; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.ie.css new file mode 100755 index 000000000..37e66e6d6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.ie.css @@ -0,0 +1,6 @@ +.icon-hot, .icon-new, .icon-new_red{ + display: inline-block; + *display: inline; + zoom: 1; + _position: absolute; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.rtl.css new file mode 100755 index 000000000..08ef6f827 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.rtl.css @@ -0,0 +1,26 @@ +/** from common.css +常用的命名样式,方便PM在CMS中配置 */ + +/*special status of links*/ + +.icon-hot, .icon-new, .icon-new_red{ + display: inline-block; + margin-right: 3px; + cursor: pointer; + font-size:0; +} +.icon-hot{ + width: 30px; + height: 11px; + background: url(../img/i-hot.png?__sprite) no-repeat; +} +.icon-new{ + width: 30px; + height: 11px; + background: url(../img/i-new.png?__sprite) no-repeat; +} +.icon-new_red{ + width: 25px; + height: 15px; + background: url(../img/i-big-new.png?__sprite) no-repeat; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.rtl.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.rtl.ie.css new file mode 100755 index 000000000..8b6bd0866 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/icon.rtl.ie.css @@ -0,0 +1,6 @@ +.icon-hot, .icon-new, .icon-new_red{ + display: inline-block; + *display: inline; + zoom: 1; + _position: absolute; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.css new file mode 100755 index 000000000..a528e485f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.css @@ -0,0 +1,297 @@ +.l-fl { + float: left; +} + +.l-fr { + float: right; +} + +.l-ff, .l-g0 { + overflow: hidden; +} + +.l-wrap { + width: 960px; + margin: 0 auto +} + +/********** +* layout +*/ + +.l-g { + width: 100%; +} + +.l-g:before, .l-g:after { + content: ''; + display: table +} + +.l-g:after { + clear: both +} + +.l-g1-1 { + float: none +} + +.l-g1-2 { + width: 50% +} + +.l-g1-3 { + width: 33.33333% +} + +.l-g2-3 { + width: 66.66666% +} + +.l-g1-4 { + width: 25% +} + +.l-g3-4 { + width: 75% +} + +.l-g1-5 { + width: 20% +} + +.l-g2-5 { + width: 40% +} + +.l-g3-5 { + width: 60% +} + +.l-g4-5 { + width: 80% +} + +.l-g1-8 { + width: 12.5% +} + +.l-g3-8 { + width: 37.5% +} + +.l-g5-8 { + width: 62.5% +} + +.l-g7-8 { + width: 87.5% +} + +.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + float: left; +} + +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + float: left; + margin-left: 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +[class*="l-g"]:first-child { + margin-left: 0 +} + +.l-g1 { + width: 70px +} + +.l-g2 { + width: 150px +} + +.l-g3 { + width: 230px +} + +.l-g4 { + width: 310px +} + +.l-g5 { + width: 390px +} + +.l-g6 { + width: 470px +} + +.l-g7 { + width: 550px +} + +.l-g8 { + width: 630px +} + +.l-g9 { + width: 710px +} + +.l-g10 { + width: 790px +} + +.l-g11 { + width: 870px +} + +.l-g12 { + width: 950px +} + +.l-g_1 { + margin-left: 80px !important +} + +.l-g_2 { + margin-left: 160px !important +} + +.l-g_3 { + margin-left: 240px !important +} + +.l-g_4 { + margin-left: 320px !important +} + +.l-g_5 { + margin-left: 400px !important +} + +.l-g_6 { + margin-left: 480px !important +} + +.l-g_7 { + margin-left: 560px !important +} + +.l-g_8 { + margin-left: 640px !important +} + +.l-g_9 { + margin-left: 720px !important +} + +.l-g_10 { + margin-left: 800px !important +} + +.l-g_11 { + margin-left: 880px !important +} + +.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + margin-right: 10px; +} + +/*.l-wrap_l .l-wrap { + width: 1130px +} + +.l-wrap_l .l-g1 { + width: 85px +} + +.l-wrap_l .l-g2 { + width: 180px +} + +.l-wrap_l .l-g3 { + width: 275px +} + +.l-wrap_l .l-g4 { + width: 370px +} + +.l-wrap_l .l-g5 { + width: 465px +} + +.l-wrap_l .l-g6 { + width: 560px +} + +.l-wrap_l .l-g7 { + width: 655px +} + +.l-wrap_l .l-g8 { + width: 750px +} + +.l-wrap_l .l-g9 { + width: 845px +} + +.l-wrap_l .l-g10 { + width: 940px +} + +.l-wrap_l .l-g11 { + width: 1035px +} + +.l-wrap_l .l-g12 { + width: 1130px +} + +.l-wrap_l .l-g_1 { + margin-left: 95px !important +} + +.l-wrap_l .l-g_2 { + margin-left: 190px !important +} + +.l-wrap_l .l-g_3 { + margin-left: 285px !important +} + +.l-wrap_l .l-g_4 { + margin-left: 380px !important +} + +.l-wrap_l .l-g_5 { + margin-left: 475px !important +} + +.l-wrap_l .l-g_6 { + margin-left: 570px !important +} + +.l-wrap_l .l-g_7 { + margin-left: 665px !important +} + +.l-wrap_l .l-g_8 { + margin-left: 760px !important +} + +.l-wrap_l .l-g_9 { + margin-left: 855px !important +} + +.l-wrap_l .l-g_10 { + margin-left: 950px !important +} + +.l-wrap_l .l-g_11 { + margin-left: 1045px !important +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.ie.css new file mode 100755 index 000000000..72548e0fe --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.ie.css @@ -0,0 +1,26 @@ +.l-fl { + _margin-right: -3px +} + +.l-fr { + _margin-left: -3px +} + +.l-ff, .l-g0 { + zoom: 1 +} + +.l-g { + zoom: 1; + _zoom: expression(function(el){el.firstChild.style.marginLeft = 0;el.style.zoom = "1"}(this)) +} +.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + _margin-right: -3px +} +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + display: inline; +} + +.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + _zoom: expression(function(el){if(!el.nextSibling || el.nextSibling.nodeType!== 1) el.style.marginRight = 0;el.style.zoom = "1"}(this)) +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.rtl.css new file mode 100755 index 000000000..2de0d43e2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.rtl.css @@ -0,0 +1,204 @@ +.l-fl { + float: left; +} + +.l-fr { + float: right; +} + +.l-ff, .l-g0 { + overflow: hidden; +} + +.l-wrap { + width: 960px; + margin: 0 auto +} + +/********** +* layout +*/ + +.l-g { + width: 100%; +} + +.l-g:before, .l-g:after { + content: ''; + display: table +} + +.l-g:after { + clear: both +} + +.l-g1-1 { + float: none +} + +.l-g1-2 { + width: 50% +} + +.l-g1-3 { + width: 33.33333% +} + +.l-g2-3 { + width: 66.66666% +} + +.l-g1-4 { + width: 25% +} + +.l-g3-4 { + width: 75% +} + +.l-g1-5 { + width: 20% +} + +.l-g2-5 { + width: 40% +} + +.l-g3-5 { + width: 60% +} + +.l-g4-5 { + width: 80% +} + +.l-g1-8 { + width: 12.5% +} + +.l-g3-8 { + width: 37.5% +} + +.l-g5-8 { + width: 62.5% +} + +.l-g7-8 { + width: 87.5% +} + +.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + float: right; + _margin-left: -3px !important; +} + +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + display: inline; + float: right; + margin-right: 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +[class*="l-g"]:first-child { + margin-right: 0 +} + +.l-g1 { + width: 70px +} + +.l-g2 { + width: 150px +} + +.l-g3 { + width: 230px +} + +.l-g4 { + width: 310px +} + +.l-g5 { + width: 390px +} + +.l-g6 { + width: 470px +} + +.l-g7 { + width: 550px +} + +.l-g8 { + width: 630px +} + +.l-g9 { + width: 710px +} + +.l-g10 { + width: 790px +} + +.l-g11 { + width: 870px +} + +.l-g12 { + width: 950px +} + +.l-g_1 { + margin-right: 80px !important; +} + +.l-g_2 { + margin-right: 160px !important; +} + +.l-g_3 { + margin-right: 240px !important; +} + +.l-g_4 { + margin-right: 320px !important; +} + +.l-g_5 { + margin-right: 400px !important; +} + +.l-g_6 { + margin-right: 480px !important; + margin-left: 0 !important +} + +.l-g_7 { + margin-right: 560px !important; +} + +.l-g_8 { + margin-right: 640px !important; +} + +.l-g_9 { + margin-right: 720px !important; +} + +.l-g_10 { + margin-right: 800px !important; +} + +.l-g_11 { + margin-right: 880px !important; +} + +.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + margin-left: 10px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.rtl.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.rtl.ie.css new file mode 100755 index 000000000..6eb7aef81 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/layout.rtl.ie.css @@ -0,0 +1,18 @@ +.l-ff, .l-g0 { + zoom: 1 +} + +.l-g { + zoom: 1; + _zoom: expression(function(el){el.firstChild.style.marginRight = 0;el.style.zoom = "1"}(this)) +} +.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + _margin-left: -3px +} +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + display: inline; +} + +.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + _zoom: expression(function(el){if(!el.nextSibling || el.nextSibling.nodeType!== 1) el.style.marginLeft = 0;el.style.zoom = "1"}(this)) +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/link.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/link.css new file mode 100755 index 000000000..45fd262c9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/link.css @@ -0,0 +1,5 @@ +.orange,.orange a{color:#f56f2f!important;} +.red,.red a{color:#f00!important;} +.green,.green a{color:#008000!important;} +.bold,.bold a{font-weight:600!important;} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/reset.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/reset.css new file mode 100755 index 000000000..1e2cdc9ce --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/reset.css @@ -0,0 +1,133 @@ +@charset "utf-8"; + + +/*********** +* reset +*/ + +* { + margin: 0; + padding: 0; +} + +fieldset, img, iframe { + border: 0 +} + +address, caption, cite, code, dfn, em, i, th, var { + font-style: normal; + font-weight: normal +} + +ul, li, ol { + list-style: none +} + +caption, th { + text-align: left +} + +h1, h2, h3, h4, h5, h6 { + font-size: 100%; + font-weight: normal +} + +html { + font-size: 100%; +} + +body { + vertical-align: baseline; + background-color: transparent; +} + +a:focus, a:hover, a:active, input:focus, textarea:focus { + outline: 0 +} + +img { + vertical-align: middle +} + +table { + font-size: inherit; + font: 100%; + border-collapse: collapse; + border-spacing: 0 +} + +td { + vertical-align: top +} + +th { + text-align: inherit +} + +iframe { + display: block +} + +textarea { + resize: none; + overflow: auto; + vertical-align: top +} + +button, input, select, textarea { + font-size: 100%; + vertical-align: baseline; +} + +button, input { + *overflow: visible; + line-height: normal; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box +} + +button { + cursor: pointer +} + +button[disabled], input[disabled] { + cursor: default +} + +abbr, acronym { + border: 0; + font-variant: normal +} + +strong, .strong { + font-weight: bold +} + +/*h1, .h1 { + font-size: 1.8em +} + +h2, .h2 { + font-size: 1.6em +} + +h3, .h3 { + font-size: 1.4em +} + +h4, .h4 { + font-size: 1.2em +} + +h5, .h5 { + font-size: 1em +} + +h6, .h6 { + font-size: 1em +} + +small, .small { + font-size: 75% +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/reset.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/reset.ie.css new file mode 100755 index 000000000..d3b3126e6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/reset.ie.css @@ -0,0 +1,13 @@ +body { + _zoom: expression(function(el){document.execCommand('BackgroundImageCache',false,true);el.style.zoom = "1"}(this)) +} +img { + -ms-interpolation-mode: bicubic; +} +button, input, select, textarea { + *vertical-align: middle +} + +button, input { + *overflow: visible; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/tool.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/tool.css new file mode 100755 index 000000000..c722163e1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/tool.css @@ -0,0 +1,246 @@ +.unselect, i, .i, .icon { + -moz-user-select: -moz-none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none +} + +b, .b, .border { + display: block; + font: 0/0 a +} + +.s-ptn, .s-pvn, .s-pan { + padding-top: 0 !important +} + +.s-pts, .s-pvs, .s-pas { + padding-top: 5px !important +} + +.s-ptm, .s-pvm, .s-pam { + padding-top: 10px !important +} + +.s-ptl, .s-pvl, .s-pal { + padding-top: 20px !important +} + +.s-prn, .s-phn, .s-pan { + padding-right: 0 !important +} + +.s-prs, .s-phs, .s-pas { + padding-right: 5px !important +} + +.s-prm, .s-phm, .s-pam { + padding-right: 10px !important +} + +.s-prl, .s-phl, .s-pal { + padding-right: 20px !important +} + +.s-pbn, .s-pvn, .s-pan { + padding-bottom: 0 !important +} + +.s-pbs, .s-pvs, .s-pas { + padding-bottom: 5px !important +} + +.s-pbm, .s-pvm, .s-pam { + padding-bottom: 10px !important +} + +.s-pbl, .s-pvl, .s-pal { + padding-bottom: 20px !important +} + +.s-pln, .s-phn, .s-pan { + padding-left: 0 !important +} + +.s-pls, .s-phs, .s-pas { + padding-left: 5px !important +} + +.s-plm, .s-phm, .s-pam { + padding-left: 10px !important +} + +.s-pll, .s-phl, .s-pal { + padding-left: 20px !important +} + +.s-mtn, .s-mvn, .s-man { + margin-top: 0 !important +} + +.s-mts, .s-mvs, .s-mas { + margin-top: 5px !important +} + +.s-mtm, .s-mvm, .s-mam { + margin-top: 10px !important +} + +.s-mtl, .s-mvl, .s-mal { + margin-top: 20px !important +} + +.s-mrn, .s-mhn, .s-man { + margin-right: 0 !important +} + +.s-mrs, .s-mhs, .s-mas { + margin-right: 5px !important +} + +.s-mrm, .s-mhm, .s-mam { + margin-right: 10px !important +} + +.s-mrl, .s-mhl, .s-mal { + margin-right: 20px !important +} + +.s-mbn, .s-mvn, .s-man { + margin-bottom: 0 !important +} + +.s-mbs, .s-mvs, .s-mas { + margin-bottom: 5px !important +} + +.s-mbm, .s-mvm, .s-mam { + margin-bottom: 10px !important +} + +.s-mbl, .s-mvl, .s-mal { + margin-bottom: 20px !important +} + +.s-mln, .s-mhn, .s-man { + margin-left: 0 !important +} + +.s-mls, .s-mhs, .s-mas { + margin-left: 5px !important +} + +.s-mlm, .s-mhm, .s-mam { + margin-left: 10px !important +} + +.s-mll, .s-mhl, .s-mal { + margin-left: 20px !important +} +/*提供给bigrender作为lazyload*/ +.g-area-lazyload{ + visibility: hidden; +} +.hide { + display: none !important; + visibility: hidden +} +/* +.hide-layout { + visibility: hidden +} + +.hide-text { + border: 0; + font: 0/0 a; + text-shadow: none; + color: transparent; + background-color: transparent +} + +.hide-read, .hide-focus { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px +} + +.hide-focus:active, .hide-focus:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto +}*/ + +/* float */ + +.cf:before, .cf:after { + content: ''; + display: table +} + +.cf:after { + clear: both +} + +.fl { + float: left +} + +.fr { + float: right +} + +.ibw{ + word-spacing: -0.35em; + letter-spacing: -.32em +} + +.ib, .ibw .ib, s, .s, .space, .btn { + display: inline-block; +} + +.ibw .ib{ + word-spacing: normal; + letter-spacing: normal; + vertical-align: top +} + +.mod { + overflow: hidden; +} + +/*.mod .img { + float: left +} + +.mod .img img { + display: block +} + +.transparent { + filter: alpha(opacity=50); + -moz-opacity: .5; + -khtml-opacity: .5; + opacity: .5 +}*/ + +/** from common.css +常用的命名样式,方便PM在CMS中配置 */ + +.triangle{ + width:0; + height:0; + overflow:hidden; + font-size:0; + line-height:0; + border-color:transparent; + border-style:dashed; + border-width:5px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/tool.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/tool.ie.css new file mode 100755 index 000000000..9e0881d32 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/src/tool.ie.css @@ -0,0 +1,17 @@ +.unselect, i, .i, .icon { + -khtml-user-select: none; +} +.cf { + zoom: 1 +} +.fl, .fr { + display: inline +} +.mod { + *overflow: visible; + zoom: 1 +} +.ib, .ibw .ib, s, .s, .space, .btn { + *display: inline; + zoom: 1 +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.ltr.css new file mode 100755 index 000000000..9ed8491e7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.ltr.css @@ -0,0 +1 @@ +@charset "utf-8";*{margin:0;padding:0}fieldset,img,iframe{border:0}address,caption,cite,code,dfn,em,i,th,var{font-style:normal;font-weight:400}ul,li,ol{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}html{font-size:100%}body{vertical-align:baseline;background-color:transparent}a:focus,a:hover,a:active,input:focus,textarea:focus{outline:0}img{vertical-align:middle}table{font-size:inherit;font:100%;border-collapse:collapse;border-spacing:0}td{vertical-align:top}th{text-align:inherit}iframe{display:block}textarea{resize:none;overflow:auto;vertical-align:top}button,input,select,textarea{font-size:100%;vertical-align:baseline}button,input{*overflow:visible;line-height:normal;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}button{cursor:pointer}button[disabled],input[disabled]{cursor:default}abbr,acronym{border:0;font-variant:normal}strong,.strong{font-weight:700}.l-fl{float:left}.l-fr{float:right}.l-ff,.l-g0{overflow:hidden}.l-wrap{width:960px;margin:0 auto}.l-g{width:100%}.l-g:before,.l-g:after{content:'';display:table}.l-g:after{clear:both}.l-g1-1{float:none}.l-g1-2{width:50%}.l-g1-3{width:33.33333%}.l-g2-3{width:66.66666%}.l-g1-4{width:25%}.l-g3-4{width:75%}.l-g1-5{width:20%}.l-g2-5{width:40%}.l-g3-5{width:60%}.l-g4-5{width:80%}.l-g1-8{width:12.5%}.l-g3-8{width:37.5%}.l-g5-8{width:62.5%}.l-g7-8{width:87.5%}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{float:left}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{float:left;margin-left:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[class*=l-g]:first-child{margin-left:0}.l-g1{width:70px}.l-g2{width:150px}.l-g3{width:230px}.l-g4{width:310px}.l-g5{width:390px}.l-g6{width:470px}.l-g7{width:550px}.l-g8{width:630px}.l-g9{width:710px}.l-g10{width:790px}.l-g11{width:870px}.l-g12{width:950px}.l-g_1{margin-left:80px!important}.l-g_2{margin-left:160px!important}.l-g_3{margin-left:240px!important}.l-g_4{margin-left:320px!important}.l-g_5{margin-left:400px!important}.l-g_6{margin-left:480px!important}.l-g_7{margin-left:560px!important}.l-g_8{margin-left:640px!important}.l-g_9{margin-left:720px!important}.l-g_10{margin-left:800px!important}.l-g_11{margin-left:880px!important}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{margin-right:10px}.unselect,i,.i,.icon{-moz-user-select:-moz-none;-webkit-user-select:none;-o-user-select:none;user-select:none}b,.b,.border{display:block;font:0/0 a}.s-ptn,.s-pvn,.s-pan{padding-top:0!important}.s-pts,.s-pvs,.s-pas{padding-top:5px!important}.s-ptm,.s-pvm,.s-pam{padding-top:10px!important}.s-ptl,.s-pvl,.s-pal{padding-top:20px!important}.s-prn,.s-phn,.s-pan{padding-right:0!important}.s-prs,.s-phs,.s-pas{padding-right:5px!important}.s-prm,.s-phm,.s-pam{padding-right:10px!important}.s-prl,.s-phl,.s-pal{padding-right:20px!important}.s-pbn,.s-pvn,.s-pan{padding-bottom:0!important}.s-pbs,.s-pvs,.s-pas{padding-bottom:5px!important}.s-pbm,.s-pvm,.s-pam{padding-bottom:10px!important}.s-pbl,.s-pvl,.s-pal{padding-bottom:20px!important}.s-pln,.s-phn,.s-pan{padding-left:0!important}.s-pls,.s-phs,.s-pas{padding-left:5px!important}.s-plm,.s-phm,.s-pam{padding-left:10px!important}.s-pll,.s-phl,.s-pal{padding-left:20px!important}.s-mtn,.s-mvn,.s-man{margin-top:0!important}.s-mts,.s-mvs,.s-mas{margin-top:5px!important}.s-mtm,.s-mvm,.s-mam{margin-top:10px!important}.s-mtl,.s-mvl,.s-mal{margin-top:20px!important}.s-mrn,.s-mhn,.s-man{margin-right:0!important}.s-mrs,.s-mhs,.s-mas{margin-right:5px!important}.s-mrm,.s-mhm,.s-mam{margin-right:10px!important}.s-mrl,.s-mhl,.s-mal{margin-right:20px!important}.s-mbn,.s-mvn,.s-man{margin-bottom:0!important}.s-mbs,.s-mvs,.s-mas{margin-bottom:5px!important}.s-mbm,.s-mvm,.s-mam{margin-bottom:10px!important}.s-mbl,.s-mvl,.s-mal{margin-bottom:20px!important}.s-mln,.s-mhn,.s-man{margin-left:0!important}.s-mls,.s-mhs,.s-mas{margin-left:5px!important}.s-mlm,.s-mhm,.s-mam{margin-left:10px!important}.s-mll,.s-mhl,.s-mal{margin-left:20px!important}.g-area-lazyload{visibility:hidden}.hide{display:none!important;visibility:hidden}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}.fl{float:left}.fr{float:right}.mod{overflow:hidden}.triangle{width:0;height:0;overflow:hidden;font-size:0;line-height:0;border-color:transparent;border-style:dashed;border-width:5px}html{background:#edf0ef}body{font:12px/1.231 arial,Tahoma,helvetica,clean,sans-serif;position:relative}a{text-decoration:none;color:#333}a:hover{text-decoration:none}.orange,.orange a{color:#f56f2f!important}.red,.red a{color:red!important}.green,.green a{color:green!important}.bold,.bold a{font-weight:600!important}.icon-hot,.icon-new,.icon-new_red{display:inline-block;margin-left:3px;cursor:pointer;_position:absolute;font-size:0}.icon-hot{width:30px;height:11px;background:url(../img/i-hot.png?m=z) no-repeat}.icon-new{width:30px;height:11px;background:url(../img/i-new.png?m=z) no-repeat}.icon-new_red{width:25px;height:15px;background:url(../img/i-big-new.png?m=z) no-repeat} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.ltr.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.ltr.ie.css new file mode 100755 index 000000000..3239e4463 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.ltr.ie.css @@ -0,0 +1 @@ +@charset "utf-8";*{margin:0;padding:0}fieldset,img,iframe{border:0}address,caption,cite,code,dfn,em,i,th,var{font-style:normal;font-weight:400}ul,li,ol{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}html{font-size:100%}body{vertical-align:baseline;background-color:transparent}a:focus,a:hover,a:active,input:focus,textarea:focus{outline:0}img{vertical-align:middle}table{font-size:inherit;font:100%;border-collapse:collapse;border-spacing:0}td{vertical-align:top}th{text-align:inherit}iframe{display:block}textarea{resize:none;overflow:auto;vertical-align:top}button,input,select,textarea{font-size:100%;vertical-align:baseline}button,input{*overflow:visible;line-height:normal;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}button{cursor:pointer}button[disabled],input[disabled]{cursor:default}abbr,acronym{border:0;font-variant:normal}strong,.strong{font-weight:700}body{_zoom:expression(function(el){document.execCommand('BackgroundImageCache',false,true);el.style.zoom="1"}(this))}img{-ms-interpolation-mode:bicubic}button,input,select,textarea{*vertical-align:middle}button,input{*overflow:visible}.l-fl{float:left}.l-fr{float:right}.l-ff,.l-g0{overflow:hidden}.l-wrap{width:960px;margin:0 auto}.l-g{width:100%}.l-g:before,.l-g:after{content:'';display:table}.l-g:after{clear:both}.l-g1-1{float:none}.l-g1-2{width:50%}.l-g1-3{width:33.33333%}.l-g2-3{width:66.66666%}.l-g1-4{width:25%}.l-g3-4{width:75%}.l-g1-5{width:20%}.l-g2-5{width:40%}.l-g3-5{width:60%}.l-g4-5{width:80%}.l-g1-8{width:12.5%}.l-g3-8{width:37.5%}.l-g5-8{width:62.5%}.l-g7-8{width:87.5%}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{float:left}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{float:left;margin-left:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[class*=l-g]:first-child{margin-left:0}.l-g1{width:70px}.l-g2{width:150px}.l-g3{width:230px}.l-g4{width:310px}.l-g5{width:390px}.l-g6{width:470px}.l-g7{width:550px}.l-g8{width:630px}.l-g9{width:710px}.l-g10{width:790px}.l-g11{width:870px}.l-g12{width:950px}.l-g_1{margin-left:80px!important}.l-g_2{margin-left:160px!important}.l-g_3{margin-left:240px!important}.l-g_4{margin-left:320px!important}.l-g_5{margin-left:400px!important}.l-g_6{margin-left:480px!important}.l-g_7{margin-left:560px!important}.l-g_8{margin-left:640px!important}.l-g_9{margin-left:720px!important}.l-g_10{margin-left:800px!important}.l-g_11{margin-left:880px!important}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{margin-right:10px}.l-fl{_margin-right:-3px}.l-fr{_margin-left:-3px}.l-ff,.l-g0{zoom:1}.l-g{zoom:1;_zoom:expression(function(el){el.firstChild.style.marginLeft=0;el.style.zoom="1"}(this))}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{_margin-right:-3px}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{display:inline}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{_zoom:expression(function(el){if(!el.nextSibling || el.nextSibling.nodeType!==1) el.style.marginRight=0;el.style.zoom="1"}(this))}.unselect,i,.i,.icon{-moz-user-select:-moz-none;-webkit-user-select:none;-o-user-select:none;user-select:none}b,.b,.border{display:block;font:0/0 a}.s-ptn,.s-pvn,.s-pan{padding-top:0!important}.s-pts,.s-pvs,.s-pas{padding-top:5px!important}.s-ptm,.s-pvm,.s-pam{padding-top:10px!important}.s-ptl,.s-pvl,.s-pal{padding-top:20px!important}.s-prn,.s-phn,.s-pan{padding-right:0!important}.s-prs,.s-phs,.s-pas{padding-right:5px!important}.s-prm,.s-phm,.s-pam{padding-right:10px!important}.s-prl,.s-phl,.s-pal{padding-right:20px!important}.s-pbn,.s-pvn,.s-pan{padding-bottom:0!important}.s-pbs,.s-pvs,.s-pas{padding-bottom:5px!important}.s-pbm,.s-pvm,.s-pam{padding-bottom:10px!important}.s-pbl,.s-pvl,.s-pal{padding-bottom:20px!important}.s-pln,.s-phn,.s-pan{padding-left:0!important}.s-pls,.s-phs,.s-pas{padding-left:5px!important}.s-plm,.s-phm,.s-pam{padding-left:10px!important}.s-pll,.s-phl,.s-pal{padding-left:20px!important}.s-mtn,.s-mvn,.s-man{margin-top:0!important}.s-mts,.s-mvs,.s-mas{margin-top:5px!important}.s-mtm,.s-mvm,.s-mam{margin-top:10px!important}.s-mtl,.s-mvl,.s-mal{margin-top:20px!important}.s-mrn,.s-mhn,.s-man{margin-right:0!important}.s-mrs,.s-mhs,.s-mas{margin-right:5px!important}.s-mrm,.s-mhm,.s-mam{margin-right:10px!important}.s-mrl,.s-mhl,.s-mal{margin-right:20px!important}.s-mbn,.s-mvn,.s-man{margin-bottom:0!important}.s-mbs,.s-mvs,.s-mas{margin-bottom:5px!important}.s-mbm,.s-mvm,.s-mam{margin-bottom:10px!important}.s-mbl,.s-mvl,.s-mal{margin-bottom:20px!important}.s-mln,.s-mhn,.s-man{margin-left:0!important}.s-mls,.s-mhs,.s-mas{margin-left:5px!important}.s-mlm,.s-mhm,.s-mam{margin-left:10px!important}.s-mll,.s-mhl,.s-mal{margin-left:20px!important}.g-area-lazyload{visibility:hidden}.hide{display:none!important;visibility:hidden}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}.fl{float:left}.fr{float:right}.mod{overflow:hidden}.triangle{width:0;height:0;overflow:hidden;font-size:0;line-height:0;border-color:transparent;border-style:dashed;border-width:5px}.unselect,i,.i,.icon{-khtml-user-select:none}.cf{zoom:1}.fl,.fr{display:inline}.mod{*overflow:visible;zoom:1}html{background:#edf0ef}body{font:12px/1.231 arial,Tahoma,helvetica,clean,sans-serif;position:relative}a{text-decoration:none;color:#333}a:hover{text-decoration:none}.orange,.orange a{color:#f56f2f!important}.red,.red a{color:red!important}.green,.green a{color:green!important}.bold,.bold a{font-weight:600!important}.icon-hot,.icon-new,.icon-new_red{display:inline-block;margin-left:3px;cursor:pointer;_position:absolute;font-size:0}.icon-hot{width:30px;height:11px;background:url(../img/i-hot.png?m=z) no-repeat}.icon-new{width:30px;height:11px;background:url(../img/i-new.png?m=z) no-repeat}.icon-new_red{width:25px;height:15px;background:url(../img/i-big-new.png?m=z) no-repeat}.icon-hot,.icon-new,.icon-new_red{display:inline-block;*display:inline;zoom:1;_position:absolute} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.rtl.css new file mode 100755 index 000000000..1e298b2a0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.rtl.css @@ -0,0 +1 @@ +@charset "utf-8";*{margin:0;padding:0}fieldset,img,iframe{border:0}address,caption,cite,code,dfn,em,i,th,var{font-style:normal;font-weight:400}ul,li,ol{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}html{font-size:100%}body{vertical-align:baseline;background-color:transparent}a:focus,a:hover,a:active,input:focus,textarea:focus{outline:0}img{vertical-align:middle}table{font-size:inherit;font:100%;border-collapse:collapse;border-spacing:0}td{vertical-align:top}th{text-align:inherit}iframe{display:block}textarea{resize:none;overflow:auto;vertical-align:top}button,input,select,textarea{font-size:100%;vertical-align:baseline}button,input{*overflow:visible;line-height:normal;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}button{cursor:pointer}button[disabled],input[disabled]{cursor:default}abbr,acronym{border:0;font-variant:normal}strong,.strong{font-weight:700}.l-fl{float:left}.l-fr{float:right}.l-ff,.l-g0{overflow:hidden}.l-wrap{width:960px;margin:0 auto}.l-g{width:100%}.l-g:before,.l-g:after{content:'';display:table}.l-g:after{clear:both}.l-g1-1{float:none}.l-g1-2{width:50%}.l-g1-3{width:33.33333%}.l-g2-3{width:66.66666%}.l-g1-4{width:25%}.l-g3-4{width:75%}.l-g1-5{width:20%}.l-g2-5{width:40%}.l-g3-5{width:60%}.l-g4-5{width:80%}.l-g1-8{width:12.5%}.l-g3-8{width:37.5%}.l-g5-8{width:62.5%}.l-g7-8{width:87.5%}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{float:right;_margin-left:-3px!important}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{display:inline;float:right;margin-right:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[class*=l-g]:first-child{margin-right:0}.l-g1{width:70px}.l-g2{width:150px}.l-g3{width:230px}.l-g4{width:310px}.l-g5{width:390px}.l-g6{width:470px}.l-g7{width:550px}.l-g8{width:630px}.l-g9{width:710px}.l-g10{width:790px}.l-g11{width:870px}.l-g12{width:950px}.l-g_1{margin-right:80px!important}.l-g_2{margin-right:160px!important}.l-g_3{margin-right:240px!important}.l-g_4{margin-right:320px!important}.l-g_5{margin-right:400px!important}.l-g_6{margin-right:480px!important;margin-left:0!important}.l-g_7{margin-right:560px!important}.l-g_8{margin-right:640px!important}.l-g_9{margin-right:720px!important}.l-g_10{margin-right:800px!important}.l-g_11{margin-right:880px!important}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{margin-left:10px}.unselect,i,.i,.icon{-moz-user-select:-moz-none;-webkit-user-select:none;-o-user-select:none;user-select:none}b,.b,.border{display:block;font:0/0 a}.s-ptn,.s-pvn,.s-pan{padding-top:0!important}.s-pts,.s-pvs,.s-pas{padding-top:5px!important}.s-ptm,.s-pvm,.s-pam{padding-top:10px!important}.s-ptl,.s-pvl,.s-pal{padding-top:20px!important}.s-prn,.s-phn,.s-pan{padding-right:0!important}.s-prs,.s-phs,.s-pas{padding-right:5px!important}.s-prm,.s-phm,.s-pam{padding-right:10px!important}.s-prl,.s-phl,.s-pal{padding-right:20px!important}.s-pbn,.s-pvn,.s-pan{padding-bottom:0!important}.s-pbs,.s-pvs,.s-pas{padding-bottom:5px!important}.s-pbm,.s-pvm,.s-pam{padding-bottom:10px!important}.s-pbl,.s-pvl,.s-pal{padding-bottom:20px!important}.s-pln,.s-phn,.s-pan{padding-left:0!important}.s-pls,.s-phs,.s-pas{padding-left:5px!important}.s-plm,.s-phm,.s-pam{padding-left:10px!important}.s-pll,.s-phl,.s-pal{padding-left:20px!important}.s-mtn,.s-mvn,.s-man{margin-top:0!important}.s-mts,.s-mvs,.s-mas{margin-top:5px!important}.s-mtm,.s-mvm,.s-mam{margin-top:10px!important}.s-mtl,.s-mvl,.s-mal{margin-top:20px!important}.s-mrn,.s-mhn,.s-man{margin-right:0!important}.s-mrs,.s-mhs,.s-mas{margin-right:5px!important}.s-mrm,.s-mhm,.s-mam{margin-right:10px!important}.s-mrl,.s-mhl,.s-mal{margin-right:20px!important}.s-mbn,.s-mvn,.s-man{margin-bottom:0!important}.s-mbs,.s-mvs,.s-mas{margin-bottom:5px!important}.s-mbm,.s-mvm,.s-mam{margin-bottom:10px!important}.s-mbl,.s-mvl,.s-mal{margin-bottom:20px!important}.s-mln,.s-mhn,.s-man{margin-left:0!important}.s-mls,.s-mhs,.s-mas{margin-left:5px!important}.s-mlm,.s-mhm,.s-mam{margin-left:10px!important}.s-mll,.s-mhl,.s-mal{margin-left:20px!important}.g-area-lazyload{visibility:hidden}.hide{display:none!important;visibility:hidden}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}.fl{float:left}.fr{float:right}.mod{overflow:hidden}.triangle{width:0;height:0;overflow:hidden;font-size:0;line-height:0;border-color:transparent;border-style:dashed;border-width:5px}html{background:#edf0ef}body{font:12px/1.231 arial,Tahoma,helvetica,clean,sans-serif;position:relative}a{text-decoration:none;color:#333}a:hover{text-decoration:none}.orange,.orange a{color:#f56f2f!important}.red,.red a{color:red!important}.green,.green a{color:green!important}.bold,.bold a{font-weight:600!important}.icon-hot,.icon-new,.icon-new_red{display:inline-block;margin-right:3px;cursor:pointer;font-size:0}.icon-hot{width:30px;height:11px;background:url(../img/i-hot.png?m=z) no-repeat}.icon-new{width:30px;height:11px;background:url(../img/i-new.png?m=z) no-repeat}.icon-new_red{width:25px;height:15px;background:url(../img/i-big-new.png?m=z) no-repeat} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.rtl.ie.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.rtl.ie.css new file mode 100755 index 000000000..2c2c8b8a3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/dist/base.rtl.ie.css @@ -0,0 +1 @@ +@charset "utf-8";*{margin:0;padding:0}fieldset,img,iframe{border:0}address,caption,cite,code,dfn,em,i,th,var{font-style:normal;font-weight:400}ul,li,ol{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}html{font-size:100%}body{vertical-align:baseline;background-color:transparent}a:focus,a:hover,a:active,input:focus,textarea:focus{outline:0}img{vertical-align:middle}table{font-size:inherit;font:100%;border-collapse:collapse;border-spacing:0}td{vertical-align:top}th{text-align:inherit}iframe{display:block}textarea{resize:none;overflow:auto;vertical-align:top}button,input,select,textarea{font-size:100%;vertical-align:baseline}button,input{*overflow:visible;line-height:normal;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}button{cursor:pointer}button[disabled],input[disabled]{cursor:default}abbr,acronym{border:0;font-variant:normal}strong,.strong{font-weight:700}body{_zoom:expression(function(el){document.execCommand('BackgroundImageCache',false,true);el.style.zoom="1"}(this))}img{-ms-interpolation-mode:bicubic}button,input,select,textarea{*vertical-align:middle}button,input{*overflow:visible}.l-fl{float:left}.l-fr{float:right}.l-ff,.l-g0{overflow:hidden}.l-wrap{width:960px;margin:0 auto}.l-g{width:100%}.l-g:before,.l-g:after{content:'';display:table}.l-g:after{clear:both}.l-g1-1{float:none}.l-g1-2{width:50%}.l-g1-3{width:33.33333%}.l-g2-3{width:66.66666%}.l-g1-4{width:25%}.l-g3-4{width:75%}.l-g1-5{width:20%}.l-g2-5{width:40%}.l-g3-5{width:60%}.l-g4-5{width:80%}.l-g1-8{width:12.5%}.l-g3-8{width:37.5%}.l-g5-8{width:62.5%}.l-g7-8{width:87.5%}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{float:right;_margin-left:-3px!important}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{display:inline;float:right;margin-right:10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[class*=l-g]:first-child{margin-right:0}.l-g1{width:70px}.l-g2{width:150px}.l-g3{width:230px}.l-g4{width:310px}.l-g5{width:390px}.l-g6{width:470px}.l-g7{width:550px}.l-g8{width:630px}.l-g9{width:710px}.l-g10{width:790px}.l-g11{width:870px}.l-g12{width:950px}.l-g_1{margin-right:80px!important}.l-g_2{margin-right:160px!important}.l-g_3{margin-right:240px!important}.l-g_4{margin-right:320px!important}.l-g_5{margin-right:400px!important}.l-g_6{margin-right:480px!important;margin-left:0!important}.l-g_7{margin-right:560px!important}.l-g_8{margin-right:640px!important}.l-g_9{margin-right:720px!important}.l-g_10{margin-right:800px!important}.l-g_11{margin-right:880px!important}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{margin-left:10px}.l-ff,.l-g0{zoom:1}.l-g{zoom:1;_zoom:expression(function(el){el.firstChild.style.marginRight=0;el.style.zoom="1"}(this))}.l-g1-1,.l-g1-2,.l-g1-3,.l-g2-3,.l-g3-3,.l-g1-4,.l-g2-4,.l-g3-4,.l-g4-5,.l-g1-5,.l-g2-5,.l-g3-5,.l-g4-5,.l-g1-8,.l-g3-8,.l-g5-8,.l-g7-8{_margin-left:-3px}.l-g1,.l-g2,.l-g3,.l-g4,.l-g5,.l-g6,.l-g7,.l-g8,.l-g9,.l-g10,.l-g11,.l-g12{display:inline}.l-g_1,.l-g_2,.l-g_3,.l-g_4,.l-g_5,.l-g_6,.l-g_7,.l-g_8,.l-g_9,.l-g_10,.l-g_11{_zoom:expression(function(el){if(!el.nextSibling || el.nextSibling.nodeType!==1) el.style.marginLeft=0;el.style.zoom="1"}(this))}.unselect,i,.i,.icon{-moz-user-select:-moz-none;-webkit-user-select:none;-o-user-select:none;user-select:none}b,.b,.border{display:block;font:0/0 a}.s-ptn,.s-pvn,.s-pan{padding-top:0!important}.s-pts,.s-pvs,.s-pas{padding-top:5px!important}.s-ptm,.s-pvm,.s-pam{padding-top:10px!important}.s-ptl,.s-pvl,.s-pal{padding-top:20px!important}.s-prn,.s-phn,.s-pan{padding-right:0!important}.s-prs,.s-phs,.s-pas{padding-right:5px!important}.s-prm,.s-phm,.s-pam{padding-right:10px!important}.s-prl,.s-phl,.s-pal{padding-right:20px!important}.s-pbn,.s-pvn,.s-pan{padding-bottom:0!important}.s-pbs,.s-pvs,.s-pas{padding-bottom:5px!important}.s-pbm,.s-pvm,.s-pam{padding-bottom:10px!important}.s-pbl,.s-pvl,.s-pal{padding-bottom:20px!important}.s-pln,.s-phn,.s-pan{padding-left:0!important}.s-pls,.s-phs,.s-pas{padding-left:5px!important}.s-plm,.s-phm,.s-pam{padding-left:10px!important}.s-pll,.s-phl,.s-pal{padding-left:20px!important}.s-mtn,.s-mvn,.s-man{margin-top:0!important}.s-mts,.s-mvs,.s-mas{margin-top:5px!important}.s-mtm,.s-mvm,.s-mam{margin-top:10px!important}.s-mtl,.s-mvl,.s-mal{margin-top:20px!important}.s-mrn,.s-mhn,.s-man{margin-right:0!important}.s-mrs,.s-mhs,.s-mas{margin-right:5px!important}.s-mrm,.s-mhm,.s-mam{margin-right:10px!important}.s-mrl,.s-mhl,.s-mal{margin-right:20px!important}.s-mbn,.s-mvn,.s-man{margin-bottom:0!important}.s-mbs,.s-mvs,.s-mas{margin-bottom:5px!important}.s-mbm,.s-mvm,.s-mam{margin-bottom:10px!important}.s-mbl,.s-mvl,.s-mal{margin-bottom:20px!important}.s-mln,.s-mhn,.s-man{margin-left:0!important}.s-mls,.s-mhs,.s-mas{margin-left:5px!important}.s-mlm,.s-mhm,.s-mam{margin-left:10px!important}.s-mll,.s-mhl,.s-mal{margin-left:20px!important}.g-area-lazyload{visibility:hidden}.hide{display:none!important;visibility:hidden}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}.fl{float:left}.fr{float:right}.mod{overflow:hidden}.triangle{width:0;height:0;overflow:hidden;font-size:0;line-height:0;border-color:transparent;border-style:dashed;border-width:5px}.unselect,i,.i,.icon{-khtml-user-select:none}.cf{zoom:1}.fl,.fr{display:inline}.mod{*overflow:visible;zoom:1}html{background:#edf0ef}body{font:12px/1.231 arial,Tahoma,helvetica,clean,sans-serif;position:relative}a{text-decoration:none;color:#333}a:hover{text-decoration:none}.orange,.orange a{color:#f56f2f!important}.red,.red a{color:red!important}.green,.green a{color:green!important}.bold,.bold a{font-weight:600!important}.icon-hot,.icon-new,.icon-new_red{display:inline-block;margin-right:3px;cursor:pointer;font-size:0}.icon-hot{width:30px;height:11px;background:url(../img/i-hot.png?m=z) no-repeat}.icon-new{width:30px;height:11px;background:url(../img/i-new.png?m=z) no-repeat}.icon-new_red{width:25px;height:15px;background:url(../img/i-big-new.png?m=z) no-repeat}.icon-hot,.icon-new,.icon-new_red{display:inline-block;*display:inline;zoom:1;_position:absolute} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/ar-index.html b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/ar-index.html new file mode 100755 index 000000000..c2ee4fdd6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/ar-index.html @@ -0,0 +1,3809 @@ +ابدء التصفح من هنا | مدخلك لعالم الانترنت |hao123 صفحتي الرئيسية + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      سيتم حفظ أكثر مواقع تقوم بالضغط عليها فى Hao123 وعرضها تلقائيا ، استمتع معنا بهذه الخاصية المميزة.
      اضغط لإضافة الموقع
      تأكيدإلغاء
      +
      +
      +
      +
      +
      +
      +
      +
      + + +
      +
      + +
      +
      +
      + المزيد +
      + + +
      • مواقيت الصلاة
      • Speedtest
      • الأبراج
      \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/br-index.html b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/br-index.html new file mode 100755 index 000000000..d3acf1719 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/br-index.html @@ -0,0 +1,3371 @@ +Hao123 e Pronto! + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Com os atalhos do Hao123 fica mais fácil navegar na internet!

        HotMais visitadosNotepad
        Quando você clica em links no hao123, seus sites mais visitados serão gravados aqui automaticamente. Tente e desfrute duma experiência incrível!
        Adicione seus sites favoritos
        OkCancelar
        + + + + +
        +
        + + +
        • Horóscopo
        • Speedtest
        \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/en-index.html b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/en-index.html new file mode 100755 index 000000000..e4ed4e9fa --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/en-index.html @@ -0,0 +1,2838 @@ + +hao123- Easy and convenient access to Internet services + + + + + + + + + + + + + + + + + + + + + + +
          +
          +
          Mail
          +
          Gmail
          +
          Yahoo Mail
          +
          Hotmail
          +
          AOL
          +
          +
          +
          \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/jp-index.html b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/jp-index.html new file mode 100755 index 000000000..fdca47138 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/jp-index.html @@ -0,0 +1,3329 @@ +Hao123—マイ スタートページ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            人気サイトよく訪問するサイトどこでもノート
            まだ訪問履歴がありません、気になるサイトをクリックしてみてください~
            クリックして、好きなサイト追加
            OKキャンセル
            + + + + +
            +
            + + +
            • 通信速度測定
            • 乗換案内
            \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/th-index.html b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/th-index.html new file mode 100755 index 000000000..40fbe08f7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/th-index.html @@ -0,0 +1,3436 @@ +hao123-ท่องเน็ตสะดวกปลอดภัย + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              เว็บไซต์ยอดฮิตประวัติnote
              เพิ่มเติม
              ตกลงยกเลิก
              • ดูทีวีออนไลน์
              • Speedtest
              • ดูดวงรายวัน
              • ตรวจสลากกินแบ่งรัฐบาล
              • ราคาทองคำ
              + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/vn-index.html b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/vn-index.html new file mode 100755 index 000000000..ea6c35a71 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/hao123/vn-index.html @@ -0,0 +1,3540 @@ +Hao123-Trang chủ truy cập web + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                Website hotLịch sử duyệt webNhật ký mỗi ngày
                Lịch sử duyệt web của bạn sẽ được ghi lại tại đây, bạn click vào một website để thử xem nào~
                Click để thêm website
                Xác nhậnThoát
                • Kết quả bóng đá
                • Dò kết quả xổ số
                • Google Dịch
                • Tra tốc độ Internet
                • Giá vàng (Đơn vị: ngàn đồng/lượng)
                \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/index.html b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/index.html new file mode 100755 index 000000000..bc1151b6d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-base/test/index.html @@ -0,0 +1,114 @@ + + + + +Hao123 + + + +
                +
                  +
                • +
                +
                + + + + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/css-flatbase.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/css-flatbase.tpl new file mode 100755 index 000000000..42e3af120 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/css-flatbase.tpl @@ -0,0 +1,7 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/css-flatbase/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/css-flatbase/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/ltr/ltr.css new file mode 100755 index 000000000..5e13e34ec --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/ltr/ltr.css @@ -0,0 +1,4 @@ +/* 新首页的背景色为白色,写在这里是为了兼容老版本 */ +html { + background-color: #ffffff; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/rtl/rtl.css new file mode 100755 index 000000000..5e13e34ec --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/css-flatbase/rtl/rtl.css @@ -0,0 +1,4 @@ +/* 新首页的背景色为白色,写在这里是为了兼容老版本 */ +html { + background-color: #ffffff; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/footer-seo-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/footer-seo-async.js new file mode 100755 index 000000000..1a97365b5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/footer-seo-async.js @@ -0,0 +1,3 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); + +conf.fb_like && $(".fb_like").append(''); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/footer-seo.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/footer-seo.tpl new file mode 100755 index 000000000..204e4f73b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/footer-seo.tpl @@ -0,0 +1,57 @@ +<%strip%> +<%* 声明对ltr/rtl的css依赖 *%> +<%require name="common:widget/footer-seo/<%$head.dir%>/<%$head.dir%>.css"%> +<%require name="common:widget/footer/<%$head.dir%>/<%$head.dir%>.css"%> + + + +<%script%> + <%if !empty($body.fb_like)%> + conf.fb_like = { + "locale":"<%$body.fb_like.locale%>", + "url":"<%$body.fb_like.page|escape:'url'%>", + "width":<%$body.fb_like.width%>, + "height":<%$body.fb_like.height%> + }; + <%/if%> + require.async("common:widget/ui/jquery/jquery.js", function($){ + $(window).on("load", function(){ + require.async('common:widget/ui/monitor/monitor.js'); + require.async('common:widget/footer-seo/footer-seo-async.js'); + }); + }); +<%/script%> +<%/strip%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/ltr/ltr.css new file mode 100755 index 000000000..4384cc183 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/ltr/ltr.css @@ -0,0 +1,73 @@ +.mod-footer-seo{ + margin-top: 30px; + color: #202020; + background-color: #f5f6f7; + display: block !important; +} + +.mod-footer-seo .footer-links{ + padding-top: 20px; +} + + +.mod-footer-seo .sort{ + float: left; +} + +.mod-footer-seo .sort-0{ + width: 33%; + border-right: 1px solid #ffffff; +} + +.mod-footer-seo .sort-1{ + width: 40%; + margin-left: 3.3%; + border-right: 1px solid #ffffff; +} + +.mod-footer-seo .sort-2{ + width: 20%; + margin-left: 3.3%; +} + +.mod-footer-seo .sort ul{ + float: left; +} + +.mod-footer-seo .sort-0 ul{ + width: 50%; +} + +.mod-footer-seo .sort-1 ul{ + width: 25%; +} + +.mod-footer-seo .sort-2 ul{ + width: 100%; +} + +.mod-footer-seo .sort li{ + width: 90%; + height: 20px; + line-height: 20px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.mod-footer-seo a, .mod-footer-seo .box-fot a{ + color: #202020; +} + +.mod-footer-seo a:hover{ + text-decoration: underline; +} + +.mod-footer-seo .box-fot{ + margin: 19px 0 5px 0; +} + +.mod-footer-seo .footer-copyright{ + padding-bottom: 25px; + text-align: center; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/rtl/rtl.css new file mode 100755 index 000000000..9401ea608 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer-seo/rtl/rtl.css @@ -0,0 +1,73 @@ +.mod-footer-seo{ + margin-top: 30px; + color: #202020; + background-color: #f5f6f7; + display: block !important; +} + +.mod-footer-seo .footer-links{ + padding-top: 20px; +} + + +.mod-footer-seo .sort{ + float: right; +} + +.mod-footer-seo .sort-0{ + width: 33%; + border-left: 1px solid #ffffff; +} + +.mod-footer-seo .sort-1{ + width: 40%; + margin-right: 3.3%; + border-left: 1px solid #ffffff; +} + +.mod-footer-seo .sort-2{ + width: 20%; + margin-right: 3.3%; +} + +.mod-footer-seo .sort ul{ + float: right; +} + +.mod-footer-seo .sort-0 ul{ + width: 50%; +} + +.mod-footer-seo .sort-1 ul{ + width: 25%; +} + +.mod-footer-seo .sort-2 ul{ + width: 100%; +} + +.mod-footer-seo .sort li{ + width: 90%; + height: 20px; + line-height: 20px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.mod-footer-seo a, .mod-footer-seo .box-fot a{ + color: #202020; +} + +.mod-footer-seo a:hover{ + text-decoration: underline; +} + +.mod-footer-seo .box-fot{ + margin: 19px 0 5px 0; +} + +.mod-footer-seo .footer-copyright{ + padding-bottom: 25px; + text-align: center; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer-async.js new file mode 100755 index 000000000..044aaad60 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer-async.js @@ -0,0 +1,5 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); + +conf.fb_like && $(window).load(function() { + $(".fb_like").append(''); +}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer-main.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer-main.tpl new file mode 100755 index 000000000..8609942d3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer-main.tpl @@ -0,0 +1 @@ +<%widget name="common:widget/footer/footer.tpl" linkList=$body.footprint.links copyright=$html.copyright%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer.tpl new file mode 100755 index 000000000..710f866f7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/footer.tpl @@ -0,0 +1,40 @@ +<%*widget需要传递变量$linkList和copyright*%> + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/footer/ltr/ltr.css"%> <%else%> <%require name="common:widget/footer/rtl/rtl.css"%> <%/if%> + + +
                + + <%if !empty($copyright)%> + <%$copyright%> + <%/if%> +
                + +<%script%> + require.async('common:widget/ui/monitor/monitor.js'); + require.async('common:widget/footer/footer-async.js'); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/ltr/ltr.css new file mode 100755 index 000000000..a29094a8f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/ltr/ltr.css @@ -0,0 +1,43 @@ +.copyright{ + margin-top:-10px; + margin-bottom:10px; + line-height:1.5; + color: #999; + display: block; +} +.t-c{ + text-align: center; +} +.box-fot { + margin:19px 0; + display: inline-block; + *display: inline; + *zoom: 1; + font-size: 12px; +} +.box-fot li { + float:left; +} +.box-fot a{ + color: #999; +} +.box-fot .space { + display:inline-block; + font-size:0; + border-right:1px solid #999; + height:10px; + padding-left:10px; + margin-right:10px; + margin-bottom:-2px; +} +.fb_like { + margin-left: 10px; + margin-top: -3px; +} +.fb_like_label { + display:inherit; + color:red; +} +p.fb_like_label a { + color: red; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/rtl/rtl.css new file mode 100755 index 000000000..72ace7ef1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/footer/rtl/rtl.css @@ -0,0 +1,44 @@ +/*footer*/ +.t-c{ + text-align: center; +} +.box-fot { + margin:19px 0; + display: inline-block; + *display: inline; + *zoom: 1; + font-size: 12px; +} +.box-fot li { + display: inline; + text-align: right; +} +/*.box-fot li, x:-moz-any-link, x:default { + float: left; + direction: ltr; +}*/ +.box-fot a{ + color: #999; +} +.box-fot .space { + display:inline-block; + font-size:0; + border-right:1px solid #999; + height:10px; + padding-left:10px; + margin-right:10px; + margin-bottom:-2px; +} +.fb_like { + display: inline-block !important; + position: relative; + top: 5px; + right: 5px; +} +.fb_like_label { + display:inherit; + color:red; +} +p.fb_like_label a { + color: red; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/global-conf/global-conf.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/global-conf/global-conf.tpl new file mode 100755 index 000000000..0335bf685 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/global-conf/global-conf.tpl @@ -0,0 +1,32 @@ +<%strip%> + +<%/strip%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/account-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/account-async.js new file mode 100755 index 000000000..7e50a3997 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/account-async.js @@ -0,0 +1,383 @@ +String.prototype.replaceTpl = function (o){ + return this.replace(/#\{([^}]*)\}/gm,function(v,k){return v=o[k]||""}) +}; + +var $ = require("common:widget/ui/jquery/jquery.js"), + helper = require("common:widget/ui/helper/helper.js"), + UT = require("common:widget/ui/ut/ut.js"); + +var loginTpl = ''; +} else { + loginTpl = ''; +} + +var signTpl = '

                '; + +var tpl = ''; + +$("#accountWrap .account-loginfo_wrap").html(helper.replaceTpl(tpl, _conf)); + +/** + * loginCtroller代表初始化。在index.html页面333行。 + */ +! function(WIN, conf) { + var wrap = $("#accountWrap"), + dropDwon = $(".account-dropdown_wrap"), + login = $(".account_login-tip"), + logout = $(".account_logout-tip"), + elName = logout.find(".account_logout_name"), + elMail = logout.find(".account_logout_email"), + elImg = logout.find("img"), + elLogout = logout.find(".account_logout_btn"), + mask = wrap.find(".account_trig"), + dir = conf.dir, + headImgUrl = conf.commonLogin.defauUrl; + + var conf = conf.commonLogin, + self = WIN.loginCtroller = { + /** + * verify user login status + * 2 ==> unlogin | 1 ==> already login + * vertify:2 ==>代表“没有登录”的状态,vertify:1 ==>代表“登录”的状态 + * uid ==> 用户唯一标识 + * loginUrl ==> 配置的参数,代表向服务器端发送的请求,参数,这里有一些参数需要转换编码,目前还没有弄懂参数的编码转换的含义 + */ + verify : 2, + uid : 0, + loginUrl: conf.hao123LoginUrl.replaceTpl({ + idc: conf.idcMap[conf.countryCode], + country: conf.countryCode, + level: conf.level + }), + + // type : 1.代表登录状态,并且请求的数据data存在的情况 + // type :2.代表默认状态,没有登录成功 + // 最后的self.verify代表渲染页面之后将登录状态修改为当前值,type :1为已经登录,2:为未登录 + render: function(type, data) { + var img = new Image(), + imgUrl = ""; + + if (type == 1 && data) { + + login.hide(); + elName.html(data.uname); + //调整email的换行显示策略 + var emailContent = data.email; + var emailArray = emailContent.split("@"); + if (emailContent.length > 17 && emailContent.indexOf("@") < 15) { + emailContent = emailArray[0] + "
                @" + emailArray[1]; + } + elMail.html(emailContent); + + self.uid = data.uid; + self.bindid = data.bindid; + + if (manyLogin) { + imgUrl = data.pic; + } else { + imgUrl = helper.replaceTpl(headImgUrl, { + id: data.bindid + }); + } + + img.src = imgUrl; + setTimeout( function() { + elImg.attr("src", imgUrl); + if($("#headPic").length > 0) { + $("#headPic").attr("src", imgUrl); + } else { + mask.removeClass("account_title").html(""); + } + wrap.addClass("account-login_suc"); + }, 500); + + } else { + if (/(png|gif|jpg|jpeg)/i.test(conf.defauImg)) { + mask.removeClass("account_title").html(""); + } else { + mask.addClass("account_title").html(conf.defauImg); + } + wrap.removeClass("account-login_suc"); + elLogout.attr("href", helper.replaceTpl(conf.logoutUrl, { + idc: encodeURIComponent(conf.idcMap[conf.countryCode]), + "gotourl": encodeURIComponent(document.location.href) + })); + } + + // update status when user login. + self.verify = type; + }, + /** + * 检查登录的状态 + * Check user's status about wheather they have been login. + * @param url ==> target url; + * success ==> excute something when finish + * error ==> when login failure + * (1)obj为传入的对象值 + * (2)ajax发送请求,cache:false; + * (3)url:请求地址,转码后的地址 + * (4)success:成功之后要处理的事情 + * (5)error:失败后的信息提示 + */ + checkStatus: function(obj) { + obj = obj || {}; + $.ajax({ + cache: false, + url: helper.replaceTpl(conf.checkLoginUrl, { + countryCode: encodeURIComponent(conf.countryCode) + }), + success: function(data) { + data = eval("(" + data + ")"); + if(data && data.status == 1 && obj.success) { + // record facebook id + data.bindid && $.cookie("__FBID", data.bindid, { + expires: 10*365, + path: '/' + }); + obj.success(data); + } + else obj.error && obj.error(); + }, + error: function() { + obj.error && obj.error(); + } + }); + }, + + /* + + loginCtroller.fire(url,width,height); + login layout fold ==> loginCtroller.fire.call(jQuery("#fBook")[0]); + params: + + url, width, height + */ + fire: function(url, width, height, type) { + if (self.verify == 1) { + + return self.verify; + } + + // UT.send({ + // "type" : "click", + // "position" : "login", + // "sort" : "login", + // "modId" : "account" + // }); + document.domain = "hao123.com"; + + var w = width || conf.iWidth, + h = height || conf.iHeight; + + url = url || helper.replaceTpl(self.loginUrl, { + type: type || "facebook" + }, /#_\{([^}]*)\}/mg); + + WIN.open(url, "newwindow", "height=" + h + ",innerHeight=" + h + ",width=" + w + ",innerWidth=" + w + ",top=" + (WIN.screen.availHeight - 30 - h) / 2 + ",left=" + (WIN.screen.availWidth - 30 - w) / 2 + ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no"); + }, + /** + * 为联合登录执行的操作 + * @param {[array]} data [需要处理的联合登录url列表] + * 登录成功后,从数据中得到需要处理的联合登录url的列表,遍历列表,对每个url填入联合登录所需的参数(参数如下,值从cookie中取),然后请求url,触发后端在其域下种下相应cookie + * (1)type: [facebook | twitter | google | yahoo] + * (2)uss: urlencode之后的第三方的access_token + * (3)bduss: 百度的token + * (4)level: 权限级别,业务自己的level,顶部为1,侧边栏为2 + * (5)thid: 用户在第三方的唯一id,非必填 + */ + unitedLogin: function(data){ + var suffix = "?type=#{type}&uss=#{uss}&bduss=#{bduss}&level=#{level}&thid=#{thid}", + imgList = []; + $.each(data.loginurl, function(i,v){ + imgList[i] = new Image(); + imgList[i].src = helper.replaceTpl(v+suffix, { + type: $.cookie("LOGINTYPE") || "", + uss: $.cookie("USS") || "", + bduss: $.cookie("BDUSS") || "", + level: $.cookie("LEVEL") || "", + thid: $.cookie("THIRDID") || "" + }); + }); + }, + /** + * 初始化执行的操作 + * @param {[type]} data [description] + * @return {[type]} [description] + * (1)hao123LoginCallback:回调函数:不错在data或者未登录的状态时要执行的事情==>弹窗 + * 如果成功,执行“统计”请求;并且渲染页面 + * (2)绑定点击事件:在整个按钮点击的情况下,首先,判断登录状态(“1”为登录,“2”为未登录) + * 登录状态下:给最外层div添加样式“mod-login--unfold”(这个样式在login_mod.css文件里), 做的操作就是将div展开,并且将里面的(图片,姓名,邮箱,lougout按钮)样式切换到大图状态。 + * (3)第二种情况 ==>未登录。首先,发送统计请求,再执行window.open方法,打开登录页面的窗口-> 登录 + * (4)给body绑定事件:移除大图下面所有效果,切换为小图状态。 + * (5)给logout标签绑定“统计”事件。 + * (6)最后一步调用“checkStatus”方法,如果成功的话,渲染页面 + */ + init: function(data) { + + //self.render(1,data); + // 1. reg global callback + WIN.hao123LoginCallback = function(data) { + if (!data || data.status != 1) { + return alert(conf.txtErrorMsg); + } + // record facebook id + data.bindid && $.cookie("__FBID", data.bindid, { + expires: 10*365, + path: '/' + }); + + UT.send({ + "type" : "access", + "position" : "login" + }); + self.render(data.status, data); + Gl.history && Gl.history.get(); //Get the sites list again for history widget + Gl.notepad && Gl.notepad.initNotes(); // intialize notepad while available + Gl.hotsiteFB && Gl.hotsiteFB.start(); + Gl.loginPopup && Gl.loginPopup.remove(); //close login popup + $(WIN).trigger("dailySign.login"); // daily sign + + $(document.body).addClass('self-account-logged'); + + // united login for tieba .etc + data.loginurl && self.unitedLogin(data); + }; + + var isInsert = false; + + // 2. bind button event + login.on("click", function() { + if (wrap.hasClass("account_many")) { + + } else { + if (self.verify != 1) { + UT.send({ + "type": "click", + "ac": "b", + "position": "login", + "sort": "login", + "modId": "account" + }); + } + self.fire.call(this); + } + }).on("click", ".account_li", function() { + var typ = $(this).attr("typ") || "facebook"; + if (self.verify != 1) { + UT.send({ + "type": "click", + "ac": "b", + "position": "login", + "sort": "login", + "modId": "account" + }); + UT.send({ + "type": "others", + "position": "login", + "sort": typ, + "modId": "account" + }); + } + self.fire.call(login, null, null, null, typ); + }); + + mask.on("click", function() { + if(wrap.hasClass("account-login_suc") || wrap.hasClass("account_many")) { + + } else { + if(self.verify != 1) { + UT.send({ + "type" : "click", + "ac" : "b", + "position" : "login", + "sort" : "login", + "modId" : "account" + }); + } + self.fire.call(this); + } + }); + wrap.hover(function() { + if(wrap.hasClass("account-login_suc")) { + login.hide(); + logout.show(); + } else { + login.css(dir == 'ltr' ? 'right' : 'left', (parseInt(mask.outerWidth() / 2 - 19, 10)) + 'px'); + login.show(); + logout.hide(); + } + dropDwon.show(); + //mask.addClass("module-mask"); + UT.send({ + modId: "msgbox", + type: "others", + sort: "hover", + position: "accounticon" + }); + }, function() { + dropDwon.hide(); + //mask.removeClass("module-mask"); + }); + + if(isActivi) { + logout.find(".account_logout_sign_btn").on("click", function() { + UT.send({ + "type": "click", + "position": "activity", + "sort": "sign", + "modId": "account" + }); + }); + } + elLogout.on("click", function() { + UT.send({ + "type" : "click", + "position": "login", + "sort" : "logout", + "modId" : "account" + }); + }); + // 3. check status + self.checkStatus({ + success: function(data) { + self.render(1, data); + $(document.body).addClass('self-account-logged'); + }, + error: function() { + // alert("error") + } + }); + // 4. init render + self.render(2); + } + }; +}(window, conf); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/account.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/account.tpl new file mode 100755 index 000000000..1321e723a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/account.tpl @@ -0,0 +1,91 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header-flat/account/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header-flat/account/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header-flat/account/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header-flat/account/rtl/rtl.more.css"%> +<%/if%> + + + +<%script%> + <%* + /** + * Facebook页面登录退出的配置信息(可供PM使用) + * conf.commonLogin:入口。 + * 信息:(1)iWidth,iHeight:弹出窗口宽高。 + * (2)userip: 登录时的参数信息(可配)。 + * (3)jumpUrl:登录时的参数信息(可配)。 + * (4)loginUrl:登录时的参数信息(可配)。 + * (5)checkLoginUrl:Ajax请求地址。 + * (6)logoutUrl:退出时请求的URL地址,刷新页面。 + * (7)domainName:各国机房服务器地址(优先选择的地址)。 + * (8)txtDefaultBtn:默认按钮文字信息(可配)。 + * (9)txtErrorMsg:错误状态提示信息(可配)。 + * (10)level:权限级别(可配)。 + */ + *%> + + conf.commonLogin = { + iWidth : <%$body.commonLogin.iWidth%>, + iHeight : <%$body.commonLogin.iHeight%>, + countryCode: conf.country, + + <%if !empty($sysInfo.userip)%> + userip: "<%$sysInfo.userip%>", + <%else%> + userip: "sdfdslgksdlgk", + <%/if%> + + loginCallbackName: "<%$body.commonLogin.loginCallbackName%>", + + jumpUrl : "<%$body.commonLogin.jumpUrl%>", + hao123LoginUrl: "<%$body.commonLogin.hao123LoginUrl%>", + checkLoginUrl : "<%$body.commonLogin.checkLoginUrl%>", + logoutUrl : "<%$body.commonLogin.logoutUrl%>", + domainName : <%json_encode($body.commonLogin.domainName)%>, + txtErrorMsg : "<%$body.commonLogin.txtErrorMsg%>", + idcMap : <%json_encode($body.commonLogin.idcMap)%>, + level : "<%$body.commonLogin.level%>", + message : "<%$body.commonLogin.message%>", + infoMsg : "<%$body.commonLogin.infoMessage%>", + defauImg : "<%$body.headerTest.accountDefaultImg%>", + defauUrl : "<%$body.headerTest.accountUrl%>", + txtDefaultBtn : "<%$body.commonLogin.txtDefaultBtn%>", + logoutTxt : "<%$body.commonLogin.logoutTxt%>", + newLoginTxt : "<%$body.commonLogin.newLoginTxt%>", + manyLogin : "<%$body.commonLogin.manyLogin%>", + manyAccount : <%json_encode($body.commonLogin.manyAccount)%>, + activitySign : "<%$body.commonLogin.activitySign%>", + activitySignUrl: "<%$body.commonLogin.activitySignUrl%>" + }; + +require.async(["common:widget/ui/jquery/jquery.js", "common:widget/header-flat/account/account-async.js"], function ($) { + if(window.loginCtroller) { + loginCtroller.init(); + loginCtroller.isInited = true; + } +}); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/bg-account.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/bg-account.png new file mode 100755 index 000000000..5876a043b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/bg-account.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/bg-init.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/bg-init.png new file mode 100755 index 000000000..aecd627e5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/bg-init.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-facebook-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-facebook-bg.png new file mode 100755 index 000000000..37aa30806 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-facebook-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-facebook-logo.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-facebook-logo.png new file mode 100755 index 000000000..18ba2e79e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-facebook-logo.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-fb-logo.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-fb-logo.png new file mode 100755 index 000000000..ef7f2ede2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-fb-logo.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-fb-logo_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-fb-logo_rtl.png new file mode 100755 index 000000000..af71900fb Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/btn-fb-logo_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/fb.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/fb.png new file mode 100755 index 000000000..98a3f8049 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/fb.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/fb_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/fb_hover.png new file mode 100755 index 000000000..90014f9b0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/fb_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail.png new file mode 100755 index 000000000..c5246177c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail2.png new file mode 100755 index 000000000..f3aaf4b31 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail2_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail2_hover.png new file mode 100755 index 000000000..2f78b3a3e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/gmail2_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/login.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/login.gif new file mode 100755 index 000000000..9e26c6716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/login.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/twitter.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/twitter.png new file mode 100755 index 000000000..d97fbc3ee Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/twitter.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo.png new file mode 100755 index 000000000..062972b50 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo2.png new file mode 100755 index 000000000..a45a18e24 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo_hover.png new file mode 100755 index 000000000..42891fea8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/img/yahoo_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/ltr/ltr.css new file mode 100755 index 000000000..24eb6092f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/ltr/ltr.css @@ -0,0 +1,3 @@ +/*.account_wrap { + visibility: hidden; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/ltr/ltr.more.css new file mode 100755 index 000000000..3794e3a69 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/ltr/ltr.more.css @@ -0,0 +1,285 @@ +/* 消息盒子的寄生于account,修改样式时麻烦留意一下 */ +.account_wrap { + float: right; + position: relative; + max-width: 170px; +} +.account_wrap:hover .account_trig { + background-color: #0164C8; + background-color: rgba(0, 99, 199, 0.97); +} +.account_trig { + padding: 0 12px; + height: 50px; + min-width: 14px; + overflow: hidden; + cursor: pointer; + text-align: center; + vertical-align: middle; + position: relative; + display: table-cell; +} +.account_title { + width: auto; + max-width: 150px; + line-height: 50px; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + color: rgba(255, 255, 255, 0.5); +} +.account_login-tip { + cursor: pointer; +} +.login-tip_con { + padding-left: 28px; + text-align: center; + height: 30px; + line-height: 30px; + color: #587dc7; + background: url(../img/btn-fb-logo.png?__sprite) no-repeat; + background-color: #ffffff; + font-size: 14px; + font-weight: 600; +} +.account-loginfo_wrap { + width: 237px; + word-wrap: break-word; + overflow: hidden; + padding: 9px 20px 20px; + position: relative; + right: 0; + top: 0; + background-color: #0164C8; + background-color: rgba(0, 99, 199, 0.97); +} +.account-loginfo_wrap img { + width: 70px; + height: 70px; + margin-right: 12px; + margin-left: 2px; + margin-top: 4px; + float: left; + border-radius: 35px; + box-shadow: -2px 0 3px #fff, 0 -2px 3px #fff, 0 2px 3px #fff, 2px 0 3px #fff; +} +.account_logout_content { + float: left; + width: 140px; +} +.account_logout_name { + color: #ffffff; + line-height: 16px; + font-size: 12px; + margin-bottom: 4px; + word-wrap: break-word; + overflow: hidden; +} +.account_logout_email { + color: #9CC3E9; + color: rgba(255,255,255,0.6); + line-height: 16px; + font-size: 12px; + margin-bottom: 8px; + word-wrap: break-word; + overflow: hidden; +} +.accout_logout_sign { + margin-bottom: 7px; +} +.account_logout_btn, +.account_logout_sign_btn { + white-space: nowrap; + display: inline-block; + width: 94px; + height: 24px; + text-align: center; + line-height: 24px; + background-color: #1C81E5; + color: #FFF; + font-size: 12px; + overflow: hidden; +} +.account_logout_sign_btn { + background-color: #68A1DA; + width: 130px; +} +.account_logout-act .account_logout_btn { + width: 130px; + background-color: #217DD9; + color: rgba(255,255,255,0.6); +} +.account_logout-act .account_logout_btn:hover { + background-color: #1775D3; +} +.account_logout-act .account_logout_sign_btn:hover { + background-color: #3986D4; +} +.account-login_suc .account_trig img { + width: 26px; + height: 26px; + cursor: default; + border-radius: 13px; + box-shadow: -2px 0 3px #ffffff, 0 -2px 3px #ffffff, 0 2px 3px #ffffff, 2px 0 3px #ffffff; +} +.account-dropdown_wrap { + position: absolute; + right: 0; + top: 50px; + display: none; +} + +.userbar-wrap .account_wrap { + visibility: visible; +} + +/*has skin*/ +.skin-on .account_wrap:hover .account_trig, +.skin-on .wrap-message-content, +.skin-on .account-loginfo_wrap { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} +.skin-on .wrap-message-content li:hover { + background-color: #0A0A0A; + background-color: rgba(0,0,0,0.6); +} +.skin-on .wrap-message-content li { + border-bottom-color: #717171; + border-bottom-color: rgba(255,255,255,0.3); +} +.skin-on .account_logout_btn { + background-color: #626262; +} +.skin-on .account_logout-act .account_logout_btn:hover { + background-color: #555555; +} +.skin-on .account_logout_sign_btn { + background-color: #8B8B8B; +} +.skin-on .account_logout-act .account_logout_sign_btn:hover { + background-color: #666666; +} + +/*head fixed*/ +.header-fixed-st .account_trig { + height: 40px; +} +.header-fixed-st .account-dropdown_wrap { + top: 40px; +} +.header-fixed-st .account_title { + line-height: 40px; +} + +/*many accounts*/ +.account_many .account_trig, +.account_many .account_login-tip { + cursor: default; +} +.account_many .account_li { + height: 44px; + width: 44px; + border-radius: 26px; + border: 2px solid #fff; + display: inline-block; + margin-right: 13px; + background-color: #ffffff; + cursor: pointer; +} +.account_many .account_li:hover { + background-color: #327dcc; + background-color: rgba(50,125,204,0.7); +} +.account_many .account_li:active { + background-color: #327dcc; + border-color: rgba(255,255,255,0.5); +} +.account_many .account_li_last { + margin-right: 0; +} +.account_many .account_li_facebook span { + display: block; + width: 12px; + height: 26px; + background: url(../img/fb.png?__sprite) no-repeat; + margin-left: 16px; + margin-top: 9px; +} +.account_many .account_li_gmail span { + display: block; + width: 21px; + height: 16px; + background: url(../img/gmail.png?__sprite) no-repeat; + margin-left: 11px; + margin-top: 14px; +} +.account_many .account_li_twitter span { + display: block; + width: 25px; + height: 19px; + background: url(../img/twitter.png?__sprite) no-repeat; + margin-left: 9px; + margin-top: 12px; +} +.account_many .account_li_yahoo span { + display: block; + width: 26px; + height: 15px; + background: url(../img/yahoo.png?__sprite) no-repeat; + margin-left: 9px; + margin-top: 14px; +} +.account_many .account_li_facebook:hover span { + background: url(../img/fb_hover.png?__sprite) no-repeat; +} +.account_many .account_li_yahoo:hover span { + background: url(../img/yahoo_hover.png?__sprite) no-repeat; +} +.account_many .account_list { + overflow: hidden; + margin-top: 10px; + margin-bottom: 12px; + text-align: center; + font-size: 0; + letter-spacing: -4px; + word-spacing: -4px; +} +.account_many .account_login-tip_m { + font-size: 13px; + /* font-weight: bold;*/ + text-align: center; +} + + +#bubbleaccount-guider2 { + visibility: hidden !important; +} +.self-account-logged #bubbleaccount-guider { + visibility: hidden !important; +} +.self-account-logged #bubbleaccount-guider2 { + visibility: visible !important; +} + +.account_many_jp .account_li_gmail span { + width: 14px; + height: 22px; + background: url(../img/gmail2.png?__sprite) no-repeat; + margin-left: 14px; + margin-top: 11px; +} +.account_many_jp .account_li_yahoo span { + display: block; + width: 23px; + height: 13px; + background: url(../img/yahoo2.png?__sprite) no-repeat; + margin-left: 10px; + margin-top: 15px; +} +.account_many_jp .account_li_gmail:hover span { + background: url(../img/gmail2_hover.png?__sprite) no-repeat; +} +.account_many_jp .account_li_yahoo:hover span { + background: url(../img/yahoo2.png?__sprite) no-repeat; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/rtl/rtl.css new file mode 100755 index 000000000..24eb6092f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/rtl/rtl.css @@ -0,0 +1,3 @@ +/*.account_wrap { + visibility: hidden; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/rtl/rtl.more.css new file mode 100755 index 000000000..efd4dc88e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/account/rtl/rtl.more.css @@ -0,0 +1,263 @@ +/* 消息盒子的寄生于account,修改样式时麻烦留意一下 */ +.account_wrap { + float: left; + position: relative; + max-width: 170px; +} +.account_wrap:hover .account_trig { + background-color: #0164C8; + background-color: rgba(0, 99, 199, 0.97); +} +.account_trig { + padding: 0 12px; + height: 50px; + min-width: 14px; + overflow: hidden; + cursor: pointer; + text-align: center; + vertical-align: middle; + position: relative; + display: table-cell; +} +.account_title { + width: auto; + max-width: 150px; + line-height: 50px; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + color: rgba(255, 255, 255, 0.5); +} +.account_login-tip { + cursor: pointer; +} +.login-tip_con { + padding-right: 28px; + text-align: center; + height: 30px; + line-height: 30px; + color: #587dc7; + background: url(../img/btn-fb-logo_rtl.png?__sprite) no-repeat right top; + background-color: #ffffff; + font-size: 14px; + font-weight: 600; +} +.account-loginfo_wrap { + width: 237px; + word-wrap: break-word; + overflow: hidden; + padding: 9px 20px 20px; + position: relative; + left: 0; + top: 0; + background-color: #0164C8; + background-color: rgba(0, 99, 199, 0.97); +} +.account-loginfo_wrap img { + width: 70px; + height: 70px; + margin-left: 12px; + margin-right: 2px; + margin-top: 4px; + float: right; + border-radius: 35px; + box-shadow: -2px 0 3px #fff, 0 -2px 3px #fff, 0 2px 3px #fff, 2px 0 3px #fff; +} +.account_logout_content { + float: right; + width: 140px; +} +.account_logout_name { + color: #ffffff; + line-height: 16px; + font-size: 12px; + margin-bottom: 4px; + word-wrap: break-word; + overflow: hidden; +} +.account_logout_email { + color: #9CC3E9; + color: rgba(255,255,255,0.6); + line-height: 16px; + font-size: 12px; + margin-bottom: 8px; + word-wrap: break-word; + overflow: hidden; +} +.accout_logout_sign { + margin-bottom: 7px; +} +.account_logout_btn, +.account_logout_sign_btn { + white-space: nowrap; + display: inline-block; + width: 94px; + height: 24px; + text-align: center; + line-height: 24px; + background-color: #1C81E5; + color: #FFF; + font-size: 12px; + overflow: hidden; +} +.account_logout_sign_btn { + background-color: #68A1DA; + width: 130px; +} +.account_logout-act .account_logout_btn { + width: 130px; + background-color: #217DD9; + color: rgba(255,255,255,0.6); +} +.account_logout-act .account_logout_btn:hover { + background-color: #1775D3; +} +.account_logout-act .account_logout_sign_btn:hover { + background-color: #3986D4; +} +.account-login_suc .account_trig img { + width: 26px; + height: 26px; + cursor: default; + border-radius: 13px; + box-shadow: -2px 0 3px #ffffff, 0 -2px 3px #ffffff, 0 2px 3px #ffffff, 2px 0 3px #ffffff; +} +.account-dropdown_wrap { + position: absolute; + left: 0; + top: 50px; + display: none; +} + +.userbar-wrap .account_wrap { + visibility: visible; +} + +/*has skin*/ +.skin-on .account_wrap:hover .account_trig, +.skin-on .wrap-message-content, +.skin-on .account-loginfo_wrap { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} +.skin-on .wrap-message-content li:hover { + background-color: #0A0A0A; + background-color: rgba(0,0,0,0.6); +} +.skin-on .wrap-message-content li { + border-bottom-color: #717171; + border-bottom-color: rgba(255,255,255,0.3); +} +.skin-on .account_logout_btn { + background-color: #626262; +} +.skin-on .account_logout-act .account_logout_btn:hover { + background-color: #555555; +} +.skin-on .account_logout_sign_btn { + background-color: #8B8B8B; +} +.skin-on .account_logout-act .account_logout_sign_btn:hover { + background-color: #666666; +} + +/*head fixed*/ +.header-fixed-st .account_trig { + height: 40px; +} +.header-fixed-st .account-dropdown_wrap { + top: 40px; +} +.header-fixed-st .account_title { + line-height: 40px; +} + +/*many accounts*/ +.account_many .account_trig, +.account_many .account_login-tip { + cursor: default; +} +.account_many .account_li { + height: 44px; + width: 44px; + border-radius: 26px; + border: 2px solid #fff; + display: inline-block; + margin-left: 13px; + background-color: #ffffff; + cursor: pointer; +} +.account_many .account_li:hover { + background-color: #327dcc; + background-color: rgba(50,125,204,0.7); +} +.account_many .account_li:active { + background-color: #327dcc; + border-color: rgba(255,255,255,0.5); +} +.account_many .account_li_last { + margin-left: 0; +} +.account_many .account_li_facebook span { + display: block; + width: 12px; + height: 26px; + background: url(../img/fb.png?__sprite) no-repeat; + margin-right: 16px; + margin-top: 9px; +} +.account_many .account_li_gmail span { + display: block; + width: 21px; + height: 16px; + background: url(../img/gmail.png?__sprite) no-repeat; + margin-right: 11px; + margin-top: 14px; +} +.account_many .account_li_twitter span { + display: block; + width: 25px; + height: 19px; + background: url(../img/twitter.png?__sprite) no-repeat; + margin-right: 9px; + margin-top: 12px; +} +.account_many .account_li_yahoo span { + display: block; + width: 26px; + height: 15px; + background: url(../img/yahoo.png?__sprite) no-repeat; + margin-right: 9px; + margin-top: 14px; +} +.account_many .account_li_facebook:hover span { + background: url(../img/fb_hover.png?__sprite) no-repeat; +} +.account_many .account_li_yahoo:hover span { + background: url(../img/yahoo_hover.png?__sprite) no-repeat; +} +.account_many .account_list { + overflow: hidden; + margin-top: 10px; + margin-bottom: 12px; + text-align: center; + font-size: 0; + letter-spacing: -4px; + word-spacing: -4px; +} +.account_many .account_login-tip_m { + font-size: 13px; + /* font-weight: bold;*/ + text-align: center; +} + + +#bubbleaccount-guider2 { + visibility: hidden !important; +} +.self-account-logged #bubbleaccount-guider { + visibility: hidden !important; +} +.self-account-logged #bubbleaccount-guider2 { + visibility: visible !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/add-fav-bar-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/add-fav-bar-async.js new file mode 100755 index 000000000..633fd5c92 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/add-fav-bar-async.js @@ -0,0 +1,65 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var message = require('common:widget/ui/message/src/message.js'); + +module.exports = function() { + if (!conf.addFavBar) return; + + var _conf = conf.addFavBar, + container = $('#addFavBar'), + + init = function() { + + //当PM将showbarTime从非0改为0时,重置cookie。需要排除为空的情况 + if (parseInt(_conf.showbarTime) === 0) { + $.cookie('Gh_b', 0); + } + + //cookie中存的都是字符串,!('0') == false,所以需要转换为数字 + !parseInt($.cookie('Gh_b')) && setBar(); + }, + + setBar = function() { + if (_conf.hideBar) return; + bindEvent(); + }, + + + // Bind event + bindEvent = function() { + container + .on('click', '.fav-btn', function() { + hideBar(); + }) + .on('click', '.fav-close', function(e) { + var $kbd = $('#kbd'); + e.preventDefault(); + hideBar(); + $kbd.length && $kbd.animate({ + top: '130px' + }, 400); + }) + .on('click', 'a', function() { + UT.send({ + position: conf.pageType, + sort: $(this).attr('data-val'), + type: 'click', + modId: 'sethp-bar' + }); + }); + }, + + // Hide the bar and set cookie + hideBar = function() { + container.slideUp(400); + $.cookie('Gh_b', 1, { + expires: parseInt(_conf.showbarTime || 1, 10) + }); + + message.send('module.sidebar.changesize'); + }; + + setTimeout(function() { + init(); + }, 1e3); +}; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/add-fav-bar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/add-fav-bar.tpl new file mode 100755 index 000000000..cb99a8813 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/add-fav-bar.tpl @@ -0,0 +1,42 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header-flat/add-fav-bar/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header-flat/add-fav-bar/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header-flat/add-fav-bar/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header-flat/add-fav-bar/rtl/rtl.more.css"%> +<%/if%> + +
                +<%if empty($body.addFavBar.hideBar) && ($body.addFavBar.showbarTime === '0' || empty($smarty.cookies['Gh_b']))%> +
                + + <%$body.addFavBar.download.title%> + <%$body.addFavBar.download.text%> + + <%$body.addFavBar.download.buttonText%> + + + +
                +<%/if%> +
                +<%script%> + <%if isset($body.addFavBar)%> + conf.addFavBar = { + hideBar: "<%$body.addFavBar.hideBar%>", + showbarTime:"<%$body.addFavBar.showbarTime%>" + }; + <%/if%> + require.async("common:widget/header-flat/add-fav-bar/add-fav-bar-async.js", function(addFavBar) { + addFavBar(); + }); +<%/script%> + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-addfav.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-addfav.png new file mode 100755 index 000000000..6cb56a600 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-addfav.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-bg.png new file mode 100755 index 000000000..4d099072a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-down.png new file mode 100755 index 000000000..62a8886aa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-sethome.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-sethome.png new file mode 100755 index 000000000..1b924b920 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-bar-sethome.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-close-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-close-hover.png new file mode 100755 index 000000000..7a60797ee Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-close-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-close.png new file mode 100755 index 000000000..2c4ab1d06 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/img/i-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/ltr/ltr.css new file mode 100755 index 000000000..e01a064d0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/ltr/ltr.css @@ -0,0 +1,49 @@ +#ieSetHomePage { + display: none; +} +.bar-addfav { + font-size: 14px; + position: relative; + z-index: 400; + background-repeat: repeat-x; + background-image: -webkit-linear-gradient(top, #FFFFFF,#F1F1F1, #E2E2E2); + background-image: -moz-linear-gradient(top, #FFFFFF,#F1F1F1, #E2E2E2); + background-image: -ms-linear-gradient(top, #FFFFFF,#F1F1F1, #E2E2E2); + background-image: linear-gradient(top, #FFFFFF,#F1F1F1, #E2E2E2); + background-color: #f1f1f1; +} +.bar-addfav .l-wrap { + overflow: hidden; + height: 37px; +} +.bar-addfav .fav-title, +.bar-addfav .fav-text { + line-height: 37px; + float: left; + padding-right: 5px; + color: #3890e7; +} +.bar-addfav .fav-title { + font-weight: 700; +} +.bar-addfav .fav-down { + float: left; + width: 21px; + height: 20px; + margin: 9px 5px 0 0; +} +.bar-addfav .fav-btn { + line-height: 20px; + float: left; + max-width: 150px; + height: 20px; + margin: 8px 0 0 25px; + padding-right: 20px; + padding-left: 20px; + cursor: pointer; + color: #fff; + border: 1px solid #c87d00; + border-radius: 2px; + outline: 0; + background-color: #f08e00; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/ltr/ltr.more.css new file mode 100755 index 000000000..ecf4102dd --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/ltr/ltr.more.css @@ -0,0 +1,14 @@ +.bar-addfav .fav-down { + background: url(../img/i-bar-down.png?__sprite) no-repeat; +} +.bar-addfav .fav-close { + float: right; + overflow: hidden; + width: 20px; + height: 20px; + margin-top: 9px; + background: url(../img/i-close.png?__sprite) no-repeat; +} +.bar-addfav .fav-close:hover { + background: url(../img/i-close-hover.png?__sprite) no-repeat; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/rtl/rtl.css new file mode 100755 index 000000000..660ded57c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/rtl/rtl.css @@ -0,0 +1,49 @@ +#ieSetHomePage { + display: none; +} +.bar-addfav { + font-size: 14px; + position: relative; + z-index: 400; + background-color: #f1f1f1; + background-image: -webkit-linear-gradient(top, #fff, #f1f1f1, #e2e2e2); + background-image: -moz-linear-gradient(top, #fff, #f1f1f1, #e2e2e2); + background-image: -ms-linear-gradient(top, #fff, #f1f1f1, #e2e2e2); + background-image: linear-gradient(top, #fff, #f1f1f1, #e2e2e2); + background-repeat: repeat-x; +} +.bar-addfav .l-wrap { + overflow: hidden; + height: 37px; +} +.bar-addfav .fav-title, +.bar-addfav .fav-text { + line-height: 37px; + float: right; + padding-left: 5px; + color: #3890e7; +} +.bar-addfav .fav-title { + font-weight: 700; +} +.bar-addfav .fav-down { + float: right; + width: 21px; + height: 20px; + margin: 9px 0 0 5px; +} +.bar-addfav .fav-btn { + line-height: 20px; + float: right; + max-width: 150px; + height: 20px; + margin: 8px 25px 0 0; + padding-right: 20px; + padding-left: 20px; + cursor: pointer; + color: #fff; + border: 1px solid #c87d00; + border-radius: 2px; + outline: 0; + background-color: #f08e00; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/rtl/rtl.more.css new file mode 100755 index 000000000..0ca753f19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/add-fav-bar/rtl/rtl.more.css @@ -0,0 +1,14 @@ +.bar-addfav .fav-down { + background: url(../img/i-bar-down.png?__sprite) no-repeat; +} +.bar-addfav .fav-close { + float: left; + overflow: hidden; + width: 20px; + height: 20px; + margin-top: 9px; + background: url(../img/i-close.png?__sprite) no-repeat; +} +.bar-addfav .fav-close:hover { + background: url(../img/i-close-hover.png?__sprite) no-repeat; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/banner-site-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/banner-site-async.js new file mode 100755 index 000000000..4ceffd581 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/banner-site-async.js @@ -0,0 +1,43 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var helper = require("common:widget/ui/helper/helper.js"); + + +var TPL = '', + TPL2 = ''; + +var DATA = conf.bannerSite["data"] || {}; + +var fire = function(id) { + var $wrap = $(id), _frag = ""; + + var i = 0, j = DATA.length, t = {}; + + if($wrap.length && j) { + + for(; i < j; i++) { + t = DATA[i]; + + if (!t["url"]) { + return; + } + + (i === 0) && (t["className"] += " item-first"); + + _frag += helper.replaceTpl(((t && t["bgImg"]) ? TPL : TPL2), t); + } + + $wrap.html(_frag); + + $wrap.on("click", "a", function() { + UT.send({ + "modId": "banner-site", + "type": "click", + "position": "site", + "sort": $(this).attr("href") + }); + }); + } +}; + +module.exports = fire; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/banner-site.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/banner-site.tpl new file mode 100755 index 000000000..1283c3a5d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/banner-site.tpl @@ -0,0 +1,16 @@ +<%require name="common:widget/header-flat/banner-site/`$head.dir`/`$head.dir`.more.css"%> +<%style%> + <%if !empty($body.bannerSite.style)%> + <%$body.bannerSite.style%> + <%/if%> +<%/style%> + +
                +
                + +<%script%> +conf.bannerSite = <%json_encode($body.bannerSite)%>||{}; +require.async(["common:widget/header-flat/banner-site/banner-site-async.js"], function (fire) { + fire("#" + "<%$body.bannerSite.id|default:'fixedBannerSite'%>"); +}); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/game.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/game.png new file mode 100755 index 000000000..46d319d23 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/game.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/picture.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/picture.png new file mode 100755 index 000000000..f2a2b5aeb Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/picture.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/video.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/video.png new file mode 100755 index 000000000..4089a733c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/img/video.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/ltr/ltr.more.css new file mode 100755 index 000000000..ce5105c91 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/ltr/ltr.more.css @@ -0,0 +1,47 @@ +.mod-banner-site { + float: right; + position: relative; + height: 50px; + display: none; +} +.mod-banner-site .hd-item { + float: right; + width: 42px; + margin-right: 12px; + height: 100%; + background-position: center center; + background-repeat: no-repeat; + +} +.mod-banner-site .item-first { + margin-right: 0; +} +.mod-banner-site .game { + background-image: url(../img/game.png); +} +.mod-banner-site .picture { + background-image: url(../img/picture.png); +} +.mod-banner-site .video { + background-image: url(../img/video.png); +} +.mod-banner-site .game:hover { + background-color: #ff5c0d; + background-color: rgba(155,92,13,0.8); +} +.mod-banner-site .picture:hover { + background-color: #e51c63; + background-color: rgba(229,28,99,0.8); +} +.mod-banner-site .video:hover { + background-color: #1B1B1B; + background-color: rgba(27, 27, 27,0.8); +} + +/*head fixed*/ +.header-fixed-st .mod-banner-site { + height: 40px; +} +.header-fixed .mod-banner-site { + display: block; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/rtl/rtl.more.css new file mode 100755 index 000000000..735ac3ec2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/banner-site/rtl/rtl.more.css @@ -0,0 +1,47 @@ +.mod-banner-site { + float: left; + position: relative; + height: 50px; + display: none; +} +.mod-banner-site .hd-item { + float: left; + width: 42px; + margin-left: 12px; + height: 100%; + background-position: center center; + background-repeat: no-repeat; + +} +.mod-banner-site .item-first { + margin-left: 0; +} +.mod-banner-site .game { + background-image: url(../img/game.png); +} +.mod-banner-site .picture { + background-image: url(../img/picture.png); +} +.mod-banner-site .video { + background-image: url(../img/video.png); +} +.mod-banner-site .game:hover { + background-color: #ff5c0d; + background-color: rgba(155,92,13,0.8); +} +.mod-banner-site .picture:hover { + background-color: #e51c63; + background-color: rgba(229,28,99,0.8); +} +.mod-banner-site .video:hover { + background-color: #1B1B1B; + background-color: rgba(27, 27, 27,0.8); +} + +/*head fixed*/ +.header-fixed-st .mod-banner-site { + height: 40px; +} +.header-fixed .mod-banner-site { + display: block; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/calendar-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/calendar-async.js new file mode 100755 index 000000000..0c20eaa3d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/calendar-async.js @@ -0,0 +1,206 @@ +var $ = require("common:widget/ui/jquery/jquery.js"), + __date = require("common:widget/ui/date/date.js"), + time = require("common:widget/ui/time/time.js"), + UT = require("common:widget/ui/ut/ut.js"); +require("common:widget/ui/date-new/date.js"); + +var calenPath = { // plugin path + 'isl': 'isl', + 'buddhist': 'buddhist', + 'rokuyou': 'rokuyou', + 'lunar': 'lunar' + }, + parseToArr = function(obj, fix) { + fix = fix || "value"; + var i = 0, + j = obj.length, + arr = []; + for(; i < j; i++) { + arr.push(obj[i][fix] || obj[i]); + } + return arr; + }, + _conf = conf.calendar || {}, + seCalen = _conf.secondCalendar, // 副日历名称 + dateMsg = _conf.dateMsg || {}, + holiday = {}, + events = {}, + festival = {}, + normal = {}, + lyl = parseToArr(_conf.rokuyou || []), + organizeToHash = function(data, kind) { + if(!data) {return {};} + var newData = {}, + tmpObj = {}; + for (var i = 0, j = data.length; i < j; i++) { + tmpObj = data[i]; + if(!tmpObj) continue; + newData["d" + tmpObj.date] = { + kind: tmpObj.kind || kind, + title: tmpObj.title, + url: tmpObj.url + } + } + return newData; + }; + +holiday = organizeToHash(dateMsg["holiday"], "holiday"); // format data for easy handle +events = organizeToHash(dateMsg["events"], "event"); // format data for easy handle +festival = organizeToHash(dateMsg["festival"], "festival"); // format data for easy handle +normal = organizeToHash(dateMsg["normal"]); // format data for easy handle + +var calenTpl = '
                    ', + toDate = function(y, M, d) { + /*var date = new Date(); + date.setFullYear(y); + date.setDate(d); + date.setMonth(M - 1);*/ + return new Date(y, M - 1, d); + }, + formatDate = function(y, M, d) { + return ('d' + y + '-' + M + '-' + d); + }, + getItemData = function(y, M, d) { + var str = formatDate(y, M, d), + obj = {}, + ymd = {}; + + obj = normal[str] || events[str] || holiday[str] || festival[str] || null; + if(obj) { + if(obj.kind) { + ymd.className = 'class=mod-calendar-' + obj.kind; + } + if(obj.title) { + ymd.info = obj.title; + } + if(obj.url) { + ymd.url = obj.url; + } + ymd.noLink = ""; + if(obj.url == "" || obj.url == "#") { + ymd.noLink = "no-link"; + } + } + return ymd; + }, + calenFuncMap = { + 'isl': function(y, M, d) { + var date = Date.toIsl(toDate(y, M, d)), + islM = parseToArr(_conf.islMonth || []); + if(islM && date.id == "1") { + return islM[date.im - 1] || ""; + } + return date.id || ""; + }, + 'rokuyou': function(y, M, d) { + var date = toDate(y, M, d); + return lyl[Date.toLyl(date).jl] || ""; + }, + 'lunar': function(y, M, d) { + var lunarObj = __date.toLunar(y, M, d), + str = lunarObj.cd || ""; + if (_conf.lunarNumber === "1") { + return str + (str == "1" ? ("/" + lunarObj.cm) : ""); + } else { + return str == "1" ? lunarObj.CM : (lunarObj.CD || ""); + } + }, + 'buddhist': function(y, M, d) { + return ""; + } + }, + callback = function($glo, moreBtn, url, _co, week) { + var params = { + footer: moreBtn ? ('' + moreBtn + '') : '', + onFilterDays: function(data) { + data.noLink = "no-link"; + if(seCalen && calenFuncMap[seCalen]) { + data.info = calenFuncMap[seCalen](data.y, data.M, data.d); + } + $.extend(data, getItemData(data.y, data.M, data.d)); + return data; + }, + onSwitch: function(data, $y, $m) { + $("#calYearList").find("li").filter(function() { + return $(this).attr("value") == data.y; + }).trigger("mousedown.dropdownlist"); + $("#calMonthList").find("li").filter(function() { + return $(this).attr("value") == data.M; + }).trigger("mousedown.dropdownlist"); + } + }; + if(_co.useAbbrMonth === '1' && _co.abbrMonth) { + var abbrM = parseToArr(_co.abbrMonth); + params.fixMonth = function(i) { + return abbrM[i - 1] || ""; + }; + } + if(seCalen === "buddhist") { + params.fixYear = function(i) { + return i + (parseInt(_co.fixYear, 10) || 543); + }; + } + if (_co.yearFrom) { + params.minDate = _co.yearFrom; + } + if (_co.yearTo) { + params.maxDate = _co.yearTo; + } + if (_co.isAbbrWeek === "1") { + params.isAbbrWeek = true; + } else { + params.isAbbrWeek = false; + } + if (_co.beginDay) { + params.beginDay = parseInt(_co.beginDay, 10); + } + if (week && week.length) { + params.weeks = parseToArr(week); + } + params.switchLoop = true; + $('.mod-calendar', $glo).calendar(params); + require.async("common:widget/ui/dropdownlist/dropdownlist.js", function(dropdown) { + new dropdown({ + selector: "calYear", + defIndex: $("#calYear").get(0).selectedIndex, + supportSubmit: 1, + lineHeight: 36, + customScrollbar: 1 + }); + new dropdown({ + selector: "calMonth", + defIndex: $("#calMonth").get(0).selectedIndex, + supportSubmit: 1, + lineHeight: 36, + customScrollbar: 1 + }); + }); + }; +// require的文件必须为字符串吗?变量拼接的获取不到! +var init = function($glo, moreBtn, url, _co, week) { + $('.calendar-wrapper', $glo).html(calenTpl); + if (seCalen && calenPath[seCalen]) { + if (calenPath[seCalen] === "rokuyou") { + require.async(["common:widget/ui/calendar/calendar.js", "common:widget/ui/date-new/plugin/rokuyou.js"], function() { + callback($glo, moreBtn, url, _co, week); + }); + } else if (calenPath[seCalen] === "isl") { + require.async(["common:widget/ui/calendar/calendar.js", "common:widget/ui/date-new/plugin/isl.js"], function() { + callback($glo, moreBtn, url, _co, week); + }); + } else if (calenPath[seCalen] === "buddhist") { + require.async(["common:widget/ui/calendar/calendar.js", "common:widget/ui/date-new/plugin/buddhist.js"], function() { + callback($glo, moreBtn, url, _co, week); + }); + } else if (calenPath[seCalen] === "lunar") { + require.async(["common:widget/ui/calendar/calendar.js", "common:widget/ui/date-new/plugin/lunar.js"], function() { + callback($glo, moreBtn, url, _co, week); + }); + } + } else { + require.async(["common:widget/ui/calendar/calendar.js"], function() { + callback($glo, moreBtn, url, _co, week); + }); + } +}; +module.exports = init; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock-async.js new file mode 100755 index 000000000..b56ec8164 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock-async.js @@ -0,0 +1,178 @@ +/* + * CLOCK + */ +window.Gl || (window.Gl = {}); + +var $ = require("common:widget/ui/jquery/jquery.js"), + __date = require("common:widget/ui/date/date.js"), + time = require("common:widget/ui/time/time.js"), + UT = require("common:widget/ui/ut/ut.js"); +require("common:widget/ui/date-new/date.js"); +//clock +//time & date & calendar +Gl.clock = function(el) { + var _conf = conf.clock, + $wraper = $(".userbar-date-wrapper"), + $glo = $("#" + el), + $el = $glo, + url = _conf.url || "", + title = _conf.title || "", + tpl = _conf.tpl || '#{y}/#{m}/#{d}', + moreTpl = '
                    ', // when has calendar + rate = _conf.rate || 500, + ssCache = 0, //seconds cache + tim, // for calendar timetamp + format = function() { + var date = time.getForm(); + + if (date.ss === ssCache) return ""; + ssCache = date.ss; //update seconds + return tpl.replaceTpl(date); + }, + toNum = function(n) { + return parseInt(n, 10); + }; + + // open calendar + if (_conf.headerTest && _conf.openCal === "1") { + $glo.addClass('userbar-date-cal'); + $glo.html(moreTpl); + + $(document.body).on("click", function(e) { + var $e = $(e.target); + if (!$e.closest('.userbar-date-cal').length) { + $glo.removeClass('date-open'); + $wraper.removeClass('userbar-date-new_mod-show'); + } + }); + $(".calendar-wrapper", $glo).on("click", "a", function(e) { + var $that = $(this), + href = $that.attr("href"); + if (href == "" || href == "#") { + e.preventDefault(); + e.stopPropagation(); + } else { + UT.send({ + position: "clickable", + sort: href, + type: "click", + modId: "date" + }); + } + }).on("mousedown", "a", function(e) { + var $that = $(this), + href = $that.attr("href"); + if (href == "" || href == "#") { + e.preventDefault(); + e.stopPropagation(); + } + }); + + // create Calendar + $glo.one("o.onceload", function() { + $.ajax({ + url: "http://"+conf.country+".hao123.com/cmsdata?country="+conf.country+"&module=date&basemerge=true", + dataType: "jsonp" + }).done(function ( result ) { + conf.calendar = result.data.calendar; + require.async("common:widget/header-flat/clock/calendar-async.js", function(init) { + var wk = $.extend(true, [], conf.date.lunar && conf.date.lunar.wk ); + init($glo, _conf.moreBtn, url, conf.calendar, conf.calendar.week || wk); + }); + }); + }); + // add UT + $glo.on("click", function(e) { + var $e = $(e.target); + if (!$e.closest('.calendar-wrapper').length) { + $glo.toggleClass('date-open'); + $wraper.toggleClass('userbar-date-new_mod-show'); + UT.send({ + ac: "b", + position: "control", + sort: $glo.hasClass('date-open') ? "open" : "close", + type: "click", + modId: "date" + }); + e.preventDefault(); + } + }).one("mouseenter", function() { + $glo.trigger('o.onceload'); + }).on("click", ".mod-calendar_next", function(e) { + UT.send({ + ac: "b", + position: "control", + sort: "next", + type: "click", + modId: "date" + }); + }).on("click", ".mod-calendar_prev", function(e) { + UT.send({ + ac: "b", + position: "control", + sort: "prev", + type: "click", + modId: "date" + }); + }).on("click", ".dropdown", function(e) { + UT.send({ + ac: "b", + position: "control", + sort: "select", + type: "click", + modId: "date" + }); + }).on("mouseover", function(e) { + var $e = $(e.target); + if (!$e.closest('.calendar-wrapper').length) { + $glo.addClass('calendar-open'); + } else { + $glo.removeClass('calendar-open'); + } + }).on("mouseout", function(e) { + $glo.removeClass('calendar-open'); + }); + $(document.body).on("click", function(e) { + //clearTimeout(tim); + //tim = setTimeout(function() { + $('.userbar-date .dropdown-arrow').each(function(index, ele) { + var that = $(this), + par = that.closest('.dropdown-trigger'); + if (that.hasClass('dropdown-arrow-up')) { + par.addClass('dropdown-ctrl-open'); + } else { + par.removeClass('dropdown-ctrl-open'); + } + }); + // }, 10); + }); + $(window).load(function() { + setTimeout( function() { + $glo.trigger('o.onceload'); + }, 200); + }); + $el = $glo.find(".date-wrapper"); + } else { + $glo.on("click", "a", function(e) { // old UT log + UT.send({ + position: "click", + sort: "click", + type: "click", + modId: "date" + }); + }); + if ( !! url) { + tpl = '' + tpl + ''; + } + } + //display local time when initialize + $el.html(format(new Date)); + $wraper.addClass('animate-opacity'); + + timer = setInterval(function() { + var html = format(); + + //render the time + if (html) $el.html(html); + }, rate); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock-conf/clock-conf.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock-conf/clock-conf.tpl new file mode 100755 index 000000000..7e78fe450 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock-conf/clock-conf.tpl @@ -0,0 +1,19 @@ +<%script%> +//conf.date + String.prototype.parseToArray=function(e,t){var n=this.split(t||"|");return e?function(t,r){for(;t--;)n[t]=parseInt(n[t],e);return n}(n.length):n}; + + conf.date={day:{0:"<%$body.date.today%>",1:"<%$body.date.tomorrow%>"},days:[31,28,31,30,31,30,31,31,30,31,30,31],lunar:{tpl:"#{y}-#{m}-#{d} #{W} \u519c\u5386 #{CM}#{CD} #{gy}(#{sx}) #{gm} #{gd} #{so} #{cf} #{gf}",leap:"ezc|esg|wog|gr9|15k0|16xc|1yl0|h40|ukw|gya|esg|wqe|wk0|15jk|2k45|zsw|16e8|yaq|tkg|1t2v|ei8|wj4|zp1|l00|lkw|2ces|8kg|tio|gdu|ei8|k12|1600|1aa8|lud|hxs|8kg|257n|t0g|2i8n|13rk|1600|2ld2|ztc|h40|2bas|7gw|t00|15ma|xg0|ztj|lgg|ztc|1v11|fc0|wr4|1sab|gcw|xig|1a34|l28|yhy|xu8|ew0|xr8|wog|g9s|1bvn|16xc|i1j|h40|tsg|fdh|es0|wk0|161g|15jk|1654|zsw|zvk|284m|tkg|ek0|xh0|wj4|z96|l00|lkw|yme|xuo|tio|et1|ei8|jw0|n1f|1aa8|l7c|gxs|xuo|tsl|t0g|13s0|16xg|1600|174g|n6a|h40|xx3|7gw|t00|141h|xg0|zog|10v8|y8g|gyh|exs|wq8|1unq|gc0|xf4|nys|l28|y8g|i1e|ew0|wyu|wkg|15k0|1aat|1640|hwg|nfn|tsg|ezb|es0|wk0|2jsm|15jk|163k|17ph|zvk|h5c|gxe|ek0|won|wj4|xn4|2dsl|lk0|yao".parseToArray(36),jqmap:"0|gd4|wrn|1d98|1tuh|2akm|2rfn|38g9|3plp|46vz|4o9k|55px|5n73|64o5|6m37|73fd|7kna|81qe|8io7|8zgq|9g4b|9wnk|ad3g|ath2|".parseToArray(36),jqnames:"\u5c0f\u5bd2|\u5927\u5bd2|\u7acb\u6625|\u96e8\u6c34|\u60ca\u86f0|\u6625\u5206|\u6e05\u660e|\u8c37\u96e8|\u7acb\u590f|\u5c0f\u6ee1|\u8292\u79cd|\u590f\u81f3|\u5c0f\u6691|\u5927\u6691|\u7acb\u79cb|\u5904\u6691|\u767d\u9732|\u79cb\u5206|\u5bd2\u9732|\u971c\u964d|\u7acb\u51ac|\u5c0f\u96ea|\u5927\u96ea|\u51ac\u81f3".parseToArray(),c1:"|\u4e00|\u4e8c|\u4e09|\u56db|\u4e94|\u516d|\u4e03|\u516b|\u4e5d|\u5341".parseToArray(),c2:"\u521d|\u5341|\u5eff|\u5345|".parseToArray(),wk:"<%$body.date.Sunday%>|<%$body.date.Monday%>|<%$body.date.Tuesday%>|<%$body.date.Wednesday%>|<%$body.date.Thursday%>|<%$body.date.Friday%>|<%$body.date.Saturday%>".parseToArray(),tg:"\u7532|\u4e59|\u4e19|\u4e01|\u620a|\u5df1|\u5e9a|\u8f9b|\u58ec|\u7678".parseToArray(),dz:"\u5b50|\u4e11|\u5bc5|\u536f|\u8fb0|\u5df3|\u5348|\u672a|\u7533|\u9149|\u620c|\u4ea5".parseToArray(),sx:"\u9f20|\u725b|\u864e|\u5154|\u9f99|\u86c7|\u9a6c|\u7f8a|\u7334|\u9e21|\u72d7|\u732a".parseToArray(),fixMonth:["2001-5-23~2001-6-20","2004-3-21~2004-4-18","2006-8-24~2006-9-21","2009-6-23~2009-7-21", "2012-5-21~2012-6-18","2014-10-24~2014-11-21","2017-7-23~2017-8-21", "2020-5-23~2020-6-29","2023-3-22~2023-4-19","2025-7-25~2025-8-22"],fixDate:["2002-1-1~2002-1-12=0|-1|0", "2002-1-14~2002-2-11=0|-1|1", "2002-1-13=0|0|-29", "2005-1-1~2005-1-9=0|-1|0", "2005-1-11~2005-2-8=0|-1|1", "2005-1-10=0|0|-29", "2007-1-1~2007-1-18=0|-1|1", "2007-1-20~2007-2-17=0|-1|1", "2007-1-19=0|0|-29", "2010-1-1~2010-1-14=0|-1|1", "2010-1-16~2010-2-13=0|-1|1", "2010-1-15=0|0|-29", "2013-1-1~2013-1-11=0|-1|1", "2013-1-12~2013-2-9=0|-1|0", "2015-1-1~2015-1-19=0|-1|0", "2015-1-21~2015-2-18=0|-1|1", "2015-1-20=0|0|-29", "2018-1-1~2018-1-16=0|-1|0", "2018-1-17~2018-2-15=0|-1|0", "2021-1-1~2021-1-12=0|-1|0", "2021-1-14~2021-2-11=0|-1|1", "2021-1-13=0|0|-29", "2024-1-1~2024-1-10=0|-1|0", "2024-1-12~2024-2-9=0|-1|1", "2024-1-11=0|0|-29"]},isl:{tpl:"#{IW} - #{d} \u0645\u0646 #{M} #{y} - #{id} #{IM} #{iy}",weekNames:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a"],gMonthNames:["<%$body.date.Jan%>","<%$body.date.Feb%>","<%$body.date.Mar%>","<%$body.date.Apr%>","<%$body.date.May%>","<%$body.date.Jun%>","<%$body.date.Jul%>","<%$body.date.Aug%>","<%$body.date.Sep%>","<%$body.date.Oct%>","<%$body.date.Nov%>","<%$body.date.Dec%>"],monthNames:["\u0627\u0644\u0645\u062d\u0631\u0645","\u0635\u0641\u0631","\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644","\u0631\u0628\u064a\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u062c\u0645\u0627\u062f\u064a \u0627\u0644\u0623\u0648\u0644\u0649","\u062c\u0645\u0627\u062f\u064a \u0627\u0644\u0622\u062e\u0631\u0629","\u0631\u062c\u0628","\u0634\u0639\u0628\u0627\u0646","\u0631\u0645\u0636\u0627\u0646","\u0634\u0648\u0627\u0644","\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629","\u0630\u0648 \u0627\u0644\u062d\u062c\u0629"],fixDate:[]}}; + + //clock configuration + conf.clock = { + imgUrl: "/static/web/common/img/gut.gif", + url: '<%$body.date.url%>', + title: '<%$body.date.title%>', + tpl: '<%$body.date.tpl%>', + islDateFix: '<%if isset($body.date.islDateFix)%><%$body.date.islDateFix%><%/if%>' || 0, + rate: 1000, + openCal: '<%$body.date.openCalendar%>', + moreBtn: '<%$body.date.moreBtn%>', + headerTest: '<%$body.headerTest.widget%>' + }; +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock.tpl new file mode 100755 index 000000000..e6f352e3b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/clock.tpl @@ -0,0 +1,29 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header-flat/clock/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header-flat/clock/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header-flat/clock/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header-flat/clock/rtl/rtl.more.css"%> <%/if%> + +<%if !empty($body.headerTest.widget)%>
                    <%/if%> +
                    style="font-size:<%$body.date.fontSize%>"<%/if%>>
                    +<%if !empty($body.headerTest.widget)%>
                    <%/if%> +<%widget name="common:widget/header-flat/clock/clock-conf/clock-conf.tpl"%> +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + + $(window).one("e_go.clock", function () { + require.async("common:widget/header-flat/clock/clock-async.js", function () { + Gl.clock("dateBox"); + }); + }); + + //$(function () { + $(window).trigger("e_go.clock"); + //}); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/bell.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/bell.png new file mode 100755 index 000000000..b0b8dd72e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/bell.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/calendar-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/calendar-new.png new file mode 100755 index 000000000..676802a72 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/calendar-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/calendar.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/calendar.png new file mode 100755 index 000000000..60e6e6ed2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/calendar.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/count_bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/count_bg.png new file mode 100755 index 000000000..71c8fc7df Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/count_bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/countdown.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/countdown.png new file mode 100755 index 000000000..ca747bdfc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/countdown.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/events.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/events.png new file mode 100755 index 000000000..d4ca94538 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/events.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/festval.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/festval.png new file mode 100755 index 000000000..4432977e1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/festval.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/football.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/football.png new file mode 100755 index 000000000..418a40f1e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/football.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger-hover.png new file mode 100755 index 000000000..cd547fd4b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger-hover_sk.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger-hover_sk.png new file mode 100755 index 000000000..45b0a9845 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger-hover_sk.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger.png new file mode 100755 index 000000000..46f160b21 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger_sk.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger_sk.png new file mode 100755 index 000000000..adfc0adf7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/more_trigger_sk.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next.png new file mode 100755 index 000000000..254c9eb49 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_hover.png new file mode 100755 index 000000000..2a04f244c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_hover_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_hover_rtl.png new file mode 100755 index 000000000..2a04f244c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_hover_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_rtl.png new file mode 100755 index 000000000..254c9eb49 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/next_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev.png new file mode 100755 index 000000000..06dfbfcc9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_hover.png new file mode 100755 index 000000000..7a8e5b8d9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_hover_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_hover_rtl.png new file mode 100755 index 000000000..7a8e5b8d9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_hover_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_rtl.png new file mode 100755 index 000000000..06dfbfcc9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/prev_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/worldcup-vs.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/worldcup-vs.png new file mode 100755 index 000000000..7959deeda Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/img/worldcup-vs.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/ltr/ltr.css new file mode 100755 index 000000000..c1339348b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/ltr/ltr.css @@ -0,0 +1,7 @@ +/*.userbar-date{ display: none;} +.userbar-date-wrapper { + float: left; + position: relative; + z-index: 100; + background-repeat: no-repeat; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/ltr/ltr.more.css new file mode 100755 index 000000000..4464bab6e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/ltr/ltr.more.css @@ -0,0 +1,609 @@ +/*form inline css*/ +.userbar-date{ + display: none; +} +.userbar-date-wrapper { + float: right; + /*position: relative;*/ + z-index: 100; + background-repeat: no-repeat; + opacity: 0; +} + + + +.userbar-date{ + white-space: nowrap; + display: block; + display: block !important; + position: relative; + float: left; + padding: 11px 20px 9px 20px; +} +.userbar-date a { + color: #fff; +} +.userbar-date span { + color: #b8e1cf; + font-size: 9px; + padding: 0 2px; +} + +/*for countdown*/ +.userbar-date .down-wrapper { + height: 30px; + overflow: hidden; +} +.userbar-date .down-wrapper span { + color: #ffffff; + font-size: 12px; + padding: 0; +} +.down-wrapper .down-time { + float: right; + overflow: hidden; + height: 30px; +/* width: 72px;*/ +} +.userbar-date .down-wrapper .down-day { + font-size: 30px; + line-height: 30px; + float: left; + margin-right: 4px; + color: #fff000; +} +.down-wrapper .down-dhm { + float: right; +} +.userbar-date .down-wrapper .down-d { + color: #9BD5C1; + color: rgba(255,255,255,0.6); +} +.down-wrapper .down-tip { + float: left; + position: absolute; + left: 18px; +} +.userbar-date .mod-calendar_ft a { + display: inline; +} +.userbar-date .mod-calendar a { + color: #FFFFFF; +} +.userbar-date .mod-calendar_weeks { + color: #BACCEB; + color: rgba(255,255,255,0.6); + border-color: transparent; +} +.userbar-date .mod-calendar_next, .userbar-date .mod-calendar_prev { + width: 30px; + height: 50px; + padding: 0; + text-indent: -1000px; + overflow: hidden; + white-space: nowrap; + cursor: pointer; +} +.userbar-date .mod-calendar_next { + background: url(../img/next.png?__sprite) no-repeat; + margin-right: 1px; +} +.userbar-date .mod-calendar_next:hover { + background: url(../img/next_hover.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev { + background: url(../img/prev.png?__sprite) no-repeat; + margin-left: 1px; +} +.userbar-date .mod-calendar_prev:hover { + background: url(../img/prev_hover.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_year { + width: 61px; +} +.userbar-date .mod-calendar_month { + width: 46px; +} +.userbar-date .dropdown,.calendar-wrapper span { + font-size: 12px; + color: #000000; + padding: 0; +} +.userbar-date .mod-calendar_hd { + padding: 6px 0; +} +#calYearDropDown { + margin-right: 5px; +} +/*.userbar-date .mod-calendar-holder dd { + display: none; +}*/ +.userbar-date .mod-calendar-countdown dl { + /*background: url(../img/bell.png) no-repeat center 4px;*/ + background-color: #FCA438; + color: #fff; +} +/*.userbar-date .mod-calendar-countdown dt{ + text-indent: -1000px; + overflow: hidden; + white-space: nowrap; +}*/ +.down-show { + background-color: #049565; +} +.userbar-date .no-link { + cursor: default; +} +.userbar-date .ui-bubble-t .ui-bubble_in, .userbar-date .ui-bubble-t .ui-bubble_out { + left: 64px; +} +/*.userbar-date li.mod-calendar-today { + border-bottom: 3px solid; +}*/ +.userbar-date .mod-calendar_days a:hover dl { + left: -2px; + right: auto; +} +/*.userbar-date .mod-calendar-today a:hover dl { + left: -1px; +}*/ +.date-wrapper { + max-height: 30px; + line-height: 16px; +} +.userbar-date .mod-calendar_days li:nth-of-type(7n+7) a:hover dl { + left: auto; + right: -2px; +} + + +.userbar-date br { + display: block !important; +} +.userbar-date .calendar_bg { + display: inline !important; + float: left; + width: 30px; + height: 30px; + font-size: 14px; + font-weight: 700; + line-height: 36px; + padding: 0; + margin-right: 8px; + text-align: center; + color: #fff; + background: url(../img/calendar.png?__sprite) no-repeat; +} + + +/***倒计时&&日历增强***/ +body .userbar-date a { + display: block; + /*text-align: center;*/ +} +.userbar-date-cal { + cursor: pointer; + padding: 11px 42px 9px 20px; +} +body .calendar-open, .userbar-date-cal:hover, body .date-open { + background-color: #0265C9; + background-color: rgba(0, 99, 199, 0.94); +} +.userbar-date-cal .date-tip { + width: 12px; + height: 12px; + background: url(../img/more_trigger.png?__sprite) no-repeat; + position: absolute; + right: 20px; + top: 18px; + pointer-events: none; + cursor: pointer; +} +.date-open .date-tip { + background: url(../img/more_trigger-hover.png?__sprite) no-repeat; +} +.userbar-date-cal .calendar-wrapper { + position: absolute; + top: 50px; + left: 0px; + background-color: #0265C9; + background-color: rgba(0, 99, 199, 0.94); + border-top-width: 0; + cursor: default; + display: none; +} +.date-open .calendar-wrapper { + display: block; +} +.userbar-date-cal .ui-arrow-t { + left: 52px; + border-bottom-color: #F0FFFB; +} +.userbar-date-cal .cal-btn { + display: inline-block; + max-width: 94%; + height: 34px; + line-height: 34px; + color: #07b67b; + font-size: 12px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + bottom: 0; + right: 12px; +} +.userbar-date .mod-calendar { + border-color: transparent; + background: #0F6CCA; + /*background: rgba(0, 99, 199, 0.06);*/ + /*autopack*/ + width: 377px; + position: relative; +} +.userbar-date .mod-calendar_bd, +.userbar-date .mod-calendar_weeks li, +.userbar-date .mod-calendar_days li, +.userbar-date .mod-calendar_days dl, +.userbar-date .mod-calendar_days a:hover dl, +.userbar-date .mod-calendar_days a, +.userbar-date .mod-calendar-holder dl { + background: transparent; + border-color: transparent; +} +.userbar-date .mod-calendar-festival a, +.userbar-date .mod-calendar-holiday a { + background: url(../img/festval.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar-event a { + background: url(../img/events.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar-countdown a { + background: url(../img/countdown.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar-football a { + background: url(../img/football.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar-festival a:hover, +.userbar-date .mod-calendar-holiday a:hover, +.userbar-date .mod-calendar-event a:hover, +.userbar-date .mod-calendar-countdown a:hover, +.userbar-date .mod-calendar-football a:hover { + background: none; +} +.userbar-date .mod-calendar-festival a dd, +.userbar-date .mod-calendar-holiday a dd, +.userbar-date .mod-calendar-event a dd, +.userbar-date .mod-calendar-countdown a dd, +.userbar-date .mod-calendar-football a dd { + visibility: hidden; + color: #ffffff; +} +.userbar-date .mod-calendar-festival a:hover dl, +.userbar-date .mod-calendar-holiday a:hover dl { + background-color: #F29C9F; + border-radius: 34px; + margin-left: -10px; + min-width: 70px; +} +.userbar-date .mod-calendar-event a:hover dl { + background-color: #7CD25F; + border-radius: 34px; + margin-left: -10px; + min-width: 70px; +} +.userbar-date .mod-calendar-countdown a:hover dl { + background-color: #F5C009; + border-radius: 34px; + margin-left: -10px; + min-width: 70px; +} +.userbar-date .mod-calendar-football a:hover dl { + background-color: #7CD25F; + border-radius: 34px; + margin-left: -10px; + min-width: 70px; +} +.userbar-date .mod-calendar_days a:hover dd { + visibility: visible; +} +.userbar-date .mod-calendar_days dt { + color: #ffffff; +} +.userbar-date .mod-calendar-holder dt, +.mod-calendar_days dl dd { + color: #6FA7DF; + color: rgba(255,255,255,0.3); +} +.userbar-date .mod-calendar_days dd { + margin-top: -4px; +} +.userbar-date .mod-calendar_bd li { + border-bottom: 1px solid #1c81e5 !important; + border-bottom: 1px solid rgba(28,129,229,0.96) !important; +} +.userbar-date .mod-calendar_splt { + border-top: 1px solid #0F6CCA; + border-top-color: rgba(0,99,199,.06); + margin-top: -5px; +} + +.userbar-date .mod-calendar-today dt { + font-size: 24px; + padding-top: 0 !important; + line-height: 36px; + background: #4ca6ff; + width: 36px; + height: 36px; + margin-left: 6px; + margin-top: 7px; + text-align: center; + border-radius: 18px; +} +.userbar-date .dropdown { + margin-top: 8px; +} +.userbar-date .mod-calendar_ft { + /* margin-top: -7px; */ +} + +.userbar-date .mod-calendar .mod-calendar_ft a { + /* padding-top: 12px; */ + display: inline-block; +} +.userbar-date .dropdown-list { + background: #1c81e5; + border-width: 0; + text-indent: 0; +} +.userbar-date .dropdown span, .userbar-date .dropdown-list li { + font-size: 18px; + color: #ffffff; + background: transparent; +} +.userbar-date .dropdown-list li { + line-height: 36px; + height: 36px; +} +.userbar-date .dropdown-trigger,.userbar-date .dropdown-input { + border-width: 0; + height: 34px; + line-height: 34px; +} +.userbar-date .dropdown-list li:hover, .userbar-date .dropdown-list .dropdown-list-hover { + background-color: #1974CE; + background-color: rgba(0,0,0,0.1); +} +.userbar-date .dropdown .dropdown-arrow { + border-width: 0; + width: 12px; + height: 12px; + top: 11px; + right: 15px; + background: url(../img/more_trigger.png?__sprite) no-repeat; +} +.userbar-date .dropdown .dropdown-arrow-up { + background: url(../img/more_trigger-hover.png?__sprite) no-repeat; +} +.userbar-date .dropdown .dropdown-arrow i { + display: none; +} +.userbar-date .dropdown .dropdown-ctrl-open { + background: #1c81e5; +} + + +/**fix calendar style depend on UI**/ +.userbar-date .mod-calendar_days a, .userbar-date .mod-calendar_days dl { + height: 68px; +} +.userbar-date .mod-calendar_days dt { + padding-top: 16px; +} + +/*has skin*/ +.skin-on .userbar-date-cal .date-tip { + background: url(../img/more_trigger_sk.png?__sprite) no-repeat; +} +.skin-on .date-open .date-tip { + background: url(../img/more_trigger-hover_sk.png?__sprite) no-repeat; +} +.skin-on .userbar-date .dropdown .dropdown-arrow { + background: url(../img/more_trigger_sk.png?__sprite) no-repeat; +} +.skin-on .userbar-date .dropdown .dropdown-arrow-up { + background: url(../img/more_trigger-hover_sk.png?__sprite) no-repeat; +} +.skin-on .calendar-open, +.skin-on .userbar-date-cal:hover, +.skin-on .date-open, +.skin-on .userbar-date-cal .calendar-wrapper { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} +.skin-on .userbar-date .mod-calendar { + background: none; +} +.skin-on .userbar-date .mod-calendar_bd li { + border-bottom-color: #717171 !important; + border-bottom-color: rgba(255,255,255,0.3) !important; +} +.skin-on .userbar-date .dropdown .dropdown-ctrl-open, +.skin-on .userbar-date .dropdown-list { + background: #626262; +} +.skin-on .userbar-date .dropdown-list li:hover, +.skin-on .userbar-date .dropdown-list .dropdown-list-hover { + background-color: #444444; + background-color: rgba(0,0,0,0.3); +} +.skin-on .userbar-date .mod-calendar_next:hover { + background: url(../img/next.png?__sprite) no-repeat; + background-color: #186EC0; + background-color: rgba(28,129,229,0.8); +} +.skin-on .userbar-date .mod-calendar_prev:hover { + background: url(../img/prev.png?__sprite) no-repeat; + background-color: #186EC0; + background-color: rgba(28,129,229,0.8); +} + +/*倒计时增强*/ +.userbar-date-new_mod { + /*box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -webkit-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -o-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -moz-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -ms-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset;*/ + background-position: left top; +} +.userbar-date-new_mod:hover, +.userbar-date-new_mod.userbar-date-new_mod-show { + background-color: #0164C8 !important; + background-color: rgba(0,99,199,.97) !important; +} +.userbar-date-new_mod2 { + background-position: right top; +} +.userbar-date-new_mod .userbar-date { + background: none !important; + width: auto !important; + float: none !important; +} +/*.userbar-date-new_mod .date-tip { + display: none !important; +}*/ +/*@media \0screen { + .userbar-date-new_mod .calendar-open { + filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#33FFFFFF', endColorstr='#33FFFFFF'); + } +}*/ +.userbar-date-new_mod .down-tip { + visibility: hidden; +} +.userbar-date-new_mod .down-dhm .down-hm, +.userbar-date-new_mod .down-dhm br { + display: none !important; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-day, +.userbar-date-new_mod .userbar-date .down-wrapper .down-dhm { + float: none; + display: block; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-day { + margin-top: -3px; + color: #f83a66; + width: 40px; + float: right; + margin-right: 0; + overflow: hidden; + letter-spacing: 2px; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-d { + color: #FFFFFF; + display: block; + font-size: 10px; + -webkit-transform: scale(0.8); + margin-top: 24px; + padding-left: 2px; + text-align: center; +} +.userbar-date-new_mod .userbar-date .down-wrapper, +.userbar-date-new_mod .down-wrapper .down-time { + overflow: visible; +} +.userbar-date-new_mod .down-wrapper .down-time { + background: url(../img/count_bg.png?__sprite) no-repeat; + width: 45px; + margin-top: -9px; + padding-top: 10px; +} +.userbar-date-new_mod2 .down-wrapper .down-time { + float: left; +} +.skin-on .userbar-date-new_mod:hover, +.skin-on .userbar-date-new_mod.userbar-date-new_mod-show { + background-color: #333 !important; + background-color: rgba(0,0,0,.8) !important; +} + + +/*head fixed*/ +.header-fixed .userbar-date { + width: auto !important; +} +.header-fixed .down-wrapper { + display: none !important; +} +.header-fixed .date-wrapper { + display: block !important; + line-height: 20px; +} +.header-fixed .userbar-date .calendar_bg, +.header-fixed .userbar-date br { + display: none !important; +} +.header-fixed-st .userbar-date-cal .calendar-wrapper { + top: 40px; +} +.header-fixed-st .userbar-date-cal .date-tip { + top: 15px; +} +.header-fixed .userbar-date-new_mod { + background-image: none !important; + width: auto !important; +} + +.header-fixed-up .date-wrapper { + line-height: 30px; +} + +/**世界杯赛事**/ +.userbar-data-worldcup .userbar-date-cal{ + padding: 0 +} +.userbar-data-worldcup .worldcup{ + margin: 8px 45px 0 16px; + height: 42px; + overflow: hidden; +} +.userbar-data-worldcup .match-info{ + float: left; + margin-right: 8px; + color: #ffef00; +} +.userbar-data-worldcup .match-info .time{ + font-size: 21px; +} +.userbar-data-worldcup .team-vs{ + float: left; +} +.userbar-data-worldcup .team-vs .team-vs-icon{ + display: inline-block; + width: 38px; + height: 33px; + background: url(../img/worldcup-vs.png?__sprite); + vertical-align: middle; +} +.header-fixed .userbar-data-worldcup .worldcup{ + display: none; +} +.header-fixed .userbar-data-worldcup .userbar-date-cal{ + padding: 0 16px; +} +.header-fixed .userbar-data-worldcup .date-wrapper{ + line-height: 40px; + height: 40px; + margin-right: 25px; + height: 40px; + max-height: 40px; +} +.animate-opacity{ + -webkit-transition: opacity linear .6s; + -moz-transition: opacity linear .6s; + -ms-transition: opacity linear .6s; + -o-transition: opacity linear .6s; + transition: opacity linear .6s; + opacity: 1; + filter: alpha(opacity=100); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/rtl/rtl.css new file mode 100755 index 000000000..9271b012f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/rtl/rtl.css @@ -0,0 +1,9 @@ +/*.userbar-date{ + display: none; +} +.userbar-date-wrapper { + float: right; + position: relative; + z-index: 100; + background-repeat: no-repeat; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/rtl/rtl.more.css new file mode 100755 index 000000000..e2dca1410 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/clock/rtl/rtl.more.css @@ -0,0 +1,612 @@ +/*form inline css*/ +.userbar-date{ + display: none; +} +.userbar-date-wrapper { + float: left; + /*position: relative;*/ + z-index: 100; + background-repeat: no-repeat; + opacity: 0; +} + + +.userbar-date{ + white-space: nowrap; + display: block; + display: block !important; + position: relative; + float: right; + padding: 11px 20px 9px 20px; +} +.userbar-date a { + color: #fff; +} +.userbar-date span { + color: #b8e1cf; + font-size: 9px; + padding: 0 2px; +} + +/*for countdown*/ +.userbar-date .down-wrapper { + height: 30px; + overflow: hidden; +} +.userbar-date .down-wrapper span { + color: #ffffff; + font-size: 12px; + padding: 0; +} +.down-wrapper .down-time { + float: left; + overflow: hidden; + height: 30px; +/* width: 72px;*/ +} +.userbar-date .down-wrapper .down-day { + font-size: 30px; + line-height: 30px; + float: right; + margin-left: 4px; + color: #fff000; +} +.down-wrapper .down-dhm { + float: left; +} +.userbar-date .down-wrapper .down-d { + color: #9BD5C1; + color: rgba(255,255,255,0.6); +} +.down-wrapper .down-tip { + float: right; + position: absolute; + right: 18px; +} +.userbar-date .mod-calendar_ft a { + display: inline; +} +.userbar-date .mod-calendar a { + color: #FFFFFF; +} +.userbar-date .mod-calendar_weeks { + color: #BACCEB; + color: rgba(255,255,255,0.6); + border-color: transparent; +} +.userbar-date .mod-calendar_next, .userbar-date .mod-calendar_prev { + width: 30px; + height: 50px; + padding: 0; + text-indent: -1000px; + overflow: hidden; + white-space: nowrap; + cursor: pointer; +} +.userbar-date .mod-calendar_next { + background: url(../img/prev_rtl.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_next:hover { + background: url(../img/prev_hover_rtl.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev { + background: url(../img/next_rtl.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev:hover { + background: url(../img/next_hover_rtl.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev{ float: right; margin-right: 1px;margin-left: 0;} +.userbar-date .mod-calendar_next{ float: left; margin-left: 1px;margin-right: 0;} +.userbar-date .mod-calendar_grid li {float:right;} +.userbar-date .mod-calendar_ft {text-align: left;} +.userbar-date .mod-calendar_year { + width: 61px; +} +.userbar-date .mod-calendar_month { + width: 62px; +} +.userbar-date .dropdown,.calendar-wrapper span { + font-size: 12px; + color: #000000; + padding: 0; +} +.userbar-date .mod-calendar_hd { + padding: 6px 0; +} +#calYearDropDown { + margin-left: 5px; +} +/*.userbar-date .mod-calendar-holder dd { + display: none; +}*/ +.userbar-date .mod-calendar-countdown dl { + /*background: url(../img/bell.png) no-repeat center 4px;*/ + background-color: #FCA438; + color: #fff; +} +/*.userbar-date .mod-calendar-countdown dt{ + text-indent: -1000px; + overflow: hidden; + white-space: nowrap; +}*/ +.down-show { + background-color: #049565; +} +.userbar-date .no-link { + cursor: default; +} +.userbar-date .ui-bubble-t .ui-bubble_in, .userbar-date .ui-bubble-t .ui-bubble_out { + right: 64px; +} +/*.userbar-date li.mod-calendar-today { + border-bottom: 3px solid; +}*/ +.userbar-date .mod-calendar_days a:hover dl { + right: -2px; + left: auto; +} +/*.userbar-date .mod-calendar-today a:hover dl { + right: 1px; +}*/ +.date-wrapper { + max-height: 30px; + line-height: 16px; +} +.userbar-date .mod-calendar_days li:nth-of-type(7n+7) a:hover dl { + right: auto; + left: -2px; +} + + +.userbar-date br { + display: block !important; +} +.userbar-date .calendar_bg { + display: inline !important; + float: right; + width: 30px; + height: 30px; + font-size: 14px; + font-weight: 700; + line-height: 36px; + padding: 0; + margin-left: 8px; + text-align: center; + color: #fff; + background: url(../img/calendar.png?__sprite) no-repeat; +} + + +/***倒计时&&日历增强***/ +body .userbar-date a { + display: block; + /*text-align: center;*/ +} +.userbar-date-cal { + cursor: pointer; + padding: 11px 20px 9px 60px; +} +body .calendar-open,.userbar-date-cal:hover,body .date-open { + background-color: #0265C9; + background-color: rgba(0, 99, 199, 0.94); +} +.userbar-date-cal .date-tip { + width: 12px; + height: 12px; + background: url(../img/more_trigger.png?__sprite) no-repeat; + position: absolute; + left: 20px; + top: 18px; + pointer-events: none; + cursor: pointer; +} +.date-open .date-tip { + background: url(../img/more_trigger-hover.png?__sprite) no-repeat; +} +.userbar-date-cal .calendar-wrapper { + position: absolute; + top: 50px; + right: 0px; + background-color: #0265C9; + background-color: rgba(0, 99, 199, 0.94); + border-top-width: 0; + cursor: default; + display: none; +} +.date-open .calendar-wrapper { + display: block; +} +.userbar-date-cal .ui-arrow-t { + right: 52px; + border-bottom-color: #F0FFFB; +} +.userbar-date-cal .cal-btn { + display: inline-block; + max-width: 94%; + height: 34px; + line-height: 34px; + color: #07b67b; + font-size: 12px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + bottom: 0; + left: 12px; +} +.userbar-date .mod-calendar { + border-color: transparent; + background: #0F6CCA; + background: rgba(0, 99, 199, 0.06); + /*autopack*/ + width: 377px; + position: relative; +} +.userbar-date .mod-calendar_bd, +.userbar-date .mod-calendar_weeks li, +.userbar-date .mod-calendar_days li, +.userbar-date .mod-calendar_days dl, +.userbar-date .mod-calendar_days a:hover dl, +.userbar-date .mod-calendar_days a, +.userbar-date .mod-calendar-holder dl { + background: transparent; + border-color: transparent; +} +.userbar-date .mod-calendar-festival a, +.userbar-date .mod-calendar-holiday a { + background: url(../img/festval.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar-event a { + background: url(../img/events.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar-countdown a { + background: url(../img/countdown.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar-football a { + background: url(../img/football.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar-festival a:hover, +.userbar-date .mod-calendar-holiday a:hover, +.userbar-date .mod-calendar-event a:hover, +.userbar-date .mod-calendar-countdown a:hover, +.userbar-date .mod-calendar-football a:hover { + background: none; +} +.userbar-date .mod-calendar-festival a dd, +.userbar-date .mod-calendar-holiday a dd, +.userbar-date .mod-calendar-event a dd, +.userbar-date .mod-calendar-countdown a dd, +.userbar-date .mod-calendar-football a dd { + visibility: hidden; + color: #ffffff; +} +.userbar-date .mod-calendar-festival a:hover dl, +.userbar-date .mod-calendar-holiday a:hover dl { + background-color: #F29C9F; + border-radius: 34px; + margin-right: -10px; + min-width: 70px; +} +.userbar-date .mod-calendar-event a:hover dl { + background-color: #7CD25F; + border-radius: 34px; + margin-right: -10px; + min-width: 70px; +} +.userbar-date .mod-calendar-countdown a:hover dl { + background-color: #F5C009; + border-radius: 34px; + margin-right: -10px; + min-width: 70px; +} +.userbar-date .mod-calendar-football a:hover dl { + background-color: #7CD25F; + border-radius: 34px; + margin-right: -10px; + min-width: 70px; +} +.userbar-date .mod-calendar_days a:hover dd { + visibility: visible; +} +.userbar-date .mod-calendar_days dt { + color: #ffffff; +} +.userbar-date .mod-calendar-holder dt, +.mod-calendar_days dl dd { + color: #6FA7DF; + color: rgba(255,255,255,0.3); +} +.userbar-date .mod-calendar_days dd { + margin-top: -4px; +} +.userbar-date .mod-calendar_bd li { + border-bottom: 1px solid #1c81e5 !important; + border-bottom: 1px solid rgba(28,129,229,0.96) !important; +} +.userbar-date .mod-calendar_splt { + border-top: 1px solid #0F6CCA; + border-top-color: rgba(0,99,199,.06); + margin-top: -5px; +} + +.userbar-date .mod-calendar-today dt { + font-size: 24px; + padding-top: 0 !important; + line-height: 36px; + background: #4ca6ff; + width: 36px; + height: 36px; + margin-right: 6px; + margin-top: 7px; + text-align: center; + border-radius: 18px; +} +.userbar-date .dropdown { + margin-top: 8px; +} +.userbar-date .mod-calendar_ft { + /* margin-top: -7px; */ +} + +.userbar-date .mod-calendar .mod-calendar_ft a { + /* padding-top: 12px; */ + display: inline-block; +} +.userbar-date .dropdown-list { + background: #1c81e5; + border-width: 0; + text-indent: 0; +} +.userbar-date .dropdown span, .userbar-date .dropdown-list li { + font-size: 18px; + color: #ffffff; + background: transparent; +} +.userbar-date .dropdown-list li { + line-height: 36px; + height: 36px; +} +.userbar-date .dropdown-trigger,.userbar-date .dropdown-input { + border-width: 0; + height: 34px; + line-height: 34px; +} +.userbar-date .dropdown-list li:hover, .userbar-date .dropdown-list .dropdown-list-hover { + background-color: #1974CE; + background-color: rgba(0,0,0,0.1); +} +.userbar-date .dropdown .dropdown-arrow { + border-width: 0; + width: 12px; + height: 12px; + top: 11px; + left: 15px; + background: url(../img/more_trigger.png?__sprite) no-repeat; +} +.userbar-date .dropdown .dropdown-arrow-up { + background: url(../img/more_trigger-hover.png?__sprite) no-repeat; +} +.userbar-date .dropdown .dropdown-arrow i { + display: none; +} +.userbar-date .dropdown .dropdown-ctrl-open { + background: #1c81e5; +} + + +/**fix calendar style depend on UI**/ +.userbar-date .mod-calendar_days a, .userbar-date .mod-calendar_days dl { + height: 68px; +} +.userbar-date .mod-calendar_days dt { + padding-top: 16px; +} + +/*has skin*/ +.skin-on .userbar-date-cal .date-tip { + background: url(../img/more_trigger_sk.png?__sprite) no-repeat; +} +.skin-on .date-open .date-tip { + background: url(../img/more_trigger-hover_sk.png?__sprite) no-repeat; +} +.skin-on .userbar-date .dropdown .dropdown-arrow { + background: url(../img/more_trigger_sk.png?__sprite) no-repeat; +} +.skin-on .userbar-date .dropdown .dropdown-arrow-up { + background: url(../img/more_trigger-hover_sk.png?__sprite) no-repeat; +} +.skin-on .calendar-open, +.skin-on .userbar-date-cal:hover, +.skin-on .date-open, +.skin-on .userbar-date-cal .calendar-wrapper { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} +.skin-on .userbar-date .mod-calendar { + background: none; +} +.skin-on .userbar-date .mod-calendar_bd li { + border-bottom-color: #717171 !important; + border-bottom-color: rgba(255,255,255,0.3) !important; +} +.skin-on .userbar-date .dropdown .dropdown-ctrl-open, +.skin-on .userbar-date .dropdown-list { + background: #626262; +} +.skin-on .userbar-date .dropdown-list li:hover, +.skin-on .userbar-date .dropdown-list .dropdown-list-hover { + background-color: #444444; + background-color: rgba(0,0,0,0.3); +} +.skin-on .userbar-date .mod-calendar_next:hover { + background: url(../img/prev_rtl.png?__sprite) no-repeat; + background-color: #186EC0; + background-color: rgba(28,129,229,0.8); +} +.skin-on .userbar-date .mod-calendar_prev:hover { + background: url(../img/next_rtl.png?__sprite) no-repeat; + background-color: #186EC0; + background-color: rgba(28,129,229,0.8); +} + +/*倒计时增强*/ +.userbar-date-new_mod { + /*box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -webkit-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -o-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -moz-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -ms-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset;*/ + background-position: right top; +} +.userbar-date-new_mod .userbar-date-cal { + padding-left: 42px; +} +.userbar-date-new_mod:hover, +.userbar-date-new_mod.userbar-date-new_mod-show { + background-color: #0164C8 !important; + background-color: rgba(0,99,199,.97) !important; +} +.userbar-date-new_mod2 { + background-position: left top; +} +.userbar-date-new_mod .userbar-date { + background: none !important; + width: auto !important; + float: none !important; +} +/*.userbar-date-new_mod .date-tip { + display: none !important; +}*/ +/*@media \0screen { + .userbar-date-new_mod .calendar-open { + filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#33FFFFFF', endColorstr='#33FFFFFF'); + } +}*/ +.userbar-date-new_mod .down-tip { + visibility: hidden; +} +.userbar-date-new_mod .down-dhm .down-hm, +.userbar-date-new_mod .down-dhm br { + display: none !important; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-day, +.userbar-date-new_mod .userbar-date .down-wrapper .down-dhm { + float: none; + display: block; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-day { + margin-top: -4px; + color: #f83a66; + width: 40px; + float: left; + margin-left: 1px; + overflow: hidden; + letter-spacing: 2px; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-d { + color: #FFFFFF; + display: block; + font-size: 10px; + -webkit-transform: scale(0.8); + margin-top: 22px; + padding-right: 2px; + text-align: center; +} +.userbar-date-new_mod .userbar-date .down-wrapper, +.userbar-date-new_mod .down-wrapper .down-time { + overflow: visible; +} +.userbar-date-new_mod .down-wrapper .down-time { + background: url(../img/count_bg.png?__sprite) no-repeat; + width: 45px; + margin-top: -9px; + padding-top: 10px; +} +.userbar-date-new_mod2 .down-wrapper .down-time { + float: right; +} +.skin-on .userbar-date-new_mod:hover, +.skin-on .userbar-date-new_mod.userbar-date-new_mod-show { + background-color: #333 !important; + background-color: rgba(0,0,0,.8) !important; +} + + +/*head fixed*/ +.header-fixed .userbar-date { + width: auto !important; +} +.header-fixed .down-wrapper { + display: none !important; +} +.header-fixed .date-wrapper { + display: block !important; + line-height: 20px; +} +.header-fixed .userbar-date .calendar_bg, +.header-fixed .userbar-date br { + display: none !important; +} +.header-fixed-st .userbar-date-cal .calendar-wrapper { + top: 40px; +} +.header-fixed-st .userbar-date-cal .date-tip { + top: 15px; +} +.header-fixed .userbar-date-new_mod { + background-image: none !important; + width: auto !important; +} + +.header-fixed-up .date-wrapper { + line-height: 30px; +} + +/**世界杯赛事**/ +.userbar-data-worldcup .userbar-date-cal{ + padding: 0 +} +.userbar-data-worldcup .worldcup{ + margin: 8px 16px 0 45px; + height: 42px; + overflow: hidden; +} +.userbar-data-worldcup .match-info{ + float: right; + margin-left: 8px; + color: #ffef00; +} +.userbar-data-worldcup .match-info .time{ + font-size: 21px; +} +.userbar-data-worldcup .team-vs{ + float: right; +} +.userbar-data-worldcup .team-vs .team-vs-icon{ + display: inline-block; + width: 38px; + height: 33px; + background: url(../img/worldcup-vs.png?__sprite); + vertical-align: middle; +} +.header-fixed .userbar-data-worldcup .worldcup{ + display: none; +} +.header-fixed .userbar-data-worldcup .userbar-date-cal{ + padding: 0 16px; +} +.header-fixed .userbar-data-worldcup .date-wrapper{ + line-height: 40px; + margin-left: 25px; + height: 40px; + max-height: 40px; +} +.animate-opacity{ + -webkit-transition: opacity linear .6s; + -moz-transition: opacity linear .6s; + -ms-transition: opacity linear .6s; + -o-transition: opacity linear .6s; + transition: opacity linear .6s; + opacity: 1; + filter: alpha(opacity=100); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/fontsize-switch-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/fontsize-switch-async.js new file mode 100755 index 000000000..0eec1ecc5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/fontsize-switch-async.js @@ -0,0 +1,56 @@ +//依赖 +var $ = require("common:widget/ui/jquery/jquery.js"); + +//变量 +var $html = $("html"); +var $body = $("body"); +var $mod = $("#fontsizeSwitch"); +var $switchers = $mod.find(".switcher"); +var classPrefix = "fontsize-switch-"; + +//初始化 +init(); + +function init() { + var storeFontsize = $.store("fontsize"); + var bodyFontsize = parseInt($body.css("font-size")); + //添加html类名 + if (storeFontsize && storeFontsize != bodyFontsize) { + $html.addClass(classPrefix + storeFontsize); + } + //为当前字号元素添加cur类 + $switchers.filter("[data-size=" + (storeFontsize || bodyFontsize) + "]").addClass("cur"); + //切换fontsize + $mod.on("click", ".switcher", function(e) { + setFont($(this).attr("data-size")); + //切换下一个fontsize + }).on("click", ".switcher-next", function(e) { + var curFontsize = $.store("fontsize") || parseInt($body.css("font-size")); + var $curSwitcher = $switchers.filter("[data-size=" + curFontsize + "]"); + if (!$curSwitcher.length) { + $curSwitcher = $switchers.eq(0); + } + var $nextSwitcher = $switchers.eq($curSwitcher.index() % $switchers.length); + setFont($nextSwitcher.attr("data-size")); + }); +} + +//设置fontsize +function setFont(fontsize) { + var fontClass = classPrefix + fontsize; + //不为当前字号时 + if (!$html.hasClass(fontClass)) { + $switchers.filter(".cur").removeClass("cur"); + $switchers.filter("[data-size=" + fontsize + "]").addClass("cur"); + $.store("fontsize", fontsize, { + expires: 365 + }); + //删除遗留的字号类名 + $.each($html.get(0).className.split(" "), function(index, value) { + if (value.indexOf(classPrefix) == 0) { + $html.removeClass(value); + } + }); + $html.addClass(fontClass); + } +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/fontsize-switch.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/fontsize-switch.tpl new file mode 100755 index 000000000..91be065cc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/fontsize-switch.tpl @@ -0,0 +1,25 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header-flat/fontsize-switch/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header-flat/fontsize-switch/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="common:widget/header-flat/fontsize-switch/ltr/ltr.more.css"%> +<%else%> + <%require name="common:widget/header-flat/fontsize-switch/rtl/rtl.more.css"%> +<%/if%> + +
                      +
                    • + <%foreach $body.headerTest.fontsizeSwitch as $fontItem%> +
                    • <%$fontItem.word%>
                    • + <%/foreach%> +
                    + +<%script%> + require.async("common:widget/header-flat/fontsize-switch/fontsize-switch-async.js"); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/img/fontsize.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/img/fontsize.png new file mode 100755 index 000000000..a2c6d778e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/img/fontsize.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/ltr/ltr.css new file mode 100755 index 000000000..2be44a093 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/ltr/ltr.css @@ -0,0 +1 @@ +/*.mod-fontsize-swtich{visibility: hidden;}*/ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/ltr/ltr.more.css new file mode 100755 index 000000000..ef5b38e22 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/ltr/ltr.more.css @@ -0,0 +1,13 @@ +.mod-fontsize-swtich{visibility: visible !important;width: 42px;float: right;text-align: center;} +.mod-fontsize-swtich:hover{background-color: #0A69C9;background-color: rgba(0,99,199,0.96);} + +.mod-fontsize-swtich li{width: 42px;height: 50px;line-height: 50px;cursor: pointer;} +.mod-fontsize-swtich li.cur{cursor: default;} +.mod-fontsize-swtich .switcher-next i{display: inline-block;width: 26px;height: 25px;background-image: url(../img/fontsize.png?__sprite);margin-top: 12px;} +.mod-fontsize-swtich .switcher{display: none;color: #fff;} +.mod-fontsize-swtich:hover .switcher{display: block;} +.mod-fontsize-swtich .switcher:hover{background-color: #075DB5;background-color: rgba(0,0,0,.1);} + +/*has skin*/ +.skin-on .mod-fontsize-swtich:hover, +.skin-on .mod-fontsize-swtich .switcher:hover{background-color: #333333;background-color: rgba(0, 0, 0, 0.8);} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/rtl/rtl.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/fontsize-switch/rtl/rtl.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat-async.js new file mode 100755 index 000000000..e15eb7ea8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat-async.js @@ -0,0 +1,48 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); + +var CON = conf.headerTest, + isScrolled = false, + fixedClass = "header-fixed" + (CON.ceilingMore === "1" ? " header-fixed-up" : " header-fixed-st"), + $head = $("#top"), + $win = $(window), + $doc = $(document), + $body = $(document.body), + initHeight = $head.parent().outerHeight(), + curHeight = 0; + +setTimeout(function() { + //吸顶 + if (CON.isCeiling === "1") { + $win.on("scroll", function() { + isScrolled = true; + }); + + window.setTimeout(function() { + if (isScrolled) { + isScrolled = false; + curHeight = initHeight; + + if ($doc.scrollTop() > curHeight) { + if (!$body.hasClass(fixedClass)) { + $head.css("position", "fixed"); + $body.addClass(fixedClass); + if (CON.ceilingMore === "1") { + $win.trigger("headerFixed.transTo"); + $win.trigger("headerFixed.changed"); + } + } + } else { + if ($body.hasClass(fixedClass)) { + $head.css("position", "relative"); + $body.removeClass(fixedClass); + if (CON.ceilingMore === "1") { + $win.trigger("headerFixed.restore"); + $win.trigger("headerFixed.changed"); + } + } + } + } + window.setTimeout(arguments.callee, 250); + }, 250); + } +}, 1000); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat-new.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat-new.tpl new file mode 100755 index 000000000..7f38b8d65 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat-new.tpl @@ -0,0 +1,50 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header-flat/ltr/ltr.fn.css?__inline'); +<%else%> +@import url('/widget/header-flat/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> +
                    +
                    + <%widget name="common:widget/header-flat/logo/logo.tpl"%> + <%if !empty($body.searchBox.widget)%> + <%widget name="common:widget/`$body.searchBox.widget`/`$body.searchBox.widget`.tpl"%> + <%else%> + <%widget name="common:widget/search-box/search-box.tpl"%> + <%/if%> + <%*widget name="common:widget/search-box-flat-head/search-box-flat-head.tpl"*%> +
                    + <%if !empty($body.headerTest.logoSibling)%> + <%foreach explode("|", $body.headerTest.logoSibling) as $item%> + <%widget name="common:widget/header-flat/`$item`/`$item`.tpl"%> + <%/foreach%> + <%/if%> +
                    +
                    +
                    +
                    + <%widget name="common:widget/header-flat/navigation/navigation.tpl"%> +
                    +
                    + <%if !empty($body.headerTest.showContent)%> + <%foreach array_reverse(explode("|", $body.headerTest.showContent)) as $module%> + <%widget name="common:widget/header-flat/`$module`/`$module`.tpl"%> + <%/foreach%> + <%/if%> +
                    +
                    +
                    +<%script%> + conf.headerTest = { + dateWidth : "<%$body.headerTest.dateWidth%>", + weatherWidth : "<%$body.headerTest.weather.width%>", + isCeiling: "<%$body.headerTest.isCeiling%>", + ceilingMore: "<%$body.headerTest.ceilingMore%>", + settingTip: "<%$body.headerTest.settingTip%>", + ceilingLogo: "<%$body.headerTest.ceilingLogo%>" + }; + require.async("common:widget/header-flat/header-flat-async.js"); +<%/script%> + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat.tpl new file mode 100755 index 000000000..f0c4a49ab --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/header-flat.tpl @@ -0,0 +1,109 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header-flat/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header-flat/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header-flat/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header-flat/rtl/rtl.more.css"%> +<%/if%> + +<%if $body.headerTest.isCeiling == '1'%> +<%if $body.headerTest.ceilingMore == '1' && $body.searchBox.widget =='search-box-4ps'%> + <%if $head.dir=='ltr'%> + <%require name="common:widget/header-flat/ltr/ltr.ps.css"%> + <%else%> + <%require name="common:widget/header-flat/rtl/rtl.ps.css"%> + <%/if%> +<%/if%> +<%/if%> + +<%if !empty($body.headerTest.ceilingHide)%> + <%assign var="headArr" value=[ + "userbar-btn-header" => ".header-fixed .userbar-btn", + "account" => ".header-fixed .account_wrap", + "site-switch" => ".header-fixed .settings", + "banner-site" => ".header-fixed .mod-banner-site" + ]%> + <%assign var="ceilingArr" value=[]%> + <%foreach explode("|", $body.headerTest.ceilingHide) as $item%> + <%if !empty($item) && !empty($headArr[$item]) && array_push($ceilingArr, $headArr[$item])%> + <%/if%> + <%/foreach%> + + <%if $ceilingArr != []%> + <%style%> + <%join(",", $ceilingArr)%> {display: none;} + <%/style%> + <%/if%> +<%/if%> +<%*newUserRedirect*%> +<%assign var="newUserName" value="newUser"%> +<%*cookieRedirect*%> +<%assign var="cookieName" value="simplenav"%> +<%foreach $head.cookieRedirect as $cookieItem%> + <%if $cookieItem@first%> + <%$cookieName = $cookieItem@key%> + <%/if%> +<%/foreach%> + +<%if $smarty.get.tn && (!empty($smarty.cookies.$cookieName) || $smarty.cookies.$newUserName == "0")%> + <%widget name="common:widget/header-flat/simple-nav/simple-nav.tpl"%> +<%else%> + <%if empty($body.addFavBar.hideBar)%> + <%widget name="common:widget/header-flat/add-fav-bar/add-fav-bar.tpl"%> + <%/if%> +<%/if%> +
                    +
                    + <%widget name="common:widget/header-flat/logo/logo.tpl"%> +
                    +
                    + <%if !empty($body.headerTest.logoSibling)%> + <%foreach explode("|", $body.headerTest.logoSibling) as $item%> + <%if $item == "weather"%> +
                    style="font:<%$body.headerTest.weather.font%>;"<%/if%>> + <%*
                    *%> + <%widget name="common:widget/header-flat/`$item`/`$item`.tpl"%> +
                    +
                    +
                    +
                      +
                      +
                      +
                      + <%else%> + <%widget name="common:widget/header-flat/`$item`/`$item`.tpl"%> + <%/if%> + <%/foreach%> + <%/if%> +
                      +
                      + <%if !empty($body.headerTest.showContent)%> + <%foreach array_reverse(explode("|", $body.headerTest.showContent)) as $module%> + <%widget name="common:widget/header-flat/`$module`/`$module`.tpl"%> + <%/foreach%> + <%/if%> +
                      +
                      +
                      +
                      +
                      +<%script%> + conf.headerTest = { + dateWidth : "<%$body.headerTest.dateWidth%>", + weatherWidth : "<%$body.headerTest.weather.width%>", + isCeiling: "<%$body.headerTest.isCeiling%>", + ceilingMore: "<%$body.headerTest.ceilingMore%>", + settingTip: "<%$body.headerTest.settingTip%>", + ceilingLogo: "<%$body.headerTest.ceilingLogo%>" + }; + require.async("common:widget/header-flat/header-flat-async.js"); +<%/script%> + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow1-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow1-rtl.png new file mode 100755 index 000000000..36e8342ae Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow1-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow1.png new file mode 100755 index 000000000..a47042dd0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow2-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow2-rtl.png new file mode 100755 index 000000000..72b1c55bf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow2-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow2.png new file mode 100755 index 000000000..dde31d817 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/arrow2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/btn-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/btn-rtl.png new file mode 100755 index 000000000..7dca042aa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/btn-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/btn.png new file mode 100755 index 000000000..53eb3293d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/calendar.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/calendar.png new file mode 100755 index 000000000..60e6e6ed2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/calendar.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/calendar_s.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/calendar_s.png new file mode 100755 index 000000000..512736ebc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/calendar_s.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop-down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop-down.png new file mode 100755 index 000000000..40993b5cb Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop-down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop-up.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop-up.png new file mode 100755 index 000000000..020a7527f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop-up.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop.png new file mode 100755 index 000000000..35cf32126 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/drop.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-arrow-open.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-arrow-open.png new file mode 100755 index 000000000..78d2ca0f9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-arrow-open.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-arrow.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-arrow.png new file mode 100755 index 000000000..424355a60 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-arrow.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-search.png new file mode 100755 index 000000000..e99be9b12 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-delete-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-delete-hover.png new file mode 100755 index 000000000..2dadce85c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-delete-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-delete.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-delete.png new file mode 100755 index 000000000..72ad45601 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-delete.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-logotips-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-logotips-rtl.png new file mode 100755 index 000000000..f9deeece5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-logotips-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-logotips.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-logotips.png new file mode 100755 index 000000000..a8ac5b151 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-logotips.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-over-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-over-rtl.png new file mode 100755 index 000000000..6b2423429 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-over-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-over.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-over.png new file mode 100755 index 000000000..6352a62a5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-over.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-rtl.png new file mode 100755 index 000000000..51a5e55b9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice.png new file mode 100755 index 000000000..30fa678e5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/icon-msg-notice.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/logo_test.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/logo_test.png new file mode 100755 index 000000000..780cf0bd6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/logo_test.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger-hover.png new file mode 100755 index 000000000..cd547fd4b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger-hover_sk.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger-hover_sk.png new file mode 100755 index 000000000..45b0a9845 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger-hover_sk.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger.png new file mode 100755 index 000000000..46f160b21 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger_sk.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger_sk.png new file mode 100755 index 000000000..adfc0adf7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/more_trigger_sk.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/select-city_tip.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/select-city_tip.png new file mode 100755 index 000000000..33c7837e6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/select-city_tip.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_down.png new file mode 100755 index 000000000..f5d1bb95a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_down_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_down_rtl.png new file mode 100755 index 000000000..e6b5afbc4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_down_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_up.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_up.png new file mode 100755 index 000000000..7bd7cdbc5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_up.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_up_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_up_rtl.png new file mode 100755 index 000000000..e32954234 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/img/weather-tip_up_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_ative.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_ative.png new file mode 100755 index 000000000..12bb63a4f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_ative.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_gray.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_gray.png new file mode 100755 index 000000000..efb7884bf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_gray.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_normal.png new file mode 100755 index 000000000..a2ab6e855 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/del_normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips-hover.png new file mode 100755 index 000000000..bc185f617 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips-yellow.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips-yellow.png new file mode 100755 index 000000000..f1c0ea9b6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips-yellow.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips.png new file mode 100755 index 000000000..beda9c405 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/flat-i-logotips.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/i-logotips.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/i-logotips.png new file mode 100755 index 000000000..2007de5da Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/i-logotips.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/logo_test.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/logo_test.png new file mode 100755 index 000000000..780cf0bd6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/img/logo_test.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/logo-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/logo-async.js new file mode 100755 index 000000000..680433f48 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/logo-async.js @@ -0,0 +1,232 @@ +// welcome tip + +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var helper = require("common:widget/ui/helper/helper.js"); +require("common:widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js"); + +window.Gl || (window.Gl = {}); + +var confAct = conf.logoActivity || {}, + curUa = navigator.userAgent.toLowerCase().match(/(msie|firefox|chrome)/), + curBrowser = curUa ? curUa[1] : "", + actLogo = {}, + actTips = {}; + +curBrowser = ((curBrowser === "msie") || (document.documentMode == 11)) ? "ie" : curBrowser; +actLogo = confAct[curBrowser] ? confAct[curBrowser].logo : null; +actTips = confAct[curBrowser] ? confAct[curBrowser].logoTips : null; + +function isNotEmpty(str) { + return ($.trim(str) !== ""); +} + +Gl.logo = function (type) { + var indexLogo = $("#indexLogo"), + indexLogoImg = $("#indexLogoImg"), + /*secLogoImg = $("#secLogoImg"),*/ + indexSlogan = $(".userbar-logo_slogan"); + + setTimeout(function() { + indexLogoImg.attr("src", conf.logo.imgSrc); + }, 1e3); + + if (type !== "index") { + /*indexLogoImg.hide(); + secLogoImg.show();*/ + } else { + if (confAct.isHidden === "0" && actLogo) { + var imgSrc = actLogo["src"], + logoUrl = actLogo["url"], + sloganTxt = actLogo["slogan"], + sloganSz = actLogo["sloganSize"], + indexTtl = actLogo["indexTitle"]; + setTimeout(function() { + indexLogoImg.attr("src", imgSrc); + }, 1e3); + indexLogo.attr("href", logoUrl); + indexSlogan.html(sloganTxt); + isNotEmpty(sloganSz) && indexSlogan.css("font-size", sloganSz); + indexLogo.attr("title", indexTtl); + indexLogoImg.attr("title", indexTtl); + indexLogoImg.attr("alt", indexTtl); + } + } + + indexLogo.on("click", function ( e ) { + var logoTip = $("#logoTips").eq(0), + noJump = conf.logo.noJump; + UT.send({ + position: "logo", + modId: "logo", + type: "click" + }); + if(logoTip && isNotEmpty(conf.logo.autoCloseTip)) { + logoTip.hide(); + $.cookie("Gh_l", conf.logoTips.country || "jp"); + } + if( type === "index" && conf.logo.notOpenNew === "true" ){ + e.preventDefault(); + return; + } + else if (type === "index" && ($(this).attr("href") === '/' || $(this).attr("href").match(/^\/\?/))) + $(this).sethome(); + else if (type === "index"){//如果有passQueryParam,则点击链接要带上这个参数 + var url = $(this).attr("href"), + paramKey = conf.logo.passQueryParam.trim(); + url = helper.appendQueryToUrl(url, paramKey); + !noJump && window.open(url); + } + else{ + !noJump && (window.location.href = $(this).attr("href") || "/"); + } + }); +} + +Gl.logoTips = function () { + if(!(this instanceof Gl.logoTips)) return new Gl.logoTips(); + + var that = this; + that.tip = $("#logoTips"); + that.tipLink = $("#tipLink"); + that.closeBtn = $("#tipClose"); + that.conf = conf.logoTips; + + that.init(); + if(conf.pageType === "index") { + that.fixActTips(confAct.isHidden, actTips); + } +} +Gl.logoTips.prototype = { + constructor: Gl.logoTips, + + init: function () { + var that = this; + var myConf; + if(confAct.isHidden === "0" && actTips) { + myConf = confAct.logoTips; + } else { + myConf = that.conf; + } + if (myConf.show) { + //点击logotips跳转分类区在二级页不适用 + if((!conf.pageType || conf.pageType != "index") && /^{[0-9]+}$/.test(that.tipLink.attr("href"))){ + that.tip.hide(); + return; + } + that.bindEvent(); + if (myConf.alwaysShow) { + that.show(); + } else if (myConf.userOption) { + (!$.cookie("Gh_l") || $.cookie("Gh_l") !== that.conf.country) && that.show(); + } else { + $.cookie("oldFriend", null); + that.setStore("oldFriend", myConf.version, function() { + that.show(); + }); + } + } + }, + bindEvent: function () { + var that = this; + that.tipLink.on("click", function (e) { + var href = $(this).attr("href"); + e.preventDefault(); + if(href && href !== "#"){//如果有passQueryParam,则点击链接要带上这个参数 + //针对点击logotips可跳转到指定分类区的处理 + if (/^{[0-9]+}$/.test(href)) { + var sortIndex = href.substring(1, href.length-1); + var sortSite = $("dl[log-index="+sortIndex+"]", ".box-sort"); + var sortMarginTop = conf.logoTips.sortMarginTop || 40; + var sortDisappearTime = conf.logoTips.sortDisappearTime || 1500; + if(sortSite.length>0){ + var embedHome = $("#embed-iframe-nav .home"); + if(embedHome.length>0 && !embedHome.hasClass("current")){ + embedHome.trigger("click"); + } + $(window).scrollTop(sortSite.offset().top - sortMarginTop); + var sortSiteHeight = sortSite.height()-2; + //按需加载导致获取高度可能有问题,采用一定延时 + if (sortIndex>4 && sortSiteHeight<50) { + setTimeout(function(){ + sortSiteHeight = sortSite.height()-2; + sortSite.height(sortSiteHeight); + }, 50); + }else{ + sortSite.height(sortSiteHeight); + } + sortSite.addClass("selected"); + setTimeout(function(){ + sortSite.removeClass("selected"); + sortSite.height(sortSiteHeight+2); + }, sortDisappearTime); + } + }else{ + var url = $(this).attr("href"), + paramKey = that.conf.passQueryParam.trim(); + url = helper.appendQueryToUrl(url, paramKey); + window.open(url, "_blank"); + } + } + if(confAct.isHidden === "0" && actTips) { + confAct.logoTips.userOption && $.cookie("Gh_l",that.conf.country); + } else { + that.conf.userOption && $.cookie("Gh_l",that.conf.country); + } + that.tip.hide(); + UT.send({ + position: "logoTipsLink", + modId: "logo", + type: "click" + }); + }); + that.closeBtn.on("mouseenter", function () { + $(this).addClass("tip-close_hover"); + }); + that.closeBtn.on("mouseleave", function () { + $(this).removeClass("tip-close_hover"); + }); + that.closeBtn.on("click", function (e) { + e.preventDefault(); + that.tip.hide(); + UT.send({ + position: "logoTipsClose", + ac:"b", + modId: "logo", + type: "click" + }); + $.cookie("Gh_l",that.conf.country); + }); + }, + show: function () { + var that = this, + timeout = parseInt(that.conf.tipsHideTime, 10); + that.tip.show(); + if (timeout) { + setTimeout(function() { + that.tip.hide(); + }, timeout); + } + return true; + }, + setStore: function (key, value, callback, expires) { + var that = this; + $.store(key) !== value && callback(); + $.store(key, value, {expires: expires || 2000}); + }, + fixActTips: function(isHidden, data) { + var that = this; + if(isHidden === "0" && data) { + isNotEmpty(data["tipsWidth"]) && that.tip.css("width", data["tipsWidth"]); + that.tipLink.attr("href", data["url"]); + that.tip.children('p').first().contents().filter(function() { + return this.nodeType === 3; + }).replaceWith(data["text"]); + if (isNotEmpty(data["closeText"])) { + that.tipLink.html(data["closeText"] + ''); + } else { + that.tipLink.html(''); + } + } + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/logo.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/logo.tpl new file mode 100755 index 000000000..906e09b02 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/logo.tpl @@ -0,0 +1,94 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header-flat/logo/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header-flat/logo/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%style%> +<%if !empty($body.headerTest.ceilingLogo)%> +.header-fixed #indexLogo { + background: url(<%$body.headerTest.ceilingLogo%>) no-repeat <%if $head.dir=='ltr'%>left<%else%>right<%/if%> center !important; +} +<%/if%> +<%if !empty($body.headerTest.widget)%> +.userbar-logo { + width: <%if $head.dir=='ltr'%><%$body.headerTest.logoWidth|default:'345'%><%else%><%$body.headerTest.logoWidth|default:'345'%><%/if%>px; +} +<%/if%> +<%/style%> + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header-flat/logo/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header-flat/logo/rtl/rtl.more.css"%> +<%/if%> + + + + +<%script%> + conf.logo = { + imgSrc: "<%$body.logo.src%>", + passQueryParam: "<%$body.logo.passQueryParam%>", + notOpenNew : "<%$body.logo.notOpenNew%>", + autoCloseTip: "<%$body.logo.autoCloseTip%>", + noJump: "<%$body.logo.noJump%>" + }; + conf.logoTips = { + show: "<%$body.logoTips.show%>", + alwaysShow: "<%$body.logoTips.alwaysShow%>", + version: "<%$body.logoTips.version%>", + userOption: "<%$body.logoTips.userOption%>", + country: conf.country, + passQueryParam: "<%$body.logo.passQueryParam%>", + sortDisappearTime: "<%$body.logoTips.sortDisappearTime%>", + sortMarinTop: "<%$body.logoTips.sortMarinTop%>", + tipsHideTime: "<%$body.logoTips.tipsHideTime%>" + }; + conf.logoActivity = <%json_encode($body.logoActivity)%>; + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/header-flat/logo/logo-async.js"], function ($) { + Gl.logo(conf.pageType); + Gl.logoTips(); + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/ltr/ltr.css new file mode 100755 index 000000000..ece6b998a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/ltr/ltr.css @@ -0,0 +1,17 @@ +.userbar-logo { + height: 50px; + position: relative; + z-index: 10; + font-size: 12px; +} +.userbar-logo_slogan { + position: absolute; + font-size: 13px; + left: 133px; + top: 26px; + white-space: nowrap; +} +.userbar-logo_tip { + display: none; + visibility: hidden; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/ltr/ltr.more.css new file mode 100755 index 000000000..f988f35c2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/ltr/ltr.more.css @@ -0,0 +1,107 @@ +.userbar-logo_tip { + position: absolute; + top: 49px; + left: 0; + padding: 5px 17px 5px 7px; + width: 230px; + max-width: 230px; + border: 1px solid #e6e6e6; + color: #666; + background-color: #fff; + border-radius: 2px; + + visibility: visible !important; +} +.userbar-logo_tip a{ + color: #666; +} +.userbar-logo_tip p a:hover{ + color: #1c81e5; +} +.userbar-logo_tip .arrow, .userbar-logo_tip .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 8px dashed transparent; +} +.userbar-logo_tip .arrow { + border-bottom-color: #e6e6e6; + border-bottom-style: solid; + top: -16px; + left: 19px; +} +.userbar-logo_tip .arrow_bg { + border-bottom-color: #fff; + border-bottom-style: solid; + margin: -7px 0 0 -8px; +} +.userbar-logo_tip .tip-close { + display: block; + width: 12px; + height: 12px; + position: absolute; + top: 4px; + right: 4px; + background: url(../img/flat-i-logotips.png?__sprite) no-repeat; + cursor: pointer; +} +.userbar-logo_tip .tip-close_hover { + background: url(../img/flat-i-logotips.png?__sprite) no-repeat; +} +.userbar-logo_tip .tipLinkArrow{ + position: relative; + display: inline-block; + width: 12px; + height: 12px; + background: url(../img/flat-i-logotips.png?__sprite) no-repeat -12px 0px; +} +.userbar-logo_tip a:hover .tipLinkArrow{ + background: url(../img/flat-i-logotips-hover.png?__sprite) no-repeat -12px 0px; +} + +/**yellow logoTips***/ +.userbar-logo_tip.yellow{ + border: none; + background-color: #f3a534; + color: #fff; +} +.userbar-logo_tip.yellow .tip-close{ + background: url(../img/flat-i-logotips-yellow.png?__sprite) no-repeat; +} +.userbar-logo_tip.yellow .tip-close_hover { + background: url(../img/flat-i-logotips-yellow.png?__sprite) no-repeat; +} +.userbar-logo_tip.yellow .tipLinkArrow{ + background: url(../img/flat-i-logotips-yellow.png?__sprite) no-repeat -12px 0px; +} +.userbar-logo_tip.yellow .arrow{ + border-bottom-color: #f3a534; +} +.userbar-logo_tip.yellow .arrow_bg{ + border-bottom-color: #f3a534; +} +.userbar-logo_tip.yellow a{ + color: #fff; +} + + +/*head fixed*/ +.header-fixed-st #indexLogo, +.header-fixed-st .userbar-logo { + height: 40px; +} +.header-fixed #indexLogo { + float: left; + width: 94px; + background: url(../img/logo_test.png) no-repeat left center; +} +.header-fixed #indexLogo img, +.header-fixed .userbar-logo_slogan, +.header-fixed .userbar-logo_tip { + display: none !important; +} + +.header-fixed-up #indexLogo, +.header-fixed-up .userbar-logo { + height: 50px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/rtl/rtl.css new file mode 100755 index 000000000..925297330 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/rtl/rtl.css @@ -0,0 +1,17 @@ +.userbar-logo { + height: 50px; + position: relative; + z-index: 10; + font-size: 12px; +} +.userbar-logo_slogan { + position: absolute; + font-size: 13px; + right: 133px; + top: 26px; + white-space: nowrap; +} +.userbar-logo_tip { + display: none; + visibility: hidden; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/rtl/rtl.more.css new file mode 100755 index 000000000..1466b6d75 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/logo/rtl/rtl.more.css @@ -0,0 +1,106 @@ +.userbar-logo_tip { + position: absolute; + top: 49px; + right: 0; + padding: 5px 7px 5px 17px; + width: 230px; + max-width: 230px; + border: 1px solid #e6e6e6; + color: #666; + background-color: #fff; + border-radius: 2px; + + visibility: visible !important; +} +.userbar-logo_tip a{ + color: #666; +} +.userbar-logo_tip p a:hover{ + color: #1c81e5; +} +.userbar-logo_tip .arrow, .userbar-logo_tip .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 8px dashed transparent; +} +.userbar-logo_tip .arrow { + border-bottom-color: #e6e6e6; + border-bottom-style: solid; + top: -16px; + right: 19px; +} +.userbar-logo_tip .arrow_bg { + border-bottom-color: #fff; + border-bottom-style: solid; + margin: -7px -8px 0 0; +} +.userbar-logo_tip .tip-close { + display: block; + width: 12px; + height: 12px; + position: absolute; + top: 4px; + left: 4px; + background: url(../img/flat-i-logotips.png?__sprite) no-repeat; + cursor: pointer; +} +.userbar-logo_tip .tip-close_hover { + background: url(../img/flat-i-logotips.png?__sprite) no-repeat; +} +.userbar-logo_tip .tipLinkArrow{ + position: relative; + display: inline-block; + width: 12px; + height: 12px; + background: url(../img/flat-i-logotips.png?__sprite) no-repeat -3px -13px; +} +.userbar-logo_tip a:hover .tipLinkArrow{ + background: url(../img/flat-i-logotips-hover.png?__sprite) no-repeat -3px -13px; +} + +/**yellow logoTips***/ +.userbar-logo_tip.yellow{ + border: none; + background-color: #f3a534; + color: #fff; +} +.userbar-logo_tip.yellow .tip-close{ + background: url(../img/flat-i-logotips-yellow.png?__sprite) no-repeat; +} +.userbar-logo_tip.yellow .tip-close_hover { + background: url(../img/flat-i-logotips-yellow.png?__sprite) no-repeat; +} +.userbar-logo_tip.yellow .tipLinkArrow{ + background: url(../img/flat-i-logotips-yellow.png?__sprite) no-repeat -3px -13px; +} +.userbar-logo_tip.yellow .arrow{ + border-bottom-color: #f3a534; +} +.userbar-logo_tip.yellow .arrow_bg{ + border-bottom-color: #f3a534; +} +.userbar-logo_tip.yellow a{ + color: #fff; +} + + +/*head fixed*/ +.header-fixed-st #indexLogo, +.header-fixed-st .userbar-logo { + height: 40px; +} +.header-fixed #indexLogo { + float: right; + width: 94px; + background: url(../img/logo_test.png) no-repeat right center; +} +.header-fixed #indexLogo img, +.header-fixed .userbar-logo_slogan, +.header-fixed .userbar-logo_tip { + display: none !important; +} +.header-fixed-up #indexLogo, +.header-fixed-up .userbar-logo { + height: 50px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.css new file mode 100755 index 000000000..45bdfa752 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.css @@ -0,0 +1,71 @@ +/*============userbar=============*/ + +.userbar-wrap { + background: #1c81e5; + min-width: 960px; + position: relative; + height: 50px; + zoom: 1; + z-index: 400; +} + +.userbar { + height: 50px; + margin: 0 auto; + color: #fff; + position: relative; + z-index: 9; +} +/*.userbar-tool { + display: none; +} +.weather-more { + display: none; +} + +.weather-more_wrap { + border-bottom: 1px solid #fff; +}*/ + + +.userbar-logo { + max-width: 345px; +} +/*.weather-wrap { + position: relative; + float: left; + visibility: hidden; +} +div.userbar-weather { + float: left; +}*/ + +.userbar-glo { + position: absolute; + right: 0; + top: 0; + display: none; +} +/*.userbar-logoSibling { + margin-right: 62px; +}*/ + +/*960*/ +/*.w960 .userbar-logoSibling { + margin-right: 18px; +}*/ + +/*has skin*/ +body.skin-on .userbar-wrap { + background: #666666; + background: rgba(0,0,0,0.6); +} + + +/*head fixed*/ +.header-fixed .userbar-wrap { + position: fixed; + width: 100%; + top: 0; + left: 0; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.fn.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.fn.css new file mode 100755 index 000000000..4f3ec6d3c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.fn.css @@ -0,0 +1,72 @@ +/*============userbar=============*/ +.head-top-wrap{ + height:105px; + margin-top:30px; +} +.userbar-logo { + max-width: 230px; + padding-top: 10px; +} +.userbar-wrap { + background: #1c81e5; + min-width: 960px; + position: relative; + height: 40px; + zoom: 1; + z-index: 100; +} +/*.userbar { + height: 40px; + margin: 0 auto; + color: #fff; + position: relative; + z-index: 9; +}*/ +.userbar-tool{ + padding-right: 7px; +} +.userbar-tool .settings-btn{ + height: 16px; + padding: 12px 10px; +} +.userbar-tool .settings-btn .btn-holder { + display: block; + width: 16px; + height: 16px; + background: url(../site-switch/img/i-settings-btn-s.png?__sprite) no-repeat; +} +.userbar-tool .settings-dropdown{ + top: 40px; +} +.userbar-tool .account-loginfo_wrap{ + padding: 20px; +} +.userbar-tool .account_trig{ + height: 16px; + padding: 12px 10px; +} +.userbar-tool .account-dropdown_wrap{ + top: 40px; +} +.userbar-tool .account-login_suc .account_trig img{ + width: 16px; + height: 16px; + border-radius: 8px; +} +.userbar-tool .userbar-btn .btn-item-anchor{ + width: 16px; + height: 16px; + padding: 12px 10px; +} +.userbar-tool .userbar-btn .btn-sethome{ + margin-top: 0; + background: url(../userbar-btn-header/img/setHome-s.png?__sprite) no-repeat; +} +.userbar-tool .userbar-btn .btn-addfav{ + margin-top: 0; + background: url(../userbar-btn-header/img/addfav-s.png?__sprite) no-repeat; +} +.userbar-tool .userbar-btn .btn-down{ + margin-top: 0; + background: url(../userbar-btn-header/img/down-s.png?__sprite) no-repeat; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.more.css new file mode 100755 index 000000000..e03943f28 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.more.css @@ -0,0 +1,673 @@ +/* from inline css */ +.userbar-tool { + display: none; +} +.weather-more { + display: none; +} +.weather-more_wrap { + border-bottom: 1px solid #fff; +} +.weather-wrap { + position: relative; + visibility: hidden; + float: left; + opacity: 0; +} +div.userbar-weather { + float: left; +} +.userbar-glo { + display: block !important; +} +.userbar-logoSibling { + margin-right: 62px; +} + +/* 960 */ +.w960 .userbar-logoSibling { + margin-right: 18px; +} + +/* ============userbar============= */ +.userbar-tool { + position: relative; + z-index: 101; + display: block; + display: block !important; + overflow: visible; +} +.userbar a:hover { + text-decoration: none; +} + +/* ============userbar============= */ +.weather-wrap .weather-more_wrap { + overflow: visible; + zoom: 1; + height: 0; + border-width: 0; +} +.weather-more_show { + height: auto; + border-top: 1px solid #0a6f4e; +} +.weather-more_line { + border-bottom: 1px solid #0a6f4e; + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + -moz-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + -o-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; +} +.weather-more { + display: none; +} +.module-mask { + cursor: pointer; + background: rgba(255, 255, 255, .1); + filter: progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr='#19FFFFFF', endColorstr='#19FFFFFF'); + -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(enabled=\'true\', startColorstr=\'#19FFFFFF\', endColorstr=\'#19FFFFFF\')'; +} + +/* weather */ +.weather_last, +.weather-info .dot_img, +.weather-info .temperature_hum, +.userbar-weather li.weather_last { + display: none; +} +.weather-info .text { + font-size: 12px; + visibility: visible; +} +.weather-info .temperature_p { + font-size: 12px; +} +.userbar-weather div.fl { + width: auto; + height: 45px; + margin-left: 0; + padding-top: 5px; + padding-right: 42px; + padding-left: 20px; + cursor: pointer; +} +.userbar-weather .fl:hover, +.weather-wrap-open .userbar-weather .fl { + background-color: #0164c8; + background-color: rgba(0, 99, 199, .97); +} +.weather-wrap .userbar-weather { + height: 50px; + margin-right: 0; + padding-top: 0; +} +.userbar-weather .fl li { + margin-right: 0; +} +div.userbar-weather_console { + position: absolute; + top: 78px; + left: 114px; + display: none; + height: auto; +} +div.userbar-weather_console a { + font-size: 14px; + font-weight: 700; + color: #000; +} +#weatherView li img { + width: 40px; + height: 36px; + margin-top: -2px; +} +.userbar-weather .weather-info span { + font-weight: 500; +} +.userbar-weather_console .weather-days { + display: none; +} +.weather-wrap .weather-more_wrap { + position: absolute; + top: 50px; + left: 0; + display: none; + height: auto; +} +.weather-wrap .weather-more { + display: block; + overflow: hidden; + width: 340px; + padding: 23px 30px 15px; + background: #0868c9; + background: rgba(0, 99, 199, .97); +} +.weather-wrap .weather-more li { + font-size: 18px; + line-height: 40px; + position: relative; + overflow: hidden; + width: 100%; + height: 42px; + margin: 0; + padding: 0; + color: #fff; + background: transparent; +} +.weather-wrap .weather-more li img { + position: absolute; + left: 50%; + margin-left: -20px; + padding: 0; +} +body .weather-more_odd { + margin-left: 1px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + _margin-left: 0; + -o-box-shadow: none; +} +.weather-wrap .weather-more .weather-more_today { + position: relative; + float: none; + overflow: hidden; + width: auto; + height: auto; + margin-bottom: 17px; + padding: 0; + text-align: left; + border-bottom: 1px solid #1b80e4; + border-bottom-color: rgba(28, 129, 229, .96); + background: transparent; +} +.weather-more_today .temperature_big { + font-size: 42px; + font-weight: normal; + padding-left: 117px; +} +.weather-wrap .dot_img_head { + margin-right: 6px; + margin-bottom: 0; + background: url(../img/drop.png?__sprite) no-repeat; +} +.weather-more_wrap .weather-more_line { + border: none; +} +.weather-more .humidity { + font-size: 18px; + font-weight: normal; + padding: 0 4px; +} +.weather-more_today p { + margin-top: 24px; + margin-bottom: 55px; +} +.weather-more_today p:first-child { + font-size: 14px; + font-weight: 600; + line-height: 30px; + margin: 0; + padding-left: 130px !important; + text-align: right; + color: #9cc3e9 !important; + color: rgba(255, 255, 255, .6) !important; +} +.weather-wrap .weather-more .weather-more_today img { + position: absolute; + top: 50px; + left: 40px; + padding: 0; +} +.weather-more_today .weather-more_tip-remind { + font-size: 12px; + font-weight: 400; + float: left; + overflow: hidden; + max-width: 132px; + margin-top: -14px; + padding-left: 122px; + white-space: nowrap; + text-overflow: ellipsis; +} +body div.userbar-weather_city-cur a { + font-size: 18px; + display: inline-block; + min-height: 15px; + padding-right: 36px; + color: #fff; + background: url(../img/select-city_tip.png) no-repeat right top; +} + +/* .weather-wrap_arrow, +.weather-wrap_arrow-bg { + position: absolute; + height: 0; + width: 0; + border: 6px solid transparent; +} +.weather-wrap_arrow { + border-bottom-color: #bee2d6; + bottom: -1px; + left: 64px; + display: none; + z-index: 2; +} +.weather-wrap_arrow-bg { + border-bottom-color: #EBFCF7; + margin: -6px 0 0 -7px; +} +*/ +div.userbar-weather_tip { + right: 0; + left: -1px; + border-color: #00ae74; + background-color: #f0fffc; +} +div.userbar-weather_tip .arrow { + border-bottom-color: #00ae74; +} +div.userbar-weather_tip .arrow_bg { + border-bottom-color: #f0fffc; +} +.city-select .box-prompt-inner, +.weather-wrap div.city-select { + border: none; +} +.weather-wrap div.city-select { + font-size: 18px; + top: -28px; + right: 0; + left: -114px; + width: 400px; + height: 310px; + /* overflow: hidden; + */ + + color: #fff; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + background: #0868c9; + background: rgba(0, 99, 199, .97); + -o-border-radius: 0; +} +.city-select .weather_cur-city { + font-size: 18px; + font-weight: normal; + height: 20px; + margin-top: 30px; + margin-bottom: 18px; +} +.city-select .weather_close-btn { + font-size: 18px; + position: absolute; + top: 16px; + right: 20px; + display: none; + color: #b3e0d1; +} +.weather-wrap .city-select select { + font-size: 18px; + /* height: 40px; + */ + line-height: 18px; + width: 100%; + margin-bottom: 19px; + padding: 8px 0; + color: #fff; + border: 0; + /* padding-left: 16px; + */ + background: #1c81e5; +} +.weather-wrap .city-select label { + font-size: 14px; + margin-top: 10px; + margin-bottom: 10px; + color: #9cc3e9; + color: rgba(255, 255, 255, .6); +} +.weather-wrap .city-select .btn-bar { + position: absolute; + bottom: 0; + width: 400px; + margin-left: -30px; + text-align: center; +} +.weather-wrap .mod-btn_normal, +.weather-wrap .mod-btn_cancel { + font-size: 18px; + font-weight: bold; + line-height: 60px; + float: left; + width: 200px; + height: 60px; + margin-top: -5px; + text-align: center; + background: #004d99; +} +.weather-wrap .mod-btn_cancel { + float: right; + width: 199px; +} +.weather-wrap .mod-btn_normal:hover, +.weather-wrap .mod-btn_cancel:hover { + background-color: #003973; +} +.weather-wrap .mod-btn_normal .ui-button-text, +.weather-wrap .mod-btn_cancel .ui-button-text { + color: #fff; +} +.weather-wrap .weather-tip_def { + position: absolute; + top: 18px; + right: 20px; + width: 12px; + height: 12px; + cursor: pointer; + pointer-events: none; + background: url(../img/more_trigger.png?__sprite) no-repeat; +} +.weather-wrap .weather-tip_up { + background: url(../img/more_trigger-hover.png?__sprite) no-repeat; +} +.userbar-weather_city-cur { + position: absolute; + left: -84px; + white-space: nowrap; +} +.weather-wrap .weather-more li .wea-fl { + float: left; +} +.weather-wrap .weather-more li .wea-fr { + float: right; + margin-right: -5px; +} +.weather-wrap .weather-more li .wea-hide { + display: none; +} +.weather-wrap .weather-more li .wea-small { + font-size: 12px; + color: #9cc3e9; + color: rgba(220, 220, 220, .6); +} +.weather-wrap .weather-more .wea-flr { + float: right; + margin-top: -14px; + margin-right: -9px; +} +.weather-wrap .box-prompt-inner { + padding: 8px 30px; +} +.weather-more_wrap .weather-origin_wrap { + position: relative; +} +.weather-more_wrap .weather-origin { + display: none; +} +.weather-more_wrap .weather-origin_wrap .weather-more { + padding-bottom: 40px; +} +.weather-more_wrap .weather-origin_wrap .weather-origin { + font-size: 13px; + position: absolute; + right: 30px; + bottom: 18px; + display: block; + color: #fff; +} +.weather-more_wrap .weather-origin_wrap .weather-origin:hover { + opacity: .6; + filter: alpha(opacity=60); +} + +/* has skin */ +.skin-on .weather-wrap .weather-tip_def { + background: url(../img/more_trigger_sk.png?__sprite) no-repeat; +} +.skin-on .weather-wrap .weather-tip_up { + background: url(../img/more_trigger-hover_sk.png?__sprite) no-repeat; +} +.skin-on .userbar-weather .fl:hover, +.skin-on .weather-wrap-open .userbar-weather .fl, +.skin-on .weather-wrap .weather-more, +.skin-on .weather-wrap div.city-select { + background-color: #333; + background-color: rgba(0, 0, 0, .8); +} +.skin-on .weather-wrap .weather-more .weather-more_today { + border-bottom-color: #717171; + border-bottom-color: rgba(255, 255, 255, .3); +} +.skin-on .weather-wrap .city-select select { + background-color: #626262; +} +.skin-on .weather-wrap .mod-btn_normal, +.skin-on .weather-wrap .mod-btn_cancel { + background-color: #535353; +} +.skin-on .weather-wrap .mod-btn_normal:hover, +.skin-on .weather-wrap .mod-btn_cancel:hover { + background-color: #434343; +} +.skin-on .weather-wrap .mod-btn_normal { + border-right: 1px solid #717171; + border-right-color: rgba(255, 255, 255, .3); +} +.skin-on .userbar-weather .dropdown-trigger, +.skin-on .userbar-weather .dropdown .dropdown-input, +.skin-on .userbar-weather .dropdown-list, +.skin-on .userbar-weather .dropdown-list .dropdown-list-inner { + background-color: #626262; +} +.skin-on .userbar-weather .dropdown-list li:hover, +.skin-on .userbar-weather .dropdown-list-hover { + background-color: #444; +} +.skin-on .userbar-weather .dropdown .dropdown-arrow { + background: url(../img/drop-up.png?__sprite) no-repeat; +} +.skin-on .userbar-weather .dropdown .dropdown-arrow-up { + background: url(../img/drop-down.png?__sprite) no-repeat; +} + +/* head fixed */ +.header-fixed .userbar-wrap { + position: fixed; + top: 0; + left: 0; + width: 100%; + background-color: #328de8; + background-color: rgba(28, 129, 229, .9); +} +.header-fixed-st .userbar-wrap, +.header-fixed-st .userbar { + height: 40px; +} +.header-test-holder { + display: none; + height: 50px; +} +.header-fixed-st .header-test-holder { + display: block; +} +.header-fixed .newerguide-tip { + display: none !important; +} +.header-fixed-st .skinbox-more-hide { + position: static !important; +} +.header-fixed-up .userbar-logoSibling { + display: none; +} +.header-fixed .skinbox-more-mask, +.header-fixed .skinbox-more-wrap { + display: none !important; +} + +/* 页头吸顶高度为50px时的搜索框 */ +/* 普通搜索框 */ +.header-fixed-up .sk-wrap, +.header-fixed-up .box-search_tab, +.header-fixed-up .box-search_hsrch { + display: none; + display: none !important; +} +.header-fixed-up .box-search_wrap { + position: fixed; + z-index: 499; + top: 4px; + margin-left: 123px; +} +.header-fixed-up .sg_tri .sg_btn .sg_new_num, +.header-fixed-up .sg_v_tri .sg_v_btn .sg_v_new_num { + top: -7px; +} +.header-fixed-up .box-search_inner { + height: auto; +} +.header-fixed-up #searchGroupForm { + /* overflow: hidden; + */ +} +.header-fixed-up .btn-search { + width: auto; + border-width: 0; +} +.header-fixed-up .btn-search_c { + position: absolute; + z-index: 14; + top: 7px; + right: 3px; + overflow: hidden; + width: 23px; + height: 23px; + white-space: nowrap; + text-indent: -1000px; + border: 2px solid #2186ea; + border-radius: 2px; + background: url(../img/i-search.png?__sprite) no-repeat; + background-color: #2186ea; +} +.header-fixed-up .btn-search_c:hover { + border-color: #1c81e5; + background-color: #1c81e5; +} +.header-fixed-up .box-search_form { + padding-left: 0; +} +.header-fixed-up .box-search_form .input { + padding-right: 28px; + background-color: white; +} +.header-fixed-up .box-search_form .input input { + margin-left: 34px; +} +.header-fixed-up .box-search_logo_wrap { + position: absolute; + z-index: 7; + top: 17px; + left: 7px; + width: auto; + height: auto; +} +.header-fixed-up .box-search_logo img { + width: 16px; + height: 16px; + margin-top: 8px; + margin-left: 6px; +} +.header-fixed-up .box-search .box-search_logo dt, +.header-fixed-up .box-search .box-search_logo dd { + padding: 0; +} +.header-fixed-up .box-search_logo a { + /* border-right: 1px solid #B1B1B1; + */ + height: 33px; +} +.header-fixed-up .box-search_logo dt { + background-color: #f2f2f2; +} +.header-fixed-up .box-search_logos_show dt { + width: 37px; + background-image: none; +} +.header-fixed-up .box-search .sug-search, +.header-fixed-up .box-search .baidu_sug, +.header-fixed-up .box-search .baidu_video_sug { + left: 37px; + width: 572px; +} +.header-fixed-up .box-search_logo dt a { + background: url(../img/i-arrow.png) no-repeat 26px 13px; +} +.header-fixed-up .box-search_logos_show dt a { + background: url(../img/i-arrow-open.png) no-repeat 26px 13px; +} +.header-fixed-up .box-search_logos_show { + overflow: visible; + height: 0; + border: 0; +} +.header-fixed-up .box-search_logos_show dd { + margin-left: -1px; + text-align: left; + background-color: #fff; +} +.header-fixed-up .box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; +} +.header-fixed-up .box-search_logo .box-search_logo_first { + border-top: 1px solid #c0c0c0; +} +.header-fixed-up .box-search_logo .box-search_logo_last { + border-bottom: 1px solid #c0c0c0; +} +.header-fixed-up .box-search_logo dd a { + white-space: nowrap; + color: #8c8b8b; + border-right: 1px solid #c0c0c0; + border-left: 1px solid #c0c0c0; +} +.header-fixed-up .box-search_logo dd a:hover { + color: #5d5d5d; +} +.box-search-logo-item-tips { + display: none; +} +.header-fixed-up .box-search-logo-item-tips { + display: inline; + margin-left: 6px; + vertical-align: -5px; +} +.header-fixed-up .btn-search_ico { + display: none; + display: none !important; +} +.header-fixed-up .baidu_sug, +.header-fixed-up .baidu_video_sug { + margin-left: 0; +} +.header-fixed-up .box-search_logo_disabled dt a { + background: 0 0; +} +.header-fixed-up .box-search_logo_disabled dt { + width: 37px; +} +.header-fixed-up .box-search_logo_disabled dt a { + padding-right: 6px; +} +.header-fixed-up .box-search .box-search_logo_disabled dt { + background: none; + background-color: #f0f0f0; +} + +/* w960 */ +.w960 .header-fixed-up .box-search .sug-search, +.w960 .header-fixed-up .box-search .baidu_sug, +.w960 .header-fixed-up .box-search .baidu_video_sug { + width: 493px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.ps.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.ps.css new file mode 100755 index 000000000..dcf31a885 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/ltr/ltr.ps.css @@ -0,0 +1,15 @@ +/*for PS*/ +.header-fixed-up .radios { + display: none; + display: none !important; +} +body.header-fixed-up .box-search_logo dt { + padding-right: 15px; + height: 33px; + cursor: pointer; + background: #F2F2F2 url(../img/i-arrow.png) no-repeat 26px 13px; +} +body.header-fixed-up .box-search_logos_show dt { + width: 22px; + background-image: url(../img/i-arrow-open.png); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/btn-facebook-logo.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/btn-facebook-logo.png new file mode 100755 index 000000000..18ba2e79e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/btn-facebook-logo.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-hover.png new file mode 100755 index 000000000..fcbd96676 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-new.png new file mode 100755 index 000000000..62354ca53 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-new_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-new_hover.png new file mode 100755 index 000000000..ca92cf840 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete-new_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete.png new file mode 100755 index 000000000..f6a6757a7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-delete.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-new.png new file mode 100755 index 000000000..c5417dc1d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-over-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-over-rtl.png new file mode 100755 index 000000000..213bb14c2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-over-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-over.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-over.png new file mode 100755 index 000000000..36afab5cf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-over.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-rtl.png new file mode 100755 index 000000000..5465eaa2d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice.png new file mode 100755 index 000000000..ad4f9f309 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/img/icon-msg-notice.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/ltr/ltr.more.css new file mode 100755 index 000000000..64a6faf09 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/ltr/ltr.more.css @@ -0,0 +1,280 @@ +.wrap-message { + float: left; + position: relative; +} +.wrap-message-content { + position: relative; + background-color: #0164C8; + background-color: rgba(0,99,199,0.97); + width: 277px; +} +.wrap-message-content li { + border-bottom: 1px solid #1B80E4; + border-bottom-color: rgba(28,129,229,0.96); +} +.wrap-message-content li:hover { + background-color: #075DB5; + background-color: rgba(0,0,0,.1); +} +.wrap-message-content .message-target { + float: left; + color: #fff; + width: 255px; + font-size: 12px; + min-height: 58px; +} +/*.message-target:hover span { + color: #fff; +}*/ +a.message-target:hover span { + text-decoration: underline; +} +span.message-target span { + cursor: default; +} +.message-over-item .message-target { + color: #999999; +} +/*.message-over-item .message-target:hover span { + color: #777777; +}*/ +.message-target span { + display: block; + width: 200px; + float: left; + margin: 19px 0 10px 10px; +} +.ico-message-delete { + float: right; + margin-top: 10px; + margin-right: 10px; + display: none; + width: 11px; + height: 11px; + background: url("../img/icon-delete.png?__sprite") no-repeat; +} +.ico-message-delete:hover { + cursor: pointer; + background: url("../img/icon-delete-hover.png?__sprite") no-repeat; +} +.wrap-message-content li:hover .ico-message-delete { + display: block; +} +.ico-message-new { + position: absolute; + right: 10px; + top: 10px; + width: 12px; + height: 12px; + background: url("../img/icon-msg-new.png?__sprite") no-repeat; +} +.ico-message-type { + width: 28px; + height: 25px; + float: left; + margin-left: 15px; + margin-top: 17px; + background: url("../img/icon-msg-notice.png?__sprite") no-repeat; +} +.ico-message-type1, +.ico-message-type2 { + background: url("../img/icon-msg-notice.png?__sprite") no-repeat; +} +.message-over-item .ico-message-type { + background-image: url("../img/icon-msg-notice-over.png?__sprite"); +} +.message-over-item .ico-message-type1, +.message-over-item .ico-message-type2 { + background-image: url("../img/icon-msg-notice-over.png?__sprite"); +} +.message-no-item { + line-height: 58px; + text-align: center; +} +.message-no-item span { + width: 100%; + overflow: hidden; + color: #FFFFFF; + text-overflow: ellipsis; + white-space: nowrap; +} + +/*head fixed*/ +.header-fixed-st .ico-message-new{top: 6px;} + + + +.account-msg-shop .wrap-message-content { + width: 428px; + border: 1px solid #CCCCCC; + border-bottom-width: 0; + background-color: #FFFFFF; + max-height: 396px; + position: relative; +} +.account-msg-shop .wrap-message-content li { + height: 76px; + padding-top: 11px; + padding-bottom: 11px; + border-bottom: 1px dashed #E4E4E4; + position: relative; + margin-left: 13px; + margin-right: 18px; +} +.account-msg-shop .wrap-message-content li:hover { + background-color: transparent; +} +.account-msg-shop .ico-shop { + float: left; + width: 74px; + height: 74px; + border: 1px solid #E0E0E0; + margin-right: 14px; +} +.account-msg-shop .account-dropdown_wrap, +.account-msg-shop .wrap-message-content .message-target { + color: #3E3E3E; +} +.account-msg-shop .wrap-message-content .message-target { + width: auto; +} +.account-msg-shop .wrap-message-content .message-target:hover .ico-des p { + text-decoration: underline; +} +.account-msg-shop .ico-des { + float: left; + width: 278px; + line-height: 16px; + height: 48px; + overflow: hidden; + text-overflow: ellipsis; +} +.account-msg-shop .ico-fur { + position: absolute; + left: 100px; + bottom: 12px; + font-size: 14px; + width: 300px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #686868; +} +.account-msg-shop .ico-fur span { + font-size: 12px; +} +.account-msg-shop .ico-price { + color: #E02304; +} +.account-msg-shop .ico-more { + position: absolute; + right: 29px; + bottom: 15px; + height: 24px; + line-height: 24px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding-left: 12px; + padding-right: 12px; + background-color: #FF7200; + color: #ffffff; + font-size: 14px; + max-width: 100px; +} +.account-msg-shop .ico-more:hover { + background-color: #F85116; +} +.account-msg-shop .ico-more:active { + background-color: #A53209; +} +.account-msg-shop .ico-message-delete { + position: absolute; + right: -7px; + top: 3px; + width: 15px; + height: 15px; + background: url("../img/icon-delete-new.png?__sprite") no-repeat; +} +.account-msg-shop .ico-message-delete:hover { + background: url("../img/icon-delete-new_hover.png?__sprite") no-repeat; +} + +.account-msg-shop .arrow, +.account-msg-shop .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 8px dashed transparent; + z-index: 2; + pointer-events: none; +} +.account-msg-shop .arrow { + border-bottom-color: #CCCCCC; + border-bottom-style: solid; + top: -16px; + right: 15px; +} +.account-msg-shop .arrow_bg { + border-bottom-color: #fff; + border-bottom-style: solid; + margin: -7px 0 0 -8px; +} +.account-msg-shop .ico-message-new { + left: 22px; + right: auto; + top: 5px; + min-width: 14px; + line-height: 14px; + height: 14px; + text-align: center; + background: #FF7200; + border-radius: 7px; +} +.header-fixed-st .account-msg-shop .ico-message-new { + top: 1px; +} +.account-msg-shop .account-loginfo_wrap { + width: 388px; + border: 1px solid #CCCCCC; + border-top-color: #E4E4E4; + margin-top: -1px; + padding-top: 20px; + background-color: #ffffff; +} +.account-msg-shop .account_login-tip { + width: 242px; + margin: 0 auto; +} +.account-msg-shop .login-tip_con { + background: url(../img/btn-facebook-logo.png?__sprite) no-repeat; + background-color: #587DC7; + color: #ffffff; + height: 28px; +} +.account-msg-shop .wrap-message-content .message-no-item { + border-bottom-width: 0; + height: 44px; + padding-top: 0; +} +.account-msg-shop .message-no-item span { + color: #3E3E3E; +} +.account-msg-shop .mod-scroll { + border-width: 0; +} +.account-msg-shop .account_logout_email { + color: #9D9D9D; +} +.account-msg-shop .account_logout_name { + color: #3E3E3E; +} +.account-msg-shop .account_logout-tip { + margin-left: 46px; +} +.account-msg-shop .account-loginfo_wrap img { + margin-right: 20px; +} +.account-msg-shop ..account_logout_content { + width: 220px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/message-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/message-async.js new file mode 100755 index 000000000..b1cd2ffb3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/message-async.js @@ -0,0 +1,392 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var Helper = require("common:widget/ui/helper/helper.js"); +var Md5 = require('common:widget/ui/md5/md5.js'); +var UT = require("common:widget/ui/ut/ut.js"); + +/***************************** +消息盒子 +------------------------------ +MRD地址:http://10.65.211.71:8200/doc/61aa0959-2f0b-4761-8073-41455e74e7ae +------------------------------ +可传入的参数说明 + apiUrlPrefix:API请求的前缀 + apiUrlParam:API请求的参数 + noMsgContent:无消息时显示的文本 + maxNumber:消息数的最大值 + msgLineHeight:每条消息的最大显示高度(溢出省略) + +*****************************/ +var Message = function(userOption){ + var defaultOption = { + records: [], + deletedIds: [], + clickedIds: [], + hasBubble: false, + htmlTpl: '
                    • ' + + '<#{tagName} #{attrs} class="message-target" data-sort="msgcontent" data-val="#{id}">' + + '' + + '#{description}' + + '' + + '' + +'
                    • ', + htmlShopTpl: '
                    • ' + + '' + + '' + + '

                      #{description}  #{price}

                      ' + + '
                      ' + + '#{supplier} | #{timestamp}' + + '#{submit}' + + '' + +'
                    • ', + apiUrlPrefix: conf.apiUrlPrefix, + apiUrlParam: "?app=msgbox&act=contents&num=5&country=" + conf.country, + noMsgContent: "There is no message.", + maxNumber: 5, + msgLineHeight: 30, + _callbacks: {} + } + $.extend(this, defaultOption, userOption); +}; + +Message.prototype = { + + constructor: Message, + + //模型绑定事件 + bind: function(ev, callback){ + (this._callbacks[ev] || (this._callbacks[ev] = [])).push(callback); + }, + + //触发模型事件 + trigger: function(ev){ + var callbacks; + if (!(callbacks = this._callbacks[ev])) { + return this; + } + $.each(callbacks, function(){ + this(); + }); + }, + + /*新增消息(暂时无用) + addRecord: function(message){ + if (this.records.length < this.maxNumber) { + this.records.push(message); + this.trigger("change"); + } + },*/ + + //删除消息 + delRecord: function(delId){ + var locRecords = this.records; + var matchIndex; + for(matchIndex=0; matchIndex= 0) { + return; + } + var storeIds = $.store(storeName); + if (storeIds) { + if (!conf.msgBoxShop && (ids.length >= this.maxNumber)) { + var minIndex = 0; + for(var i=1; i"; + }else{ + var clickedIds = this.clickedIds; + for(var i=0; i= 0 ? "message-over-item" : "" + })); + continue; + } + if( message.type == "3" ){ + message.tagName = "span"; + message.attrs = ""; + }else{ + message.tagName = "a"; + message.attrs = "href=" + message.target + " target='_blank'"; + } + content += Helper.replaceTpl(this.htmlTpl, $.extend(message, { + "class": $.inArray(message.id + '', clickedIds) >= 0 ? "message-over-item" : "" + })); + } + } + this.contentWrap.find("ul").empty().append(content); + // this.linesEllipsis(this.contentWrap.find("li a span")); + }, + + //多行的溢出省略(工具函数) + // linesEllipsis: function(jqDom){ + // var self = this; + // jqDom.each(function(i){ + // var jqThis = $(this); + // while (jqThis.outerHeight() > self.msgLineHeight) { + // jqThis.text(jqThis.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "...")); + // } + // }); + // }, + + //定义一些需要用到的变量 + defineVar: function(){ + this.newIcon = $(".ico-message-new"); + this.messageBox = $(".box-message"); + this.contentWrap = $(".wrap-message-content"); + this.lastTimestamp = parseInt($.store("msgTimestamp") || 0, 10); + }, + + //事件绑定 + bindEvent: function(){ + var self = this; + this.messageBox.one("mouseenter", function(){ + self.trigger("change"); + self.newIcon.addClass("hide"); + $.store("msgHoverd", self.ver || "1", {expires: 30}); + }); + this.bind("change", $.proxy(this.updateTpl, this)); + $(document.body).on("click", function(e){ + var target = $(e.target), + messageTarget = target.closest(".message-target"); + if(target.hasClass("ico-message-delete")){ + var id = target.parent().attr("data-id"); + self.delRecord(id); + e.preventDefault(); + }else if(messageTarget.length>0 && messageTarget.is("a") && !target.closest("li").hasClass("message-over-item")){ + var id= target.closest("li").attr("data-id"); + self.addClickedId(id); + } + }); + // 对不是a链接的消息,使其hover之后就变灰 + this.messageBox.on("mouseenter", ".account-dropdown_wrap li", function(e){ + // 保证已经初始化了DOM + // self.trigger("change"); + var target = $(e.target), + messageTarget = target.closest("li"); + if(messageTarget.find(".message-target").is("span") && !target.closest("li").hasClass("message-over-item")){ + var id= target.closest("li").attr("data-id"); + // 将hover统一当作click,统一效果(可能不是很符合语义,升级带来的问题) + self.addClickedId(id); + self.trigger( "change" ); + } + }); + + if(conf.msgBoxShop) { + this.messageBox + .on("click", ".message-target", function(e) { + UT.send({ + modId: "msgbox", + type: "click", + sort: self.hasBubble ? "hasBubble" : "noBubble", + position: (window["loginCtroller"] && loginCtroller.verify == 1) ? "logged": "nolog" + }); + UT.send({ + modId: "msgbox", + type: "click", + position: "content" + }); + }) + .on("click", ".ico-more", function(e) { + UT.send({ + modId: "msgbox", + type: "click", + sort: self.hasBubble ? "hasBubble" : "noBubble", + position: (window["loginCtroller"] && loginCtroller.verify == 1) ? "logged": "nolog" + }); + UT.send({ + modId: "msgbox", + type: "click", + position: "button" + }); + }) + .on("click", ".ico-message-delete", function(e) { + UT.send({ + modId: "msgbox", + type: "click", + position: "delete" + }); + }); + } + }, + + calculateTipNumber: function(ver) { + var data = this.records; + var _del = $.store("msgDelIds"); + var len = 0; + var _bool = false; + + _del = _del && _del.split("|"); + for(var i = 0, l = data.length; i < l; i++) { + if(parseInt(data[i]["version"], 10) > ver) { + if(_del) { + $.each(_del, function(index, value) { + if(value == data[i]["id"]) { + _bool = true; + return false; + } + }); + if(!_bool) { + ++len; + } + _bool = false; + } else { + ++len; + } + } + } + if(len) { + this.newIcon.html(len > 99 ? "...": len).removeClass("hide"); + this.hasBubble = true; + } + }, + + //是否有新消息的判断 + judgeFresh: function(timestamp){ + if (conf.msgBoxShop) { + timestamp = parseInt(timestamp, 10); + this.ver = timestamp; + } + var hoverdCookie = $.store("msgHoverd"); + var timeCookie = this.lastTimestamp; + if (timestamp > timeCookie || (timestamp == timeCookie && !hoverdCookie) || (conf.msgBoxShop && hoverdCookie != timestamp)) { + UT.send({ + modId: "msgbox", + type: "others", + sort: "show", + position: "newicon" + }); + if(conf.msgBoxShop) { + this.calculateTipNumber(parseInt(hoverdCookie, 10)||0); + } else { + this.newIcon.removeClass("hide"); + } + } + $.store("msgTimestamp", timestamp, {expires: 30}); + }, + + addScrollBar: function() { + var that = this; + require.async("common:widget/ui/scrollable/scrollable.js", function(scrollObj) { + that.contentWrap.find("ul").scrollable(); + }); + }, + //消息数据的请求 + ajaxLoad: function(){ + var self = this; + + var _data = conf.msgBoxShop; + var content = _data? _data.content: null; + if(content) { + if (content.data.length) { + self.submitWord = _data.submitWord; + self.records = content.data; + self.judgeFresh(_data.version); + self.filterRecord(); + self.addScrollBar(); + } + return; + } + + var apiUrl = this.apiUrlPrefix + this.apiUrlParam; + $.ajax({ + // test + // url : "/static/web/message.json", + // dataType : "json", + // cache : true, + url: apiUrl, + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + Md5(this.apiUrlParam, 16), + cache: false, + success: function(data){ + var content = data.content; + if (content.data.length) { + self.judgeFresh(content.data[0].timestamp); + self.records = content.data; + self.filterRecord(); + } + } + }); + }, + + //初始化 + init: function(){ + this.defineVar(); + this.bindEvent(); + this.initDelId(); + this.initClkId(); + this.ajaxLoad(); + } +}; + +module.exports = Message; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/message.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/message.tpl new file mode 100755 index 000000000..f5ca74eea --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/message.tpl @@ -0,0 +1,20 @@ +<%if $head.dir=='ltr'%> +<%require name="common:widget/header-flat/message/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header-flat/message/rtl/rtl.more.css"%> +<%/if%> + + + +<%script%> +conf.messageBox = <%json_encode($body.messageBox)%>; +<%if $body.messageBoxforShop.isHidden==='0'%> +conf.msgBoxShop = <%json_encode($body.messageBoxforShop)%>; +<%/if%> +require.async(["common:widget/header-flat/message/message-async.js"], function(Message){ + var message = new Message(conf.messageBox); + message.init(); +}); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/rtl/rtl.more.css new file mode 100755 index 000000000..9b594035f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/message/rtl/rtl.more.css @@ -0,0 +1,104 @@ +.wrap-message { + float: right; + position: relative; +} +.wrap-message-content { + position: relative; + background-color: #0164C8; + background-color: rgba(0,99,199,0.97); + width: 277px; +} +.wrap-message-content li { + border-bottom: 1px solid #1B80E4; + border-bottom-color: rgba(28,129,229,0.96); +} +.wrap-message-content li:hover { + background-color: #075DB5; + background-color: rgba(0,0,0,.1); +} +.wrap-message-content .message-target { + float: right; + color: #fff; + width: 255px; + font-size: 12px; + min-height: 58px; +} +/*.message-target:hover span { + color: #00ad72; +}*/ +a.message-target:hover span { + text-decoration: underline; +} +span.message-target span { + cursor: default; +} +.message-over-item .message-target { + color: #999999; +} +/*.message-over-item .message-target:hover span { + color: #777777; +}*/ +.message-target span { + display: block; + width: 200px; + float: right; + margin: 19px 10px 10px 0; +} +.ico-message-delete { + color: #9dd2bf; + float: left; + margin-top: 10px; + margin-left: 10px; + display: none; + width: 11px; + height: 11px; + background: url("../img/icon-delete.png?__sprite") no-repeat; +} +.ico-message-delete:hover { + cursor: pointer; + background: url("../img/icon-delete-hover.png?__sprite") no-repeat; +} +.wrap-message-content li:hover .ico-message-delete { + display: block; +} +.ico-message-new { + position: absolute; + left: 10px; + top: 10px; + width: 12px; + height: 12px; + background: url("../img/icon-msg-new.png?__sprite") no-repeat; +} +.ico-message-type { + width: 28px; + height: 25px; + float: right; + margin-right: 15px; + margin-top: 17px; + background: url("../img/icon-msg-notice-rtl.png?__sprite") no-repeat; +} +.ico-message-type1, +.ico-message-type2 { + background: url("../img/icon-msg-notice-rtl.png?__sprite") no-repeat; +} +.message-over-item .ico-message-type { + background-image: url("../img/icon-msg-notice-over-rtl.png?__sprite"); +} +.message-over-item .ico-message-type1, +.message-over-item .ico-message-type2 { + background-image: url("../img/icon-msg-notice-over-rtl.png?__sprite"); +} +.message-no-item { + line-height: 58px; + text-align: center; +} +.message-no-item span { + width: 100%; + overflow: hidden; + color: #FFFFFF; + text-overflow: ellipsis; + white-space: nowrap; +} + +/*head fixed*/ +.header-fixed-st .ico-message-new{top: 6px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-down.png new file mode 100755 index 000000000..1eebd2938 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-hover.png new file mode 100755 index 000000000..bb24a6208 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-up.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-up.png new file mode 100755 index 000000000..a9d99d3bf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/i-arrow-up.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/title-mask.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/title-mask.png new file mode 100755 index 000000000..7d1c73007 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/img/title-mask.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/ltr/ltr.css new file mode 100755 index 000000000..58f77fd97 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/ltr/ltr.css @@ -0,0 +1,345 @@ +.mod-nav-wrap{ + display: block!important; + -webkit-transition: height .5s; + -moz-transition: height .5s; + -o-transition: height .5s; + transition: height .5s; + height: 30px; + z-index: 5; + position: relative; +} +.mod-nav-wrap .nav-item{ + float: left; + height: 30px; + line-height: 30px; + position: relative; +} +.mod-nav-wrap .nav-item .nav-el{ + background-color: #f5f6f8; + color: #333; + display: block; + width: 100%; + height: 100%; +} +.mod-nav-wrap .nav-item .nav-first .i-nav{ + border-left-width: 0; +} +.mod-nav-wrap .i-nav{ + width: 40px; + height: 30px; + display: block; + float: left; + border-left: 1px solid #fff; + cursor: pointer; +} +.mod-nav-wrap .nav-text-wrap{ + height: 28px; + margin-left: 40px; + /*padding-right: 21px;*/ + border: 1px solid #e6e6e6; + border-left-width: 0; + -webkit-transition: all .2s linear; + -moz-transition: all .2s linear; + -ms-transition: all .2s linear; + transition: all .2s linear; + cursor: pointer; +} +.mod-nav-wrap .nav-item-text{ + display: block; + height: 28px; + line-height: 28px; + text-align: center; + overflow: hidden; + padding-right: 21px; + +} +.mod-nav-wrap .i-arrow{ + display: block; + position: absolute; + background: url(../img/i-arrow-down.png) no-repeat; + width: 6px; + height: 4px; + top: 13px; + right: 16px; +} +.mod-nav-wrap .i-hover-arrow{ + display: none; + position: absolute; + background: url(../img/i-arrow-hover.png) no-repeat; + width: 11px; + height: 6px; + bottom: -1px; + right: 50%; + z-index: 1; +} +.mod-nav-wrap .i-arrow-hover{ + background: url(../img/i-arrow-up.png) no-repeat; +} + + +.mod-nav-wrap .nav-hover-wrap{ + display: none; + background-color: #fff; + border: 1px solid #ccc; + padding: 20px 16px; + z-index: 0; + position: absolute; + -webkit-box-shadow: 0 5px 20px #b0b0b0; + -moz-box-shadow: 0 5px 20px #b0b0b0; + -ms-box-shadow: 0 5px 20px #b0b0b0; + box-shadow: 0 5px 20px #b0b0b0; +} +.mod-nav-wrap .nav-reco{ + display: inline-block; +} +.mod-nav-wrap .nav-reco-ul{ + overflow: hidden; +} +.mod-nav-wrap .nav-reco-item .nav-reco-wrap{ + position: relative; + width: 100%; + height: 100%; + display: block; +} +.mod-nav-wrap .nav-reco-item .nav-reco-img{ + width: 100%; + height: 100%; +} +.mod-nav-wrap .nav-reco-item .nav-reco-title{ + display: none; +} +.mod-nav-wrap .nav-reco-item .nav-mask{ + display: none; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + display: none; + background-color: #000; + opacity: .1; + filter: alpha(opacity=10); + z-index: 2; +} +.mod-nav-wrap .nav-tab{ + /*float: left;*/ + display: inline-block; + vertical-align: top; + position: relative; + height: 224px; +} +.mod-nav-wrap .nav-tab-ul{ + overflow: hidden; + width: 120px; + display: inline-block; +} +.mod-nav-wrap .nav-tab-ul .cur{ + background-color: #f5f6f8; + color: #1b81e5; + display: block; +} +.mod-nav-wrap .nav-tab-ul .cur a{ + color: #1b81e5; +} +.mod-nav-wrap .nav-tab-item{ + width: 110px; + height: 28px; + line-height: 28px; + font-size: 14px; + padding-left: 10px; + color: #333; + cursor: pointer; +} +.mod-nav-wrap .nav-subtab-ul{ + overflow: hidden; + width: 140px; + display: inline-block; + vertical-align: top; + height: 224px; + background: #f5f6f8; +} +.mod-nav-wrap .nav-subtab-ul .cur{ + display: block; +} +.mod-nav-wrap .nav-subtab-item{ + width: 140px; + /*height: 224px;*/ + /*padding-left: 20px;*/ + /*display: none;*/ + /*position: relative; + overflow: hidden; + height: 224px;*/ +} +.mod-nav-wrap .nav-subtab-container{ + +} +.mod-nav-wrap .nav-subtab-a{ + display: block; + padding-left: 20px; + color: #666; + line-height: 28px; + width: 110px; + overflow: hidden; +} +.mod-nav-wrap .nav-subtab-a:hover{ + color: #1b81e5; + text-decoration: underline; +} +.mod-nav-wrap .nav-tab .nav-more{ + position: absolute; + right: 0; + bottom: -30px; + font-size: 14px; + color: #1b81e5; +} +.mod-nav-wrap .nav-tab .nav-more:hover{ + text-decoration: underline; +} +.mod-nav-wrap .nav-tab .nav-more b{ + font-family: Tahoma; + font-size: 20px; + vertical-align: middle; + display: inline-block; + margin-top: -5px; +} + +.mod-nav-wrap .nav01 { + width: 530px; +} +.mod-nav-wrap .nav01 .nav-reco{ + width: 265px; +} +.mod-nav-wrap .nav01 .nav-reco-item{ + float: left; + width: 84px; + height: 115px; + border: 1px solid #fff; + margin: -1px 0 0 -1px; +} +.mod-nav-wrap .nav01 .nav-reco-item .nav-reco-wrap{ + position: relative; + width: 100%; + height: 100%; + display: block; +} +.mod-nav-wrap .nav01 .nav-reco-item .nav-reco-img{ + width: 100%; + height: 100%; +} +.mod-nav-wrap .nav01 .nav-reco-item .nav-reco-title{ + position: absolute; + bottom: 0; + left: 0; + color: #fff; + text-align: center; + width: 100%; + line-height: 20px; + height: 20px; + display: block; + background: url(../img/title-mask.png?__sprite) repeat-x; + +} + +.mod-nav-wrap .nav02 { + width: 550px; +} +.mod-nav-wrap .nav02 .nav-reco{ + width: 285px; +} +.mod-nav-wrap .nav02 .nav-reco-item{ + float: left; + width: 75px; + height: 110px; + margin: 0 18px 10px 0; +} + +.mod-nav-wrap .nav02 .nav-reco-item .nav-reco-img{ + border-radius: 10px; + width: 75px; + height: 75px; +} +.mod-nav-wrap .nav02 .nav-reco-item .nav-reco-title{ + /*position: absolute; + bottom: 0; + left: 0;*/ + color: #666; + text-align: center; + width: 100%; + display: block; + width: 75px; + height: 30px; + word-break: break-word; + line-height: 15px; + overflow: hidden; + margin-top: 5px; +} +.mod-nav-wrap .nav02 .nav-reco-wrap:hover .nav-reco-title{ + color: #1b81e5; +} + +.mod-nav-wrap .nav03 { + width: 655px; + /*right: 0;*/ +} +.mod-nav-wrap .nav03 .nav-reco{ + width: 390px; +} +.mod-nav-wrap .nav03 .nav-reco-item{ + float: left; + width: 125px; + height: 75px; + border: 1px solid #fff; + margin: -1px 0 0 -1px; +} +.mod-nav-wrap .nav03 .first{ + width: 251px; + height: 151px; +} +.mod-nav-wrap .nav03 .nav-reco-item .nav-reco-title{ + position: absolute; + bottom: 0; + left: 0; + color: #fff; + text-align: center; + width: 100%; + line-height: 20px; + display: block; + overflow: hidden; + height: 20px; + background: url(../img/title-mask.png?__sprite) repeat-x; + +} +.mod-nav-wrap .nav04 { + width: 565px; + /*right: 0;*/ +} +.mod-nav-wrap .nav04 .nav-reco{ + width: 300px; +} +.mod-nav-wrap .nav04 .nav-reco-item{ + float: left; + width: 95px; + height: 115px; + border: 1px solid #efefef; + margin: -1px 0 0 -1px; + overflow: hidden; +} +.mod-nav-wrap .nav04 .nav-reco-wrap{ + -webkit-transition: all .3s ease; + -moz-transition: all .3s ease; + -ms-transition: all .3s ease; + transition: all .3s ease; +} +.mod-nav-wrap .nav04 .nav-reco-wrap:hover{ + -webkit-transform: scale(1.03); + -moz-transform: scale(1.03); + -ms-transform: scale(1.03); + -o-transform: scale(1.03); + transform: scale(1.03); +} +.mod-nav-wrap .nav04 .nav-reco-ul{ + padding: 1px; +} +.mod-nav-wrap .nav01 .nav-reco-wrap:hover .nav-mask, .mod-nav-wrap .nav03 .nav-reco-wrap:hover .nav-mask{ + display: block; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/ltr/ltr.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/nav-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/nav-async.js new file mode 100755 index 000000000..ca17f491b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/nav-async.js @@ -0,0 +1,221 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var helper = require('common:widget/ui/helper/helper.js'); +var message = require('common:widget/ui/message/src/message.js'); +var scroll = require("common:widget/ui/scrollable/scrollable.js"); + +require('common:widget/ui/slide/slide.js'); +require('common:widget/ui/slide/plugin/pagination.js'); +require('common:widget/ui/slide/plugin/animate.js'); +require('common:widget/ui/slide/plugin/control.js'); + +var nav = function(navData){ + var navOption = { + $mod: $('#navWrap'), + selectId: "", + preloadTpl: "" + }; + var navTpl = { + //导航hover推荐区 + // navReco: [''].join(''), + //导航hovertab区 + navTabCon: '#{title}' + }; + $.extend(this, navOption, navTpl, navData); + + this.init(); +} +nav.prototype = { + /** + * 初始化入口 + */ + init: function(){ + var self = this; + self._bindEvent(); + self._adjustPos(); + }, + _adjustPos: function(){ + var self = this; + var $mod = self.$mod; + var $navItem = $mod.find('.nav-item'); + var winWidth = $mod.parent().width(); + + $.each($navItem, function(i,item){ + var $item = $(item); + var restWidth = winWidth - $item.position().left; + var $navCard = $item.find('.nav-hover-wrap'); + var navCardWidth = $navCard.outerWidth(); + + if (restWidth + .mod-nav-wrap{ + display: none; + height: 0; + } +<%/style%> +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/header-flat/nav/ltr/ltr.css?__inline'); + <%else%> + @import url('/widget/header-flat/nav/rtl/rtl.css?__inline'); + <%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%*require name="common:widget/header-flat/nav/`$head.dir`/`$head.dir`.more.css"*%> + + +<%script%> + conf.nav = { + data: <%json_encode($body.navigation)%> + }; + require.async("common:widget/header-flat/nav/nav-async.js", function(nav){ + new nav(conf.nav.data); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/rtl/rtl.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/nav/rtl/rtl.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/ltr/ltr.css new file mode 100755 index 000000000..791138033 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/ltr/ltr.css @@ -0,0 +1,3 @@ +.mod-nav-wrap{ + visibility: hidden; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/ltr/ltr.more.css new file mode 100755 index 000000000..e4be4b1c1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/ltr/ltr.more.css @@ -0,0 +1,28 @@ +.mod-nav-wrap{ + visibility: visible; +} +.mod-nav-wrap .nav-item{ + float: left; + width: 120px; + height: 40px; + line-height: 40px; + text-align: center; + font-size: 15px; + color: #fff; +} +.mod-nav-wrap .nav-item a{ + color: #fff; + display: block; + width: 100%; + height: 100%; +} +.mod-nav-wrap .cur{ + background-color: #0A69C9; + cursor: default; +} +.mod-nav-wrap .cur span{ + cursor: default; +} +.mod-nav-wrap .nav-item:hover{ + background-color: #0A69C9; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/navigation-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/navigation-async.js new file mode 100755 index 000000000..59975ec35 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/navigation-async.js @@ -0,0 +1,12 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); + +var $navWrap = $("#navWrap"); + +$navWrap.on("click", '.nav-el', function(e) { + UT.send({ + position: "nav", + sort: $(this).attr("href"), + type: "click", + modId: "navigation" + }); +}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/navigation.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/navigation.tpl new file mode 100755 index 000000000..4202b1869 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/navigation.tpl @@ -0,0 +1,29 @@ +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/header-flat/navigation/ltr/ltr.css?__inline'); + <%else%> + @import url('/widget/header-flat/navigation/rtl/rtl.css?__inline'); + <%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%require name="common:widget/header-flat/navigation/`$head.dir`/`$head.dir`.more.css"%> + + +<%script%> + require.async("common:widget/header-flat/navigation/navigation-async.js"); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/rtl/rtl.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/navigation/rtl/rtl.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.css new file mode 100755 index 000000000..066db543b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.css @@ -0,0 +1,70 @@ +/*============userbar=============*/ + +.userbar-wrap { + background: #1c81e5; + min-width: 960px; + position: relative; + height: 50px; + zoom: 1; + z-index: 400; +} +.userbar { + height: 50px; + margin: 0 auto; + color: #fff; + position: relative; + z-index: 9; +} +/*.userbar-tool { + display: none; +} +.weather-more { + display: none; +} +.weather-more_wrap { + border-bottom: 1px solid #fff; +}*/ + + +.userbar-logo { + max-width: 345px; +} +/*.weather-wrap { + position: relative; + float: right; + visibility: hidden; +} +body .userbar-weather { + width: auto; + float: right; +}*/ + +.userbar-glo { + position: absolute; + left: 0; + top: 0; + display: none; +} +/*.userbar-logoSibling { + margin-left: 62px; +}*/ + +/*960*/ +/*.w960 .userbar-logoSibling { + margin-left: 18px; +}*/ + +/*has skin*/ +body.skin-on .userbar-wrap { + background: #666666; + background: rgba(0,0,0,0.6); +} + + +/*head fixed*/ +.header-fixed .userbar-wrap { + position: fixed; + width: 100%; + top: 0; + right: 0; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.more.css new file mode 100755 index 000000000..f831883d5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.more.css @@ -0,0 +1,676 @@ +/*from inline css*/ +.userbar-tool { + display: none; +} +.weather-more { + display: none; +} +.weather-more_wrap { + border-bottom: 1px solid #fff; +} +.weather-wrap { + position: relative; + float: right; + visibility: hidden; + opacity: 0; +} +body .userbar-weather { + width: auto; + float: right; +} +.userbar-glo { + display: block !important; +} +.userbar-logoSibling { + margin-left: 62px; +} + +/*960*/ +.w960 .userbar-logoSibling { + margin-left: 18px; +} + + + + +/*============userbar=============*/ +.userbar-tool { + position: relative; + overflow: visible; + z-index: 101; + display: block; + display: block !important; +} + +.userbar a:hover { + text-decoration: none; +} + +/*============userbar=============*/ +.weather-wrap .weather-more_wrap { + overflow: visible; + height: 0; + border-width: 0; + zoom: 1; +} +.weather-more_show { + height: auto; + border-top: 1px solid #0a6f4e; +} + + + + + + +/*weather*/ + .weather_last, .weather-info .dot_img, .weather-info .temperature_hum, .userbar-weather li.weather_last { + display: none; +} +body .weather-info { + width: auto; +} +.weather-info .text { + visibility: visible; + font-size: 12px; +} +.weather-info .temperature_p { + font-size: 12px; +} +.userbar-weather ul.fl { + height: 45px; + padding-top: 5px; + margin-right: 0; + margin-top: 0; + width: auto; + padding-right: 20px; + padding-left: 42px; + cursor: pointer; +} +.userbar-weather ul.fl:hover, .weather-wrap-open .userbar-weather .fl { + background-color: #0164C8; + background-color: rgba(0,99,199,0.97);} +.weather-wrap .userbar-weather { + margin-left: 0; + height: 50px; + padding-top: 0; + z-index: 1; +} +.userbar-weather .fl li { + margin-left: 0; +} +div.userbar-weather_console { + position: absolute; + right: 114px; + top: 78px; + height: auto; + display: none; +} +div.userbar-weather_console a { + color: #000000; + font-size: 14px; + font-weight: 700; +} +#weatherView li img { + width: 40px; + height: 36px; + margin-top: -2px; +} +.userbar-weather .weather-info span { + font-weight: 500; +} +.userbar-weather_console .weather-days { + display: none; +} +.weather-wrap .weather-more_wrap { + position: absolute; + right: 0px; + top: 50px; + height: auto; + display: none; +} +.weather-wrap .weather-more { + display: block; + width: 340px; + padding: 23px 30px 15px; + overflow: hidden; + background: #0868C9; + background: rgba(0,99,199,0.97); +} +.weather-wrap .weather-more li { + padding: 0; + height: 42px; + line-height: 40px; + overflow: hidden; + color: #FFFFFF; + width: 100%; + background: transparent; + margin: 0; + position: relative; + font-size: 18px; +} +.weather-wrap .weather-more li img { + padding: 0; + position: absolute; + right: 50%; + margin-right: -20px; +} +body .weather-more_odd { + margin-right: 1px; + _margin-right: 0; + -moz-box-shadow: none; + -webkit-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; +} +.weather-wrap .weather-more .weather-more_today { + float: none; + text-align: right; + width: auto; + height: auto; + padding: 0; + background: transparent; + overflow: hidden; + position: relative; + border-bottom: 1px solid #1B80E4; + border-bottom-color: rgba(28,129,229,0.96); + margin-bottom: 17px; +} +.weather-more_today .temperature_big { + font-size: 42px; + padding-right: 95px; + font-weight: normal; +} +.weather-wrap .dot_img_head { + margin-bottom: 0px; + margin-left: 2px; + background: url(../img/drop.png?__sprite) no-repeat; +} +.weather-more_wrap .weather-more_line { + border: none; +} +.weather-more .humidity { + font-size: 18px; + font-weight: normal; + padding: 0 4px; +} +.weather-more_today p { + margin-top: 24px; + margin-bottom: 55px; +} +.weather-more_today p:first-child { + margin: 0; + padding-right: 130px !important; + text-align: left; + font-weight: 600; + font-size: 14px; + line-height: 30px; + color: #9CC3E9 !important; + color: rgba(255,255,255,0.6) !important; +} +.weather-wrap .weather-more .weather-more_today img { + position: absolute; + top: 50px; + right: 40px; + padding: 0; +} +.weather-more_today .weather-more_tip-remind { + padding-right: 121px; + font-weight: 400; + font-size: 12px; + float: right; + margin-top: -4px; + max-width: 132px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + direction: rtl; +} +body div.userbar-weather_city-cur a { + background: url(../img/select-city_tip.png) no-repeat left top; + padding-left: 36px; + display: inline-block; + min-height: 15px; + color: #ffffff; + font-size: 18px; +} +/*.weather-wrap_arrow, .weather-wrap_arrow-bg { + position: absolute; + height: 0; + width: 0; + border: 6px solid transparent; +} +.weather-wrap_arrow { + border-bottom-color: #bee2d6; + bottom: -1px; + right: 64px; + display: none; + z-index: 2; +} +.weather-wrap_arrow-bg { + border-bottom-color: #EBFCF7; + margin: -6px -7px 0 0; +}*/ +div.userbar-weather_tip { + left: 0; + right: -1px; + background-color: #F0FFFC; + border-color: #00AE74; +} +div.userbar-weather_tip .arrow { + border-bottom-color: #00AE74; +} +div.userbar-weather_tip .arrow_bg { + border-bottom-color: #F0FFFC; +} +.city-select .box-prompt-inner, .weather-wrap div.city-select { + border: none; +} +.weather-wrap div.city-select { + left: 0; + right: -114px; + top: -28px; + width: 400px; + height: 310px; + background: #0868C9; + background: rgba(0, 99, 199, 0.97); + /*overflow: hidden;*/ + color: #FFFFFF; + font-size: 18px; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.city-select .weather_cur-city { + font-size: 18px; + font-weight: normal; + height: 20px; + margin-bottom: 18px; + margin-top: 30px; +} +.city-select .weather_close-btn { + position: absolute; + top: 16px; + left: 20px; + font-size: 18px; + color: #B3E0D1; + display: none; +} +.weather-wrap .city-select select { + width: 100%; + /* height: 40px;*/ + line-height: 18px; + color: #FFFFFF; + font-size: 18px; + /*padding-right: 16px;*/ + padding: 8px 0; + background: #1c81e5; + border: 0; + margin-bottom: 19px; +} +.weather-wrap .city-select label { + font-size: 14px; + margin-top: 10px; + margin-bottom: 10px; + color: #9CC3E9; + color: rgba(255,255,255,0.6); +} +.weather-wrap .city-select .btn-bar { + width: 400px; + margin-right: -30px; + text-align: center; + position: absolute; + bottom: 0; +} +.weather-wrap .mod-btn_normal, +.weather-wrap .mod-btn_cancel { + float: right; + height: 60px; + line-height: 60px; + text-align: center; + font-size: 18px; + font-weight: bold; + width: 200px; + background: #004d99; + margin-top: -5px; +} +.weather-wrap .mod-btn_cancel { + float: left; + width: 199px; +} +.weather-wrap .mod-btn_normal:hover, +.weather-wrap .mod-btn_cancel:hover { + background-color: #003973; +} +.weather-wrap .mod-btn_normal .ui-button-text,.weather-wrap .mod-btn_cancel .ui-button-text { + color: #ffffff; +} + + +.weather-wrap .weather-tip_def { + width: 12px; + height: 12px; + background: url(../img/more_trigger.png?__sprite) no-repeat; + position: absolute; + left: 20px; + top: 18px; + pointer-events: none; + cursor: pointer; + z-index: 1; +} +.weather-wrap .weather-tip_up { + background: url(../img/more_trigger-hover.png?__sprite) no-repeat; +} + + +.userbar-weather_city-cur { + white-space: nowrap; + position: absolute; + right: -84px; +} +.weather-wrap .weather-more li .wea-fl { + float: right; +} +.weather-wrap .weather-more li .wea-fr { + float: left; + margin-left: -5px; +} +.weather-wrap .weather-more li .wea-hide { + display: none; +} +.weather-wrap .weather-more li .wea-small { + font-size: 12px; + color: #9CC3E9; + color: rgba(220,220,220,0.6); +} +.weather-wrap .weather-more .wea-flr { + float: left; + margin-top: -4px; + margin-left: -9px; +} +.weather-wrap .box-prompt-inner { + padding: 8px 30px; +} +.weather-wrap .humidity { + margin-left: 0px; +} +.weather-more_wrap .weather-origin_wrap{ + position: relative; +} +.weather-more_wrap .weather-origin{ + display: none; +} +.weather-more_wrap .weather-origin_wrap .weather-more{ + padding-bottom: 40px; +} +.weather-more_wrap .weather-origin_wrap .weather-origin{ + display: block; + position: absolute; + bottom: 18px; + color: #fff; + left: 30px; + font-size: 13px; +} +.weather-more_wrap .weather-origin_wrap .weather-origin:hover{ + filter:alpha(opacity=60); + opacity: 0.6; +} +/*has skin*/ +.skin-on .weather-wrap .weather-tip_def { + background: url(../img/more_trigger_sk.png?__sprite) no-repeat; +} +.skin-on .weather-wrap .weather-tip_up { + background: url(../img/more_trigger-hover_sk.png?__sprite) no-repeat; +} +.skin-on .userbar-weather .fl:hover, +.skin-on .weather-wrap-open .userbar-weather .fl, +.skin-on .weather-wrap .weather-more, +.skin-on .weather-wrap div.city-select { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} +.skin-on .weather-wrap .weather-more .weather-more_today { + border-bottom-color: #717171; + border-bottom-color: rgba(255,255,255,0.3); +} +.skin-on .weather-wrap .city-select select { + background-color: #626262; +} +.skin-on .weather-wrap .mod-btn_normal, +.skin-on .weather-wrap .mod-btn_cancel { + background-color: #535353; +} +.skin-on .weather-wrap .mod-btn_normal:hover, +.skin-on .weather-wrap .mod-btn_cancel:hover { + background-color: #434343; +} +.skin-on .weather-wrap .mod-btn_normal { + border-left: 1px solid #717171; + border-left-color: rgba(255,255,255,0.3); +} + +.skin-on .userbar-weather .dropdown-trigger, +.skin-on .userbar-weather .dropdown .dropdown-input, +.skin-on .userbar-weather .dropdown-list, +.skin-on .userbar-weather .dropdown-list .dropdown-list-inner { + background-color: #626262; +} +.skin-on .userbar-weather .dropdown-list li:hover, +.skin-on .userbar-weather .dropdown-list-hover { + background-color: #444444; +} +.skin-on .userbar-weather .dropdown .dropdown-arrow { + + background: url(../img/drop-up.png?__sprite) no-repeat; +} +.skin-on .userbar-weather .dropdown .dropdown-arrow-up { + background: url(../img/drop-down.png?__sprite) no-repeat; +} + + +/*head fixed*/ +.header-fixed .userbar-wrap { + position: fixed; + width: 100%; + top: 0; + right: 0; + background-color: #328DE8; + background-color: rgba(28, 129, 229, 0.9); +} +.header-fixed-st .userbar-wrap, +.header-fixed-st .userbar { + height: 40px; +} +.header-test-holder { + display: none; + height: 50px; +} +.header-fixed-st .header-test-holder { + display: block; +} +.header-fixed .newerguide-tip { + display: none !important; +} +.header-fixed-st .skinbox-more-hide { + position: static !important; +} + + +.header-fixed-up .userbar-logoSibling { + display: none; +} + +.header-fixed .skinbox-more-mask, +.header-fixed .skinbox-more-wrap { + display: none !important; +} +/*页头吸顶高度为50px时的搜索框*/ +/*普通搜索框*/ + .header-fixed-up .sk-wrap, + .header-fixed-up .box-search_tab, + .header-fixed-up .box-search_hsrch { + display: none; + display: none !important; +} +.header-fixed-up .box-search_wrap { + position: fixed; + top: 4px; + z-index: 499; + margin-right: 128px; +} +.header-fixed-up .sg_tri .sg_btn .sg_new_num, +.header-fixed-up .sg_v_tri .sg_v_btn .sg_v_new_num { + top: -7px; +} +.header-fixed-up .box-search_inner { + height: auto; +} +.header-fixed-up #searchGroupForm { + /*overflow: hidden;*/ +} +.header-fixed-up .btn-search { + border-width: 0; + width: auto; +} +.header-fixed-up .btn-search_c { + position: absolute; + left: 3px; + top: 7px; + z-index: 14; + text-indent: -1000px; + white-space: nowrap; + overflow: hidden; + height: 23px; + width: 22px; + border: 2px solid #2186EA; + background: url(../img/i-search.png?__sprite) no-repeat; + background-color: #2186EA; + border-radius: 2px; +} +.header-fixed-up .btn-search_c:hover { + background-color: #1C81E5; + border-color: #1C81E5; +} +.header-fixed-up .box-search_form { + padding-right: 0; +} +.header-fixed-up .box-search_form .input { + padding-left: 28px; + background-color: white; +} +.header-fixed-up .box-search_form .input input { + margin-right: 34px; +} +.header-fixed-up .box-search_logo_wrap { + position: absolute; + right: 7px; + top: 17px; + height: auto; + width: auto; +} +.header-fixed-up .box-search_logo img { + width: 16px; + height: 16px; + margin-top: 8px; + margin-right: 6px; +} +.header-fixed-up .box-search .box-search_logo dt, +.header-fixed-up .box-search .box-search_logo dd { + padding: 0; +} +.header-fixed-up .box-search_logo a { + /*border-right: 1px solid #B1B1B1;*/ + height: 33px; +} +.header-fixed-up .box-search_logo dt { + background-color: #F2F2F2; +} +.header-fixed-up .box-search_logos_show dt { + background-image: none; + width: 37px; +} +.header-fixed-up .box-search .sug-search, +.header-fixed-up .box-search .baidu_sug, +.header-fixed-up .box-search .baidu_video_sug { + width: 571px; + right: 37px; +} +.header-fixed-up .box-search_logo dt a { + background: url(../img/i-arrow.png) no-repeat 4px 13px; +} +.header-fixed-up .box-search_logos_show dt a { + background: url(../img/i-arrow-open.png) no-repeat 4px 13px; +} +.header-fixed-up .box-search_logos_show { + height: 0; + overflow: visible; + border: 0; +} +.header-fixed-up .box-search_logos_show dd { + background-color: #fff; + text-align: right; + margin-right: -1px; +} +.header-fixed-up .box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; +} +.header-fixed-up .box-search_logo .box-search_logo_first { + border-top: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo .box-search_logo_last { + border-bottom: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo dd a { + white-space: nowrap; + color: #8C8B8B; + border-left: 1px solid #C0C0C0; + border-right: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo dd a:hover { + color: #5D5D5D; +} +.box-search-logo-item-tips { + display: none; +} +.header-fixed-up .box-search-logo-item-tips { + display: inline; + vertical-align: -5px; + margin-right: 6px; +} +.header-fixed-up .btn-search_ico { + display: none; + display: none !important; +} +.header-fixed-up #kbd { + position: fixed !important; + top: 50px !important; + bottom: 0px !important; +} +.header-fixed-up .baidu_sug, +.header-fixed-up .baidu_video_sug { + margin-right: 0; +} + + +.header-fixed-up .box-search_logo_disabled dt a { + background: 0 0; +} +.header-fixed-up .box-search_logo_disabled dt { + width: 37px; +} +.header-fixed-up .box-search_logo_disabled dt a { + padding-left: 6px; +} +.header-fixed-up .box-search .box-search_logo_disabled dt { + background: none; + background-color: #F0F0F0; +} + + +/*w960*/ +.w960 .header-fixed-up .box-search .sug-search, +.w960 .header-fixed-up .box-search .baidu_sug, +.w960 .header-fixed-up .box-search .baidu_video_sug { + width: 492px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.ps.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.ps.css new file mode 100755 index 000000000..68de949bb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/rtl/rtl.ps.css @@ -0,0 +1,15 @@ +/*for PS*/ +.header-fixed-up .radios { + display: none; + display: none !important; +} +body.header-fixed-up .box-search_logo dt { + padding-left: 15px; + height: 33px; + cursor: pointer; + background: #F2F2F2 url(../img/i-arrow.png) no-repeat 4px 13px; +} +body.header-fixed-up .box-search_logos_show dt { + width: 22px; + background-image: url(../img/i-arrow-open.png); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/i-download-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/i-download-hover.png new file mode 100755 index 000000000..782979aeb Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/i-download-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/i-download.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/i-download.png new file mode 100755 index 000000000..3ff26c520 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/i-download.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/simple-logo-grey.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/simple-logo-grey.png new file mode 100755 index 000000000..659521279 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/simple-logo-grey.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/simple-logo.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/simple-logo.png new file mode 100755 index 000000000..739825e8d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/img/simple-logo.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/ltr/ltr.css new file mode 100755 index 000000000..540128766 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/ltr/ltr.css @@ -0,0 +1,3 @@ +.mod-simple-nav{ + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/ltr/ltr.more.css new file mode 100755 index 000000000..cb32946e4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/ltr/ltr.more.css @@ -0,0 +1,153 @@ +.mod-simple-nav{ + display: block; + background: #fbfbfb; + border-bottom: 1px solid #dfdfdf; + text-align: center; + height: 30px; + /*margin-bottom: 10px;*/ + position: relative; + z-index: 401; +} +.mod-simple-nav .nav-item{ + display: inline-block; + height: 30px; + line-height: 30px; + border: 1px solid #dfdfdf; + margin-left: -1px; + border-top-width: 0; + vertical-align: top; + position: relative; +} +.mod-simple-nav .nav-light:hover .ic-light{ + background: url(../img/simple-logo.png?__sprite) no-repeat 5px 5px; +} +.mod-simple-nav .cur{ + background-color: #fff; + /*border-bottom-color: #fff;*/ + cursor: default; +} +.mod-simple-nav .nav-item-con{ + padding: 0 5px; + display: block; + cursor: pointer; +} +.mod-simple-nav .ic-light{ + background: url(../img/simple-logo-grey.png?__sprite) no-repeat 5px 5px; + width: 16px; + height: 31px; +} +.mod-simple-nav .nav-wrap .nav-color{ + color: #0f7eea; +} +.mod-simple-nav .nav-wrap .nav-item:hover .nav-tips{ + display: block; +} +/*.mod-simple-nav .nav-wrap .nav-item:hover .nav-color{ + color: #1b81e5; +}*/ +.mod-simple-nav .nav-tips { + display: none; + position: absolute; + top: 30px; + left: 50%; +} +.mod-simple-nav .logo-notice{ + display: none; + position: absolute; + left: 50%; +} +.mod-simple-nav .nav-tips .inner{ + width: 100px; + padding: 5px 0; +} +.mod-simple-nav .inner{ + position: relative; + left: -50%; + border: 1px solid #bfbfbf; + color: #666; + background-color: #fff; + width: 230px; + line-height:20px; + border-radius: 2px; + cursor: pointer; +} +.mod-simple-nav .notice-close{ + position: absolute; + display: block; + top: 5px; + right: 5px; + width: 7px; + height: 7px; +} +.mod-simple-nav .arrow-border{ + width: 0; + height: 0; + font-size: 0; + border-color: transparent transparent #bfbfbf; + border-style: dashed dashed solid; + border-width: 8px; + position: absolute; + left: 50%; + margin-left: -8px; + top: -17px; +} +.mod-simple-nav .cur-arrow-border{ + width: 0; + height: 0; + font-size: 0; + border-color: transparent transparent #1b81e5; + border-style: dashed dashed solid; + border-width: 8px; + position: absolute; + left: 50%; + margin-left: -8px; + top: 15px; +} +.mod-simple-nav .arrow{ + width: 0; + height: 0; + font-size: 0; + border-color: transparent transparent #fff; + border-style: dashed dashed solid; + border-width: 8px; + position: absolute; + left: 50%; + margin-left: -8px; + top: -15px; +} +.mod-simple-nav .notice-link{ + padding: 10px; + display: block; +} +.mod-simple-nav .down-wrap{ + width: 1120px; + position: relative; + margin: 0 auto; + margin-top: -27px; +} +.w960 .mod-simple-nav .down-wrap{ + width: 960px; +} +.mod-simple-nav .down-btn{ + display: block; + position: absolute; + border: 1px solid #0f7ee9; + line-height: 20px; + color: #0f7ee9; + left: 0; + padding: 0 5px; +} +.mod-simple-nav .i-download{ + background: url(../img/i-download.png?__sprite) no-repeat; + width: 9px; + height: 10px; + padding-right: 5px; + display: inline-block; +} +.mod-simple-nav .down-btn:hover{ + background-color: #0f7ee9; + color: #fff; +} +.mod-simple-nav .down-btn:hover .i-download{ + background: url(../img/i-download-hover.png?__sprite) no-repeat; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/rtl/rtl.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/rtl/rtl.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/simple-nav-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/simple-nav-async.js new file mode 100755 index 000000000..930e5ccd8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/simple-nav-async.js @@ -0,0 +1,123 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); + +var nav = function(){ + var navOption = { + $wrap: $('.mod-simple-nav'), + logoNotice: conf.logoNotice + }; + $.extend(this, navOption); + this.init(); +}; +nav.prototype = { + init: function(){ + this._bindEvents(); + this._initNotice(); + }, + _bindEvents: function(){ + var self = this; + var $wrap = self.$wrap; + var cookieRedirect = conf.cookieRedirect; + + $wrap.on('click', '.nav-href', function() { + var _this = $(this); + var cookieName = ""; + for(var key in cookieRedirect){ + cookieName = key; + } + if (self._cookie(cookieName)) { + self._cookie(cookieName,'',{expires: 400}); + } + if(self._cookie('newUser') == '0'){ + self._cookie('newUser','1',{expires: 400}); + } + + window.location.reload(); + UT.send({ + type: "others", + modId: "index-nav", + sort: _this.data('ut') + }); + + }); + }, + _initNotice: function(){ + var self = this; + var $wrap = self.$wrap; + var logoNotice = self.logoNotice; + if (logoNotice.text) { + var key = "simpleBackTips"; + if (self._cookie(key) !== 'off') { + var tpl = [ + '
                      ', + '', + '
                      ' + ].join(''); + var $navItem = $wrap.find('.nav-item'); + $navItem.eq(~~logoNotice.index).append(tpl); + + var $logoNotice = $wrap.find('.logo-notice'); + var $logoUl = $wrap.find('ul'); + $logoNotice.show(); + $logoUl.removeClass('nav-wrap'); + + $wrap.on('click', '.notice-link', function() { + self._cookie(key, 'off',{expires: 400}); + $logoUl.addClass('nav-wrap'); + $logoNotice.hide(); + }); + $wrap.on('mousedown', '.notice-close', function(e) { + e.stopPropagation(); + UT.send({ + type: "others", + modId: "simple-nav", + sort: 'close' + }); + self._cookie(key, 'off',{expires: 400}); + $logoNotice.hide(); + $logoUl.addClass('nav-wrap'); + + }); + } + } + }, + _cookie: function(key, value, options) { + + // key and value given, set cookie... + if (arguments.length > 1 && (value === null || typeof value !== "object")) { + //options = jQuery.extend({}, options); + + if (value === null) { + options.expires = -1; + } + if (typeof options.expires === 'number') { + var days = options.expires, + t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? String(value) : encodeURIComponent(String(value)), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function(s) { + return s; + } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; + } + +}; + +module.exports = new nav(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/simple-nav.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/simple-nav.tpl new file mode 100755 index 000000000..a156766ca --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/simple-nav/simple-nav.tpl @@ -0,0 +1,46 @@ +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/header-flat/simple-nav/ltr/ltr.css?__inline'); + <%else%> + @import url('/widget/header-flat/simple-nav/rtl/rtl.css?__inline'); + <%/if%> +<%/style%> +<%* 声明对ltr/rtl的css依赖 *%> +<%require name="common:widget/header-flat/simple-nav/`$head.dir`/`$head.dir`.more.css"%> +<%strip%> +
                      + + <%if $body.simpleNav.downloadInfo.downloadUrl%> + + <%/if%> +
                      +<%/strip%> + +<%script%> + conf.cookieRedirect = <%json_encode($head.cookieRedirect)%>; + conf.logoNotice = <%json_encode($body.simpleNav.logoNotice)%>; + require.async(["common:widget/header-flat/simple-nav/simple-nav-async.js"]); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/img/i-settings-btn-s.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/img/i-settings-btn-s.png new file mode 100755 index 000000000..4e536052e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/img/i-settings-btn-s.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/img/i-settings-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/img/i-settings-btn.png new file mode 100755 index 000000000..2672c0cb3 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/img/i-settings-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/ltr/ltr.css new file mode 100755 index 000000000..cc229b27e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/ltr/ltr.css @@ -0,0 +1,6 @@ +/*.settings { + visibility: hidden; +} +.settings-dropdown { + display: none; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/ltr/ltr.more.css new file mode 100755 index 000000000..22f48a734 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/ltr/ltr.more.css @@ -0,0 +1,95 @@ +/*form inline css*/ +.settings { + visibility: hidden; +} +.settings-dropdown { + display: none; +} + +.settings { + visibility: visible !important; + float: right; + position: relative; +} +.settings-dropdown { + position: absolute; + right: 0; + top: 50px; + width: 120px; + text-align: right; + background-color: #0868C9; + background-color: rgba(0, 99, 199, 0.97); + padding-top: 8px; + padding-bottom: 5px; +} +.settings:hover .settings-dropdown { + display: block; +} +.settings:hover .settings-btn { + background-color: #0063c7; +} +.settings-btn { + display: block; + height: 34px; + padding-top: 16px; + text-align: center; + padding-left: 12px; + padding-right: 12px; +} +.settings-btn .btn-holder { + display: block; + width: 18px; + height: 18px; + background: url(../img/i-settings-btn.png?__sprite) no-repeat; +} +.settings-site a { + color: #FFFFFF; + display: block; + padding-right: 20px; + height: 31px; + line-height: 31px; +} +.settings-site a:hover { + background-color: #075DB5; + background-color: rgba(0,0,0, 0.1); +} +.settings-site a.cur { + cursor: default; + position: relative; + overflow: hidden; +} +.settings-site .cur:after { + content: "\2022"; + position: absolute; + right: 5px; + top: -1px; + line-height: 34px; + height: 34px; + font-size: 34px; + color: #ffffff; + font-family: arial; +} +.settings-site a.cur:hover { + background-color: transparent; +} + +/*has skin*/ +.skin-on .settings:hover .settings-btn, +.skin-on .settings-dropdown { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} +.skin-on .settings-site a:hover { + background-color: #0A0A0A; + background-color: rgba(0,0,0,0.6); +} + + +/*head fixed*/ +.header-fixed-st .userbar-tool .settings-dropdown { + top: 40px; +} +.header-fixed-st .settings .settings-btn { + height: 29px; + padding-top: 11px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/rtl/rtl.css new file mode 100755 index 000000000..cc229b27e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/rtl/rtl.css @@ -0,0 +1,6 @@ +/*.settings { + visibility: hidden; +} +.settings-dropdown { + display: none; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/rtl/rtl.more.css new file mode 100755 index 000000000..bee920da1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/rtl/rtl.more.css @@ -0,0 +1,95 @@ +/*from inline css*/ +.settings { + visibility: hidden; +} +.settings-dropdown { + display: none; +} + + +.settings { + visibility: visible !important; + float: left; + position: relative; +} +.settings-dropdown { + position: absolute; + left: 0; + top: 50px; + width: 120px; + text-align: left; + background-color: #0868C9; + background-color: rgba(0, 99, 199, 0.97); + padding-top: 8px; + padding-bottom: 5px; +} +.settings:hover .settings-dropdown { + display: block; +} +.settings:hover .settings-btn { + background-color: #0063c7; +} +.settings-btn { + display: block; + height: 34px; + padding-top: 16px; + text-align: center; + padding-left: 12px; + padding-right: 12px; +} +.settings-btn .btn-holder { + display: block; + width: 18px; + height: 18px; + background: url(../img/i-settings-btn.png?__sprite) no-repeat; +} +.settings-site a { + color: #FFFFFF; + display: block; + padding-left: 20px; + height: 31px; + line-height: 31px; +} +.settings-site a:hover { + background-color: #075DB5; + background-color: rgba(0,0,0, 0.1); +} +.settings-site a.cur { + cursor: default; + position: relative; + overflow: hidden; +} +.settings-site .cur:after { + content: "\2022"; + position: absolute; + left: 5px; + top: 0px; + line-height: 34px; + height: 34px; + font-size: 34px; + color: #ffffff; + font-family: arial; +} +.settings-site a.cur:hover { + background-color: transparent; +} + +/*has skin*/ +.skin-on .settings:hover .settings-btn, +.skin-on .settings-dropdown { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} +.skin-on .settings-site a:hover { + background-color: #0A0A0A; + background-color: rgba(0,0,0,0.6); +} + +/*head fixed*/ +.header-fixed-st .userbar-tool .settings-dropdown { + top: 40px; +} +.header-fixed-st .settings .settings-btn { + height: 29px; + padding-top: 11px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/site-switch-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/site-switch-async.js new file mode 100755 index 000000000..47a1246ae --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/site-switch-async.js @@ -0,0 +1,30 @@ +/* +* Setting btn including site switching and theme features +* @ by FK +* @require modified by Cgy +*/ +var $ = require("common:widget/ui/jquery/jquery.js"); + +var siteList = $("#siteList"), + curCountry = $("li.site_" + conf.country + " a", siteList); + +curCountry.addClass("cur"); + +$("a", siteList).on("click", function(e) { + if (e.target !== curCountry[0]) { + var la = $(this).attr("data-la"); + // Set cookie for the Accept-language judging + la !== "" && $.cookie("LA", $(this).attr("data-la"), { + expires: 2000, + domain: "hao123.com" + }); + } else { + e.preventDefault(); + } + UT.send({ + position: "siteSwitch", + sort: $(this).attr("href"), + type: "click", + modId: "country" + }); +}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/site-switch.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/site-switch.tpl new file mode 100755 index 000000000..97255de74 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/site-switch/site-switch.tpl @@ -0,0 +1,22 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header-flat/site-switch/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header-flat/site-switch/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="common:widget/header-flat/site-switch/ltr/ltr.more.css"%> +<%else%> + <%require name="common:widget/header-flat/site-switch/rtl/rtl.more.css"%> +<%/if%> + +
                      +<%script%> +require.async(["common:widget/ui/jquery/jquery.js"], function($) { + $(".settings").html(' '); + require.async("common:widget/header-flat/site-switch/site-switch-async.js"); +}); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/addfav-s.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/addfav-s.png new file mode 100755 index 000000000..d02145afb Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/addfav-s.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/addfav.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/addfav.png new file mode 100755 index 000000000..a6598c9be Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/addfav.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/down-s.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/down-s.png new file mode 100755 index 000000000..f8ca8be1d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/down-s.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/down.png new file mode 100755 index 000000000..8b6d2a482 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/setHome-s.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/setHome-s.png new file mode 100755 index 000000000..22cf5cfb6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/setHome-s.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/setHome.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/setHome.png new file mode 100755 index 000000000..060ce1b43 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/img/setHome.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/ltr/ltr.css new file mode 100755 index 000000000..fc8d34d08 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/ltr/ltr.css @@ -0,0 +1,3 @@ +/*.userbar-btn { + visibility: hidden; +}*/ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/ltr/ltr.more.css new file mode 100755 index 000000000..7c74b5398 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/ltr/ltr.more.css @@ -0,0 +1,89 @@ +.userbar-btn { + float: right; + position: relative; + visibility: visible !important; +} +.userbar-btn .btn-item { + float: left; + position: relative; +} +.userbar-btn .btn-item:hover { + background-color: #0A69C9; + background-color: rgba(0,99,199,0.96); +} +.userbar-btn .btn-item-anchor { + display: block; + width: 42px; + height: 50px; + white-space: nowrap; + text-align: center; + overflow: hidden; +} +.userbar-btn .btn-item i { + margin-left: auto; + margin-right: auto; + display: block; +} +.userbar-btn .btn-item-tips { + position: absolute; + left: 50%; + margin-left: -81px; + display: none; + background-color: #0A69C9; + background-color: rgba(0, 99, 199, 0.96); +} +.userbar-btn .btn-item:hover .btn-item-tips { + display: block; +} + +.userbar-btn .btn-item-tips p,.userbar-btn #shortCutBot a { + height: 51px; + width: 163px; + display: block; + white-space: nowrap; + overflow: hidden; + text-align: center; + line-height: 51px; + cursor: pointer; + font-size: 12px; + color: #ffffff; +} +.userbar-btn .btn-addfav { + width: 21px; + height: 20px; + margin-top: 15px; + background: url(../img/addfav.png?__sprite) no-repeat; +} +.userbar-btn .btn-down { + width: 17px; + height: 17px; + margin-top: 17px; + background: url(../img/down.png?__sprite) no-repeat; +} +.userbar-btn .btn-sethome { + width: 19px; + height: 18px; + margin-top: 16px; + background: url(../img/setHome.png?__sprite) no-repeat; +} + +/*has skin*/ +.skin-on .userbar-btn .btn-item:hover, +.skin-on .userbar-btn .btn-item-tips { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} + +/*head fixed*/ +.header-fixed-st .userbar-btn .btn-item-anchor { + height: 40px; +} +.header-fixed-st .userbar-btn .btn-down { + margin-top: 12px; +} +.header-fixed-st .userbar-btn .btn-addfav { + margin-top: 10px; +} +.header-fixed-st .userbar-btn .btn-sethome { + margin-top: 11px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/rtl/rtl.css new file mode 100755 index 000000000..0c4dfd138 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/rtl/rtl.css @@ -0,0 +1,3 @@ +/*.userbar-btn { + visibility: hidden; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/rtl/rtl.more.css new file mode 100755 index 000000000..e8faefdf3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/rtl/rtl.more.css @@ -0,0 +1,89 @@ +.userbar-btn { + float: left; + position: relative; + visibility: visible !important; +} +.userbar-btn .btn-item { + float: right; + position: relative; +} +.userbar-btn .btn-item:hover { + background-color: #0A69C9; + background-color: rgba(0,99,199,0.96); +} +.userbar-btn .btn-item-anchor { + display: block; + width: 42px; + height: 50px; + white-space: nowrap; + text-align: center; + overflow: hidden; +} +.userbar-btn .btn-item i { + margin-left: auto; + margin-right: auto; + display: block; +} +.userbar-btn .btn-item-tips { + position: absolute; + right: 50%; + margin-right: -81px; + display: none; + background-color: #0A69C9; + background-color: rgba(0, 99, 199, 0.96); +} +.userbar-btn .btn-item:hover .btn-item-tips { + display: block; +} + +.userbar-btn .btn-item-tips p,.userbar-btn #shortCutBot a { + height: 51px; + width: 163px; + display: block; + white-space: nowrap; + overflow: hidden; + text-align: center; + line-height: 51px; + cursor: pointer; + font-size: 12px; + color: #ffffff; +} +.userbar-btn .btn-addfav { + width: 21px; + height: 20px; + margin-top: 15px; + background: url(../img/addfav.png?__sprite) no-repeat; +} +.userbar-btn .btn-down { + width: 17px; + height: 17px; + margin-top: 17px; + background: url(../img/down.png?__sprite) no-repeat; +} +.userbar-btn .btn-sethome { + width: 19px; + height: 18px; + margin-top: 16px; + background: url(../img/setHome.png?__sprite) no-repeat; +} + +/*has skin*/ +.skin-on .userbar-btn .btn-item:hover, +.skin-on .userbar-btn .btn-item-tips { + background-color: #333333; + background-color: rgba(0, 0, 0, 0.8); +} + +/*head fixed*/ +.header-fixed-st .userbar-btn .btn-item-anchor { + height: 40px; +} +.header-fixed-st .userbar-btn .btn-down { + margin-top: 12px; +} +.header-fixed-st .userbar-btn .btn-addfav { + margin-top: 10px; +} +.header-fixed-st .userbar-btn .btn-sethome { + margin-top: 11px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js new file mode 100755 index 000000000..d62cd2496 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/userbar-btn-header-async.js @@ -0,0 +1,92 @@ +/* +* User Bar Buttons +* html改为JS动态拼接 +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var helper = require("common:widget/ui/helper/helper.js"); +require("common:widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js"); +require("common:widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js"); + +var _conf = conf.userbarBtnHd; + + +_conf.browser.reverse(); + +var _browser = _conf.browser, + _addfav = _conf.addfav, + _download = _conf.download, + _sethome = _conf.sethome, + _browserData = _conf.browserData, + _itemTpl = '
                      #{content}

                      #{botContent}

                      ', + _itemMsg = { + addfav: { + 'display': (_browserData == 'addfav' ? ' style="display: none;"' : ''), + 'url': _addfav.url, + 'id': 'addFav', + 'retrn': ' onclick="return false;"', + 'content': _addfav.content || '', + 'botId': 'addFavBot', + 'botContent': _addfav.title + }, + download: { + 'display': (_browserData == 'download' ? ' style="display: none;"' : ''), + 'url': _download.url, + 'id': 'shortCut', + 'retrn': '', + 'content': _download.content || '', + 'botId': 'shortCutBot', + 'botContent': '' +_download.title +'' + }, + sethome: { + 'display': (_browserData == 'sethome' ? ' style="display: none;"' : ''), + 'url': _sethome.url, + 'id': 'setHome', + 'retrn': ' onclick="return false;"', + 'content': _sethome.content || '', + 'botId': 'setHomeBot', + 'botContent': _sethome.title + } + }, + _tplGroup = '', + curObj = null, + wrap = $("#userbarBtnHd"); + +for (var m = 0, n = _browser.length; m < n; m++) { + curObj = _browser[m]; + _tplGroup += helper.replaceTpl(_itemTpl, _itemMsg[curObj]); +} +wrap.html(_tplGroup); + +//userbar buttons +var userbarBtn = function() { + wrap.on("click", ".btn-item-anchor, .btn-item-tips p", function(e) { + var curTarget = $(this), + curAttr = curTarget.attr("id").replace(/Bot/, ""); + + if (/addFav/i.test(curAttr)) { + curTarget.addfav(_addfav.error, window.location.href); + } else if (/setHome/i.test(curAttr)) { + curTarget.sethome(); + } + if (curTarget.get(0).tagName === "A") { + UT.send({ + position: "sethp-btn", + sort: curAttr, + type: "click", + modId: "sethp-btn" + }); + } else { + UT.send({ + position: "sethp-btn", + ac: "b", + sort: curAttr, + type: "click", + modId: "sethp-btn" + }); + } + + }); +}; +module.exports = userbarBtn; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/userbar-btn-header.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/userbar-btn-header.tpl new file mode 100755 index 000000000..6079b12b3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/userbar-btn-header/userbar-btn-header.tpl @@ -0,0 +1,58 @@ +<%style%> +<%if $head.dir=='ltr'%> + @import url('/widget/header-flat/userbar-btn-header/ltr/ltr.css?__inline'); +<%else%> + @import url('/widget/header-flat/userbar-btn-header/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="common:widget/header-flat/userbar-btn-header/ltr/ltr.more.css"%> +<%else%> + <%require name="common:widget/header-flat/userbar-btn-header/rtl/rtl.more.css"%> +<%/if%> + + <%if strpos($smarty.server["HTTP_USER_AGENT"], "MSIE")%> + <%assign var="browser" value=$body.userbarBtn.ie%> + <%if $body.headerTest.userbarBtnIsHidden == "1"%> + <%assign var="browserData" value=$body.headerTest.userbarBtn.ie%> + <%/if%> + <%elseif strpos($smarty.server["HTTP_USER_AGENT"], "Firefox")%> + <%assign var="browser" value=$body.userbarBtn.firefox%> + <%if $body.headerTest.userbarBtnIsHidden == "1"%> + <%assign var="browserData" value=$body.headerTest.userbarBtn.firefox%> + <%/if%> + <%else%> + <%assign var="browser" value=$body.userbarBtn.chrome%> + <%if $body.headerTest.userbarBtnIsHidden == "1"%> + <%assign var="browserData" value=$body.headerTest.userbarBtn.chrome%> + <%/if%> + <%/if%> +
                      +
                      + <%script%> + conf.userbarBtnHd = { + browser: <%json_encode($browser)%>, + browserData: '<%$browserData|default:""%>', + addfav: { + 'content': '<%$body.addFav.content%>', + 'title': '<%$body.addFav.title%>', + 'url': '<%$body.addFav.url%>', + 'error': '<%$body.addFav.error%>' + }, + download: { + 'content': '<%$body.download.content%>', + 'title': '<%$body.download.title%>', + 'url': '<%$body.download.url%>' + }, + sethome: { + 'content': '<%$body.setHome.content%>', + 'title': '<%$body.setHome.title%>', + 'url': '<%$body.setHome.url%>' + } + }; + require.async(["common:widget/header-flat/userbar-btn-header/userbar-btn-header-async.js"],function(init){ + init(); + }); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ae/ae.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ae/ae.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ae/ae.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ae/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ae/weather-city.json new file mode 100755 index 000000000..347e3dd1d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ae/weather-city.json @@ -0,0 +1,43 @@ +{ + "9-127164_1_AL": "Cairo", + "6-207321_1_AL": "Alexandria", + "12-127047_1_AL": "El-Giza", + "4-130201_1_AL": "Luxor", + "6-127335_1_AL": "Zagazig", + "5-127358_1_AL": "Aswan", + "15-126919_1_AL": "El Fayoum", + "126996": "Ismailia", + "7-127484_1_AL": "Port Said", + "5-127330_1_AL": "Suez", + "3-127049_1_AL": "Shibin el-Kom", + "3-126883_1_AL": "Hurghada", + "129332": "Mersa Matruh", + "4-297030_1_AL": "Riyadh", + "3-299429_1_AL": "Jeddah", + "3-299427_1_AL": "Mecca", + "5-296807_1_AL": "Medina", + "4-321626_1_AL": "Abu Dhabi", + "323091": "Dubai", + "8-1280745_1_AL": "Fujairah", + "2-245072_1_AL": "Rabat", + "4-6368_1_AL": "Tangier", + "2-243353_1_AL": "Casablanca", + "3-244231_1_AL": "Marrakech", + "1135733": "Tunis", + "320522": "Sfax", + "317198": "Bizerte", + "1888491": "Algiers", + "2115": "Annaba", + "3-227342_1_AL": "Beirut", + "3-230555_1_AL": "Tripoli", + "3-314446_1_AL": "Damascus", + "3-313468_1_AL": "Aleppo", + "1-313556_1_AL": "Hims", + "13-222056_1_AL": "Kuwait City", + "4-271669_1_AL": "Doha", + "6-29687_1_AL": "Al Manama", + "3-258638_1_AL": "Muscat", + "4-258843_1_AL": "Khassab", + "2-221790_1_AL": "Amman", + "14-221898_1_AL": "Al Aqabah" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ar/ar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ar/ar.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ar/ar.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ar/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ar/weather-city.json new file mode 100755 index 000000000..e11cbbe84 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ar/weather-city.json @@ -0,0 +1,43 @@ +{ + "9-127164_1_AL": "\u0627\u0644\u0642\u0627\u0647\u0631\u0629", + "6-207321_1_AL": "\u0627\u0644\u0627\u0633\u0643\u0646\u062f\u0631\u064a\u0629", + "12-127047_1_AL": "\u0627\u0644\u062c\u064a\u0632\u0629", + "4-130201_1_AL": "\u0627\u0644\u0623\u0642\u0635\u0631", + "6-127335_1_AL": "\u0627\u0644\u0632\u0642\u0627\u0632\u064a\u0642", + "5-127358_1_AL": "\u0623\u0633\u0648\u0627\u0646", + "15-126919_1_AL": "\u0627\u0644\u0641\u064a\u0648\u0645", + "126996": "\u0627\u0644\u0627\u0633\u0645\u0627\u0639\u064a\u0644\u064a\u0629", + "7-127484_1_AL": "\u0628\u0648\u0631 \u0633\u0639\u064a\u062f", + "5-127330_1_AL": "\u0627\u0644\u0633\u0648\u064a\u0633", + "3-127049_1_AL": "\u0634\u0628\u064a\u0646 \u0627\u0644\u0643\u0648\u0645", + "3-126883_1_AL": "\u0627\u0644\u063a\u0631\u062f\u0642\u0629", + "129332": "\u0645\u0631\u0633\u0649 \u0645\u0637\u0631\u0648\u062D", + "4-297030_1_AL": "\u0627\u0644\u0631\u064a\u0627\u0636", + "3-299429_1_AL": "\u062c\u062f\u0629", + "3-299427_1_AL": "\u0645\u0643\u0629 \u0627\u0644\u0645\u0643\u0631\u0645\u0629", + "5-296807_1_AL": "\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629", + "4-321626_1_AL": "\u0623\u0628\u0648 \u0638\u0628\u064a", + "323091": "\u062f\u0628\u0649", + "8-1280745_1_AL": "\u0627\u0644\u0641\u062c\u064a\u0631\u0629", + "2-245072_1_AL": "\u0627\u0644\u0631\u0628\u0627\u0637", + "4-6368_1_AL": "\u0637\u0646\u062c\u0629", + "2-243353_1_AL": "\u0627\u0644\u062f\u0627\u0631 \u0627\u0644\u0628\u064a\u0636\u0627\u0621", + "3-244231_1_AL": "\u0645\u0631\u0627\u0643\u0634", + "1135733": "\u062a\u0648\u0646\u0633", + "320522": "\u0635\u0641\u0627\u0642\u0633", + "317198": "\u0628\u0646\u0632\u0631\u062a", + "1888491": "\u0627\u0644\u062c\u0632\u0627\u0626\u0631", + "2115": "\u0639\u0646\u0627\u0628\u0629", + "3-227342_1_AL": "\u0628\u064a\u0631\u0648\u062a", + "3-230555_1_AL": "\u0637\u0631\u0627\u0628\u0644\u0633", + "3-314446_1_AL": "\u062f\u0645\u0634\u0642", + "3-313468_1_AL": "\u062d\u0644\u0628", + "3-313556_1_AL": "\u062d\u0645\u0635", + "13-222056_1_AL": "\u0627\u0644\u0643\u0648\u064a\u062a", + "4-271669_1_AL": "\u0627\u0644\u062f\u0648\u062d\u0629", + "6-29687_1_AL": "\u0627\u0644\u0645\u0646\u0627\u0645\u0629", + "3-258638_1_AL": "\u0645\u0633\u0642\u0637", + "4-258843_1_AL": "\u062e\u0635\u0628", + "2-221790_1_AL": "\u0639\u0645\u0627\u0646", + "14-221898_1_AL": "\u0627\u0644\u0639\u0642\u0628\u0629" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/br/br.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/br/br.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/br/br.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/br/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/br/weather-city.json new file mode 100755 index 000000000..58244fcee --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/br/weather-city.json @@ -0,0 +1,29 @@ +{ + "45881": "S\u00e3o Paulo - SP", + "45449": "Rio de Janeiro - RJ", + "36757": "Aracaju - SE", + "44857": "Bel\u00e9m - PA", + "44403": "Belo Horizonte - MG", + "35950": "Boa Vista - RR", + "43348": "Bras\u00edlia - DF", + "33738": "Campo Grande - MS", + "44281": "Cuiab\u00e1 - MT", + "44944": "Curitiba - PR", + "35952": "Florian\u00f3polis - SC", + "43346": "Fortaleza - CE", + "43599": "Goi\u00e2nia - GO", + "34631": "Jo\u00e3o Pessoa - PB", + "31913": "Macei\u00f3 - AL", + "64": "Macap\u00e1 - AP", + "42471": "Manaus - AM", + "35658": "Natal - RN", + "36879": "Palmas - TO", + "45561": "Porto Alegre - RS", + "35941": "Porto Velho - RO", + "45090": "Recife - PE", + "31909": "Rio Branco - AC", + "43080": "Salvador - BA", + "44127": "S\u00e3o Lu\u00eds - MA", + "45253": "Teresina - PI", + "32929": "Vit\u00f3ria - ES" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/en/en.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/en/en.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/en/en.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/en/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/en/weather-city.json new file mode 100755 index 000000000..81c341ef2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/en/weather-city.json @@ -0,0 +1 @@ +{"zmw:00000.1.58968":"\u81fa\u5317","zmw:00000.1.46751":"\u81fa\u4e2d\u5e02","zmw:00000.1.59358":"\u81fa\u5357","zmw:00000.1.46740":"\u9ad8\u96c4","zmw:00000.1.46745":"\u5ca1\u5c71","zmw:00000.2.46694":"\u57fa\u9686","zmw:00000.1.46756":"\u65b0\u7af9\u7e23","zmw:00000.1.46746":"\u5609\u7fa9","zmw:00000.1.58965":"\u6843\u5712\u7e23","zmw:00000.1.46750":"\u5c4f\u6771\u7e23","zmw:00000.1.59559":"\u6052\u6625\u93ae","zmw:00000.1.59162":"\u5b9c\u862d\u5e02","zmw:00000.1.46706":"\u8607\u6fb3\u93ae","zmw:00000.3.59362":"\u82b1\u84ee\u7e23","zmw:00000.1.59562":"\u81fa\u6771\u5e02","zmw:00000.1.46754":"\u5927\u6b66\u9109"} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/id/id.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/id/id.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/id/id.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/id/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/id/weather-city.json new file mode 100755 index 000000000..874da9f6d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/id/weather-city.json @@ -0,0 +1,24 @@ +{ + "208971": "Jakarta", + "205110": "Banda Aceh", + "210188": "Bandar Lampung", + "208977": "Bandung", + "209036": "Banjarmasin", + "1127709": "Batam", + "202574": "Bekasi", + "202507": "Bogor", + "202196": "Denpasar", + "202649": "Depok", + "211242": "Makassar", + "208996": "Malang", + "211298": "Medan", + "206120": "Padang", + "211288": "Palembang", + "205619": "Pekanbaru", + "203749": "Samarinda", + "208981": "Semarang", + "203449": "Surabaya", + "202242": "Tangerang", + "202512": "Tasikmalaya", + "211671": "Yogyakarta" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/del_ative.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/del_ative.png new file mode 100755 index 000000000..12bb63a4f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/del_ative.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/del_gray.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/del_gray.png new file mode 100755 index 000000000..efb7884bf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/del_gray.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/drop-down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/drop-down.png new file mode 100755 index 000000000..4394dd9f7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/drop-down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/drop-up.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/drop-up.png new file mode 100755 index 000000000..53e314967 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/drop-up.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/i-weather-hum.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/i-weather-hum.png new file mode 100755 index 000000000..70c549e17 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/i-weather-hum.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/i-weather-more-hum.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/i-weather-more-hum.png new file mode 100755 index 000000000..a745bb196 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/i-weather-more-hum.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/light.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/light.png new file mode 100755 index 000000000..f8e4516b9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/img/light.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/jp/jp.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/jp/jp.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/jp/jp.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/jp/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/jp/weather-city.json new file mode 100755 index 000000000..7a07256fe --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/jp/weather-city.json @@ -0,0 +1,146 @@ +{ + "4-223985_1_AL": "\u672d\u5e4c", + "8-217875_1_AL": "\u91e7\u8def", + "2-217787_1_AL": "\u7a1a\u5185", + "6-223986_1_AL": "\u65ed\u5ddd", + "5-217907_1_AL": "\u7559\u840c", + "4-217942_1_AL": "\u7db2\u8d70", + "10-217792_1_AL": "\u5317\u898b", + "5-218128_1_AL": "\u7d0b\u5225", + "4-217892_1_AL": "\u6839\u5ba4", + "5-217794_1_AL": "\u5e2f\u5e83", + "6-217784_1_AL": "\u5ca9\u898b\u6ca2", + "1-217876_1_AL": "\u5036\u77e5\u5b89", + "4-217793_1_AL": "\u5ba4\u862d", + "1-2334234_1_AL": "\u6d66\u6cb3", + "6-223987_1_AL": "\u51fd\u9928", + "217843": "\u6c5f\u5dee", + "4-224683_1_AL": "\u4ed9\u53f0", + "4-222341_1_AL": "\u9752\u68ee", + "6-216904_1_AL": "\u3080\u3064", + "8-216886_1_AL": "\u516b\u6238", + "4-224170_1_AL": "\u76db\u5ca1", + "4-218332_1_AL": "\u5bae\u53e4", + "4-218342_1_AL": "\u5927\u8239\u6e21", + "4-221897_1_AL": "\u79cb\u7530", + "5-216836_1_AL": "\u6a2a\u624b", + "4-221567_1_AL": "\u5c71\u5f62", + "4-221569_1_AL": "\u7c73\u6ca2", + "4-221570_1_AL": "\u9152\u7530", + "6-221591_1_AL": "\u65b0\u5e84", + "4-223551_1_AL": "\u798f\u5cf6", + "217436": "\u5c0f\u540d\u6d5c", + "224683": "\u4ed9\u53f0", + "218964": "\u77f3\u5dfb", + "217415": "\u82e5\u677e", + "218990": "\u767d\u77f3", + "2-226396_1_AL": "\u6771\u4eac", + "4-224374_1_AL": "\u6a2a\u6d5c", + "4-724_1_AL": "\u5c0f\u7530\u539f", + "221048": "\u5927\u5cf6", + "1510182": "\u516b\u4e08\u5cf6", + "1652504": "\u7236\u5cf6", + "4-220908_1_AL": "\u718a\u8c37", + "1-220889_1_AL": "\u79e9\u7236", + "4-223069_1_AL": "\u5343\u8449", + "6-309_1_AL": "\u929a\u5b50", + "6-216952_1_AL": "\u9928\u5c71", + "4-218223_1_AL": "\u6c34\u6238", + "4-226389_1_AL": "\u5b87\u90fd\u5bae", + "221137": "\u5927\u7530\u539f", + "1-223622_1_AL": "\u524d\u6a4b", + "1-221693_1_AL": "\u7532\u5e9c", + "4-224701_1_AL": "\u9577\u91ce", + "8-219098_1_AL": "\u677e\u672c", + "4-219097_1_AL": "\u98ef\u7530", + "2012157": "\u3055\u3044\u305f\u307e", + "218236": "\u571f\u6d66", + "1-2334040_1_AL": "\u6cb3\u53e3\u6e56", + "2423804": "\u307f\u306a\u304b\u307f", + "4-224807_1_AL": "\u65b0\u6f5f", + "4-224165_1_AL": "\u91d1\u6ca2", + "4-219302_1_AL": "\u9577\u5ca1", + "4-219303_1_AL": "\u9ad8\u7530", + "4-226415_1_AL": "\u5bcc\u5c71", + "221279": "\u4f0f\u6728", + "1-218305_1_AL": "\u8f2a\u5cf6", + "4-223540_1_AL": "\u798f\u4e95", + "5-217288_1_AL": "\u6566\u8cc0", + "2014153": "\u76f8\u5ddd", + "4-221855_1_AL": "\u540d\u53e4\u5c4b", + "1-221859_1_AL": "\u8c4a\u6a4b", + "1-223600_1_AL": "\u5c90\u961c", + "4-217488_1_AL": "\u9ad8\u5c71", + "1-226089_1_AL": "\u9759\u5ca1", + "1523": "\u7db2\u4ee3", + "221060": "\u4e09\u5cf6", + "5-226090_1_AL": "\u6d5c\u677e", + "218908": "\u6d25", + "2-944_1_AL": "\u5c3e\u9df2", + "10-225007_1_AL": "\u5927\u962a", + "4-224023_1_AL": "\u795e\u6238", + "218187": "\u8c4a\u5ca1", + "224436": "\u4eac\u90fd", + "4-218698_1_AL": "\u821e\u9db4", + "5-220939_1_AL": "\u5927\u6d25", + "1-220944_1_AL": "\u5f66\u6839", + "4-224769_1_AL": "\u5948\u826f", + "4-226509_1_AL": "\u548c\u6b4c\u5c71", + "219281": "\u98a8\u5c4b", + "1505444": "\u6f6e\u5cac", + "4-223955_1_AL": "\u5e83\u5cf6", + "4-221238_1_AL": "\u9ce5\u53d6", + "4-221241_1_AL": "\u7c73\u5b50", + "4-220975_1_AL": "\u677e\u6c5f", + "4-220976_1_AL": "\u6d5c\u7530", + "2333845": "\u897f\u90f7", + "4-224935_1_AL": "\u5ca1\u5c71", + "1-219446_1_AL": "\u6d25\u5c71", + "1-217744_1_AL": "\u5e84\u539f", + "1-226560_1_AL": "\u4e0b\u95a2", + "221623": "\u5c71\u53e3", + "4-221659_1_AL": "\u67f3\u4e95", + "4-221624_1_AL": "\u8429", + "1-224395_1_AL": "\u9ad8\u77e5", + "4-224352_1_AL": "\u9ad8\u677e", + "4-223539_1_AL": "\u677e\u5c71", + "217238": "\u65b0\u5c45\u6d5c", + "1-217236_1_AL": "\u5b87\u548c\u5cf6", + "4-226392_1_AL": "\u5fb3\u5cf6", + "218601": "\u5ba4\u6238", + "218617": "\u6e05\u6c34", + "1-221183_1_AL": "\u65e5\u548c\u4f50", + "4-223544_1_AL": "\u798f\u5ca1", + "1-224369_1_AL": "\u9e7f\u5150\u5cf6", + "223545": "\u516b\u5e61", + "4-217320_1_AL": "\u98ef\u585a", + "4-217333_1_AL": "\u4e45\u7559\u7c73", + "4-219768_1_AL": "\u4f50\u8cc0", + "1-219769_1_AL": "\u4f0a\u4e07\u91cc", + "4-224706_1_AL": "\u9577\u5d0e", + "1-219187_1_AL": "\u4f50\u4e16\u4fdd", + "2333734": "\u53b3\u539f", + "10-219200_1_AL": "\u798f\u6c5f", + "4-224428_1_AL": "\u718a\u672c", + "1-218666_1_AL": "\u725b\u6df1", + "1-218650_1_AL": "\u4eba\u5409", + "5-224930_1_AL": "\u5927\u5206", + "5-219398_1_AL": "\u4e2d\u6d25", + "4-219394_1_AL": "\u65e5\u7530", + "5-219395_1_AL": "\u4f50\u4f2f", + "4-224686_1_AL": "\u5bae\u5d0e", + "1-219035_1_AL": "\u5ef6\u5ca1", + "2-219034_1_AL": "\u90fd\u57ce", + "2333684": "\u540d\u702c", + "1-218434_1_AL": "\u9e7f\u5c4b", + "2-3492_1_POI_AL": "\u7a2e\u5b50\u5cf6", + "2333690": "\u9ad8\u5343\u7a42", + "218649": "\u963f\u8607\u4e59\u59eb", + "1-224944_1_AL": "\u90a3\u8987", + "1-2012155_1_AL": "\u4e45\u7c73\u5cf6", + "5-219499_1_AL": "\u540d\u8b77", + "1779977": "\u5357\u5927\u6771\u5cf6", + "2333670": "\u5bae\u53e4\u5cf6", + "219525": "\u77f3\u57a3\u5cf6", + "219564": "\u4e0e\u90a3\u56fd\u5cf6" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr-c.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr-c.css new file mode 100755 index 000000000..833e87dfc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr-c.css @@ -0,0 +1,3 @@ +/*.userbar-weather{ + display: none; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr.more.css new file mode 100755 index 000000000..a6a77afae --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr.more.css @@ -0,0 +1,419 @@ +/* weather */ +/* @require common:widget/ui/prompt/prompt.css */ + +#weatherView img { + width: 32px; +} +.userbar-weather { + font-size: 12px; + position: relative; + display: block !important; + height: 45px; + margin-right: 20px; + padding-top: 5px; + white-space: nowrap; + color: #fff; + *z-index: 9; +} +.userbar-weather .fl { + overflow: hidden; + width: 228px; + height: 50px; + margin-left: 10px; +} +.userbar-weather_console { + display: none; +} +.userbar-weather ul { + margin-top: 5px; +} +.userbar-weather_console, +.userbar-weather img, +.userbar-weather .weather-info { + float: left; +} +.userbar-weather li { + display: block; + float: left; + margin-right: 45px; + _margin-right: 35px; +} +.userbar-weather li.weather_last { + margin-right: 0; +} +.userbar-weather img { + margin-right: 10px; +} +.userbar-weather span { + font-weight: bold; +} +.userbar-weather p { + margin: 2px 0; +} +.weather_last { + visibility: hidden; +} +.text { + visibility: hidden; +} +.dot_img { + left: 10px; + display: inline-block; + width: 9px; + height: 16px; + margin-right: 5px; + margin-bottom: -5px; + margin-left: 20px; + background: url(../img/i-weather-hum.png?__sprite) no-repeat; +} + +/* --------more--------- */ +/* weather */ +/* @require common:widget/ui/prompt/prompt.css */ +.userbar-weather_console { + display: inline-block; + height: 38px; + margin-right: 20px; + _margin-right: 11px; + _width: 200px; +} +.userbar-weather_console a { + color: #fff; +} +.userbar-weather_city { + line-height: 15px; + position: relative; + z-index: 11; + padding-right: 7px; + text-align: right; +} +.userbar-weather_city-cur { + position: absolute; + left: -84px; + height: 15px; + white-space: nowrap; +} +.userbar-weather_city-cur a { + padding-right: 10px; +} +.userbar-weather_city-click a { + background-position: right -442px; +} +.city-select { + z-index: 11; + top: 16px; + right: -8px; + text-align: left; +} +.city-select .box-prompt-inner { + overflow: visible; + *width: 100%; + _width: auto; +} +.city-select p { + font-size: 12px; + margin: 0; +} +.city-select label { + display: block; + margin-bottom: 5px; +} +.city-select select { + width: 160px; + margin-bottom: 7px; + border: 1px solid #d7d7d9; +} +.city-select .btn-bar { + width: 160px; + text-align: center; +} +.weather-days { + line-height: 25px; + position: relative; + display: block; + height: 25px; + margin-top: 5px; + padding: 0 7px; + border: 1px solid #009e69; + border-bottom: 0 none; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + -o-border-radius: 2px; + _float: right; +} +.weather-days_click { + border: 1px solid #00ad73; + border-bottom: 0 none; +} +.weather-days p { + line-height: 25px; + display: block; + margin: 0; +} +.weather-days_click p { + background-position: 50% -35px; +} +.weather-days:hover { + -webkit-border-top-left-radius: 2px; + border-top-left-radius: 2px; + -webkit-border-top-right-radius: 2px; + border-top-right-radius: 2px; + background: #009e69; + -moz-border-top-left-radius: 2px; + -o-border-top-left-radius: 2px; + -moz-border-top-right-radius: 2px; + -o-border-top-right-radius: 2px; +} +.weather-more_show .weather-more { + display: block; +} +.weather-more li { + font-size: 14px; + padding: 20px 0; + text-align: center; + color: #fff; +} +.weather-more li a { + display: block; + width: 100%; + height: 159px; + color: #fff; +} +.weather-more li a:hover { + background-color: #075db5; + background-color: rgba(0, 0, 0, .1); +} +.weather-more li img { + padding: 10px 0; +} +.weather-more span { + padding: 0 5px; +} +.weather-more_odd { + background: #117a57; + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + -moz-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + -o-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; +} +.weather-more_today p { + font-weight: bold; +} +.weather_last { + width: 40px; +} +.humidity { + left: 5px; +} +.dot_img_head { + left: 10px; + display: inline-block; + width: 9px; + height: 16px; + margin-bottom: -5px; + margin-left: 10px; + background: url(../img/i-weather-more-hum.png?__sprite) no-repeat; +} +.userbar-weather_tip { + font-size: 12px; + position: absolute; + z-index: 10; + top: 49px; + right: -28px; + width: 190px; + padding: 2px 32px 2px 12px; + color: #454545; + border: 1px solid #ffa97e; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + background-color: #fff8f4; + -o-border-radius: 2px; +} +.userbar-weather_tip .arrow, +.userbar-weather_tip .arrow_bg { + position: absolute; + width: 0; + height: 0; + border: 8px dashed transparent; +} +.userbar-weather_tip .arrow { + top: -18px; + left: 19px; + border-width: 9px; + border-bottom-style: solid; + border-bottom-color: #ffb793; +} +.userbar-weather_tip .arrow_bg { + margin: -7px -8px 0 -8px; + border-bottom-style: solid; + border-bottom-color: #fcfefd; + _margin-top: -22px; +} +.userbar-weather_tip .tips-close { + position: absolute; + top: 5px; + right: 5px; + display: block; + width: 12px; + height: 12px; + cursor: pointer; + background: url(../img/del_gray.png?__sprite) no-repeat; +} +.userbar-weather_tip .tips-close_hover { + background: url(../img/del_ative.png?__sprite) no-repeat; +} +.userbar-weather_tip p { + line-height: 1.5; + white-space: normal; + text-indent: 16px; +} +.userbar-weather_tip .tips-light { + position: absolute; + top: 4px; + left: 12px; + display: inline-block; + width: 12px; + height: 16px; + background: url(../img/light.png?__sprite) no-repeat; +} +.userbar-weather .dropdown-list li { + line-height: 40px; + display: list-item; + float: none; + height: 40px; + margin-right: 0; + text-indent: 20px; + _margin-right: 0; +} +.userbar-weather .dropdown-list li:hover, +.userbar-weather .dropdown-list-hover { + background-color: #1974ce; +} +.userbar-weather .dropdown-trigger { + font-size: 18px; + height: 40px; + color: #fff; + border-width: 0; + background-color: #1c81e5; +} +.userbar-weather .dropdown .dropdown-input { + font-size: 18px; + font-weight: normal; + line-height: 40px; + width: 280px !important; + height: 40px; + padding-right: 40px; + padding-left: 20px; + background-color: #1c81e5; +} +.userbar-weather .dropdown .dropdown-arrow { + top: 0; + right: 0; + width: 40px; + height: 40px; + border-width: 0; + background: url(../img/drop-up.png?__sprite) no-repeat; +} +.userbar-weather .dropdown .dropdown-arrow i { + display: none; +} +.userbar-weather .dropdown .dropdown-arrow-up { + background: url(../img/drop-down.png?__sprite) no-repeat; +} +.userbar-weather .dropdown-list { + font-size: 18px; + font-weight: normal; + border-width: 0; + background-color: #1c81e5; +} +.userbar-weather .dropdown-list .dropdown-list-inner { + margin-top: 0; + background-color: #1c81e5; + -webkit-backface-visibility: hidden; +} +#weatherView li#carRestrict { + margin-left: 7px; +} +#weatherView li span.car-restrict-num { + font-size: 17px; + line-height: 28px; + display: inline-block; + width: 23px; + height: 28px; + margin: 3px 0 0 3px; + text-align: center; + vertical-align: top; + color: #ffda5a; + background: #006cd9; +} +#weatherView li span.car-restrict-name { + font-size: 12px; + font-weight: 500; + line-height: 16px; + display: inline-block; + overflow: hidden; + width: 95px; + margin: 1px 0 0 3px; + text-align: center; + word-break: break-all; + color: #fff; +} +#weatherView li span.car-restrict-and { + font-weight: 500; + line-height: 32px; + display: inline-block; + height: 32px; + margin: 0 5px; + vertical-align: top; +} +.w960 #weatherView li#carRestrict { + display: none; +} + +/* head fixed */ +.header-fixed .userbar-weather_tip { + display: none !important; +} +.header-fixed #carRestrict { + display: none !important; +} +.header-fixed-st #weatherView li img { + width: 32px; + height: 28px; + margin-top: -8px; +} +.header-fixed-st .weather-info .text { + display: inline; + margin-right: 4px; +} +.header-fixed-st .weather-wrap .userbar-weather { + height: 40px; +} +.header-fixed-st .userbar-weather div.fl { + height: 30px; + padding: 8px 40px 2px 16px; +} +.header-fixed-st .weather-info { + overflow: hidden; + margin-top: 2px; +} +.header-fixed-st .weather-wrap .weather-tip_def { + top: 15px; +} +.header-fixed-st div.userbar-weather_console { + top: 68px; +} +.header-fixed-st .weather-wrap .weather-more_wrap { + top: 40px; +} +.animate-opacity{ + -webkit-transition: opacity linear .6s; + -moz-transition: opacity linear .6s; + -ms-transition: opacity linear .6s; + -o-transition: opacity linear .6s; + transition: opacity linear .6s; + opacity: 1; + filter: alpha(opacity=100); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr.tpl new file mode 100755 index 000000000..da5eb3ca2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ltr/ltr.tpl @@ -0,0 +1,6 @@ +<%require name="common:widget/header-flat/weather/ltr/ltr.more.css"%> +<%style%> + @import url('/widget/header-flat/weather/ltr/ltr-c.css?__inline'); +<%/style%> +
                      +
                      diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ma/ma.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ma/ma.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ma/ma.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ma/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ma/weather-city.json new file mode 100755 index 000000000..b021da656 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/ma/weather-city.json @@ -0,0 +1,43 @@ +{ + "9-127164_1_AL": "\u0627\u0644\u0642\u0627\u0647\u0631\u0629", + "6-207321_1_AL": "\u0627\u0644\u0627\u0633\u0643\u0646\u062f\u0631\u064a\u0629", + "12-127047_1_AL": "\u0627\u0644\u062c\u064a\u0632\u0629", + "4-130201_1_AL": "\u0627\u0644\u0623\u0642\u0635\u0631", + "6-127335_1_AL": "\u0627\u0644\u0632\u0642\u0627\u0632\u064a\u0642", + "5-127358_1_AL": "\u0623\u0633\u0648\u0627\u0646", + "15-126919_1_AL": "\u0627\u0644\u0641\u064a\u0648\u0645", + "126996": "\u0627\u0644\u0627\u0633\u0645\u0627\u0639\u064a\u0644\u064a\u0629", + "7-127484_1_AL": "\u0628\u0648\u0631 \u0633\u0639\u064a\u062f", + "5-127330_1_AL": "\u0627\u0644\u0633\u0648\u064a\u0633", + "3-127049_1_AL": "\u0634\u0628\u064a\u0646 \u0627\u0644\u0643\u0648\u0645", + "3-126883_1_AL": "\u0627\u0644\u063a\u0631\u062f\u0642\u0629", + "129332": "\u0645\u0631\u0633\u064a \u0627\u0644\u0645\u0637\u0631\u0648\u062d", + "4-297030_1_AL": "\u0627\u0644\u0631\u064a\u0627\u0636", + "3-299429_1_AL": "\u062c\u062f\u0629", + "3-299427_1_AL": "\u0645\u0643\u0629 \u0627\u0644\u0645\u0643\u0631\u0645\u0629", + "5-296807_1_AL": "\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629", + "4-321626_1_AL": "\u0623\u0628\u0648 \u0638\u0628\u064a", + "323091": "\u062f\u0628\u0649", + "8-1280745_1_AL": "\u0627\u0644\u0641\u062c\u064a\u0631\u0629", + "2-245072_1_AL": "\u0627\u0644\u0631\u0628\u0627\u0637", + "4-6368_1_AL": "\u0637\u0646\u062c\u0629", + "2-243353_1_AL": "\u0627\u0644\u062f\u0627\u0631 \u0627\u0644\u0628\u064a\u0636\u0627\u0621", + "3-244231_1_AL": "\u0645\u0631\u0627\u0643\u0634", + "1135733": "\u062a\u0648\u0646\u0633", + "320522": "\u0635\u0641\u0627\u0642\u0633", + "317198": "\u0628\u0646\u0632\u0631\u062a", + "1888491": "\u0627\u0644\u062c\u0632\u0627\u0626\u0631", + "2115": "\u0639\u0646\u0627\u0628\u0629", + "3-227342_1_AL": "\u0628\u064a\u0631\u0648\u062a", + "3-230555_1_AL": "\u0637\u0631\u0627\u0628\u0644\u0633", + "3-314446_1_AL": "\u062f\u0645\u0634\u0642", + "3-313468_1_AL": "\u062d\u0644\u0628", + "3-313556_1_AL": "\u062d\u0645\u0635", + "13-222056_1_AL": "\u0627\u0644\u0643\u0648\u064a\u062a", + "4-271669_1_AL": "\u0627\u0644\u062f\u0648\u062d\u0629", + "6-29687_1_AL": "\u0627\u0644\u0645\u0646\u0627\u0645\u0629", + "3-258638_1_AL": "\u0645\u0633\u0642\u0637", + "4-258843_1_AL": "\u062e\u0635\u0628", + "2-221790_1_AL": "\u0639\u0645\u0627\u0646", + "14-221898_1_AL": "\u0627\u0644\u0639\u0642\u0628\u0629" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl-c.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl-c.css new file mode 100755 index 000000000..833e87dfc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl-c.css @@ -0,0 +1,3 @@ +/*.userbar-weather{ + display: none; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl.more.css new file mode 100755 index 000000000..f1cbe6bd4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl.more.css @@ -0,0 +1,440 @@ +/* weather */ +/* @require common:widget/ui/prompt/prompt.css */ +#weatherView img { + width: 32px; +} +.userbar-weather { + font-size: 12px; + position: relative; + display: block !important; + zoom: 1; + width: 240px; + height: 45px; + padding-top: 5px; + color: #fff; + *width: 260px; + _width: auto; +} +.userbar-weather_console { + display: none; +} +.userbar-weather ul { + margin-top: 5px; + *width: 222px; +} +.userbar-weather img, +.userbar-weather .weather-info { + float: right; +} +.userbar-weather li { + display: block; + float: right; + margin-left: 20px; + *width: 100px; + *margin-left: 10px; +} +.userbar-weather li.weather_last { + margin-left: 0; +} +.userbar-weather img { + margin-left: 26px; +} +.userbar-weather span { + font-weight: bold; +} +.userbar-weather p { + margin: 2px 0; + direction: rtl; +} +.weather_last { + visibility: hidden; +} +.text { + visibility: hidden; +} +.dot_img { + position: relative; + left: 10px; + display: inline-block; + width: 9px; + height: 16px; + margin-right: 20px; + margin-bottom: -5px; + margin-left: -5px; + background: url(../img/i-weather-hum.png?__sprite) no-repeat; +} + +/* ----------more------------- */ +/* weather */ +/* @require common:widget/ui/prompt/prompt.css */ + +.userbar-weather { + width: 390px; + *width: 410px; +} +.userbar-weather_console { + display: block; + float: right; + height: 38px; + margin-left: 20px; + *margin-left: 10px; + *float: left; + _float: right; +} +.userbar-weather_console a { + color: #fff; +} +.weather-info { + position: relative; + right: -12px; + width: 110px; + direction: ltr; +} +.userbar-weather_city { + line-height: 15px; + position: relative; + z-index: 11; + padding-right: 7px; + text-align: left; +} +.userbar-weather_city-cur { + position: absolute; + right: -78px; + height: 15px; + white-space: nowrap; +} +.userbar-weather_city-cur a { + zoom: 1; + padding-left: 10px; +} +.userbar-weather_city-click a { + background-position: right -442px; +} +.city-select { + z-index: 11; + top: 16px; + left: -8px; + text-align: right; + _width: 180px; +} +.city-select .box-prompt-inner { + overflow: visible; + *width: 100%; + _width: auto; + *position: relative; +} +.city-select p { + font-size: 12px; + zoom: 1; + margin: 0; +} +.city-select label { + display: block; + margin-bottom: 5px; +} +.city-select select { + width: 160px; + margin-bottom: 7px; + border: 1px solid #d7d7d9; +} +.city-select .btn-bar { + width: 160px; + text-align: center; + *position: relative; +} +.weather-days { + line-height: 25px; + position: relative; + display: block; + height: 25px; + margin-top: 5px; + padding: 0 7px; + border: 1px solid #009e69; + border-bottom: 0 none; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + -o-border-radius: 2px; + _float: left; +} +.weather-days_click { + border: 1px solid #00ad73; + border-bottom: 0 none; +} +.weather-days p { + line-height: 25px; + display: block; + margin: 0; +} +.weather-days_click p { + background-position: 50% -35px; +} +.weather-days:hover { + -webkit-border-top-left-radius: 2px; + border-top-left-radius: 2px; + -webkit-border-top-right-radius: 2px; + border-top-right-radius: 2px; + background: #009e69; + -moz-border-top-left-radius: 2px; + -o-border-top-left-radius: 2px; + -moz-border-top-right-radius: 2px; + -o-border-top-right-radius: 2px; +} +.weather-more_show .weather-more { + display: block; +} +.weather-more li { + font-size: 14px; + padding: 20px 0; + text-align: center; + color: #fff; + direction: ltr; +} +.weather-more li a { + display: block; + width: 100%; + height: 159px; + color: #fff; +} +.weather-more li a:hover { + background-color: #075db5; + background-color: rgba(0, 0, 0, .1); +} +.weather-more li img { + padding: 10px 0; +} +.weather-more span { + padding: 0 5px; +} +.weather-more_odd { + background: #117a57; + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + -moz-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; + -o-box-shadow: 0 0 4px rgba(0, 0, 0, .1) inset; +} +.weather-more_today p { + font-weight: bold; +} +.weather_last { + width: 40px; +} +.humidity { + float: left; + margin-left: 40px; +} +.dot_img { + margin-right: 0; + margin-left: 10px; +} +.dot_img_head { + position: relative; + left: 5px; + display: inline-block; + width: 9px; + height: 16px; + margin-bottom: -5px; + margin-left: -10px; + background: url(../img/i-weather-more-hum.png?__sprite) no-repeat; + *left: 10px; + *float: right; + *margin-right: 20px; +} +.temperature_p { + float: right; +} +.temperature_hum { + position: relative; + left: -33px; +} +.temperature_big { + float: right; + margin-right: 20px; +} +.userbar-weather { + position: relative; + z-index: 99; +} +#weatherView .weather-info { + *position: absolute; + *right: 240px; +} +.weather-more_today .dot_img_head { + position: relative; +} +.userbar-weather_tip { + font-size: 12px; + position: absolute; + z-index: 10; + top: 49px; + right: 224px; + width: 190px; + padding: 2px 12px 2px 32px; + color: #454545; + border: 1px solid #ffa97e; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + background-color: #fff8f4; + -o-border-radius: 2px; +} +.userbar-weather_tip .arrow, +.userbar-weather_tip .arrow_bg { + position: absolute; + width: 0; + height: 0; + border: 8px dashed transparent; +} +.userbar-weather_tip .arrow { + top: -18px; + right: 19px; + border-width: 9px; + border-bottom-style: solid; + border-bottom-color: #ffb793; +} +.userbar-weather_tip .arrow_bg { + margin: -7px -8px 0 -8px; + border-bottom-style: solid; + border-bottom-color: #fcfefd; + _margin-top: -22px; +} +.userbar-weather_tip .tips-close { + position: absolute; + top: 5px; + left: 5px; + display: block; + width: 12px; + height: 12px; + cursor: pointer; + background: url(../img/del_gray.png?__sprite) no-repeat; +} +.userbar-weather_tip .tips-close_hover { + background: url(../img/del_ative.png?__sprite) no-repeat; +} +.userbar-weather_tip p { + line-height: 1.5; + white-space: normal; + text-indent: 16px; + background-position: right top; +} +.userbar-weather_tip .tips-light { + position: absolute; + top: 4px; + right: 12px; + display: inline-block; + width: 12px; + height: 16px; + background: url(../img/light.png?__sprite) no-repeat; +} +.userbar-weather .dropdown-list li { + line-height: 40px; + display: list-item; + float: none; + height: 40px; + margin-left: 0; + text-indent: 20px; + *width: auto; + *margin-left: 0; +} +.userbar-weather .dropdown-list li:hover, +.userbar-weather .dropdown-list-hover { + background-color: #1974ce; +} +.userbar-weather .dropdown-trigger { + font-size: 18px; + height: 40px; + color: #fff; + border-width: 0; + background-color: #1c81e5; +} +.userbar-weather .dropdown .dropdown-input { + font-size: 18px; + font-weight: normal; + line-height: 40px; + width: 280px !important; + height: 40px; + padding-right: 20px; + padding-left: 40px; + background-color: #1c81e5; +} +.userbar-weather .dropdown .dropdown-arrow { + top: 0; + left: 0; + width: 40px; + height: 40px; + border-width: 0; + background: url(../img/drop-up.png?__sprite) no-repeat; +} +.userbar-weather .dropdown .dropdown-arrow i { + display: none; +} +.userbar-weather .dropdown .dropdown-arrow-up { + background: url(../img/drop-down.png?__sprite) no-repeat; +} +.userbar-weather .dropdown-list { + font-size: 18px; + font-weight: normal; + border-width: 0; + background-color: #1c81e5; +} +.userbar-weather .dropdown-list .dropdown-list-inner { + margin-top: 0; + background-color: #1c81e5; + -webkit-backface-visibility: hidden; +} + +/* head fixed */ +.header-fixed .userbar-weather_tip { + display: none !important; +} +.header-fixed #carRestrict { + display: none !important; +} +.header-fixed-st #weatherView li img { + width: 32px; + height: 28px; + margin-top: -2px; +} +.header-fixed-st .weather-info .text { + display: inline; + float: right; + margin-top: 2px; + margin-left: 4px; +} +.header-fixed-st .weather-wrap .userbar-weather { + height: 40px; +} +.header-fixed-st .userbar-weather ul.fl { + height: 30px; + padding: 8px 16px 2px 32px; +} +.header-fixed-st .weather-info { + overflow: hidden; + margin-top: 2px; +} +.header-fixed-st .weather-wrap .weather-tip_def { + top: 15px; +} +.header-fixed-st div.userbar-weather_console { + top: 68px; +} +.header-fixed-st .weather-wrap .weather-more_wrap { + top: 40px; +} +.header-fixed-st .temperature_p { + float: left; + margin-top: 4px; +} +.header-fixed-st .userbar-weather img { + margin-top: 4px; + margin-left: 16px; +} +.animate-opacity{ + -webkit-transition: opacity linear .6s; + -moz-transition: opacity linear .6s; + -ms-transition: opacity linear .6s; + -o-transition: opacity linear .6s; + transition: opacity linear .6s; + opacity: 1; + filter: alpha(opacity=100); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl.tpl new file mode 100755 index 000000000..1c313c908 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/rtl/rtl.tpl @@ -0,0 +1,6 @@ +<%require name="common:widget/header-flat/weather/rtl/rtl.more.css"%> +<%style%> + @import url('/widget/header-flat/weather/rtl/rtl-c.css?__inline'); +<%/style%> +
                      +
                      diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/sa/sa.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/sa/sa.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/sa/sa.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/sa/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/sa/weather-city.json new file mode 100755 index 000000000..e11cbbe84 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/sa/weather-city.json @@ -0,0 +1,43 @@ +{ + "9-127164_1_AL": "\u0627\u0644\u0642\u0627\u0647\u0631\u0629", + "6-207321_1_AL": "\u0627\u0644\u0627\u0633\u0643\u0646\u062f\u0631\u064a\u0629", + "12-127047_1_AL": "\u0627\u0644\u062c\u064a\u0632\u0629", + "4-130201_1_AL": "\u0627\u0644\u0623\u0642\u0635\u0631", + "6-127335_1_AL": "\u0627\u0644\u0632\u0642\u0627\u0632\u064a\u0642", + "5-127358_1_AL": "\u0623\u0633\u0648\u0627\u0646", + "15-126919_1_AL": "\u0627\u0644\u0641\u064a\u0648\u0645", + "126996": "\u0627\u0644\u0627\u0633\u0645\u0627\u0639\u064a\u0644\u064a\u0629", + "7-127484_1_AL": "\u0628\u0648\u0631 \u0633\u0639\u064a\u062f", + "5-127330_1_AL": "\u0627\u0644\u0633\u0648\u064a\u0633", + "3-127049_1_AL": "\u0634\u0628\u064a\u0646 \u0627\u0644\u0643\u0648\u0645", + "3-126883_1_AL": "\u0627\u0644\u063a\u0631\u062f\u0642\u0629", + "129332": "\u0645\u0631\u0633\u0649 \u0645\u0637\u0631\u0648\u062D", + "4-297030_1_AL": "\u0627\u0644\u0631\u064a\u0627\u0636", + "3-299429_1_AL": "\u062c\u062f\u0629", + "3-299427_1_AL": "\u0645\u0643\u0629 \u0627\u0644\u0645\u0643\u0631\u0645\u0629", + "5-296807_1_AL": "\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629", + "4-321626_1_AL": "\u0623\u0628\u0648 \u0638\u0628\u064a", + "323091": "\u062f\u0628\u0649", + "8-1280745_1_AL": "\u0627\u0644\u0641\u062c\u064a\u0631\u0629", + "2-245072_1_AL": "\u0627\u0644\u0631\u0628\u0627\u0637", + "4-6368_1_AL": "\u0637\u0646\u062c\u0629", + "2-243353_1_AL": "\u0627\u0644\u062f\u0627\u0631 \u0627\u0644\u0628\u064a\u0636\u0627\u0621", + "3-244231_1_AL": "\u0645\u0631\u0627\u0643\u0634", + "1135733": "\u062a\u0648\u0646\u0633", + "320522": "\u0635\u0641\u0627\u0642\u0633", + "317198": "\u0628\u0646\u0632\u0631\u062a", + "1888491": "\u0627\u0644\u062c\u0632\u0627\u0626\u0631", + "2115": "\u0639\u0646\u0627\u0628\u0629", + "3-227342_1_AL": "\u0628\u064a\u0631\u0648\u062a", + "3-230555_1_AL": "\u0637\u0631\u0627\u0628\u0644\u0633", + "3-314446_1_AL": "\u062f\u0645\u0634\u0642", + "3-313468_1_AL": "\u062d\u0644\u0628", + "3-313556_1_AL": "\u062d\u0645\u0635", + "13-222056_1_AL": "\u0627\u0644\u0643\u0648\u064a\u062a", + "4-271669_1_AL": "\u0627\u0644\u062f\u0648\u062d\u0629", + "6-29687_1_AL": "\u0627\u0644\u0645\u0646\u0627\u0645\u0629", + "3-258638_1_AL": "\u0645\u0633\u0642\u0637", + "4-258843_1_AL": "\u062e\u0635\u0628", + "2-221790_1_AL": "\u0639\u0645\u0627\u0646", + "14-221898_1_AL": "\u0627\u0644\u0639\u0642\u0628\u0629" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/th/th.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/th/th.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/th/th.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/th/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/th/weather-city.json new file mode 100755 index 000000000..c65a7a699 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/th/weather-city.json @@ -0,0 +1,46 @@ +{ + "4-318849_1_AL": "\u0e01\u0e23\u0e38\u0e07\u0e40\u0e17\u0e1e\u0e2f", + "4-318418_1_AL": "\u0e01\u0e33\u0e41\u0e1e\u0e07\u0e40\u0e1e\u0e0a\u0e23", + "1-319052_1_AL": "\u0e25\u0e1e\u0e1a\u0e38\u0e23\u0e35", + "4-319602_1_AL": "\u0e19\u0e04\u0e23\u0e1b\u0e10\u0e21", + "2-320033_1_AL": "\u0e1e\u0e34\u0e29\u0e13\u0e38\u0e42\u0e25\u0e01", + "4-320049_1_AL": "\u0e1e\u0e23\u0e30\u0e19\u0e04\u0e23\u0e28\u0e23\u0e35\u0e2d\u0e22\u0e38\u0e18\u0e22\u0e32", + "4-320620_1_AL": "\u0e2a\u0e21\u0e38\u0e17\u0e23\u0e1b\u0e23\u0e32\u0e01\u0e32\u0e23", + "4-320626_1_AL": "\u0e2a\u0e21\u0e38\u0e17\u0e23\u0e2a\u0e32\u0e04\u0e23", + "1-320984_1_AL": "\u0e2a\u0e38\u0e1e\u0e23\u0e23\u0e13\u0e1a\u0e38\u0e23\u0e35", + "4-320984_1_AL": "\u0e40\u0e0a\u0e35\u0e22\u0e07\u0e43\u0e2b\u0e21\u0e48", + "2-318882_1_AL": "\u0e25\u0e33\u0e1b\u0e32\u0e07", + "2-318901_1_AL": "\u0e25\u0e33\u0e1e\u0e39\u0e19", + "319106": "\u0e41\u0e21\u0e48\u0e2e\u0e48\u0e2d\u0e07\u0e2a\u0e2d\u0e19", + "3-319108_1_AL": "\u0e41\u0e21\u0e48\u0e2e\u0e48\u0e2d\u0e07\u0e2a\u0e2d\u0e19(\u0e41\u0e21\u0e48\u0e2a\u0e30\u0e40\u0e23\u0e35\u0e22\u0e07)", + "2-319733_1_AL": "\u0e19\u0e48\u0e32\u0e19", + "2-319956_1_AL": "\u0e1e\u0e30\u0e40\u0e22\u0e32", + "2-317465_1_AL": "\u0e0a\u0e31\u0e22\u0e20\u0e39\u0e21\u0e34", + "4-318585_1_AL": "\u0e02\u0e2d\u0e19\u0e41\u0e01\u0e48\u0e19", + "3-318607_1_AL": "\u0e02\u0e2d\u0e19\u0e41\u0e01\u0e48\u0e19(\u0e0a\u0e38\u0e21\u0e41\u0e1e)", + "2-319038_1_AL": "\u0e40\u0e25\u0e22", + "4-319122_1_AL": "\u0e21\u0e2b\u0e32\u0e2a\u0e32\u0e23\u0e04\u0e32\u0e21", + "2-319494_1_AL": "\u0e21\u0e38\u0e01\u0e14\u0e32\u0e2b\u0e32\u0e23", + "4-319629_1_AL": "\u0e19\u0e04\u0e23\u0e23\u0e32\u0e0a\u0e2a\u0e35\u0e21\u0e32", + "5-319817_1_AL": "\u0e2b\u0e19\u0e2d\u0e07\u0e04\u0e32\u0e22", + "4-320359_1_AL": "\u0e23\u0e49\u0e2d\u0e22\u0e40\u0e2d\u0e47\u0e14", + "4-321409_1_AL": "\u0e2d\u0e38\u0e1a\u0e25\u0e23\u0e32\u0e0a\u0e18\u0e32\u0e19\u0e35", + "7-321441_1_AL": "\u0e2d\u0e38\u0e14\u0e23\u0e18\u0e32\u0e19\u0e35", + "1-317584_1_AL": "\u0e1e\u0e31\u0e17\u0e22\u0e32", + "2-317490_1_AL": "\u0e08\u0e31\u0e19\u0e17\u0e1a\u0e38\u0e23\u0e35", + "1-317582_1_AL": "\u0e0a\u0e25\u0e1a\u0e38\u0e23\u0e35", + "1-320137_1_AL": "\u0e1b\u0e23\u0e32\u0e08\u0e35\u0e19\u0e1a\u0e38\u0e23\u0e35", + "2-320337_1_AL": "\u0e23\u0e30\u0e22\u0e2d\u0e07", + "4-319691_1_AL": "\u0e19\u0e04\u0e23\u0e28\u0e23\u0e35\u0e18\u0e23\u0e23\u0e21\u0e23\u0e32\u0e0a", + "2-319761_1_AL": "\u0e19\u0e23\u0e32\u0e18\u0e34\u0e27\u0e32\u0e2a", + "2-320075_1_AL": "\u0e20\u0e39\u0e40\u0e01\u0e47\u0e15", + "2-320938_1_AL": "\u0e2a\u0e07\u0e02\u0e25\u0e32", + "3-320939_1_AL": "\u0e2a\u0e07\u0e02\u0e25\u0e32(\u0e2b\u0e32\u0e14\u0e43\u0e2b\u0e0d\u0e48)", + "4-320998_1_AL": "\u0e2a\u0e38\u0e23\u0e32\u0e29\u0e0e\u0e23\u0e4c\u0e18\u0e32\u0e19\u0e35", + "4-5470_1_AL": "\u0e2a\u0e38\u0e23\u0e32\u0e29\u0e0e\u0e23\u0e4c\u0e18\u0e32\u0e19\u0e35(\u0e40\u0e01\u0e32\u0e30\u0e2a\u0e21\u0e38\u0e22)", + "3-320151_1_AL": "\u0e1b\u0e23\u0e30\u0e08\u0e27\u0e1a\u0e04\u0e35\u0e23\u0e35\u0e02\u0e31\u0e19\u0e18\u0e4c(\u0e2b\u0e31\u0e27\u0e2b\u0e34\u0e19)", + "2-318443_1_AL": "\u0e01\u0e32\u0e0d\u0e08\u0e19\u0e1a\u0e38\u0e23\u0e35", + "318455": "\u0e01\u0e32\u0e0d\u0e08\u0e19\u0e1a\u0e23\u0e35(\u0e17\u0e2d\u0e07\u0e1c\u0e32\u0e20\u0e39\u0e21\u0e34)", + "2-320001_1_AL": "\u0e40\u0e1e\u0e0a\u0e23\u0e1a\u0e38\u0e23\u0e35", + "4-320150_1_AL": "\u0e1b\u0e23\u0e30\u0e08\u0e27\u0e1a\u0e04\u0e35\u0e23\u0e35\u0e02\u0e31\u0e19\u0e18\u0e4c" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/tw/tw.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/tw/tw.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/tw/tw.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/tw/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/tw/weather-city.json new file mode 100755 index 000000000..1a38eb1c2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/tw/weather-city.json @@ -0,0 +1,18 @@ +{ + "1-315078_1_AL": "\u81fa\u5317", + "12-315040_1_AL": "\u81fa\u4e2d", + "3-314999_1_AL": "\u81fa\u5357", + "1-313812_1_AL": "\u9ad8\u96c4", + "1-313793_1_AL": "\u5ca1\u5c71", + "4-312605_1_AL": "\u57fa\u9686", + "7-313567_1_AL": "\u65b0\u7af9", + "6-312591_1_AL": "\u5609\u7fa9", + "3-315125_1_AL": "\u6843\u5712", + "3-314385_1_AL": "\u5c4f\u6771", + "3-314391_1_AL": "\u6052\u6625", + "4-316306_1_AL": "\u5b9c\u862d", + "2-316307_1_AL": "\u8607\u6fb3\u93ae", + "2-313570_1_AL": "\u82b1\u84ee", + "3-315079_1_AL": "\u81fa\u6771" + +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/vn/vn.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/vn/vn.tpl new file mode 100755 index 000000000..156e8ebd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/vn/vn.tpl @@ -0,0 +1,6 @@ +<%script%> +require.async("common:widget/ui/weather/weather_flat.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); +}); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`_flat.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/vn/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/vn/weather-city.json new file mode 100755 index 000000000..990ab2f4c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/vn/weather-city.json @@ -0,0 +1,25 @@ +{ + "2-353412_1_AL": "H\u00e0 N\u1ed9i", + "3-353511_1_AL": "H\u1ea3i Ph\u00f2ng", + "1-352107_1_AL": "B\u1eafc C\u1ea1n", + "1-352511_1_AL": "Cao B\u1eb1ng", + "2-353983_1_AL": "H\u00f2a B\u00ecnh", + "1-354293_1_AL": "L\u1ea1ng S\u01a1n", + "1-354305_1_AL": "L\u00e0o Cai", + "1-355085_1_AL": "Nam \u0110\u1ecbnh", + "1-356182_1_AL": "Th\u00e1i Nguy\u00ean", + "1-356356_1_AL": "Vi\u1ec7t Tr\u00ec", + "2-356425_1_AL": "Y\u00ean B\u00e1i", + "2-352954_1_AL": "\u0110\u00e0 N\u1eb5ng", + "1-355711_1_AL": "H\u1ed9i An", + + "354222": "Nha Trang", + "1-356184_1_AL": "Thanh H\u00f3a", + "355417": "Vinh", + + "1-352499_1_AL": "C\u00e0 Mau", + "2-352508_1_AL": "C\u1ea7n Th\u01a1", + "3-354237_1_AL": "Ph\u00fa Qu\u1ed1c", + "3-352089_1_AL": "V\u0169ng T\u00e0u", + "1-356354_1_AL": "V\u0129nh Long" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/weather.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/weather.tpl new file mode 100755 index 000000000..f9618d956 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header-flat/weather/weather.tpl @@ -0,0 +1,48 @@ + +<%widget name="common:widget/header-flat/weather/`$head.dir`/`$head.dir`.tpl"%> +<%script%> + //conf.weather + conf.weather = { + prefixUrl: "<%$body.weather.prefixUrl%>", + country: "<%$country%>", + defaultCity: "<%$body.weather.accuDefaultCity%>", + smallIconPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/weather/weather_icon_small", + bigIconPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/weather/weather_icon_big", + isHeaderTest: "<%$body.headerTest.widget%>", + testSmallIcon: "<%$body.headerTest.weather.smallIconPath%>", + testBigIcon: "<%$body.headerTest.weather.bigIconPath%>", + testDefaultIcon: "<%$body.headerTest.weather.defaultIcon%>", + testWidth: "<%$body.headerTest.weather.width%>", + dateFormat: "<%$body.weather.dateFormat%>", + connector: "<%$body.weather.connector%>", + humidity: "<%$body.weather.humidity%>", + remindSwitch: "<%$body.weather.remindSwitch%>", + userFrom: "<%$body.weather.userFrom%>", + testUserFrom:"<%$body.headerTest.weather.testUserFrom%>", + dataLength: 5, + dataRef: function(data) { + return data; + }, + tips: { + "click": '<%$body.weather.clickText%>', + "loading": '<%$body.weather.loadingText%>', + "loadError": '<%$body.weather.loadError%>', + "nojs": '<%$body.weather.noJS%>', + "nocookie": '<%$body.weather.noCookie%>' + }, + dataGroup: { + "noScript": '<%$body.weather.noScript%>', + "selectCity": '<%$body.weather.selectCity%>', + "area": '<%$body.weather.area%>', + "city": '<%$body.weather.city%>', + "okBtn": '<%$body.weather.okBtn%>', + "cancelBtn": '<%$body.weather.cancelBtn%>', + "moreDays": '<%$body.weather.moreDays%>' + }, + infoFromText: "<%$body.weather.infoFromText%>", + tempHtoL:"<%$body.weather.tempHtoL%>", + tempConcat:"<%$body.weather.tempConcat%>", + tempUnit:"<%$body.weather.tempUnit%>" + }; +<%/script%> +<%widget name="common:widget/header-flat/weather/`$sysInfo.country`/`$sysInfo.country`.tpl" country=$sysInfo.country%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/account-test-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/account-test-async.js new file mode 100755 index 000000000..68054cfd6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/account-test-async.js @@ -0,0 +1,300 @@ +String.prototype.replaceTpl = function (o){ + return this.replace(/#\{([^}]*)\}/gm,function(v,k){return v=o[k]||""}) +}; + +var $ = require("common:widget/ui/jquery/jquery.js"), + helper = require("common:widget/ui/helper/helper.js"), + UT = require("common:widget/ui/ut/ut.js"); + +/** + * loginCtroller代表初始化。在index.html页面333行。 + */ +! function(WIN, conf) { + var wrap = $("#accountWrap"), + dropDwon = $(".account-dropdown_wrap"), + login = $(".account_login-tip"), + logout = $(".account_logout-tip"), + elName = logout.find(".account_logout_name"), + elMail = logout.find(".account_logout_email"), + elImg = logout.find("img"), + elLogout = logout.find(".account_logout_btn"), + mask = wrap.find(".account_trig"), + dir = conf.dir, + headImgUrl = conf.commonLogin.defauUrl; + + var conf = conf.commonLogin, + self = WIN.loginCtroller = { + /** + * verify user login status + * 2 ==> unlogin | 1 ==> already login + * vertify:2 ==>代表“没有登录”的状态,vertify:1 ==>代表“登录”的状态 + * uid ==> 用户唯一标识 + * loginUrl ==> 配置的参数,代表向服务器端发送的请求,参数,这里有一些参数需要转换编码,目前还没有弄懂参数的编码转换的含义 + */ + verify : 2, + uid : 0, + loginUrl: conf.hao123LoginUrl.replaceTpl({ + idc: conf.idcMap[conf.countryCode], + country: conf.countryCode, + level: conf.level + }), + + // type : 1.代表登录状态,并且请求的数据data存在的情况 + // type :2.代表默认状态,没有登录成功 + // 最后的self.verify代表渲染页面之后将登录状态修改为当前值,type :1为已经登录,2:为未登录 + render: function(type, data) { + var img = new Image(), + imgUrl = ""; + + if (type == 1 && data) { + + login.hide(); + elName.html(data.uname); + //调整email的换行显示策略 + var emailContent = data.email; + var emailArray = emailContent.split("@"); + if (emailContent.length > 17 && emailContent.indexOf("@") < 15) { + emailContent = emailArray[0] + "
                      @" + emailArray[1]; + } + elMail.html(emailContent); + + self.uid = data.uid; + self.bindid = data.bindid; + imgUrl = helper.replaceTpl(headImgUrl, { + id: data.bindid + }); + img.src = imgUrl; + setTimeout( function() { + elImg.attr("src", imgUrl); + if($("#headPic").length > 0) { + $("#headPic").attr("src", imgUrl); + } else { + mask.removeClass("account_title").html(""); + } + wrap.addClass("account-login_suc"); + }, 500); + + } else { + if (/(png|gif|jpg|jpeg)/i.test(conf.defauImg)) { + mask.removeClass("account_title").html(""); + } else { + mask.addClass("account_title").html(conf.defauImg); + } + wrap.removeClass("account-login_suc"); + elLogout.attr("href", helper.replaceTpl(conf.logoutUrl, { + idc: encodeURIComponent(conf.idcMap[conf.countryCode]), + "gotourl": encodeURIComponent(document.location.href) + })); + } + + // update status when user login. + self.verify = type; + }, + /** + * 检查登录的状态 + * Check user's status about wheather they have been login. + * @param url ==> target url; + * success ==> excute something when finish + * error ==> when login failure + * (1)obj为传入的对象值 + * (2)ajax发送请求,cache:false; + * (3)url:请求地址,转码后的地址 + * (4)success:成功之后要处理的事情 + * (5)error:失败后的信息提示 + */ + checkStatus: function(obj) { + obj = obj || {}; + $.ajax({ + cache: false, + url: helper.replaceTpl(conf.checkLoginUrl, { + countryCode: encodeURIComponent(conf.countryCode) + }), + success: function(data) { + data = eval("(" + data + ")"); + if(data && data.status == 1 && obj.success) { + // record facebook id + data.bindid && $.cookie("__FBID", data.bindid, { + expires: 10*365, + path: '/' + }); + obj.success(data); + } + else obj.error && obj.error(); + }, + error: function() { + obj.error && obj.error(); + } + }); + }, + + /* + + loginCtroller.fire(url,width,height); + login layout fold ==> loginCtroller.fire.call(jQuery("#fBook")[0]); + params: + + url, width, height + */ + fire: function(url, width, height) { + if (self.verify == 1) { + + return self.verify; + } + + // UT.send({ + // "type" : "click", + // "position" : "login", + // "sort" : "login", + // "modId" : "account" + // }); + document.domain = "hao123.com"; + + var w = width || conf.iWidth, + h = height || conf.iHeight; + + WIN.open(url || self.loginUrl, "newwindow", "height=" + h + ",innerHeight=" + h + ",width=" + w + ",innerWidth=" + w + ",top=" + (WIN.screen.availHeight - 30 - h) / 2 + ",left=" + (WIN.screen.availWidth - 30 - w) / 2 + ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no"); + }, + /** + * 为联合登录执行的操作 + * @param {[array]} data [需要处理的联合登录url列表] + * 登录成功后,从数据中得到需要处理的联合登录url的列表,遍历列表,对每个url填入联合登录所需的参数(参数如下,值从cookie中取),然后请求url,触发后端在其域下种下相应cookie + * (1)type: [facebook | twitter | google | yahoo] + * (2)uss: urlencode之后的第三方的access_token + * (3)bduss: 百度的token + * (4)level: 权限级别,业务自己的level,顶部为1,侧边栏为2 + * (5)thid: 用户在第三方的唯一id,非必填 + */ + unitedLogin: function(data){ + var suffix = "?type=#{type}&uss=#{uss}&bduss=#{bduss}&level=#{level}&thid=#{thid}", + imgList = []; + $.each(data.loginurl, function(i,v){ + imgList[i] = new Image(); + imgList[i].src = helper.replaceTpl(v+suffix, { + type: $.cookie("LOGINTYPE") || "", + uss: $.cookie("USS") || "", + bduss: $.cookie("BDUSS") || "", + level: $.cookie("LEVEL") || "", + thid: $.cookie("THIRDID") || "" + }); + }); + }, + /** + * 初始化执行的操作 + * @param {[type]} data [description] + * @return {[type]} [description] + * (1)hao123LoginCallback:回调函数:不错在data或者未登录的状态时要执行的事情==>弹窗 + * 如果成功,执行“统计”请求;并且渲染页面 + * (2)绑定点击事件:在整个按钮点击的情况下,首先,判断登录状态(“1”为登录,“2”为未登录) + * 登录状态下:给最外层div添加样式“mod-login--unfold”(这个样式在login_mod.css文件里), 做的操作就是将div展开,并且将里面的(图片,姓名,邮箱,lougout按钮)样式切换到大图状态。 + * (3)第二种情况 ==>未登录。首先,发送统计请求,再执行window.open方法,打开登录页面的窗口-> 登录 + * (4)给body绑定事件:移除大图下面所有效果,切换为小图状态。 + * (5)给logout标签绑定“统计”事件。 + * (6)最后一步调用“checkStatus”方法,如果成功的话,渲染页面 + */ + init: function(data) { + + //self.render(1,data); + // 1. reg global callback + WIN.hao123LoginCallback = function(data) { + if (!data || data.status != 1) { + return alert(conf.txtErrorMsg); + } + // record facebook id + data.bindid && $.cookie("__FBID", data.bindid, { + expires: 10*365, + path: '/' + }); + + UT.send({ + "type" : "access", + "position" : "login" + }); + self.render(data.status, data); + Gl.history && Gl.history.get(); //Get the sites list again for history widget + Gl.notepad && Gl.notepad.initNotes(); // intialize notepad while available + Gl.hotsiteFB && Gl.hotsiteFB.start(); + Gl.loginPopup && Gl.loginPopup.remove(); //close login popup + $(WIN).trigger("dailySign.login"); // daily sign + + // united login for tieba .etc + data.loginurl && self.unitedLogin(data); + + }; + + var isInsert = false; + + // 2. bind button event + login.on("click", function() { + if(self.verify != 1) { + UT.send({ + "type" : "click", + "ac" : "b", + "position" : "login", + "sort" : "login", + "modId" : "account" + }); + } + self.fire.call(this); + }); + + mask.on("click", function() { + if(wrap.hasClass("account-login_suc")) { + + } else { + if(self.verify != 1) { + UT.send({ + "type" : "click", + "ac" : "b", + "position" : "login", + "sort" : "login", + "modId" : "account" + }); + } + self.fire.call(this); + } + }); + wrap.hover(function() { + if(wrap.hasClass("account-login_suc")) { + login.hide(); + logout.show(); + } else { + login.css(dir == 'ltr' ? 'right' : 'left', (parseInt(mask.outerWidth() / 2 - 19, 10)) + 'px'); + login.show(); + logout.hide(); + } + dropDwon.show(); + mask.addClass("module-mask"); + UT.send({ + modId: "msgbox", + type: "others", + sort: "hover", + position: "accounticon" + }); + }, function() { + dropDwon.hide(); + mask.removeClass("module-mask"); + }); + + + elLogout.on("click", function() { + UT.send({ + "type" : "click", + "position": "login", + "sort" : "logout", + "modId" : "account" + }); + }); + // 3. check status + self.checkStatus({ + success: function(data) { + self.render(1, data); + }, + error: function() { + // alert("error") + } + }); + // 4. init render + self.render(2); + } + }; +}(window, conf); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/account-test.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/account-test.tpl new file mode 100755 index 000000000..17679b6db --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/account-test.tpl @@ -0,0 +1,104 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/account-test/ltr-s/ltr.css?__inline'); +<%else%> +@import url('/widget/header/account-test/rtl-s/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/account-test/ltr-s/ltr.more.css"%> +<%else%> +<%require name="common:widget/header/account-test/rtl-s/rtl.more.css"%> +<%/if%> + + + +<%script%> +window.conf || (window.conf = {}); + <%* + /** + * Facebook页面登录退出的配置信息(可供PM使用) + * conf.commonLogin:入口。 + * 信息:(1)iWidth,iHeight:弹出窗口宽高。 + * (2)userip: 登录时的参数信息(可配)。 + * (3)jumpUrl:登录时的参数信息(可配)。 + * (4)loginUrl:登录时的参数信息(可配)。 + * (5)checkLoginUrl:Ajax请求地址。 + * (6)logoutUrl:退出时请求的URL地址,刷新页面。 + * (7)domainName:各国机房服务器地址(优先选择的地址)。 + * (8)txtDefaultBtn:默认按钮文字信息(可配)。 + * (9)txtErrorMsg:错误状态提示信息(可配)。 + * (10)level:权限级别(可配)。 + */ + *%> + + conf.commonLogin = { + iWidth : <%$body.commonLogin.iWidth%>, + iHeight : <%$body.commonLogin.iHeight%>, + countryCode: conf.country, + + <%if !empty($sysInfo.userip)%> + userip: "<%$sysInfo.userip%>", + <%else%> + userip: "sdfdslgksdlgk", + <%/if%> + + loginCallbackName: "<%$body.commonLogin.loginCallbackName%>", + + jumpUrl : "<%$body.commonLogin.jumpUrl%>", + hao123LoginUrl: "<%$body.commonLogin.hao123LoginUrl%>", + checkLoginUrl : "<%$body.commonLogin.checkLoginUrl%>", + logoutUrl : "<%$body.commonLogin.logoutUrl%>", + domainName : <%json_encode($body.commonLogin.domainName)%>, + txtErrorMsg : "<%$body.commonLogin.txtErrorMsg%>", + idcMap : <%json_encode($body.commonLogin.idcMap)%>, + level : "<%$body.commonLogin.level%>", + message : "<%$body.commonLogin.message%>", + infoMsg : "<%$body.commonLogin.infoMessage%>", + defauImg : "<%$body.headerTest.accountDefaultImg%>", + defauUrl : "<%$body.headerTest.accountUrl%>" + }; + +require.async(["common:widget/ui/jquery/jquery.js", "common:widget/header/account-test/account-test-async.js"], function ($) { + // init + $(function() { + if(window.loginCtroller) { + loginCtroller.init(); + loginCtroller.isInited = true; // mark if init + } + }); +}); + +var accountTip = conf.commonLogin.defauImg; +require.async("common:widget/ui/jquery/jquery.js", function ($) { + if(/(png|gif|jpg|jpeg)/i.test(accountTip)) { + $(".account_trig").removeClass("account_title").html(""); + } else { + $(".account_trig").addClass("account_title").html(accountTip); + } +}); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/bg-account.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/bg-account.png new file mode 100755 index 000000000..5876a043b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/bg-account.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/bg-init.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/bg-init.png new file mode 100755 index 000000000..aecd627e5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/bg-init.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/btn-facebook-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/btn-facebook-bg.png new file mode 100755 index 000000000..37aa30806 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/btn-facebook-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/btn-facebook-logo.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/btn-facebook-logo.png new file mode 100755 index 000000000..18ba2e79e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/btn-facebook-logo.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/login.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/login.gif new file mode 100755 index 000000000..9e26c6716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/img/login.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/ltr-s/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/ltr-s/ltr.css new file mode 100755 index 000000000..32a86f35f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/ltr-s/ltr.css @@ -0,0 +1,3 @@ +.account_wrap { + visibility: hidden; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/ltr-s/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/ltr-s/ltr.more.css new file mode 100755 index 000000000..d4c813a83 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/ltr-s/ltr.more.css @@ -0,0 +1,158 @@ +/*消息盒子的寄生于account,修改样式时麻烦留意一下*/ +.account_wrap { + float: right; + position: relative; + max-width: 170px; +} +.account_trig { + padding: 0 10px; + height: 50px; + width: 30px; + overflow: hidden; + cursor: pointer; + text-align: center; + vertical-align: middle; + position: relative; + display: table-cell; + *display: block; +} +.account_title{ + width: auto; + max-width: 150px; + line-height: 50px; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + color: rgba(255,255,255, 0.5); +} +.account_login-tip { + background: url("../img/btn-facebook-bg.png?__sprite") repeat-x; + border: 1px solid #456BB6; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + cursor: pointer; +} +.login-tip_con { + padding-left: 17px; + color: #ffffff; + text-align: center; + height: 29px; + line-height: 29px; + background: url("../img/btn-facebook-logo.png?__sprite") no-repeat; +} +.account-loginfo_wrap { + width: 220px; + word-wrap: break-word; + overflow: hidden; + padding: 20px 30px; + position: relative; + right: 0; + top: 0; + background-color: #D6F8EF; +} +.account-loginfo_wrap img { + width: 90px; + height: 90px; + margin-right: 16px; + margin-top: 4px; + float: left; + border-radius: 45px; + -webkit-border-radius: 45px; + -moz-border-radius: 45px; + -o-border-radius: 45px; + -ms-border-radius: 45px; + border: 2px solid #00AF74; +} +.account_logout_content { + float: left; + padding: 10px 0; + width: 106px; +} +.account_logout_name { + color: #000000; + line-height: 16px; + font-size: 13px; + margin-bottom: 4px; + word-wrap: break-word; + overflow: hidden; +} +.account_logout_email { + color: #848D8A; + line-height: 16px; + font-size: 12px; + margin-bottom: 8px; + word-wrap: break-word; + overflow: hidden; +} +.account_logout_btn { + white-space: nowrap; + display: inline-block; + width: 94px; + height: 28px; + text-align: center; + line-height: 28px; + background-color: #00AF74; + color: #FFFFFF; + font-size: 13px; + overflow: hidden; + border-radius: 2px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; +} +.account-login_suc .account_trig img { + width: 26px; + height: 26px; + cursor: default; + border-radius: 13px; + -webkit-border-radius: 13px; + -moz-border-radius: 13px; + -o-border-radius: 13px; + -ms-border-radius: 13px; + box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; + -webkit-box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; + -moz-box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; + -o-box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; + -ms-box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; +} +.account-dropdown_wrap{ + position: absolute; + right: 0; top: 50px; + display: none;border: 1px solid #BEE2D6; + box-shadow: 2px 2px 2px #DEDEDE,-2px 0 2px #DEDEDE; + border-top: 0; +} +.account_arrow { + top: -12px; + right: 18px; + z-index: 2; + position: absolute; + height: 0; + width: 0; + border: 6px dashed transparent; + border-bottom: 6px solid #F0FFFC; +} + +.header-fixed .account-dropdown_wrap{top: 30px;} +.header-fixed-up .account-dropdown_wrap{top: 40px;} + +/* +.body-theme_2 .account-dropdown_wrap{border-color: #d4e0eb;} +.body-theme_2 .account-loginfo_wrap {border-color: #d4e0eb;background-color: #D3E5F6;} +.body-theme_2 .account-loginfo_wrap img {border-color: #1187F6;} +.body-theme_2 .account_logout_btn {background-color: #1187F6;} +.body-theme_2 .account_arrow {border-bottom-color: #d4e0eb;} + +.body-theme_3 .account-dropdown_wrap{border-color: #ecdfe1;} +.body-theme_3 .account-loginfo_wrap {border-color: #ecdfe1;background-color: #FCE7EA;} +.body-theme_3 .account-loginfo_wrap img {border-color: #FC91A3;} +.body-theme_3 .account_logout_btn {background-color: #FC91A3;} +.body-theme_3 .account_arrow {border-bottom-color: #ecdfe1;} +*/ + +body .account_wrap { + visibility: visible; + visibility: visible !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/rtl-s/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/rtl-s/rtl.css new file mode 100755 index 000000000..32a86f35f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/rtl-s/rtl.css @@ -0,0 +1,3 @@ +.account_wrap { + visibility: hidden; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/rtl-s/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/rtl-s/rtl.more.css new file mode 100755 index 000000000..c1f8ad2de --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account-test/rtl-s/rtl.more.css @@ -0,0 +1,142 @@ +.account_wrap { + float: left; + position: relative; + max-width: 170px; +} +.account_trig { + padding: 0 10px; + height: 50px; + width: 30px; + overflow: hidden; + cursor: pointer; + text-align: center; + vertical-align: middle; + position: relative; + display: table-cell; + *display: block; +} +.account_title { + width: auto; + max-width: 150px; + line-height: 50px; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + color: rgba(255,255,255, 0.5); +} +.account_login-tip { + background: url("../img/btn-facebook-bg.png?__sprite") repeat-x; + border: 1px solid #456BB6; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + cursor: pointer; +} +.login-tip_con { + padding-right: 0px; + text-align: center; + height: 29px; + color: #ffffff; + line-height: 29px; + background: url("../img/btn-facebook-logo.png?__sprite") no-repeat; +} +.account-loginfo_wrap { + width: 220px; + word-wrap: break-word; + overflow: hidden; + padding: 20px 30px; + position: relative; + left: 0; + top: 0; + background-color: #D6F8EF; +} +.account-loginfo_wrap img { + width: 90px; + height: 90px; + margin-left: 16px; + margin-top: 4px; + float: right; + border-radius: 45px; + -webkit-border-radius: 45px; + -moz-border-radius: 45px; + -o-border-radius: 45px; + -ms-border-radius: 45px; + border: 2px solid #00AF74; +} +.account_logout_content { + float: right; + padding: 10px 0; + width: 106px; +} +.account_logout_name { + color: #000000; + line-height: 16px; + font-size: 13px; + margin-bottom: 4px; + word-wrap: break-word; + overflow: hidden; +} +.account_logout_email { + color: #848D8A; + line-height: 16px; + font-size: 12px; + margin-bottom: 8px; + word-wrap: break-word; + overflow: hidden; +} +.account_logout_btn { + white-space: nowrap; + display: inline-block; + width: 94px; + height: 28px; + text-align: center; + line-height: 28px; + background-color: #00AF74; + color: #FFFFFF; + font-size: 13px; + overflow: hidden; + border-radius: 2px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; +} +.account-login_suc .account_trig img { + width: 26px; + height: 26px; + cursor: default; + border-radius: 13px; + -webkit-border-radius: 13px; + -moz-border-radius: 13px; + -o-border-radius: 13px; + -ms-border-radius: 13px; + box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; + -webkit-box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; + -moz-box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; + -o-box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; + -ms-box-shadow: -2px 0 3px #ffffff,0 -2px 3px #ffffff,0 2px 3px #ffffff,2px 0 3px #ffffff; +} + +.account-dropdown_wrap{ position: absolute; left: 0; top: 50px; display: none;border: 1px solid #BEE2D6;box-shadow: 2px 2px 2px #DEDEDE,-2px 0 2px #DEDEDE;border-top: 0;} +.account_arrow { top: -12px;left: 18px; z-index: 2;position: absolute;height: 0;width: 0;border: 6px dashed transparent; border-bottom:6px solid #F0FFFC;} + +.header-fixed .account-dropdown_wrap{top: 30px;} +.header-fixed-up .account-dropdown_wrap{top: 40px;} +/* +.body-theme_2 .account-dropdown_wrap{border-color: #d4e0eb;} +.body-theme_2 .account-loginfo_wrap {border-color: #d4e0eb;background-color: #D3E5F6;} +.body-theme_2 .account-loginfo_wrap img {border-color: #1187F6;} +.body-theme_2 .account_logout_btn {background-color: #1187F6;} +.body-theme_2 .account_arrow {border-bottom-color: #d4e0eb;} + +.body-theme_3 .account-dropdown_wrap{border-color: #ecdfe1;} +.body-theme_3 .account-loginfo_wrap {border-color: #ecdfe1;background-color: #FCE7EA;} +.body-theme_3 .account-loginfo_wrap img {border-color: #FC91A3;} +.body-theme_3 .account_logout_btn {background-color: #FC91A3;} +.body-theme_3 .account_arrow {border-bottom-color: #ecdfe1;} +*/ + +body .account_wrap { + visibility: visible; + visibility: visible !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/account-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/account-async.js new file mode 100755 index 000000000..f42394d1d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/account-async.js @@ -0,0 +1,235 @@ +String.prototype.replaceTpl = function (o){ + return this.replace(/#\{([^}]*)\}/gm,function(v,k){return v=o[k]||""}) +}; + +var $ = require("common:widget/ui/jquery/jquery.js"), + helper = require("common:widget/ui/helper/helper.js"), + UT = require("common:widget/ui/ut/ut.js"); + +/** + * loginCtroller代表初始化。在index.html页面333行。 + */ +!function(WIN, conf) { + var conf = conf.commonLogin, + self = WIN.loginCtroller = { + /** + * verify user login status + * 2 ==> unlogin | 1 ==> already login + * vertify:2 ==>代表“没有登录”的状态,vertify:1 ==>代表“登录”的状态 + * uid ==> 用户唯一标识 + * bgUrl ==> 代表图片地址 + * loginUrl ==> 配置的参数,代表向服务器端发送的请求,参数,这里有一些参数需要转换编码,目前还没有弄懂参数的编码转换的含义 + * contentTpl :插入的数据 + */ + verify: 2, + uid: 0, + bgUrl: "", + loginUrl: conf.hao123LoginUrl.replaceTpl({ + idc: conf.idcMap[conf.countryCode], + country: conf.countryCode, + level: conf.level + }), + /** + * [ description] + * @return {[type]} [description] + */ + + // type : 1.代表登录状态,并且请求的数据data存在的情况 + // type :2. login 代表默认状态,没有登录成功 + // 最后的self.verify代表渲染页面之后将登录状态修改为当前值,type :1为已经登录,2:为未登录 + render: function(type, data) { + var parent = $("#fBook"), + elName = parent.find(".mod-login_name"), + elMail = parent.find(".mod-login_email"), + elImg = parent.find(".mod-login_img"), + elLogout = parent.find(".mod-login_logout a"); + + if(type == 1 && data) { + elName.html(data.uname); + elMail.html(data.email); + self.bgUrl = elImg.attr("src"); + elImg.attr("src",data.pic); + // update status when user login. + + parent.addClass("mod-login--on"); + // update uid + self.uid = data.uid; + }else{ + self.bgUrl && elImg.attr("src", self.bgUrl); + elName.html(conf.txtDefaultBtn); + elLogout.attr("href", conf.logoutUrl.replaceTpl({ + idc: encodeURIComponent(conf.idcMap[conf.countryCode]), + "gotourl": encodeURIComponent(document.location.href)})); + } + + // update status when user login. + self.verify = type; + }, + /** + * 检查登录的状态 + * Check user's status about wheather they have been login. + * @param url ==> target url; + * success ==> excute something when finish + * error ==> when login failure + * (1)obj为传入的对象值 + * (2)ajax发送请求,cache:false; + * (3)url:请求地址,转码后的地址 + * (4)success:成功之后要处理的事情 + * (5)error:失败后的信息提示 + */ + checkStatus: function(obj) { + obj = obj || {}; + $.ajax({ + cache: false, + url: conf.checkLoginUrl.replaceTpl({ + countryCode: encodeURIComponent(conf.countryCode) + }), + success: function(data) { + data = eval( "(" + data + ")" ); + if(data && data.status == 1 && obj.success) { + // record facebook id + data.bindid && $.cookie("__FBID", data.bindid, { + expires: 10*365, + path: '/' + }); + obj.success(data); + } + else obj.error && obj.error(); + }, + error: function() { + obj.error && obj.error(); + } + }); + }, + + /* + + loginCtroller.fire(url,width,height); + + login layout fold ==> loginCtroller.fire.call(jQuery("#fBook")[0]); + + params: + + url, width, height + */ + fire: function(url, width, height) { + if(self.verify == 1) { + this === $("#fBook")[0] && $("#fBook").addClass("mod-login--unfold"); + return self.verify; + } + + // var timer = new Date(); + //UT && UT.send({"type": "click","position": "login","sort": "login","modId":"account"}); + document.domain = "hao123.com"; + + var w = width || conf.iWidth, + h = height || conf.iHeight; + + WIN.open(url || self.loginUrl, "newwindow", "height="+ h +",innerHeight="+ h +",width="+ w +",innerWidth="+ w +",top="+(WIN.screen.availHeight-30- h )/2+",left="+(WIN.screen.availWidth-30- w )/2+",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no"); + }, + /** + * 为联合登录执行的操作 + * @param {[array]} data [需要处理的联合登录url列表] + * 登录成功后,从数据中得到需要处理的联合登录url的列表,遍历列表,对每个url填入联合登录所需的参数(参数如下,值从cookie中取),然后请求url,触发后端在其域下种下相应cookie + * (1)type: [facebook | twitter | google | yahoo] + * (2)uss: urlencode之后的第三方的access_token + * (3)bduss: 百度的token + * (4)level: 权限级别,业务自己的level,顶部为1,侧边栏为2 + * (5)thid: 用户在第三方的唯一id,非必填 + */ + unitedLogin: function(data){ + var suffix = "?type=#{type}&uss=#{uss}&bduss=#{bduss}&level=#{level}&thid=#{thid}", + imgList = []; + $.each(data.loginurl, function(i,v){ + imgList[i] = new Image(); + imgList[i].src = helper.replaceTpl(v+suffix, { + type: $.cookie("LOGINTYPE") || "", + uss: $.cookie("USS") || "", + bduss: $.cookie("BDUSS") || "", + level: $.cookie("LEVEL") || "", + thid: $.cookie("THIRDID") || "" + }); + }); + }, + /** + /** + * 初始化执行的操作 + * @param {[type]} data [description] + * @return {[type]} [description] + * (1)hao123LoginCallback:回调函数:不错在data或者未登录的状态时要执行的事情==>弹窗 + * 如果成功,执行“统计”请求;并且渲染页面 + * (2)绑定点击事件:在整个按钮点击的情况下,首先,判断登录状态(“1”为登录,“2”为未登录) + * 登录状态下:给最外层div添加样式“mod-login--unfold”(这个样式在login_mod.css文件里), 做的操作就是将div展开,并且将里面的(图片,姓名,邮箱,lougout按钮)样式切换到大图状态。 + * (3)第二种情况 ==>未登录。首先,发送统计请求,再执行window.open方法,打开登录页面的窗口-> 登录 + * (4)给body绑定事件:移除大图下面所有效果,切换为小图状态。 + * (5)给logout标签绑定“统计”事件。 + * (6)最后一步调用“checkStatus”方法,如果成功的话,渲染页面 + */ + init: function(data) { + + //self.render(1,data); + // 1. reg global callback + WIN.hao123LoginCallback = function(data) { + //console.log(data); + if(!data || data.status != 1) { + //$(".layoutBg").hide(); 优化代码 + //$(".login_div").hide(); + return alert(conf.txtErrorMsg); + } + // record facebook id + data.bindid && $.cookie("__FBID", data.bindid, { + expires: 10*365, + path: '/' + }); + + UT && UT.send({"type": "access", "position": "login"}); + self.render(data.status, data); + //$(".layoutBg").hide(); 优化代码 + //$(".login_div").hide(); + Gl.history && Gl.history.get(); //Get the sites list again for history widget + Gl.notepad && Gl.notepad.initNotes(); // intialize notepad while available + Gl.hotsiteFB && Gl.hotsiteFB.start(); + Gl.loginPopup && Gl.loginPopup.remove(); //close login popup + + // united login for tieba .etc + data.loginurl && self.unitedLogin(data); + } + + var isInsert = false; + // 2. bind button event + $("#fBook").on("click", function() { + if(self.verify != 1) { + UT && UT.send({ + "type": "click", + "ac": "b", + "position": "login", + "sort": "login", + "modId": "account" + }); + } + self.fire.call(this); + }); + + $("body").on("click",function(e){ + if(!/mod-login/.test(e.target.className)){ + $("#fBook").removeClass("mod-login--unfold"); + } + }); + + $(".mod-login_logout a").on("click", function() { + UT && UT.send({"type": "click","position":"login","sort":"logout","modId":"account"}); + }); + // 3. check status + self.checkStatus({ + success: function(data) { + self.render(1, data); + }, + error: function() { + // alert("error") + } + }); + // 4. init render + self.render(2); + } + } +}(window, conf); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/account.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/account.tpl new file mode 100755 index 000000000..e7d348356 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/account.tpl @@ -0,0 +1,90 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/account/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/account/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/account/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/account/rtl/rtl.more.css"%> <%/if%> + +<%script%> +window.conf || (window.conf = {}); + <%* + /** + * common login configuration + * @type {Object} + * @author Thomas_曹奋泽 + * @update 2013-05-23 0:31 + * Facebook页面登录退出的配置信息(可供PM使用) + * conf.commonLogin:入口。 + * 信息:(1)iWidth,iHeight:弹出窗口宽高。 + * (2)userip: 登录时的参数信息(可配)。 + * (3)jumpUrl:登录时的参数信息(可配)。 + * (4)loginUrl:登录时的参数信息(可配)。 + * (5)checkLoginUrl:Ajax请求地址。 + * (6)logoutUrl:退出时请求的URL地址,刷新页面。 + * (7)domainName:各国机房服务器地址(优先选择的地址)。 + * (8)txtDefaultBtn:默认按钮文字信息(可配)。 + * (9)txtErrorMsg:错误状态提示信息(可配)。 + * (10)level:权限级别(可配)。 + */ + *%> + + conf.commonLogin = { + iWidth:<%$body.commonLogin.iWidth%>, + iHeight:<%$body.commonLogin.iHeight%>, + countryCode:conf.country, + + <%if !empty($sysInfo.userip)%> + userip: "<%$sysInfo.userip%>", + <%else%> + userip: "sdfdslgksdlgk", + <%/if%> + + loginCallbackName: "<%$body.commonLogin.loginCallbackName%>", + + jumpUrl: "<%$body.commonLogin.jumpUrl%>", + hao123LoginUrl: "<%$body.commonLogin.hao123LoginUrl%>", + checkLoginUrl:"<%$body.commonLogin.checkLoginUrl%>", + logoutUrl:"<%$body.commonLogin.logoutUrl%>", + domainName: <%json_encode($body.commonLogin.domainName)%>, + txtDefaultBtn: "<%$body.commonLogin.txtDefaultBtn%>", + txtErrorMsg: "<%$body.commonLogin.txtErrorMsg%>", + idcMap: <%json_encode($body.commonLogin.idcMap)%>, + level: "<%$body.commonLogin.level%>", + message:"<%$body.commonLogin.message%>", + infoMsg:"<%$body.commonLogin.infoMessage%>" + }; + + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.account", function () { + require.async("common:widget/header/account/account-async.js", function () { + // init + $(function() { + $("#fBook")[0] && $("#fBook").css("visibility") !== 'hidden' && window.loginCtroller && loginCtroller.init(); + }); + }); + }); + + $(function () { + $(window).trigger("e_go.account"); + }); + + $("#fBook").one("mouseenter", function () { + $(window).trigger("e_go.account"); + }); + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/img/bg-account.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/img/bg-account.png new file mode 100755 index 000000000..5876a043b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/img/bg-account.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/img/login.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/img/login.gif new file mode 100755 index 000000000..9e26c6716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/img/login.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/ltr/ltr.css new file mode 100755 index 000000000..eb2911c6f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/ltr/ltr.css @@ -0,0 +1 @@ +.mod-login{ display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/ltr/ltr.more.css new file mode 100755 index 000000000..39698c8e0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/ltr/ltr.more.css @@ -0,0 +1,252 @@ +/** + * “默认”状态小图整体div的显示 + */ +.mod-login{ + height: 16px; + width: 170px; + background: url("../img/bg-account.png?__sprite") repeat-x; + margin-top: 2px; + margin-left: 2px; + float: right; + overflow: hidden; + position: absolute; + right:22px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + cursor: pointer; + margin-bottom: 2px; + z-index: 3; + display: block !important; +} +/** + * ”默认状态小图的显示 + */ +.mod-login_avatar{ + width: 16px; + height: 12px; + margin-top: 2px; + float: left; + overflow: hidden; + border-right: 1px solid #a0b8d2; + position:relative; + overflow:hidden; +} +/** + * “默认”状态小图“body”区域的显示 + */ +.mod-login_body{ + background: #e0e7ee; + overflow: hidden; +} +/** + * “默认”状态小图“头像”的显示 + */ +.mod-login_img{ + width: auto; + height: auto; + float: left; + position:relative; + top:-132px; + left:2px; + margin-left: 2px; +} +/** + * “默认”状态小图“姓名”的显示 + */ +.mod-login_name{ + color:#456bb6; + text-align:center; + word-wrap: break-word; + margin-bottom: 4px; + height:10px; + font-size:12px; + margin-top: 1px; +} +/*------------more:------------*/ + +/** + * “默认”状态大图“邮箱”的显示(默认为影藏) + */ +.mod-login_email{ + margin-left: 10px; + color:#353535; + word-wrap:break-word; + height:30px; + font-size: 12px; +} +/** + * “默认”状态小图“退出按钮”的显示(默认为影藏) + */ +.mod-login_logout{ + width: 60px; + height: 20px; + background: #bdd8ef; + text-align: center; + line-height: 20px; + right:5px; + border: 1px solid #a0b8d2; + position: absolute; + bottom: 5px; + display: none; + overflow: hidden; + padding: 0 3px; +} +.mod-login_logout a { + color: #3b5998; +} +/** + * 登录状态时整个div的显示 + */ +.mod-login--on{ + background: #e0e7ee; + border: 1px solid #009e69; +} +/** + * 登录状态时小图的显示 + */ +.mod-login--on .mod-login_img{ + width: 12px; + height: 12px; + position: static; + margin-left: 2px; +} +/** + * 登录状态时“展开”显示大图后真个div的显示 + */ +body .mod-login--unfold{ + height: 92px; + cursor: default; + background-image: none; +} +/** + * 登录状态“展开”显示大图后“头像”的显示 + */ +.mod-login--unfold .mod-login_avatar{ + width:40px; + height:40px; + margin-left:5px; + margin-top: 7px; + background-image: none; +} +/** + * 登录状态“展开”显示大图后“姓名”的显示 + */ +.mod-login--unfold .mod-login_name{ + margin-top: 10px; + margin-left: 10px; + text-align: left; + height: 15px; + overflow: hidden; + font-weight: bold; +} +/** + * 登录状态“展开”显示大图后“退出按钮”的显示 + */ +.mod-login--unfold .mod-login_logout{ + display: block; +} +/** + * 登录状态“展开”显示大图后“头像”的显示 + */ +.mod-login--unfold .mod-login_img{ + width: 40px; + height: 40px; +} + +.layoutBg { + width: 100%; + height: 4250px; + display:none; + position: absolute; + top: 0; + left: 0; + z-index: 8888; + background: url(http://mat1.gtimg.com/www/images/qq2012/alphabg.png); +} +.login_div { + position: fixed; + /*width: 446px; */ + height: 416px; + padding: 0px; + top: 50%; + left:50%; + margin: -164px 0px 0px -245px; + z-index: 9999; + visibility: hidden; + overflow:hidden; +} +.fake_pageheader{ + background: #6d84b4; + color: #fff; + height:33px; + position:relative; + z-index:9999; +} +.homelink{ + background: url(https://fbstatic-a.akamaihd.net/rsrc.php/v2/yd/r/Cou7n-nqK52.gif) no-repeat 10px 50%; + color: #fff; + margin: 0; + padding: 8px 10px 8px 30px; + font-size: 14px; + font-weight: bold; +} +.closeBtn { + float:right; + margin-right: 10px; + margin-top: 10px; + cursor:pointer; + font-weight: bold; +} +.cancelBtn{ + width: 43px; + height: 22px; + font-weight: bold; + font-size: 14px; + border: 1px solid #ccc; + position: absolute; + top: 277px; + right: 5px; + cursor: pointer; +} +.fake_booklet{ + position:relative; + z-index:99999 +} +.fake_booklet_lv2{ + height:277px; + background:white; +} +.fake_booklet_lv2_msg{ + position:absolute; + width:440px; +} +.p_msg { + margin-top:50px; + text-align:center; + font-size: 14px; +} +.msg_img { + margin-left:45px; + margin-top:20px; +} +.fake_booklet_lv2_info{ + width:410px; + /*height:50px;*/ + border:1px solid #cccccc; + color:#909090; + background:#f2f2f2; + overflow:hidden; + margin: 20px auto; + margin-left:45px; +} +.info_msg { + position: relative; + margin: 10px; + display: inline-block; + line-height: 1.3; +} +.login_frame { + position:relative; + top:-33px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/rtl/rtl.css new file mode 100755 index 000000000..eb2911c6f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/rtl/rtl.css @@ -0,0 +1 @@ +.mod-login{ display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/rtl/rtl.more.css new file mode 100755 index 000000000..2899e4a5f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/account/rtl/rtl.more.css @@ -0,0 +1,260 @@ +/** + * “默认”状态小图整体div的显示 + */ +.mod-login{ + height: 16px; + background: url("../img/bg-account.png?__sprite") repeat-x; + margin-top: 2px; + overflow: hidden; + position: absolute; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + cursor: pointer; + margin-bottom: 2px; + margin-left:0; + margin-right: 2px; + float: right; + right: auto; + left: 22px; + width:169px; + display: block !important; + z-index: 3; +} +/** + * ”默认状态小图的显示 + */ +.mod-login_avatar{ + width: 16px; + height: 12px; + margin-top: 2px; + overflow: hidden; + overflow:hidden; + float: right; + border-left: 1px solid #a0b8d2; +} +/** + * “默认”状态小图“body”区域的显示 + */ +.mod-login_body{ + background: #e0e7ee; + overflow: hidden; +} +/** + * “默认”状态小图“头像”的显示 + */ +.mod-login_img{ + width: auto; + height: auto; + position:relative; + top:-132px; + left:2px; + float: right; + margin-right: -6px; +} +/** + * “默认”状态小图“姓名”的显示 + */ +.mod-login_name{ + color:#456bb6; + text-align:center; + word-wrap: break-word; + margin-bottom: 4px; + height:10px; + font-size:12px; +} + +/*---------more:-----------*/ + +/** + * “默认”状态大图“邮箱”的显示(默认为影藏) + */ +.mod-login_email{ + margin-left: 5px; + color:#353535; + word-wrap:break-word; + height:30px; + font-size: 12px; +} +/** + * “默认”状态小图“退出按钮”的显示(默认为影藏) + */ +.mod-login_logout{ + width: 60px; + height: 20px; + background: #bdd8ef; + text-align: center; + line-height: 20px; + + border: 1px solid #a0b8d2; + position: absolute; + bottom: 5px; + display: none; + overflow: hidden; + padding: 0 3px; + + left: 5px; +} +.mod-login_logout a { + color: #3b5998; +} +/** + * 登录状态时整个div的显示 + */ +.mod-login--on{ + background: #e0e7ee; + border: 1px solid #009e69; +} +/** + * 登录状态时小图的显示 + */ +.mod-login--on .mod-login_img{ + width: 12px; + height: 12px; + position: static; + margin-left: 2px; +} +/** + * 登录状态时“展开”显示大图后真个div的显示 + */ +body .mod-login--unfold{ + height: 92px; + cursor: default; + background-image: none; +} +/** + * 登录状态“展开”显示大图后“头像”的显示 + */ +.mod-login--unfold .mod-login_avatar{ + width:40px; + height:40px; + margin-top: 7px; + background-image: none; + margin-right:5px; +} +/** + * 登录状态“展开”显示大图后“姓名”的显示 + */ +.mod-login--unfold .mod-login_name{ + margin-top: 10px; + height: 15px; + overflow: hidden; + font-weight: bold; + margin-right: 10px; + text-align: right; +} +/** + * 登录状态“展开”显示大图后“退出按钮”的显示 + */ +.mod-login--unfold .mod-login_logout{ + display: block; +} +/** + * 登录状态“展开”显示大图后“头像”的显示 + */ +.mod-login--unfold .mod-login_img{ + width: 40px; + height: 40px; +} +.mod-login--on .mod-login_img{ + margin-right: 2px; + margin-left: 0; +} +.layoutBg { + width: 100%; + height: 4250px; + display:none; + position: absolute; + top: 0; + left: 0; + z-index: 8888; + background: url(http://mat1.gtimg.com/www/images/qq2012/alphabg.png); +} +.login_div { + position: fixed; + /*width: 446px; */ + height: 416px; + padding: 0px; + top: 50%; + left:50%; + margin: -164px 0px 0px -245px; + z-index: 9999; + visibility: hidden; + overflow:hidden; +} +.fake_pageheader{ + background: #6d84b4; + color: #fff; + height:33px; + position:relative; + z-index:9999; +} +.homelink{ + background: url(https://fbstatic-a.akamaihd.net/rsrc.php/v2/yd/r/Cou7n-nqK52.gif) no-repeat 10px 50%; + color: #fff; + margin: 0; + padding: 8px 10px 8px 30px; + font-size: 14px; + font-weight: bold; +} +.closeBtn { + float:right; + margin-right: 10px; + margin-top: 10px; + cursor:pointer; + font-weight: 33bold; +} +.cancelBtn{ + width: 43px; + height: 22px; + font-weight: bold; + font-size: 14px; + border: 1px solid #ccc; + position: absolute; + top: 277px; + right: 5px; + cursor: pointer; +} +.fake_booklet{ + position:relative; + z-index:99999 +} +.fake_booklet_lv2{ + height:277px; + background:white; +} +.fake_booklet_lv2_msg{ + position:absolute; + width:440px; +} +.p_msg { + margin-top:50px; + text-align:center; + font-size: 14px; + margin-right:45px; +} +.msg_img { + position: relative; + left: -60px; + margin-top:20px; +} +.fake_booklet_lv2_info{ + width:410px; + border:1px solid #cccccc; + color:#909090; + background:#f2f2f2; + overflow:hidden; + margin: 20px auto; + margin-right: 45px; +} +.info_msg { + position: relative; + margin: 10px; + display: inline-block; + line-height: 1.3; +} +.login_frame { + position:relative; + top:-33px; + float:left; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/add-fav-bar-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/add-fav-bar-async.js new file mode 100755 index 000000000..353319a3c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/add-fav-bar-async.js @@ -0,0 +1,120 @@ +// Sethome & AddFav functional top bar +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +require("common:widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js"); +require("common:widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js"); + +window.Gl || (window.Gl = {}); + +Gl.addFavBar = function (pageType) { + if (!conf.addFavBar) return; + + var ua = navigator.userAgent, + _conf = conf.addFavBar, + container = $('#addFavBar'), + + browser = /MSIE/.test(ua) ? "ie" : /Firefox/.test(ua) ? + "firefox" : /Chrome/.test(ua) ? + "chrome" : "other", + + type = browser === "ie" ? _conf.ieType : browser === "firefox" ? + _conf.ffType : browser === "chrome" ? + _conf.chType : _conf.otherType, + + init = function () { + + //当PM将showbarTime从非0改为0时,重置cookie。需要排除为空的情况 + if(parseInt(_conf.showbarTime) === 0){ + $.cookie("Gh_b", 0); + } + + // 原有cookie清空,原来的值不再使用,可能出现以前cookie失效,时间短,忽略 + $.cookie("hidebar", null); + + //cookie中存的都是字符串,!("0") == false,所以需要转换为数字 + !parseInt($.cookie("Gh_b")) && type && setBar(); + }, + + // Set the bar's behavior in different browser for current page + setBar = function () { + if (_conf.hideBar) return; + + if( type === "addFav" ){ + if( browser === "ie" ){ + creatElement("addFav", _conf.addFav); + }else{ + creatElement("addFav", _conf.addFavNoSupport); + $("#addFavBtn").hide(); + } + }else{ + creatElement(type || "download", _conf[type] || _conf.download); + } + }, + + // Create DOM element + creatElement = function (type, config) { + var inner = '
                      ' + config.title + '' + config.text + '' + config.button + '
                      '; + container.append(inner); + // $("body").prepend(container); + bindEvent(type); + /MSIE 6.0/.test(ua) && container.show(); + container.slideDown(_conf.slideSpeed); + }, + + // Bind event + bindEvent = function (type) { + var setHomeBtn = $("#setHomeBtn"), + addFavBtn = $("#addFavBtn"), + downloadBtn = $("#downloadBtn"), + close = $("#addFavClose"); + setHomeBtn.on("click", function (e) { + e.preventDefault(); + $(this).sethome(); + hideBar(); + }); + addFavBtn.on("click", function (e) { + e.preventDefault(); + $().addfav(conf.userbarBtn.addFavText); + hideBar(); + }); + downloadBtn.on("click", function (e) { + e.preventDefault(); + window.open(_conf.download.url, "_blank"); + hideBar(); + }); + close.on("click", function (e) { + e.preventDefault(); + hideBar(); + $("#kbd").length && $("#kbd").animate({top:"130px"},_conf.slideSpeed); + }); + type === "addFav" && $(document).on("keydown", function (e) { + if(/Macintosh/.test(ua)) { + (e.metaKey && e.keyCode === 68) && hideBar(); + } else { + (e.ctrlKey && e.keyCode === 68) && hideBar(); + } + }); + + container.on("click", "a", function() { + UT.send({ + position: conf.pageType, + sort: $(this).attr("data-val"), + type: "click", + modId: "sethp-bar" + }); + }); + }, + + // Hide the bar and set cookie + hideBar = function () { + var time = _conf.showbarTime === "0" ? 0 : _conf.showbarTime ? parseInt(_conf.showbarTime) : 1; + + /MSIE 6.0/.test(ua) && container.hide(); + container.slideUp(_conf.slideSpeed); + $.cookie("Gh_b", 1, {expires: time}); + }; + + $(document).ready(function () { + init(); + }); +}; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/add-fav-bar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/add-fav-bar.tpl new file mode 100755 index 000000000..0623b62b1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/add-fav-bar.tpl @@ -0,0 +1,65 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/add-fav-bar/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/add-fav-bar/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/add-fav-bar/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/add-fav-bar/rtl/rtl.more.css"%> <%/if%> + + +
                      +<%script%> + // Configuration for addFavBar + <%if isset($body.addFavBar)%> + conf.addFavBar = { + setHome: { + title: "<%$body.addFavBar.setHome.title%>", + text: "<%$body.addFavBar.setHome.text%>", + button: "<%$body.addFavBar.setHome.button%>" + }, + addFav: { + title: "<%$body.addFavBar.addFav.title%>", + text: "<%$body.addFavBar.addFav.text%>", + button: "<%$body.addFavBar.addFav.button%>" + }, + addFavNoSupport: { + title: "<%$body.addFavBar.addFavNoSupport.title%>", + text: "<%$body.addFavBar.addFavNoSupport.text%>", + button: "<%$body.addFavBar.addFavNoSupport.button%>" + }, + download: { + title: "<%$body.addFavBar.download.title%>", + text: "<%$body.addFavBar.download.text%>", + button: "<%$body.addFavBar.download.button%>", + url: "<%$body.addFavBar.download.url%>" + }, + hideBar: "<%$body.addFavBar.hideBar%>", + ieType:"<%$body.addFavBar.ie%>", + ffType:"<%$body.addFavBar.firefox%>", + chType:"<%$body.addFavBar.chrome%>", + otherType:"<%$body.addFavBar.others%>", + showbarTime:"<%$body.addFavBar.showbarTime%>", + slideSpeed: 1000 + }; + <%/if%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.addfavbar", function () { + require.async("common:widget/header/add-fav-bar/add-fav-bar-async.js", function () { + Gl.addFavBar(conf.pageType); + }); + }); + + $(function () { + $(window).trigger("e_go.addfavbar"); + }); + + $("#addFavBar").one("mouseenter", function () { + $(window).trigger("e_go.addfavbar"); + }); + }); +<%/script%> + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-addfav.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-addfav.png new file mode 100755 index 000000000..d6e335636 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-addfav.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-bg.png new file mode 100755 index 000000000..f1a4c395c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-btn-bg-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-btn-bg-hover.png new file mode 100755 index 000000000..ff89680f0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-btn-bg-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-btn-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-btn-bg.png new file mode 100755 index 000000000..58a644ec6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-btn-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-down.png new file mode 100755 index 000000000..d6e1be77d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-sethome.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-sethome.png new file mode 100755 index 000000000..09379b8e8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-bar-sethome.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-close-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-close-hover.png new file mode 100755 index 000000000..9510ffa88 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-close-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-close.png new file mode 100755 index 000000000..ae9fea26f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/img/i-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/ltr/ltr.css new file mode 100755 index 000000000..20987d606 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/ltr/ltr.css @@ -0,0 +1,7 @@ +/* set home & add fav top bar */ +.bar-addfav,.bar-addfav_inner { + display: none; +} +#ieSetHomePage { + display: none; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/ltr/ltr.more.css new file mode 100755 index 000000000..c84104ded --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/ltr/ltr.more.css @@ -0,0 +1,71 @@ +/* set home & add fav top bar */ + +.bar-addfav_inner{display: block;} +.bar-addfav { + font-size: 14px; + height: 37px; + border-bottom: 1px solid #00894b; + background: url(../img/i-bar-bg.png?__sprite) repeat-x; + overflow: hidden; +} +.bar-addfav-inner { + height: 37px; + min-height: 37px; +} +.bar-addfav_title, .bar-addfav_text { + float: left; + line-height: 37px; + color: #009455; + padding-right: 5px; + font-weight: bold; +} +.bar-addfav_icon { + float: left; + display: inline-block; + overflow: hidden; + height: 13px; + width: 14px; + margin: 11px 5px 0 0; + +} +.icon-setHome { + background: url(../img/i-bar-sethome.png?__sprite) no-repeat; +} +.icon-addFav { + background: url(../img/i-bar-addfav.png?__sprite) no-repeat; +} +.icon-download { + background: url(../img/i-bar-down.png?__sprite) no-repeat; +} +.bar-addfav_btn { + display: inline-block; + float: left; + color: #fff; + height: 19px; + line-height: 19px; + padding: 0 14px; + background: url(../img/i-bar-btn-bg.png?__sprite) repeat-x; + border: 1px solid #01a66f; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + margin: 8px 0 0 25px; + outline: none; +} +.bar-addfav_btn:hover { + background: url(../img/i-bar-btn-bg-hover.png?__sprite) repeat-x; + border: 1px solid #01925a; +} +.bar-addfav_close { + display: inline-block; + float: right; + overflow: hidden; + width: 10px; + height: 9px; + margin-top: 14px; + background: url(../img/i-close.png?__sprite) no-repeat; +} +.bar-addfav_close:hover { + background: url(../img/i-close-hover.png?__sprite) no-repeat; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/rtl/rtl.css new file mode 100755 index 000000000..20987d606 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/rtl/rtl.css @@ -0,0 +1,7 @@ +/* set home & add fav top bar */ +.bar-addfav,.bar-addfav_inner { + display: none; +} +#ieSetHomePage { + display: none; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/rtl/rtl.more.css new file mode 100755 index 000000000..f0889c71f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/add-fav-bar/rtl/rtl.more.css @@ -0,0 +1,72 @@ +/* set home & add fav top bar */ + +.bar-addfav_inner{display: block;} +.bar-addfav { + font-size: 14px; + height: 37px; + border-bottom: 1px solid #00894b; + background: url(../img/i-bar-bg.png?__sprite) repeat-x; + overflow: hidden; +} +.bar-addfav-inner { + height: 37px; + min-height: 37px; +} +.bar-addfav_title, .bar-addfav_text { + float: right; + line-height: 37px; + color: #009455; + padding-left: 5px; +} +.bar-addfav_title { + font-weight: bold; +} +.bar-addfav_icon { + float: right; + display: inline-block; + overflow: hidden; + height: 13px; + width: 14px; + margin: 11px 0 0 5px; +} +.icon-setHome { + background: url(../img/i-bar-sethome.png?__sprite) no-repeat; +} +.icon-addFav { + background: url(../img/i-bar-addfav.png?__sprite) no-repeat; +} +.icon-download { + background: url(../img/i-bar-down.png?__sprite) no-repeat; +} +.bar-addfav_btn { + display: inline-block; + float: right; + color: #fff; + height: 19px; + line-height: 19px; + padding: 0 14px; + background: url(../img/i-bar-btn-bg.png?__sprite) repeat-x; + border: 1px solid #01a66f; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + margin: 8px 25px 0 0; + outline: none; +} +.bar-addfav_btn:hover { + background: url(../img/i-bar-btn-bg-hover.png?__sprite) repeat-x; + border: 1px solid #01925a; +} +.bar-addfav_close { + display: inline-block; + float: left; + overflow: hidden; + width: 10px; + height: 9px; + margin-top: 14px; + background: url(../img/i-close.png?__sprite) no-repeat; +} +.bar-addfav_close:hover { + background: url(../img/i-close-hover.png?__sprite) no-repeat; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/app-list-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/app-list-async.js new file mode 100755 index 000000000..c149cea3b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/app-list-async.js @@ -0,0 +1,46 @@ +var $ = require("common:widget/ui/jquery/jquery.js"), + helper = require("common:widget/ui/helper/helper.js"), + UT = require("common:widget/ui/ut/ut.js"); + +var wrap = $("#appContent"), + appHd = $("#appHead"), + content = wrap.find(".app-group_content"), + CON = conf.appTest, + num = parseInt(CON.limitNum, 10), //每行显示app数目 + len = CON.list.length, //cms中配置的app数目 + TPL = '#{title}', + appData = "", + listWidth = (CON.margin * 2 + Math.max(parseInt(CON.wordWidth, 10), parseInt(CON.iconWidth, 10))) * num + 4; //用于每几个显示一行 + +$.each(CON.list, function(index, value) { + if (index % num === 0) { + appData += "
                      "; + } + appData += helper.replaceTpl(TPL, value); + if (((index + 1) % num === 0) || (index + 1 === num)) { + appData += "
                      "; + } +}); + +content.html(appData); + +wrap.parent().hover(function() { + appHd.addClass("module-mask"); + wrap.show(); +}, function() { + appHd.removeClass("module-mask"); + wrap.hide(); +}); + +content.on("click", "a", function(e) { + UT.send({ + "type": "click", + "position": "clickApp", + "sort": $(this).attr("href"), + "value": $(this).children('span').html(), + "modId": "app-list" + }); +}); +if (CON.isMouseTriggered) { + wrap.parent().trigger('mouseenter'); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/app-list.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/app-list.tpl new file mode 100755 index 000000000..9e7569092 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/app-list.tpl @@ -0,0 +1,51 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/app-list/ltr-s/ltr.css?__inline'); +<%else%> +@import url('/widget/header/app-list/rtl-s/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/app-list/ltr-s/ltr.more.css"%> +<%else%> +<%require name="common:widget/header/app-list/rtl-s/rtl.more.css"%> +<%/if%> +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +<%script%> +conf.appTest = <%json_encode($body.headerTest.app)%>; + +require.async("common:widget/ui/jquery/jquery.js", function ($) { + + var $win = $(window); + + if(/(png|gif|jpg|jpeg)/i.test(conf.appTest.title)) { + $("#appHead").html(""); + } else { + $("#appHead").addClass("app-head_word").html(conf.appTest.title); + } + + // 鼠标滑过按钮或者onload之后加载JS文件,只加载一次 + $win.one("headerTest.app", function() { + require.async("common:widget/header/app-list/app-list-async.js"); + }).load(function() { + $win.trigger("headerTest.app"); + }); + + $("#appHead").one("mouseenter", function() { + $win.trigger("headerTest.app"); + // 防止用户在未load之前hover相关区域不能触发脚本里面的事件 + conf.appTest.isMouseTriggered = true; + }); +}); + +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/ltr-s/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/ltr-s/ltr.css new file mode 100755 index 000000000..c8b8b6240 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/ltr-s/ltr.css @@ -0,0 +1,8 @@ +.app-wrapper { + float: right; + position: relative; + visibility: hidden; +} +.app-group { + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/ltr-s/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/ltr-s/ltr.more.css new file mode 100755 index 000000000..34aebd81d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/ltr-s/ltr.more.css @@ -0,0 +1,120 @@ +.app-wrapper { + visibility: visible !important; + max-width: 170px; +} +.app-head { + height: 50px; + max-width: 150px; + text-align: center; + padding: 0 10px; + display: table-cell; + vertical-align: middle; + overflow: hidden; + *display: block; + cursor: default !important; +} +.header-fixed .app-head { + height: 30px; +} +.header-fixed .app-head img { + width: 14px; + height: 14px; +} +.app-head_word { + line-height: 50px; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + color: rgba(255,255,255, 0.5); +} +.header-fixed .app-head_word { + line-height: 30px; +} +.app-group { + position: absolute; + right: 0; + top: 50px; + box-shadow: 2px 2px 2px #DEDEDE, -2px 0 2px #DEDEDE; + background-color: #ebfcf7; + border: 1px solid #bee2d6; +} +.app-group_content { + padding: 16px 12px; +} +.app-item { + float: left; + margin: 8px 6px 4px; + _margin-left: 3px; + text-align: center; +} +.app-item img { + margin: 0 auto; +} +.app-item span { + display: block; + text-align: center; + font-size: 14px; + height: 26px; + line-height: 26px; + color: #454545; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.app-arrow, .app-arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 6px dashed transparent; +} +.app-arrow { + border-bottom-color: #bee2d6; + border-bottom-style: solid; + top: -12px; + right: 10px; +} +.app-arrow_bg { + border-bottom-color: #EBFCF7; + border-bottom-style: solid; + margin: -6px 0 0 -7px; +} +.app-group_list { + overflow: hidden; + margin-left: 4px; +} +.header-fixed .app-group { + top: 30px; +} + +/*header-fixed-up*/ +.header-fixed-up .app-head { + height: 40px; +} +.header-fixed-up .app-head_word { + line-height: 40px; +} +.header-fixed-up .app-group { + top: 40px; +} +/* +.body-theme_2 .app-group { + border: 1px solid #d4e0eb; + background-color: #eef3f8; +} +.body-theme_2 .app-arrow { + border-bottom-color: #d4e0eb; +} +.body-theme_2 .app-arrow_bg { + border-bottom-color: #eef3f8; +} +.body-theme_3 .app-group { + border: 1px solid #ecdfe1; + background-color: #fcf6f7; +} +.body-theme_3 .app-arrow { + border-bottom-color: #ecdfe1; +} +.body-theme_3 .app-arrow_bg { + border-bottom-color: #fcf6f7; +} +*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/rtl-s/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/rtl-s/rtl.css new file mode 100755 index 000000000..5e9ed09cc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/rtl-s/rtl.css @@ -0,0 +1,8 @@ +.app-wrapper { + float: left; + position: relative; + visibility: hidden; +} +.app-group { + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/rtl-s/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/rtl-s/rtl.more.css new file mode 100755 index 000000000..43c40dd4d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/app-list/rtl-s/rtl.more.css @@ -0,0 +1,120 @@ +.app-wrapper { + visibility: visible !important; + max-width: 170px; +} +.app-head { + height: 50px; + max-width: 150px; + text-align: center; + padding: 0 10px; + display: table-cell; + vertical-align: middle; + overflow: hidden; + *display: block; + cursor: default !important; +} +.header-fixed .app-head { + height: 30px; +} +.header-fixed .app-head img { + width: 14px; + height: 14px; +} +.app-head_word { + line-height: 50px; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + color: rgba(255,255,255, 0.5); +} +.header-fixed .app-head_word { + line-height: 30px; +} +.app-group { + position: absolute; + left: 0; + top: 50px; + box-shadow: 2px 2px 2px #DEDEDE, -2px 0 2px #DEDEDE; + background-color: #ebfcf7; + border: 1px solid #bee2d6; +} +.app-group_content { + padding: 16px 12px; +} +.app-item { + float: right; + margin: 8px 6px 4px; + _margin-right: 3px; + text-align: center; +} +.app-item img { + margin: 0 auto; +} +.app-item span { + display: block; + text-align: center; + font-size: 14px; + height: 26px; + line-height: 26px; + color: #454545; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.app-arrow, .app-arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 6px dashed transparent; +} +.app-arrow { + border-bottom-color: #bee2d6; + border-bottom-style: solid; + top: -12px; + left: 10px; +} +.app-arrow_bg { + border-bottom-color: #EBFCF7; + border-bottom-style: solid; + margin: -6px -7px 0 0 ; +} +.app-group_list { + overflow: hidden; + margin-right: 4px; +} +.header-fixed .app-group { + top: 30px; +} + +/*header-fixed-up*/ +.header-fixed-up .app-head { + height: 40px; +} +.header-fixed-up .app-head_word { + line-height: 40px; +} +.header-fixed-up .app-group { + top: 40px; +} +/* +.body-theme_2 .app-group { + border: 1px solid #d4e0eb; + background-color: #eef3f8; +} +.body-theme_2 .app-arrow { + border-bottom-color: #d4e0eb; +} +.body-theme_2 .app-arrow_bg { + border-bottom-color: #eef3f8; +} +.body-theme_3 .app-group { + border: 1px solid #ecdfe1; + background-color: #fcf6f7; +} +.body-theme_3 .app-arrow { + border-bottom-color: #ecdfe1; +} +.body-theme_3 .app-arrow_bg { + border-bottom-color: #fcf6f7; +} +*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/banner.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/banner.tpl new file mode 100755 index 000000000..6d077a040 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/banner.tpl @@ -0,0 +1,16 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/banner/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/banner/rtl/rtl.more.css"%> <%/if%> + + +
                      + <%if isset($body.banner.url)%> + + <%$body.banner.title%> + + <%else%> + <%$body.banner.title%> + <%/if%> +
                      + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/ltr/ltr.css new file mode 100755 index 000000000..98eaa13f9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/ltr/ltr.css @@ -0,0 +1,3 @@ +.userbar-banner { + margin-right: 30px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/ltr/ltr.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/rtl/rtl.css new file mode 100755 index 000000000..3f2013054 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/rtl/rtl.css @@ -0,0 +1,3 @@ +.userbar-banner { + margin-left: 30px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/banner/rtl/rtl.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/calendar-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/calendar-async.js new file mode 100755 index 000000000..46d17af1a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/calendar-async.js @@ -0,0 +1,203 @@ +var $ = require("common:widget/ui/jquery/jquery.js"), + __date = require("common:widget/ui/date/date.js"), + time = require("common:widget/ui/time/time.js"), + UT = require("common:widget/ui/ut/ut.js"); +require("common:widget/ui/date-new/date.js"); + +var calenPath = { // plugin path + 'isl': 'isl', + 'buddhist': 'buddhist', + 'rokuyou': 'rokuyou', + 'lunar': 'lunar' + }, + parseToArr = function(obj, fix) { + fix = fix || "value"; + var i = 0, + j = obj.length, + arr = []; + for(; i < j; i++) { + arr.push(obj[i][fix] || obj[i]); + } + return arr; + }, + _conf = conf.calendar || {}, + seCalen = _conf.secondCalendar, // 副日历名称 + dateMsg = _conf.dateMsg || {}, + holiday = {}, + events = {}, + festival = {}, + normal = {}, + lyl = parseToArr(_conf.rokuyou || []), + organizeToHash = function(data, kind) { + if(!data) {return {};} + var newData = {}, + tmpObj = {}; + for (var i = 0, j = data.length; i < j; i++) { + tmpObj = data[i]; + if(!tmpObj) continue; + newData["d" + tmpObj.date] = { + kind: tmpObj.kind || kind, + title: tmpObj.title, + url: tmpObj.url + } + } + return newData; + }; + +holiday = organizeToHash(dateMsg["holiday"], "holiday"); // format data for easy handle +events = organizeToHash(dateMsg["events"], "event"); // format data for easy handle +festival = organizeToHash(dateMsg["festival"], "festival"); // format data for easy handle +normal = organizeToHash(dateMsg["normal"]); // format data for easy handle + +var calenTpl = '
                          ', + toDate = function(y, M, d) { + /*var date = new Date(); + date.setFullYear(y); + date.setDate(d); + date.setMonth(M - 1);*/ + return new Date(y, M - 1, d); + }, + formatDate = function(y, M, d) { + return ('d' + y + '-' + M + '-' + d); + }, + getItemData = function(y, M, d) { + var str = formatDate(y, M, d), + obj = {}, + ymd = {}; + + obj = normal[str] || events[str] || holiday[str] || festival[str] || null; + if(obj) { + if(obj.kind) { + ymd.className = 'class=mod-calendar-' + obj.kind; + } + if(obj.title) { + ymd.info = obj.title; + } + if(obj.url) { + ymd.url = obj.url; + } + ymd.noLink = ""; + if(obj.url == "" || obj.url == "#") { + ymd.noLink = "no-link"; + } + } + return ymd; + }, + calenFuncMap = { + 'isl': function(y, M, d) { + var date = Date.toIsl(toDate(y, M, d)), + islM = parseToArr(_conf.islMonth || []); + if(islM && date.id == "1") { + return islM[date.im - 1] || ""; + } + return date.id || ""; + }, + 'rokuyou': function(y, M, d) { + var date = toDate(y, M, d); + return lyl[Date.toLyl(date).jl] || ""; + }, + 'lunar': function(y, M, d) { + var lunarObj = __date.toLunar(y, M, d), + str = lunarObj.cd || ""; + if (_conf.lunarNumber === "1") { + return str + (str == "1" ? ("/" + lunarObj.cm) : ""); + } else { + return str == "1" ? lunarObj.CM : (lunarObj.CD || ""); + } + }, + 'buddhist': function(y, M, d) { + return ""; + } + }, + callback = function($glo, moreBtn, url, _co, week, countDown) { + var params = { + footer: moreBtn ? ('' + moreBtn + '') : '', + onFilterDays: function(data) { + data.noLink = "no-link"; + if(seCalen && calenFuncMap[seCalen]) { + data.info = calenFuncMap[seCalen](data.y, data.M, data.d); + } + $.extend(data, getItemData(data.y, data.M, data.d)); + return data; + }, + onSwitch: function(data, $y, $m) { + $("#calYearList").find("li").filter(function() { + return $(this).attr("value") == data.y; + }).trigger("mousedown.dropdownlist"); + $("#calMonthList").find("li").filter(function() { + return $(this).attr("value") == data.M; + }).trigger("mousedown.dropdownlist"); + }, + countDown: countDown ? countDown : "" + }; + if(_co.useAbbrMonth === '1' && _co.abbrMonth) { + var abbrM = parseToArr(_co.abbrMonth); + params.fixMonth = function(i) { + return abbrM[i - 1] || ""; + }; + } + if(seCalen === "buddhist") { + params.fixYear = function(i) { + return i + (parseInt(_co.fixYear, 10) || 543); + }; + } + if (_co.yearFrom) { + params.minDate = _co.yearFrom; + } + if (_co.yearTo) { + params.maxDate = _co.yearTo; + } + if (_co.isAbbrWeek === "1") { + params.isAbbrWeek = true; + } else { + params.isAbbrWeek = false; + } + if (_co.beginDay) { + params.beginDay = parseInt(_co.beginDay, 10); + } + if (week && week.length) { + params.weeks = parseToArr(week); + } + params.switchLoop = true; + $('.mod-calendar', $glo).calendar(params); + require.async("common:widget/ui/dropdownlist/dropdownlist.js", function(dropdown) { + new dropdown({ + selector: "calYear", + defIndex: $("#calYear").get(0).selectedIndex, + supportSubmit: 1 + }); + new dropdown({ + selector: "calMonth", + defIndex: $("#calMonth").get(0).selectedIndex, + supportSubmit: 1 + }); + }); + }; +// require的文件必须为字符串吗?变量拼接的获取不到! +var init = function($glo, moreBtn, url, _co, week, countDown) { + $('.calendar-wrapper', $glo).html(calenTpl); + if (seCalen && calenPath[seCalen]) { + if (calenPath[seCalen] === "rokuyou") { + require.async(["common:widget/ui/calendar/calendar.js", "common:widget/ui/date-new/plugin/rokuyou.js"], function() { + callback($glo, moreBtn, url, _co, week, countDown); + }); + } else if (calenPath[seCalen] === "isl") { + require.async(["common:widget/ui/calendar/calendar.js", "common:widget/ui/date-new/plugin/isl.js"], function() { + callback($glo, moreBtn, url, _co, week, countDown); + }); + } else if (calenPath[seCalen] === "buddhist") { + require.async(["common:widget/ui/calendar/calendar.js", "common:widget/ui/date-new/plugin/buddhist.js"], function() { + callback($glo, moreBtn, url, _co, week, countDown); + }); + } else if (calenPath[seCalen] === "lunar") { + require.async(["common:widget/ui/calendar/calendar.js", "common:widget/ui/date-new/plugin/lunar.js"], function() { + callback($glo, moreBtn, url, _co, week, countDown); + }); + } + } else { + require.async(["common:widget/ui/calendar/calendar.js"], function() { + callback($glo, moreBtn, url, _co, week, countDown); + }); + } +}; +module.exports = init; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock-async.js new file mode 100755 index 000000000..a4f173854 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock-async.js @@ -0,0 +1,247 @@ +/* +* CLOCK +*/ +window.Gl || (window.Gl = {}); + +var $ = require("common:widget/ui/jquery/jquery.js"), + __date = require("common:widget/ui/date/date.js"), + time = require("common:widget/ui/time/time.js"), + UT = require("common:widget/ui/ut/ut.js"); +require("common:widget/ui/date-new/date.js"); +//clock +//time & date & calendar +Gl.clock = function(el) { + var _conf = conf.clock, + // + $wraper = $(".userbar-date-wrapper"), + $glo = $("#" + el), + $el = $glo, + $down = {}, // countdown time change wrapper + url = _conf.url || "", + title = _conf.title || "", + tpl = _conf.tpl || '#{y}/#{m}/#{d}', + moreTpl = '
                          ', // when has calendar + rate = _conf.rate || 500, + ssCache = 0, //seconds cache + tim, // for calendar timetamp + format = function() { + var date = time.getForm(); + + if (date.ss === ssCache) return ""; + ssCache = date.ss; //update seconds + return tpl.replaceTpl(date); + }, + toNum = function(n) { + return parseInt(n, 10); + }, + formatCount = function() { // get diff between now date and conf date + var diffRe = {}, + nowDate = new Date(); + if (tDate.getTime() > nowDate.getTime()) { + diffRe = nowDate.diff(tDate); + diffRe.d = diffRe.d > 9 ? diffRe.d : isNewMo + diffRe.d; + diffRe.h = diffRe.h > 9 ? diffRe.h : '0' + diffRe.h; + diffRe.m = diffRe.m > 9 ? diffRe.m : '0' + diffRe.m; + return timeTpl.replaceTpl(diffRe); + } else { + return ""; + } + }; + + // open calendar + if (_conf.headerTest && _conf.openCal === "1") { + $glo.addClass('userbar-date-cal'); + $glo.html(moreTpl); + + $(document.body).on("click", function(e) { + var $e = $(e.target); + if (!$e.closest('.userbar-date-cal').length) { + $glo.removeClass('date-open'); + } + }); + $(".calendar-wrapper", $glo).on("click", "a", function(e) { + var $that = $(this), + href = $that.attr("href"); + if(href == "" || href == "#") { + e.preventDefault(); + e.stopPropagation(); + } else { + UT.send({ + position: "clickable", + sort: href, + type: "click", + modId: "date" + }); + } + }).on("mousedown", "a", function(e) { + var $that = $(this), + href = $that.attr("href"); + if(href == "" || href == "#") { + e.preventDefault(); + e.stopPropagation(); + } + }); + + // create Calendar + $glo.one("o.onceload", function() { + require.async("common:widget/header/clock/calendar-async.js", function(init) { + var wk = $.extend(true, [], conf.date.lunar && conf.date.lunar.wk); + init($glo, _conf.moreBtn, url, _co, _co.weeks || wk, _con.time); + }); + }); + // add UT + $glo.on("click", function(e) { + var $e = $(e.target); + if (!$e.closest('.calendar-wrapper').length) { + $glo.toggleClass('date-open'); + UT.send({ + ac: "b", + position: "control", + sort: $glo.hasClass('date-open') ? "open" : "close", + type: "click", + modId: "date" + }); + e.preventDefault(); + } + }).one("mouseenter", function() { + $glo.trigger('o.onceload'); + }).on("click", ".mod-calendar_next", function(e) { + UT.send({ + ac: "b", + position: "control", + sort: "next", + type: "click", + modId: "date" + }); + }).on("click", ".mod-calendar_prev", function(e) { + UT.send({ + ac: "b", + position: "control", + sort: "prev", + type: "click", + modId: "date" + }); + }).on("click", ".dropdown", function(e) { + UT.send({ + ac: "b", + position: "control", + sort: "select", + type: "click", + modId: "date" + }); + }).on("mouseover", function(e) { + var $e = $(e.target); + if (!$e.closest('.calendar-wrapper').length) { + $glo.addClass('calendar-open'); + } else { + $glo.removeClass('calendar-open'); + } + }).on("mouseout", function(e) { + $glo.removeClass('calendar-open'); + }); + $(window).load(function() { + $glo.trigger('o.onceload'); + }); + $el = $glo.find(".date-wrapper"); + + if( _worldcupConf.isHidden === "0" ){ + var html = worldCupTpl.replaceTpl( _worldcupConf ); + $wraper.addClass( "userbar-data-worldcup" ); + $el.after( html ); + $el.hide(); + // _worldcupConf.width && $glo.css( "width", _worldcupConf.width + "px" ); + }else if (_con && _con.isHidden === "0" && _con.time) { // countdown + timeFor = _con.time.split("_"); + yMd = timeFor[0].split("-"); + hms = timeFor[1].split(":"); + + tDate = new Date(toNum(yMd[0]), toNum(yMd[1]) - 1, toNum(yMd[2]), toNum(hms[0]), toNum(hms[1]), toNum(hms[2])); + /*tDate.setFullYear(parseInt(yMd[0], 10)); + tDate.setDate(parseInt(yMd[2], 10)); + tDate.setMonth(parseInt(yMd[1], 10) - 1); + + tDate.setHours(parseInt(hms[0], 10)); + tDate.setMinutes(parseInt(hms[1], 10)); + tDate.setSeconds(parseInt(hms[2], 10));*/ + + res = formatCount(); + if(res) { + if(_con.newMod === "1") { + $wraper.addClass('userbar-date-new_mod userbar-date-new_mod1'); + _con.newModImg && $wraper.css("background-image", "url(" + _con.newModImg + ")"); + _con.newModWidth && $wraper.css("width", _con.newModWidth + "px"); + } else if(_con.newMod === "2") { + $wraper.addClass('userbar-date-new_mod userbar-date-new_mod2'); + _con.newModImg && $wraper.css("background-image", "url(" + _con.newModImg + ")"); + _con.newModWidth && $wraper.css("width", _con.newModWidth + "px"); + } + $el.after(countTpl.replaceTpl(_con)); + $glo.addClass('down-show'); + $down = $glo.find(".down-time"); + $down.html(res); + $el.hide(); + } + var downTimer = setInterval(function() { + res = formatCount(); + if(res) { + $down.html(res); + $el.hide(); + } else { + $wraper.removeClass('userbar-date-new_mod userbar-date-new_mod1 userbar-date-new_mod2'); + $wraper.css({ + "background-image": "none", + "width": "auto" + }); + $glo.find(".down-wrapper").remove(); + $glo.removeClass('down-show'); + $el.show(); + clearInterval(downTimer); + } + }, _con.rate || 20000); + } + } else { + $glo.on("click", "a", function(e) { // old UT log + UT.send({ + position: "click", + sort: "click", + type: "click", + modId: "date" + }); + }); + if (!!url) { + tpl = '' + tpl + ''; + } + } + //display local time when initialize + $el.html(format(new Date)); + + timer = setInterval(function() { + var html = format(); + + //render the time + if(html) $el.html(html); + }, rate); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock-conf/clock-conf.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock-conf/clock-conf.tpl new file mode 100755 index 000000000..678ab7c02 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock-conf/clock-conf.tpl @@ -0,0 +1,21 @@ +<%script%> +//conf.date + String.prototype.parseToArray=function(e,t){var n=this.split(t||"|");return e?function(t,r){for(;t--;)n[t]=parseInt(n[t],e);return n}(n.length):n}; + + conf.date={day:{0:"<%$body.date.today%>",1:"<%$body.date.tomorrow%>"},days:[31,28,31,30,31,30,31,31,30,31,30,31],lunar:{tpl:"#{y}-#{m}-#{d} #{W} \u519c\u5386 #{CM}#{CD} #{gy}(#{sx}) #{gm} #{gd} #{so} #{cf} #{gf}",leap:"ezc|esg|wog|gr9|15k0|16xc|1yl0|h40|ukw|gya|esg|wqe|wk0|15jk|2k45|zsw|16e8|yaq|tkg|1t2v|ei8|wj4|zp1|l00|lkw|2ces|8kg|tio|gdu|ei8|k12|1600|1aa8|lud|hxs|8kg|257n|t0g|2i8n|13rk|1600|2ld2|ztc|h40|2bas|7gw|t00|15ma|xg0|ztj|lgg|ztc|1v11|fc0|wr4|1sab|gcw|xig|1a34|l28|yhy|xu8|ew0|xr8|wog|g9s|1bvn|16xc|i1j|h40|tsg|fdh|es0|wk0|161g|15jk|1654|zsw|zvk|284m|tkg|ek0|xh0|wj4|z96|l00|lkw|yme|xuo|tio|et1|ei8|jw0|n1f|1aa8|l7c|gxs|xuo|tsl|t0g|13s0|16xg|1600|174g|n6a|h40|xx3|7gw|t00|141h|xg0|zog|10v8|y8g|gyh|exs|wq8|1unq|gc0|xf4|nys|l28|y8g|i1e|ew0|wyu|wkg|15k0|1aat|1640|hwg|nfn|tsg|ezb|es0|wk0|2jsm|15jk|163k|17ph|zvk|h5c|gxe|ek0|won|wj4|xn4|2dsl|lk0|yao".parseToArray(36),jqmap:"0|gd4|wrn|1d98|1tuh|2akm|2rfn|38g9|3plp|46vz|4o9k|55px|5n73|64o5|6m37|73fd|7kna|81qe|8io7|8zgq|9g4b|9wnk|ad3g|ath2|".parseToArray(36),jqnames:"\u5c0f\u5bd2|\u5927\u5bd2|\u7acb\u6625|\u96e8\u6c34|\u60ca\u86f0|\u6625\u5206|\u6e05\u660e|\u8c37\u96e8|\u7acb\u590f|\u5c0f\u6ee1|\u8292\u79cd|\u590f\u81f3|\u5c0f\u6691|\u5927\u6691|\u7acb\u79cb|\u5904\u6691|\u767d\u9732|\u79cb\u5206|\u5bd2\u9732|\u971c\u964d|\u7acb\u51ac|\u5c0f\u96ea|\u5927\u96ea|\u51ac\u81f3".parseToArray(),c1:"|\u4e00|\u4e8c|\u4e09|\u56db|\u4e94|\u516d|\u4e03|\u516b|\u4e5d|\u5341".parseToArray(),c2:"\u521d|\u5341|\u5eff|\u5345|".parseToArray(),wk:"<%$body.date.Sunday%>|<%$body.date.Monday%>|<%$body.date.Tuesday%>|<%$body.date.Wednesday%>|<%$body.date.Thursday%>|<%$body.date.Friday%>|<%$body.date.Saturday%>".parseToArray(),tg:"\u7532|\u4e59|\u4e19|\u4e01|\u620a|\u5df1|\u5e9a|\u8f9b|\u58ec|\u7678".parseToArray(),dz:"\u5b50|\u4e11|\u5bc5|\u536f|\u8fb0|\u5df3|\u5348|\u672a|\u7533|\u9149|\u620c|\u4ea5".parseToArray(),sx:"\u9f20|\u725b|\u864e|\u5154|\u9f99|\u86c7|\u9a6c|\u7f8a|\u7334|\u9e21|\u72d7|\u732a".parseToArray(),fixMonth:["2001-5-23~2001-6-20","2004-3-21~2004-4-18","2006-8-24~2006-9-21","2009-6-23~2009-7-21", "2012-5-21~2012-6-18","2014-10-24~2014-11-21","2017-7-23~2017-8-21", "2020-5-23~2020-6-29","2023-3-22~2023-4-19","2025-7-25~2025-8-22"],fixDate:["2002-1-1~2002-1-12=0|-1|0", "2002-1-14~2002-2-11=0|-1|1", "2002-1-13=0|0|-29", "2005-1-1~2005-1-9=0|-1|0", "2005-1-11~2005-2-8=0|-1|1", "2005-1-10=0|0|-29", "2007-1-1~2007-1-18=0|-1|1", "2007-1-20~2007-2-17=0|-1|1", "2007-1-19=0|0|-29", "2010-1-1~2010-1-14=0|-1|1", "2010-1-16~2010-2-13=0|-1|1", "2010-1-15=0|0|-29", "2013-1-1~2013-1-11=0|-1|1", "2013-1-12~2013-2-9=0|-1|0", "2015-1-1~2015-1-19=0|-1|0", "2015-1-21~2015-2-18=0|-1|1", "2015-1-20=0|0|-29", "2018-1-1~2018-1-16=0|-1|0", "2018-1-17~2018-2-15=0|-1|0", "2021-1-1~2021-1-12=0|-1|0", "2021-1-14~2021-2-11=0|-1|1", "2021-1-13=0|0|-29", "2024-1-1~2024-1-10=0|-1|0", "2024-1-12~2024-2-9=0|-1|1", "2024-1-11=0|0|-29"]},isl:{tpl:"#{IW} - #{d} \u0645\u0646 #{M} #{y} - #{id} #{IM} #{iy}",weekNames:["\u0627\u0644\u0623\u062d\u062f","\u0627\u0644\u0627\u062b\u0646\u064a\u0646","\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062e\u0645\u064a\u0633","\u0627\u0644\u062c\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062a"],gMonthNames:["<%$body.date.Jan%>","<%$body.date.Feb%>","<%$body.date.Mar%>","<%$body.date.Apr%>","<%$body.date.May%>","<%$body.date.Jun%>","<%$body.date.Jul%>","<%$body.date.Aug%>","<%$body.date.Sep%>","<%$body.date.Oct%>","<%$body.date.Nov%>","<%$body.date.Dec%>"],monthNames:["\u0627\u0644\u0645\u062d\u0631\u0645","\u0635\u0641\u0631","\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644","\u0631\u0628\u064a\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u062c\u0645\u0627\u062f\u064a \u0627\u0644\u0623\u0648\u0644\u0649","\u062c\u0645\u0627\u062f\u064a \u0627\u0644\u0622\u062e\u0631\u0629","\u0631\u062c\u0628","\u0634\u0639\u0628\u0627\u0646","\u0631\u0645\u0636\u0627\u0646","\u0634\u0648\u0627\u0644","\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629","\u0630\u0648 \u0627\u0644\u062d\u062c\u0629"],fixDate:[]}}; + + //clock configuration + conf.clock = { + imgUrl: "/static/web/common/img/gut.gif", + url: '<%$body.date.url%>', + title: '<%$body.date.title%>', + tpl: '<%$body.date.tpl%>', + islDateFix: '<%if isset($body.date.islDateFix)%><%$body.date.islDateFix%><%/if%>' || 0, + rate: 1000, + openCal: '<%$body.date.openCalendar%>', + moreBtn: '<%$body.date.moreBtn%>', + headerTest: '<%$body.headerTest.widget%>', + countdown: <%json_encode($body.date.countdown)%>, + headerWorldcup : <%json_encode( $body.date.headerWorldcup )%> + }; +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock.tpl new file mode 100755 index 000000000..99549fbb1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/clock.tpl @@ -0,0 +1,35 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/clock/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/clock/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/clock/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header/clock/rtl/rtl.more.css"%> +<%/if%> + +<%if !empty($body.headerTest.widget)%>
                          <%/if%> +
                          style="font-size:<%$body.date.fontSize%>"<%/if%>>
                          +<%if !empty($body.headerTest.widget)%>
                          <%/if%> + +<%widget name="common:widget/header/clock/clock-conf/clock-conf.tpl"%> +<%script%> + conf.calendar = <%json_encode($body.date.calendar)%> || {}; + + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.clock", function () { + require.async("common:widget/header/clock/clock-async.js", function () { + Gl.clock("dateBox"); + }); + }); + + $(function () { + $(window).trigger("e_go.clock"); + }); + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/bell.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/bell.png new file mode 100755 index 000000000..b0b8dd72e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/bell.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next.png new file mode 100755 index 000000000..49a455d8f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_hover.png new file mode 100755 index 000000000..494faef52 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_hover_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_hover_rtl.png new file mode 100755 index 000000000..494faef52 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_hover_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_rtl.png new file mode 100755 index 000000000..49a455d8f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/next_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev.png new file mode 100755 index 000000000..444fcc2dd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_hover.png new file mode 100755 index 000000000..cf9128047 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_hover_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_hover_rtl.png new file mode 100755 index 000000000..cf9128047 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_hover_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_rtl.png new file mode 100755 index 000000000..444fcc2dd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/prev_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/worldcup-vs.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/worldcup-vs.png new file mode 100755 index 000000000..a47943b08 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/img/worldcup-vs.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/ltr/ltr.css new file mode 100755 index 000000000..30b42ceed --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/ltr/ltr.css @@ -0,0 +1 @@ +.userbar-date{ display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/ltr/ltr.more.css new file mode 100755 index 000000000..2f9ece0b9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/ltr/ltr.more.css @@ -0,0 +1,199 @@ +/*.userbar-date { + float: right; + margin: 5px 6px 5px 0; + text-align: right; + font-size: 11px; + height: 14px; + width: auto; +}*/ +.userbar-date{ + position: absolute; + left: 535px; + margin-top: 8px; + white-space: nowrap; + z-index: 100; + display: block !important; +} +.userbar-date a { + color: #fff; +} +.userbar-date span { + color: #b8e1cf; + font-size: 9px; + padding: 0 2px; +} + +/*for countdown*/ +.userbar-date .down-wrapper { + height: 30px; + overflow: hidden; +} +.userbar-date .down-wrapper span { + color: #ffffff; + font-size: 12px; + padding: 0; +} +.down-wrapper .down-time { + float: right; + overflow: hidden; + height: 30px; +/* width: 72px;*/ +} +.userbar-date .down-wrapper .down-day { + font-size: 30px; + line-height: 30px; + float: left; + margin-right: 4px; + color: #fff000; +} +.down-wrapper .down-dhm { + float: right; +} +.userbar-date .down-wrapper .down-d { + color: #9BD5C1; + color: rgba(255,255,255,0.6); +} +.down-wrapper .down-tip { + float: left; + position: absolute; + left: 18px; +} +.userbar-date .mod-calendar_ft a { + display: inline; +} +.userbar-date .mod-calendar a { + color: #39BE8D; +} +.userbar-date .mod-calendar_weeks { + color: #000000; +} +.userbar-date .mod-calendar_next, .userbar-date .mod-calendar_prev { + width: 27px; + height: 27px; + padding: 0; + text-indent: -1000px; + overflow: hidden; + white-space: nowrap; + cursor: pointer; +} +.userbar-date .mod-calendar_next { + background: url(../img/next.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_next:hover { + background: url(../img/next_hover.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev { + background: url(../img/prev.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev:hover { + background: url(../img/prev_hover.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_year { + width: 56px; +} +.userbar-date .mod-calendar_month { + width: 40px; +} +.userbar-date .dropdown,.calendar-wrapper span { + font-size: 12px; + color: #000000; + padding: 0; +} +.userbar-date .mod-calendar_hd { + padding-bottom: 2px; +} +#calYearDropDown { + margin-right: 5px; +} +/*.userbar-date .mod-calendar-holder dd { + display: none; +}*/ +.userbar-date .mod-calendar-countdown dl { + background: url(../img/bell.png) no-repeat center 4px; + background-color: #FCA438; + color: #fff; +} +.userbar-date .mod-calendar-countdown dt{ + text-indent: -1000px; + overflow: hidden; + white-space: nowrap; +} +.userbar-date .mod-calendar-football dl { + background: #68b821; + color: #fff; +} +.userbar-date .mod-calendar-football dt { + color: #fff; +} +.down-show { + background-color: #049565; +} +.userbar-date .no-link { + cursor: default; +} +.header-fixed .down-show { + background-color: transparent; +} +.header-fixed .calendar-open { + background-color: #06B67B; +} +.userbar-date .ui-bubble-t .ui-bubble_in, .userbar-date .ui-bubble-t .ui-bubble_out { + left: 64px; +} +/*.userbar-date li.mod-calendar-today { + border-bottom: 3px solid; +}*/ +.userbar-date .mod-calendar_days a:hover dl { + left: -2px; + right: auto; +} +/*.userbar-date .mod-calendar-today a:hover dl { + left: -1px; +}*/ +.date-wrapper { + max-height: 30px; +} +.userbar-date .mod-calendar_days li:nth-of-type(7n+7) a:hover dl { + left: auto; + right: -2px; +} + +/**世界杯赛事**/ +.userbar-data-worldcup .userbar-date-cal{ + padding: 0 +} +.userbar-data-worldcup .worldcup{ + margin: 8px 16px 0 14px; + height: 42px; + overflow: hidden; +} +.userbar-data-worldcup .match-info{ + float: left; + margin-right: 8px; + color: #ffef00; + width: 50px; +} +.userbar-data-worldcup .match-info .des{ + white-space: nowrap; + overflow: hidden; + text-overflow:hidden; +} +.userbar-data-worldcup .match-info .time{ + font-size: 21px; +} +.userbar-data-worldcup .team-vs{ + float: left; +} +.userbar-data-worldcup .team-vs .team-vs-icon{ + display: inline-block; + width: 38px; + height: 33px; + background: url(../img/worldcup-vs.png?__sprite); + vertical-align: middle; +} +.header-fixed .userbar-data-worldcup .worldcup{ + display: none; +} +.header-fixed .userbar-data-worldcup .userbar-date-cal{ + padding: 0 16px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/rtl/rtl.css new file mode 100755 index 000000000..30b42ceed --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/rtl/rtl.css @@ -0,0 +1 @@ +.userbar-date{ display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/rtl/rtl.more.css new file mode 100755 index 000000000..27394f078 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/clock/rtl/rtl.more.css @@ -0,0 +1,204 @@ +/*.userbar-date { + float: left; + margin: 5px 0 5px 6px; + text-align: left; + font-size: 11px; + height: 14px; +}*/ +.userbar-date { + position: absolute; + right: 540px; + *right: 550px; + margin-top: 5px; + white-space: nowrap; + z-index: 100; + display: block !important; +} +.userbar-date a { + color: #fff; +} +.userbar-date span { + color: #b8e1cf; + font-size: 9px; + padding: 0 2px; +} + +/*for countdown*/ +.userbar-date .down-wrapper { + height: 30px; + overflow: hidden; +} +.userbar-date .down-wrapper span { + color: #ffffff; + font-size: 12px; + padding: 0; +} +.down-wrapper .down-time { + float: left; + overflow: hidden; + height: 32px; +/* width: 72px;*/ +} +.userbar-date .down-wrapper .down-day { + font-size: 30px; + line-height: 30px; + float: right; + margin-left: 4px; + color: #fff000; +} +.down-wrapper .down-dhm { + float: left; +} +.userbar-date .down-wrapper .down-d { + color: #9BD5C1; + color: rgba(255,255,255,0.6); +} +.down-wrapper .down-tip { + float: right; + position: absolute; + right: 18px; +} + +.userbar-date .mod-calendar_ft a { + display: inline; +} +.userbar-date .mod-calendar a { + color: #39BE8D; +} +.userbar-date .mod-calendar_weeks { + color: #000000; +} +.userbar-date .mod-calendar_next, .userbar-date .mod-calendar_prev { + width: 27px; + height: 27px; + padding: 0; + text-indent: -1000px; + overflow: hidden; + white-space: nowrap; + cursor: pointer; +} +.userbar-date .mod-calendar_next { + background: url(../img/prev_rtl.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_next:hover { + background: url(../img/prev_hover_rtl.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev { + background: url(../img/next_rtl.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev:hover { + background: url(../img/next_hover_rtl.png?__sprite) no-repeat; +} +.userbar-date .mod-calendar_prev{ float: right; margin-right: 40px;margin-left: 0;} +.userbar-date .mod-calendar_next{ float: left; margin-left: 40px;margin-right: 0;} +.userbar-date .mod-calendar_grid li {float:right;} +.userbar-date .mod-calendar_ft {text-align: left;} +.userbar-date .mod-calendar_year { + width: 56px; +} +.userbar-date .mod-calendar_month { + width: 40px; +} +.userbar-date .dropdown,.calendar-wrapper span { + font-size: 12px; + color: #000000; + padding: 0; +} +.userbar-date .mod-calendar_hd { + padding-bottom: 2px; +} +#calYearDropDown { + margin-left: 5px; +} +/*.userbar-date .mod-calendar-holder dd { + display: none; +}*/ +.userbar-date .mod-calendar-countdown dl { + background: url(../img/bell.png) no-repeat center 4px; + background-color: #FCA438; + color: #fff; +} +.userbar-date .mod-calendar-countdown dt{ + text-indent: -1000px; + overflow: hidden; + white-space: nowrap; +} +.userbar-date .mod-calendar-football dl { + background: #68b821; + color: #fff; +} +.userbar-date .mod-calendar-football dt { + color: #fff; +} +.down-show { + background-color: #049565; +} +.userbar-date .no-link { + cursor: default; +} +.header-fixed .down-show { + background-color: transparent; +} +.header-fixed .calendar-open { + background-color: #06B67B; +} +.userbar-date .ui-bubble-t .ui-bubble_in, .userbar-date .ui-bubble-t .ui-bubble_out { + right: 64px; +} +/*.userbar-date li.mod-calendar-today { + border-bottom: 3px solid; +}*/ +.userbar-date .mod-calendar_days a:hover dl { + right: -2px; + left: auto; +} +/*.userbar-date .mod-calendar-today a:hover dl { + right: 1px; +}*/ +.date-wrapper { + max-height: 30px; +} +.userbar-date .mod-calendar_days li:nth-of-type(7n+7) a:hover dl { + left: -2px; + right: auto; +} + +/**世界杯赛事**/ +.userbar-data-worldcup .userbar-date-cal{ + padding: 0 +} +.userbar-data-worldcup .worldcup{ + margin: 8px 14px 0 16px; + height: 42px; + overflow: hidden; +} +.userbar-data-worldcup .match-info{ + float: right; + margin-left: 8px; + color: #ffef00; + width: 50px; +} +.userbar-data-worldcup .match-info .des{ + white-space: nowrap; + overflow: hidden; + text-overflow:hidden; +} +.userbar-data-worldcup .match-info .time{ + font-size: 21px; +} +.userbar-data-worldcup .team-vs{ + float: right; +} +.userbar-data-worldcup .team-vs .team-vs-icon{ + display: inline-block; + width: 38px; + height: 33px; + background: url(../img/worldcup-vs.png?__sprite); + vertical-align: middle; +} +.header-fixed .userbar-data-worldcup .worldcup{ + display: none; +} +.header-fixed .userbar-data-worldcup .userbar-date-cal{ + padding: 0 16px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com.tpl new file mode 100755 index 000000000..8b008ed15 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com.tpl @@ -0,0 +1,102 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/ltr/ltr.css?__inline'); +@import url('/widget/header/header-com/ltr-s/ltr.css?__inline'); +<%if $body.headerTest.actPage == '1'%> +@import url('/widget/header/header-com/ltr-s/ltr.lv2.css?__inline'); +<%/if%> +<%else%> +@import url('/widget/header/rtl/rtl.css?__inline'); +@import url('/widget/header/header-com/rtl-s/rtl.css?__inline'); +<%if $body.headerTest.actPage == '1'%> +@import url('/widget/header/header-com/rtl-s/rtl.lv2.css?__inline'); +<%/if%> +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/header-com/ltr-s/ltr.more.css"%> +<%if $body.headerTest.actPage == '1'%> + <%require name="common:widget/header/header-com/ltr-s/ltr.lv2.more.css"%> +<%/if%> +<%else%> +<%if $body.headerTest.actPage == '1'%> + <%require name="common:widget/header/header-com/rtl-s/rtl.lv2.more.css"%> +<%/if%> +<%require name="common:widget/header/header-com/rtl-s/rtl.more.css"%> +<%/if%> + +<%if $body.headerTest.ceilingMore == '1' && $body.searchBox.widget =='search-box-4ps'%> + <%if $head.dir=='ltr'%> + <%require name="common:widget/header/header-com/ltr-s/ltr.ps.css"%> + <%else%> + <%require name="common:widget/header/header-com/rtl-s/rtl.ps.css"%> + <%/if%> +<%/if%> + + +<%if !empty($body.headerTest.ceilingLogo)%> + +<%/if%> + +<%widget name="common:widget/header/add-fav-bar/add-fav-bar.tpl"%> +
                          +
                          + <%widget name="common:widget/header/logo/logo.tpl"%> +
                          + <%if !empty($body.headerTest.logoSibling)%> + | + <%foreach explode("|", $body.headerTest.logoSibling) as $item%> + <%if $item == "weather"%> +
                          +
                          + <%widget name="common:widget/header/`$item`/`$item`.tpl"%> +
                          +
                          +
                          +
                            +
                            +
                            +
                            + <%else%> + <%widget name="common:widget/header/`$item`/`$item`.tpl"%> + <%/if%> + | + <%/foreach%> + <%/if%> +
                            +
                            + <%if !empty($body.headerTest.showContent)%> + <%foreach array_reverse(explode("|", $body.headerTest.showContent)) as $module%> + <%widget name="common:widget/header/`$module`/`$module`.tpl"%> + | + <%/foreach%> + <%/if%> +
                            + <%if !empty($body.newerguide.isShow)%> + <%widget name="common:widget/header/newerguide/newerguide.tpl"%> + <%/if%> +
                            + <%if !empty($body.tearPage.isShow)%> + <%widget name="common:widget/header/tear-page/tear-page.tpl"%> + <%/if%> +
                            +
                            +<%script%> + conf.headerTest = { + dateWidth : "<%$body.headerTest.dateWidth%>", + weatherWidth : "<%$body.headerTest.weather.width%>", + isCeiling: "<%$body.headerTest.isCeiling%>", + ceilingMore: "<%$body.headerTest.ceilingMore%>", + settingTip: "<%$body.headerTest.settingTip%>", + ceilingLogo: "<%$body.headerTest.ceilingLogo%>" + }; + require.async("common:widget/header/header-com/header-com-async.js"); +<%/script%> + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/header-com-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/header-com-async.js new file mode 100755 index 000000000..fd709ecb6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/header-com-async.js @@ -0,0 +1,156 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); + +var CON = conf.headerTest, + direct = (conf.dir == "ltr" ? "left" : "right"), + headerTop = $("#top"), + parentHead = headerTop.parent(), + favBar = $("#addFavBar"), + isScrolled = false, + fixedClass = "header-fixed" + (CON.ceilingMore === "1" ? " header-fixed-up" : ""), + initHeight = headerTop.outerHeight(), + //placeHoldr = "", + docBody = $(document.body), + curHeight = 0; + +$(".userbar-logoSibling", headerTop).find(".userbar_split").first().css("float", direct); +$(".userbar-tool", headerTop).find(".userbar_split").last().remove(); // 移除多余的分隔条 + +$(".box-search").eq(0).parent().css("position", "relative");//用于设首等定位 +$("#userbarBtn").css("display", "block"); + + +if (/(png|gif|jpg|jpeg)/i.test(CON.settingTip)) { + $("#settingBtn").html(""); +} else { + $("#settingBtn").addClass("settings-btn_word").html(CON.settingTip); +} + + +$(function() { + var setBtn = $("#settingBtn"), + setDrop = $("#settingDropdown"), + $window = $(window), + weather = $("#weather"); + + if (CON.dateWidth !== "") { + $("#dateBox").width(CON.dateWidth); + } + if(CON.weatherWidth !== "") { + weather.children(".fl").width(CON.weatherWidth); + } + + setBtn.wrap('
                            '); + setDrop.prepend('
                            '); + //if (parentHead.is("body")) { + //$(placeHoldr).insertAfter(headerTop); + //} + + headerTop.find(".settings").hover(function() { + setBtn.parent().addClass("module-mask"); + setDrop.show(); + }, function() { + setBtn.parent().removeClass("module-mask"); + setDrop.hide(); + }); + + setTimeout(function() { + headerTop.find(".userbar_split").css("visibility", "visible"); + setBtn.off("click.old"); + setBtn.on('click', function(e) { + e.preventDefault(); + }); + }, 1500); + /* + $("#themeSelect").on("click", "li", function(e) { + var themeId = $(this).attr("data-theme"); + if (Gl.weather && Gl.weather.refreshIcon) { + setTimeout(function() { + Gl.weather.refreshIcon(themeId); + }, 20); + } + });*/ + $("#siteList").on("mousedown", "a", function(e) { + UT.send({ + position: "siteSwitch", + sort: $(this).attr("href"), + type: "click", + modId: "country" + }); + }); + /*$("#userbarBtn").on("click", "a", function(e) { + UT.send({ + position: "sethp-btn", + sort: $(this).attr("id").replace(/02/, ""), + type: "click", + modId: "sethp-btn" + }); + });*/ + weather.on("click", function(e) { + var $tar = $(e.target); + if ($tar.closest("a").length > 0) { + UT.send({ + position: "click", + sort: "click", + type: "click", + modId: "weather" + }); + } else if ($tar.closest("#weatherView").length > 0) { + UT.send({ + position: "click", + ac: "b", + sort: "click", + type: "click", + modId: "weather" + }); + } + }); +/* $("#dateBox").on("click", "a", function(e) { + UT.send({ + position: "click", + sort: "click", + type: "click", + modId: "date" + }); + });*/ + $(".settings, .account_wrap, .app-wrapper, .skinbox-wrap").on("mouseenter", function() { + $(this).prev(".userbar_split").css("visibility", "hidden"); + $(this).next(".userbar_split").css("visibility", "hidden"); + }).on("mouseleave", function() { + $(this).prev(".userbar_split").css("visibility", "visible"); + $(this).next(".userbar_split").css("visibility", "visible"); + }); + //吸顶 + if (CON.isCeiling === "1") { + $window.on("scroll", function() { + isScrolled = true; + }); + + window.setTimeout(function() { + if (isScrolled) { + isScrolled = false; + curHeight = initHeight + ((favBar.css("display") === "none") ? 0 : favBar.outerHeight()); + if ($(document).scrollTop() > curHeight) { + if (!docBody.hasClass(fixedClass)) { + //parentHead.is("body") || parentHead.height(curHeight); + headerTop.css("position", "fixed"); + docBody.addClass(fixedClass); + if(CON.ceilingMore === "1") { + $window.trigger("headerFixed.transTo"); + } + } + } else { + if (docBody.hasClass(fixedClass)) { + //parentHead.is("body") || parentHead.height("auto"); + headerTop.css("position", "relative"); + docBody.removeClass(fixedClass); + if(CON.ceilingMore === "1") { + $window.trigger("headerFixed.restore"); + } + } + } + } + window.setTimeout(arguments.callee, 250); + }, 250); + } +}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-1.png new file mode 100755 index 000000000..2f4d93283 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-2.png new file mode 100755 index 000000000..bc271055f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-3.png new file mode 100755 index 000000000..fd1a215ff Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/addfav-3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow1-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow1-rtl.png new file mode 100755 index 000000000..36e8342ae Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow1-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow1.png new file mode 100755 index 000000000..a47042dd0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow2-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow2-rtl.png new file mode 100755 index 000000000..72b1c55bf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow2-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow2.png new file mode 100755 index 000000000..dde31d817 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/arrow2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/btn-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/btn-rtl.png new file mode 100755 index 000000000..7dca042aa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/btn-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/btn.png new file mode 100755 index 000000000..53eb3293d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/calendar.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/calendar.png new file mode 100755 index 000000000..60e6e6ed2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/calendar.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/del.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/del.png new file mode 100755 index 000000000..38ad75dc7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/del.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-1.png new file mode 100755 index 000000000..f28d5cba0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-2.png new file mode 100755 index 000000000..10d735816 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-3.png new file mode 100755 index 000000000..5e33862d8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/down-3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/drop.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/drop.png new file mode 100755 index 000000000..76bd362ba Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/drop.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-arrow-open.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-arrow-open.png new file mode 100755 index 000000000..09ba2e66e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-arrow-open.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-arrow.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-arrow.png new file mode 100755 index 000000000..0174be2bc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-arrow.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-search.png new file mode 100755 index 000000000..e99be9b12 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-delete-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-delete-hover.png new file mode 100755 index 000000000..2dadce85c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-delete-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-delete.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-delete.png new file mode 100755 index 000000000..72ad45601 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-delete.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-logotips-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-logotips-rtl.png new file mode 100755 index 000000000..f9deeece5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-logotips-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-logotips.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-logotips.png new file mode 100755 index 000000000..a8ac5b151 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-logotips.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-over-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-over-rtl.png new file mode 100755 index 000000000..6b2423429 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-over-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-over.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-over.png new file mode 100755 index 000000000..6352a62a5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-over.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-rtl.png new file mode 100755 index 000000000..51a5e55b9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice.png new file mode 100755 index 000000000..30fa678e5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/icon-msg-notice.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/light_new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/light_new.png new file mode 100755 index 000000000..6f1f579e2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/light_new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/logo_test.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/logo_test.png new file mode 100755 index 000000000..07cc3d762 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/logo_test.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click.png new file mode 100755 index 000000000..40524a1b6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click_2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click_2.png new file mode 100755 index 000000000..eb0b2a9fd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click_2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click_3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click_3.png new file mode 100755 index 000000000..af316655f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_click_3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover.png new file mode 100755 index 000000000..271b24012 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover_2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover_2.png new file mode 100755 index 000000000..aec8488fa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover_2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover_3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover_3.png new file mode 100755 index 000000000..42adefc69 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_hover_3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal.png new file mode 100755 index 000000000..151898cb4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal_2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal_2.png new file mode 100755 index 000000000..374fb4fec Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal_2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal_3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal_3.png new file mode 100755 index 000000000..500904744 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/save-city_normal_3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/select-city_tip.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/select-city_tip.png new file mode 100755 index 000000000..66fc478ba Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/select-city_tip.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-1.png new file mode 100755 index 000000000..cccf85962 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-2.png new file mode 100755 index 000000000..8a89d89b1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-3.png new file mode 100755 index 000000000..a28dad801 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/sethome-3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/setting.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/setting.png new file mode 100755 index 000000000..762c88ec3 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/setting.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_down.png new file mode 100755 index 000000000..f5d1bb95a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_down_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_down_rtl.png new file mode 100755 index 000000000..e6b5afbc4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_down_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_up.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_up.png new file mode 100755 index 000000000..7bd7cdbc5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_up.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_up_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_up_rtl.png new file mode 100755 index 000000000..e32954234 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/img/weather-tip_up_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.css new file mode 100755 index 000000000..7a73d4a46 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.css @@ -0,0 +1,127 @@ +body div.userbar-wrap { + border: none; + zoom: 1; + z-index: 100; +} +.header-fixed .userbar-wrap { + position: fixed; + width: 100%; + top: 0; + left: 0; +} +div.userbar-tool { + margin-top: 0; + width: auto; +} +.settings { + max-width: 170px; +} +.settings .settings-btn { + position: relative; + height: 50px; + width: auto; + max-width: 150px; + padding: 0 10px; + border: none; + vertical-align: middle; + display: table-cell; + *display: block; + background: none; + overflow: hidden; + cursor: default; + color: #fff; +} +.settings .settings-btn_word { + line-height: 50px; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + color: rgba(255,255,255, 0.5); +} +div.setting-btn-wrap { + height: 50px; + overflow: hidden; +} +.userbar_split { + float: right; + width: 1px; + height: 100%; + font-size: 14px; + line-height: 50px; + overflow: hidden; + opacity: 0.3; + filter:alpha(opacity=30); + visibility: hidden; +} +.userbar-logoSibling .userbar_split { + float: left; + background-color: #fff; + opacity: 0.2; + filter:alpha(opacity=20); +} +div.settings-dropdown { + width: 118px; +} +.userbar-btns { + visibility: hidden; + position: absolute; + right: 0; + top: 26px; +} +/*.box-search .box-search_form .input input { + width: 480px; +} +.box-search .box-search_form .input { + margin-left: 9px; +}*/ +.userbar-logo { + /*margin-right: 150px;*/ + max-width: 280px; +} +.userbar-date-wrapper { + float: left; + position: relative; + z-index: 100; + background-repeat: no-repeat; +} +div.userbar-date { + position: relative; + left: auto; + float: left; + /*margin-left: 20px; + margin-right: 20px;*/ + margin-top: 0; + /*overflow: hidden;*/ + width: 130px; + padding: 11px 18px 9px; + /*padding-top: 9px; + padding-bottom: 9px;*/ +} +.userbar-date br { + display: block !important; +} +.userbar-date .calendar_bg { + display: inline !important; + float: left; + width: 30px; + height: 30px; + font-size: 14px; + font-weight: 700; + line-height: 36px; + padding: 0; + margin-right: 8px; + text-align: center; + color: #fff; + background: url(../img/calendar.png?__sprite) no-repeat; +} +.weather-wrap { + position: relative; + float: left; +} +.header-fixed_mask { + display: none; +} +div.userbar-weather { + float: left; +} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.lv2.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.lv2.css new file mode 100755 index 000000000..b7be5bb0b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.lv2.css @@ -0,0 +1,11 @@ +/*for lv2*/ +body .userbar-wrap { + background-image: none !important; + background: #595959 !important; + background: rgba(0,0,0,0.6) !important; +} +body .module-mask { + background: rgba(0,0,0,0.2); + filter:progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr='#33000000', endColorstr='#33000000'); + -ms-filter:"progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#33000000', endColorstr='#33000000')"; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.lv2.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.lv2.more.css new file mode 100755 index 000000000..c1095b063 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.lv2.more.css @@ -0,0 +1,117 @@ +body .userbar-weather .fl:hover { + background: #474747; + background: rgba(0,0,0,0.2); +} +body.header-fixed .account-dropdown_wrap { + /*top: 30px;*/ +} +body .account-dropdown_wrap { + /*top: 50px;*/ + box-shadow: none; + /*border-color: #4C474A; + border-color: rgba(0,0,0,0.7);*/ + border-width: 0; +} +body .wrap-message-content,body .account-loginfo_wrap { + background: #595959; + background: rgba(0,0,0,0.6); + border: 1px solid #4C474A; + border-color: rgba(0,0,0,0.7); + border-top-width: 0; +} +body .account-message_wrap,body .wrap-message-content { + margin-top: 6px; + border-bottom-width: 0; +} +body .message-no-item span { + color: #fff; +} +body .wrap-message-content li { + border-bottom-color: #3B383B; + border-bottom-color: rgba(0,0,0,0.4); +} +body .wrap-message-content li:hover { + background: #474747; + background: rgba(0,0,0,0.2); +} +body .account_arrow { + border-bottom-color: #595959; + border-bottom-color: rgba(0,0,0,0.6); + top: -6px; +} +body .login-tip_con { + height: 28px; + line-height: 28px; +} +body .account_login-tip { + border-left: 0; +} +body .wrap-message-content .message-target { + color: #C2C2C2; +} +body .message-target:hover span { + color:#ffffff; +} +body .message-over-item .message-target { + color: #8c8c8c; +} +body .ico-message-delete { + background: url("../img/icon-delete.png?__sprite") no-repeat left top; +} +body .ico-message-delete:hover{ + background: url("../img/icon-delete-hover.png?__sprite") no-repeat left top; +} +body .ico-message-type1,body .ico-message-type2 { + background: url("../img/icon-msg-notice.png?__sprite") no-repeat left top; +} +body .message-over-item .ico-message-type1,body .message-over-item .ico-message-type2{ + background: url("../img/icon-msg-notice-over.png?__sprite") no-repeat left top; +} +body .account_logout_name { + color: #ffffff; +} +body .account_logout_email { + color: #8c8c8c; +} +body .account-loginfo_wrap img { + border-color: #EFFCF9; + border-color: rgba(255,255,255, 0.6); +} + +/*logo*/ +body .userbar-logo_tip { + background: #595959; + background: rgba(0,0,0,.6); + border: 1px solid #4C474A; + border-color: rgba(0,0,0,.7); + border-top-width: 0; + top: 56px; +} +body .userbar-logo_tip .arrow_bg { + display: none; +} +body .userbar-logo_tip .arrow { + border-width: 6px; + top: -12px; + border-bottom-color: #595959; + border-bottom-color: rgba(0,0,0,0.6); +} +body .userbar-logo_tip a { + color: #FAFCFA; +} +body .userbar-logo_tip a:hover { + /*color: #ffffff;*/ + text-decoration: underline; +} +body .userbar-logo_tip .tip-close { + background: url("../img/icon-delete.png?__sprite") no-repeat left top; +} +body .userbar-logo_tip .tip-close:hover{ + background: url("../img/icon-delete-hover.png?__sprite") no-repeat left top; +} +body .userbar-logo_tip .tipLinkArrow { + background: url("../img/icon-logotips.png?__sprite") no-repeat left top; +} +body .userbar-logo_tip { + color: #E2E2E2; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.more.css new file mode 100755 index 000000000..3d7820970 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.more.css @@ -0,0 +1,990 @@ +/*============userbar=============*/ + body .userbar-tool { + /*width: 220px; + margin-top: 4px; + position: relative;*/ + position: absolute; + right: 0; + overflow: visible; + z-index: 101; + display: block; +} +.userbar-wrap { + background-image:-moz-linear-gradient(50% 0% -90deg, rgb(0, 176, 117) 0%, rgb(0, 171, 114) 100%); + background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0, rgb(0, 176, 117)), color-stop(1, rgb(0, 171, 114))); + background-image:-webkit-linear-gradient(-90deg, rgb(0, 176, 117) 0%, rgb(0, 171, 114) 100%); + background-image:-o-linear-gradient(-90deg, rgb(0, 176, 117) 0%, rgb(0, 171, 114) 100%); + background-image:-ms-linear-gradient(-90deg, rgb(0, 176, 117) 0%, rgb(0, 171, 114) 100%); + background-image:linear-gradient(-90deg, rgb(0, 176, 117) 0%, rgb(0, 171, 114) 100%); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff00b075,endColorstr=#ff00ab72,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff00b075,endColorstr=#ff00ab72,GradientType=0);*/ +} +.userbar a:hover { + text-decoration: none; +} +.weather-wrap .weather-more_wrap { + background: #0c815a; + overflow: visible; + height: 0; + border-top: 0 none; + zoom: 1; +} +.weather-more_show { + height: auto; + border-top: 1px solid #0a6f4e; +} +.weather-more_line { + -moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.1) inset; + -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.1) inset; + -o-box-shadow: 0 0 4px rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.1) inset; + border-bottom: 1px solid #0a6f4e; +} +.weather-more { + display: none; +} +div.settings-dropdown { + top: 50px; + overflow: visible; + box-shadow: 2px 2px 2px #DEDEDE, -2px 0px 2px #DEDEDE; +} +ul.settings-site { + padding: 5px 3px; +} +ul.settings-site a { + height: 22px; + line-height: 22px; + width: 72px; + padding: 0 20px; +} +ul.settings-site a:hover { + background-color: #00b075; + color: #fff; +} +.settings-site a.cur:hover { + color: #00ac72; +} +/* +.select_theme { + background-color: #D2F3EA; +} +ul.select_theme { + padding-left: 25px; + padding-top: 10px; + padding-bottom: 10px; +}*/ + .settings-arrow, .settings-arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 6px dashed transparent; +} +.settings-arrow { + border-bottom-color: #bee2d6; + border-bottom-style: solid; + top: -12px; + right: 10px; +} +.settings-arrow_bg { + border-bottom-color: #EBFCF7; + border-bottom-style: solid; + margin: -6px 0 0 -7px; +} +.module-mask { + background:rgba(255, 255, 255, 0.1); + filter:progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr='#19FFFFFF', endColorstr='#19FFFFFF'); + -ms-filter:"progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#19FFFFFF', endColorstr='#19FFFFFF')"; + cursor: pointer; +} +/* +.body-theme_2 .settings-arrow { + border-bottom-color: #d4e0eb; +} +.body-theme_2 .settings-arrow_bg { + border-bottom-color: #eef3f8; +} +.body-theme_2 .select_theme { + background-color: #CDE2F7; +} +.body-theme_2 .settings-site a:hover { + background-color: #1188f7; + color: #fff; +} +.body-theme_2 .settings-site a.cur { + color: #1188f7; +} +.body-theme_2 .settings-site a.cur:hover { + color: #1188f7; + background-color: transparent; +} +.body-theme_3 .settings-arrow { + border-bottom-color: #ecdfe1; +} +.body-theme_3 .settings-arrow_bg { + border-bottom-color: #fcf6f7; +} +.body-theme_3 .select_theme { + background-color: #FCE8EA; +} +.body-theme_3 .settings-site a:hover { + background-color: #ff617b; + color: #fff; +} +.body-theme_3 .settings-site a.cur { + color: #ff617b; +} +.body-theme_3 .settings-site a.cur:hover { + color: #ff617b; + background-color: transparent; +}*/ + +/*weather*/ + .weather_last, .weather-info .dot_img, .weather-info .temperature_hum, .userbar-weather li.weather_last { + display: none; +} +.weather-info .text { + visibility: visible; + font-size: 12px; +} +.weather-info .temperature_p { + font-size: 12px; +} +.userbar-weather div.fl { + height: 45px; + padding-top: 5px; + margin-left: 0; + width: auto; + padding-left: 18px; + padding-right: 18px; + cursor: pointer; +} +.userbar-weather .fl:hover { + background-color: #06B67B; +} +.weather-wrap .userbar-weather { + margin-right: 0; + height: 50px; + padding-top: 0; +} +.userbar-weather .fl li { + margin-right: 0; +} +div.userbar-weather_console { + position: absolute; + left: 100px; + top: 74px; + height: auto; + display: none; +} +div.userbar-weather_console a { + color: #000000; + font-size: 14px; + font-weight: 700; +} +#weatherView li img { + width: auto; +} +.userbar-weather .weather-info span { + font-weight: 500; +} +.userbar-weather_console .weather-days { + display: none; +} +.weather-wrap .weather-more_wrap { + position: absolute; + left: -1px; + top: 50px; + height: auto; + display: none; + border: 1px solid #BEE2D6; + box-shadow: 2px 2px 2px #DEDEDE, -2px 0 2px #DEDEDE; +} +.weather-wrap .weather-more { + display: block; + width: 325px; + overflow: hidden; + background: #F0FFFC; +} +.weather-wrap .weather-more li { + padding: 16px 0; + height: 98px; + overflow: hidden; + color: #899E99; + width: 162px; + margin-top: 1px; + background: #D6F8EF; + float: left; +} +.weather-wrap .weather-more .temperature_big, .weather-wrap .weather-more .humidity { + color: #000000; +} +.weather-wrap .weather-more li img { + padding: 14px 0; +} +body .weather-more_odd { + margin-left: 1px; + _margin-left: 0; + -moz-box-shadow: none; + -webkit-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; +} +.weather-wrap .weather-more .weather-more_today { + float: none; + text-align: left; + width: auto; + height: auto; + padding: 10px 20px; + background: transparent; + overflow: hidden; + position: relative; +} +.weather-more_today .temperature_big { + font-size: 18px; + padding-left: 50px; +} +.weather-wrap .dot_img_head { + margin-bottom: -4px; + background: url(../img/drop.png?__sprite) no-repeat; +} +.weather-more_wrap .weather-more_line { + border: none; +} +.weather-more .humidity { + font-size: 12px; + padding: 0 4px; +} +.weather-more_today p { + margin-top: 10px; + margin-bottom: 10px; + color: #000000; +} +.weather-more_today p:first-child { + padding-left: 130px !important; + color: #899E99 !important; +} +.weather-wrap .weather-more .weather-more_today img { + position: absolute; + top: 50px; + left: 16px; + padding: 0; +} +.weather-more_today .weather-more_tip-remind { + padding-left: 50px; + color: #899E99; + font-weight: 500; +} +body div.userbar-weather_city-cur a { + background: url(../img/select-city_tip.png) no-repeat right top; + padding-right: 24px; + display: inline-block; + min-height: 14px; +} +.weather-wrap_arrow, .weather-wrap_arrow-bg { + position: absolute; + height: 0; + width: 0; + border: 6px solid transparent; +} +.weather-wrap_arrow { + border-bottom-color: #bee2d6; + bottom: -1px; + left: 64px; + display: none; + z-index: 2; +} +.weather-wrap_arrow-bg { + border-bottom-color: #EBFCF7; + margin: -6px 0 0 -7px; +} +div.userbar-weather_tip { + right: 0; + left: 15px; + top: 44px; + width: 200px; + background-color: #FEFEFE; + border-color: #BEE2D6; + border-top-color: #00AB72; + background-image: -moz-linear-gradient(top, #FFFFFF, #FAFDFC); + background-image: -webkit-linear-gradient(top, #FFFFFF, #FAFDFC); + background-image: -ms-linear-gradient(top, #FFFFFF, #FAFDFC); + background-image: -o-linear-gradient(top, #FFFFFF, #FAFDFC); + background-image: linear-gradient(top, #FFFFFF, #FAFDFC); + border-radius: 4px; + padding: 2px 14px 2px 26px; + height: 26px; +} +div.userbar-weather_tip .arrow { + border-bottom-color: #9BDBC3; + border-width: 7px; + top: -14px; + left: 22px; +} +div.userbar-weather_tip .arrow_bg { + border-bottom-color: #FFFFFF; + margin: -5px -8px 0 -6px; + border-width: 6px; +} +.city-select .box-prompt-inner, .weather-wrap div.city-select { + border: none; +} +.weather-wrap div.city-select { + right: 0; + left: -101px; + top: -24px; + width: 285px; + border: 1px solid #BEE2D6; + box-shadow: 2px 2px 2px #DEDEDE, -2px 0 2px #DEDEDE; + border-top-width: 0; + background: #F0FFFC; + padding: 40px 20px 80px; + overflow: hidden; + color: #676566; + font-size: 14px; +} +.city-select .weather_cur-city { + font-size: 20px; + font-weight: 600; + height: 20px; + margin-bottom: 30px; +} +.city-select .weather_close-btn { + position: absolute; + top: 16px; + right: 20px; + font-size: 18px; + color: #B3E0D1; +} +.weather-wrap .city-select select { + width: 260px; + height: 26px; + line-height: 26px; + color: #000000; + font-size: 14px; + padding-left: 4px; +} +.weather-wrap .city-select label { + font-size: 14px; + margin-top: 10px; + margin-bottom: 8px; +} +.weather-wrap .city-select .btn-bar { + width: auto; + margin-top: 30px; + text-align: left; +} +.weather-wrap .mod-btn_normal, .weather-wrap .mod-btn_cancel { + width: 110px; + float: none; + display: inline-block; + border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + height: 26px; + line-height: 26px; +} +.weather-wrap .mod-btn_normal { + margin-right: 34px; + background: url(../img/save-city_normal.png?__sprite) no-repeat; +} +.weather-wrap .mod-btn_normal:hover { + background: url(../img/save-city_hover.png?__sprite) no-repeat; +} +.weather-wrap .mod-btn_normal:active { + background: url(../img/save-city_click.png?__sprite) no-repeat; +} +.weather-wrap .mod-btn_normal .ui-button-text { + color: #ffffff; +} +.weather-wrap .mod-btn_cancel .ui-button-text { + color: #666666; +} +.weather-wrap .weather-tip_def { + width: 9px; + height: 9px; + background: url(../img/arrow2.png?__sprite) no-repeat; + position: absolute; + right: 2px; + bottom: 3px; + pointer-events: none; + cursor: pointer; +} +.weather-wrap .weather-tip_up { + background: url(../img/arrow1.png?__sprite) no-repeat; + bottom: 0; + top: 2px; +} +/* +.body-theme_2 .userbar-weather .fl:hover { + background-color: #2D90ED; +} +.body-theme_2 .weather-wrap .weather-more { + background: #EEF3F8; +} +.body-theme_2 .weather-wrap .weather-more li { + background: #D3E5F6; +} +.body-theme_2 .weather-more li.weather-more_today { + background: transparent; +} +.body-theme_2 .weather-wrap div.city-select { + background: #EEF3F8; + border-color: #B9CFE4; +} +.body-theme_2 .weather-wrap_arrow-bg { + border-bottom-color: #EEF3F8; +} +.body-theme_2 .weather-wrap_arrow { + border-bottom-color:#B9CFE4; +} +.body-theme_2 .weather-wrap .mod-btn_normal { + background: url(../img/save-city_normal_2.png?__sprite) no-repeat; +} +.body-theme_2 .weather-wrap .mod-btn_normal:hover { + background: url(../img/save-city_hover_2.png?__sprite) no-repeat; +} +.body-theme_2 .weather-wrap .mod-btn_normal:active { + background: url(../img/save-city_click_2.png?__sprite) no-repeat; +} +.body-theme_2 .city-select .weather_close-btn { + color: #81B6E7; +} +.body-theme_2 .weather-wrap .weather-more_wrap { + border-color: #B9CFE4; +} +.body-theme_3 .userbar-weather .fl:hover { + background-color: #FCA1B1; +} +.body-theme_3 .weather-wrap .weather-more { + background: #FCF6F7; +} +.body-theme_3 .weather-wrap .weather-more li { + background: #FCE7EA; +} +.body-theme_3 .weather-more li.weather-more_today { + background: transparent; +} +.body-theme_3 .weather-wrap div.city-select { + background: #FCF6F7; + border-color: #DDC8CB; +} +.body-theme_3 .weather-wrap_arrow-bg { + border-bottom-color: #FCF6F7; +} +.body-theme_3 .weather-wrap_arrow { + border-bottom-color: #DDC8CB; +} +.body-theme_3 .weather-wrap .mod-btn_normal { + background: url(../img/save-city_normal_3.png?__sprite) no-repeat; +} +.body-theme_3 .weather-wrap .mod-btn_normal:hover { + background: url(../img/save-city_hover_3.png?__sprite) no-repeat; +} +.body-theme_3 .weather-wrap .mod-btn_normal:active { + background: url(../img/save-city_click_3.png?__sprite) no-repeat; +} +.body-theme_3 .city-select .weather_close-btn { + color: #F9BBC5; +} +.body-theme_3 .weather-wrap .weather-more_wrap { + border-color: #DDC8CB; +}*/ + +/*吸顶*/ + .header-fixed .userbar-wrap { + position: fixed; + width: 100%; + top: 0; + left: 0; + background-image: none; + background: rgba(0, 173, 115, 0.8); +} +/* +.body-theme_2.header-fixed .userbar-wrap { + background: rgba(16, 130, 236, 0.8); +} +.body-theme_3.header-fixed .userbar-wrap { + background: rgba(249, 143, 160, 0.8); +}*/ + .header-fixed .userbar-wrap, .header-fixed .userbar, .header-fixed #indexLogo, .header-fixed .userbar-logo { + height: 30px; +} +.header-fixed #indexLogo { + float: left; + width: 94px; + background: url(../img/logo_test.png) no-repeat left center; +} +.header-fixed #indexLogo img { + display: none !important; +} +.header-fixed .userbar-logo { + /*margin-right: 186px;*/ +} +.header-fixed .userbar-logo_slogan, .header-fixed .userbar-date .calendar_bg, .header-fixed .userbar-date br { + display: none !important; +} +.header-fixed .userbar-logo_tip, .header-fixed .tear-page, .header-fixed .userbar-weather_tip { + display: none !important; +} +.header-fixed #weatherView li img { + width: 20px; + height: 18px; +} +.header-fixed .userbar-date { + /*padding-top: 0; + padding-bottom: 0; + margin-left: 12px; + margin-right: 12px;*/ + padding: 0 16px; + line-height: 30px; + width: auto !important; +} +.header-fixed .weather-info .text { + display: inline; + margin-right: 4px; +} +.header-fixed .weather-wrap .userbar-weather, .header-fixed .account_trig, .header-fixed .setting-btn-wrap { + height: 30px; +} +.header-fixed .account_trig img { + width: 14px; + height: 14px; +} +.header-fixed .userbar-weather div.fl { + height: 25px; + padding: 2px 16px 3px; +} +.header-fixed .weather-info { + margin-top: 2px; + overflow: hidden; +} +.header-fixed div.userbar-weather_console { + top: 54px; +} +.header-fixed .weather-wrap .weather-more_wrap, .header-fixed .account_logout, .header-fixed div.settings-dropdown { + top: 30px; +} +.header-fixed .account_title, .header-fixed .userbar_split { + line-height: 30px; +} +.header-fixed .account_login { + top: 20px; +} +.header-fixed .settings .settings-btn { + height: 30px; +} +.header-fixed .settings-btn img { + width: 14px; + height: 14px; +} +.header-fixed .settings .settings-btn_word { + line-height: 30px; +} +.header-fixed .account-login_suc .account_trig img { + width: 20px; + height: 20px; + border-radius: 10px; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -o-border-radius: 10px; + -ms-border-radius: 10px; +} +.header-fixed .newerguide-tip { + _display: none; + display: none !important; +} +.userbar-weather_city-cur { + white-space: nowrap; + position: absolute; + left: -84px; +} +.userbar-tool .userbar_split { + width: 2px; + color: #ffffff; + overflow: visible; +} +.header-test-holder { + display: none; + height: 50px; +} +.header-fixed .header-test-holder { + display: block; +} + + +/*页头吸顶高度为40px*/ + .header-fixed-up .userbar-logoSibling { + display: none; + display: none !important; +} +.header-fixed-up .userbar-wrap, .header-fixed-up .userbar, .header-fixed-up #indexLogo, .header-fixed-up .userbar-logo { + height: 40px; +} +.header-fixed-up .account_trig, .header-fixed-up .setting-btn-wrap { + height: 40px; +} +.header-fixed-up .account_logout, .header-fixed-up div.settings-dropdown { + top: 40px; +} +.header-fixed-up .account_title, .header-fixed-up .userbar_split { + line-height: 40px; +} +.header-fixed-up .account_login { + top: 30px; +} +.header-fixed-up .settings .settings-btn { + height: 40px; +} +.header-fixed-up .settings .settings-btn_word { + line-height: 40px; +} + +/*页头吸顶高度为40px时的搜索框*/ +/*普通搜索框*/ + .header-fixed-up .userbar-btns, .header-fixed-up .box-search_tab, .header-fixed-up .box-search_hsrch { + display: none; + display: none !important; +} +.header-fixed-up .box-search_wrap { + position: fixed; + top: 3px; + z-index: 499; + margin-left: 110px; +} +.header-fixed-up .sg_tri .sg_btn .sg_new_num, +.header-fixed-up .sg_v_tri .sg_v_btn .sg_v_new_num { + top: -7px; +} +.header-fixed-up .box-search_inner { + height: auto; +} +.header-fixed-up #searchGroupForm { + /*overflow: hidden;*/ +} +.header-fixed-up .btn-search { + border-width: 0; + width: auto; +} +.header-fixed-up .btn-search_c { + position: absolute; + right: 16px; + top: 6px; + z-index: 14; + text-indent: -1000px; + white-space: nowrap; + overflow: hidden; + height: 23px; + width: 23px; + background: url(../img/i-search.png?__sprite) no-repeat; + background-color: #00AC72; + border-radius: 2px; + -ms-border-radius: 2px; +} +.header-fixed-up .btn-search_c:hover { + background-color: #089868; +} +.header-fixed-up .box-search_form { + padding-left: 0; +} +.header-fixed-up .box-search_form .input { + padding-right: 28px; + background-color: white; +} +.header-fixed-up .box-search_form .input input { + /*text-indent: 50px;*/ + margin-left: 50px; +} +.header-fixed-up .box-search_logo_wrap { + position: absolute; + left: 10px; + top: 20px; + height: auto; + width: auto; +} +.header-fixed-up .box-search_logo img { + width: 16px; + height: 16px; + margin: 6px 6px 5px 8px; +} +.header-fixed-up .box-search_logo dt, .header-fixed-up .box-search_logo dd { + padding: 0; +} +.header-fixed-up .box-search_logo a { + /*border-right: 1px solid #B1B1B1;*/ + height: 27px; +} +.header-fixed-up .box-search_logo dt { + background-color: #F0F0F0; + background-image: -moz-linear-gradient(top, #FEFEFE, #E3E2E2); + background-image: -webkit-linear-gradient(top, #FEFEFE, #E3E2E2); + background-image: -ms-linear-gradient(top, #FEFEFE, #E3E2E2); + background-image: -o-linear-gradient(top, #FEFEFE, #E3E2E2); + background-image: linear-gradient(top, #FEFEFE, #E3E2E2); +} +.header-fixed-up .box-search_logos_show dt { + background-image: none; + width: 49px; +} + +.header-fixed-up .box-search_form .box-search_focus { + border-color: #12845D; +} +.header-fixed-up .sug-search, .header-fixed-up .baidu_sug, .header-fixed-up .baidu_video_sug { + width: 519px; + left: 48px; +} +.header-fixed-up .box-search_logo dt a { + background: url(../img/i-arrow.png) no-repeat 30px 13px; + border-right: 1px solid #B1B1B1; +} +.header-fixed-up .box-search_logos_show dt a { + background: url(../img/i-arrow-open.png) no-repeat 30px 13px; +} +.header-fixed-up .box-search_logos_show { + height: 0; + overflow: visible; +} +.header-fixed-up .box-search_logos_show dd { + background-color: #fff; + text-align: left; + margin-left: -1px; +} +.header-fixed-up .box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; +} +.header-fixed-up .box-search_logo .box-search_logo_first { + border-top: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo .box-search_logo_last { + border-bottom: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo dd a { + white-space: nowrap; + /*line-height: 27px;*/ + color: #8C8B8B; + border-left: 1px solid #C0C0C0; + border-right: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo dd a:hover { + color: #5D5D5D; +} +.box-search-logo-item-tips { + display: none; +} +.header-fixed-up .box-search-logo-item-tips { + display: inline; + vertical-align: middle; +} +.header-fixed-up .btn-search_ico { + display: none; + display: none !important; +} +.header-fixed-up .baidu_sug, +.header-fixed-up .baidu_video_sug { + margin-left: 0; +} + + +.header-fixed-up .box-search_logo_disabled dt a { + background: 0 0; +} +.header-fixed-up .box-search_logo_disabled dt { + width: 49px; +} +.header-fixed-up .box-search_logo_disabled dt a { + padding-right: 1px; +} +.header-fixed-up .box-search .box-search_logo_disabled dt { + background: none; + background-color: #F0F0F0; + background-image: -moz-linear-gradient(top,#FEFEFE,#E3E2E2); + background-image: -webkit-linear-gradient(top,#FEFEFE,#E3E2E2); + background-image: -ms-linear-gradient(top,#FEFEFE,#E3E2E2); + background-image: -o-linear-gradient(top,#FEFEFE,#E3E2E2); + background-image: linear-gradient(top,#FEFEFE,#E3E2E2); +} + + +/***倒计时&&日历增强***/ +body .userbar-date a { + display: block; + /*text-align: center;*/ +} +.userbar-date-cal { + cursor: pointer; +} +body .calendar-open { + background-color: #06B67B; +} +.userbar-date-cal .date-tip { + width: 9px; + height: 9px; + background: url(../img/arrow2.png?__sprite) no-repeat; + position: absolute; + right: 2px; + bottom: 3px; + pointer-events: none; + cursor: pointer; +} +.date-open .date-tip { + background: url(../img/arrow1.png?__sprite) no-repeat; + bottom: 0; + top: 2px; +} +.userbar-date-cal .calendar-wrapper { + position: absolute; + top: 50px; + left: -1px; + background-color: #F0FFFB; + /*width: 376px; + height: 384px;*/ + /*border: 1px solid #BEE2D6;*/ + box-shadow: 2px 2px 2px #DEDEDE, -2px 0 2px #DEDEDE; + border-top-width: 0; + cursor: default; + display: none; +} +.date-open .calendar-wrapper { + display: block; +} +.header-fixed .userbar-date-cal .calendar-wrapper { + top: 30px; +} +.header-fixed-up .userbar-date-cal .calendar-wrapper { + top: 40px; +} +.userbar-date-cal .ui-arrow-t { + left: 52px; + border-bottom-color: #F0FFFB; +} +.userbar-date-cal .cal-btn { + display: inline-block; + max-width: 94%; + height: 34px; + line-height: 34px; + color: #07b67b; + font-size: 12px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + bottom: 0; + right: 12px; +} +.header-fixed .down-wrapper { + display: none !important; +} +.header-fixed .date-wrapper { + display: block !important; +} + +/*极端天气提醒*/ +.weather-wrap .userbar-weather_tip .tips-close { + width: 6px; + height: 6px; + background: url(../img/del.png?__sprite) no-repeat; + top: 6px; + right: 6px; +} +.weather-wrap .userbar-weather_tip .tips-light { + width: 15px; + height: 17px; + background: url(../img/light_new.png?__sprite) no-repeat; + left: 6px; + top: 6px; +} +.weather-wrap .userbar-weather_tip p { + overflow: hidden; + text-indent: 0; + white-space: normal; + line-height: normal; + margin: 0; + margin-top: -2px; + height: 30px; +} +.weather-wrap .userbar-weather_tip .weather-remind-outer { + display: table; + height: 30px; + font-weight: normal; +} +.weather-wrap .userbar-weather_tip .weather-remind-inner { + display: table-cell; + vertical-align: middle; + word-break: break-word; + font-weight: normal; +} + +/*倒计时增强*/ +.userbar-date-new_mod { + box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -webkit-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -o-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -moz-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -ms-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; +} +.userbar-date-new_mod .userbar-date { + background: none !important; + width: auto !important; + float: none !important; +} +.userbar-date-new_mod .date-tip { + display: none !important; +} +.userbar-date-new_mod .calendar-open { + background-color: rgba(255,255,255, 0.2) !important; +} +/*@media \0screen { + .userbar-date-new_mod .calendar-open { + filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#33FFFFFF', endColorstr='#33FFFFFF'); + } +}*/ +.userbar-date-new_mod .down-tip { + visibility: hidden; +} +.userbar-date-new_mod .down-dhm .down-hm, +.userbar-date-new_mod .down-dhm br { + display: none !important; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-day, +.userbar-date-new_mod .userbar-date .down-wrapper .down-dhm { + float: none; + display: block; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-day { + margin-top: -3px; + color: #ff0006; + width: 36px; + float: right; + margin-right: 0; + overflow: hidden; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-d { + color: #FFFFFF; + display: block; + font-size: 10px; + -webkit-transform: scale(0.8); + margin-top: 24px; + margin-right: -4px; +} +.userbar-date-new_mod .userbar-date .down-wrapper, +.userbar-date-new_mod .down-wrapper .down-time { + overflow: visible; +} + +.userbar-date-new_mod2 .down-wrapper .down-time { + float: left; +} +.header-fixed .userbar-date-new_mod { + background: none !important; + width: auto !important; + box-shadow: 0; + -webkit-box-shadow: none; + -o-box-shadow: none; + -moz-box-shadow: none; + -ms-box-shadow: none; +} +.header-fixed .calendar-open { + background-color: #06B67B !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.ps.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.ps.css new file mode 100755 index 000000000..40567419e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/ltr-s/ltr.ps.css @@ -0,0 +1,16 @@ +/*for PS*/ +.header-fixed-up .radios { + display: none; + display: none !important; +} +body.header-fixed-up .box-search_logo dt { + padding-right: 18px; + background-color: #F0F0F0; + background: url(../img/btn.png) no-repeat left top; + border-right: 1px solid #B1B1B1; + cursor: pointer; +} +body.header-fixed-up .box-search_logos_show dt { + width: 30px; + background: url(../img/i-arrow-open.png) no-repeat 31px 12px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.css new file mode 100755 index 000000000..555e59e86 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.css @@ -0,0 +1,126 @@ +body div.userbar-wrap { + border: none; + z-index: 100; + zoom: 1; +} +.header-fixed .userbar-wrap { + position: fixed; + width: 100%; + top: 0; + right: 0; +} +div.userbar-tool { + margin-top: 0; + width: auto; +} +.settings { + max-width: 170px; +} +.settings .settings-btn { + position: relative; + height: 50px; + width: auto; + max-width: 150px; + padding: 0 10px; + border: none; + vertical-align: middle; + display: table-cell; + *display: block; + background: none; + overflow: hidden; + cursor: default; + color: #fff; +} +.settings .settings-btn_word { + line-height: 50px; + white-space: nowrap; + text-overflow: ellipsis; + display: block; + color: rgba(255,255,255, 0.5); +} +div.setting-btn-wrap { + height: 50px; + overflow: hidden; +} +.userbar_split { + float: left; + width: 3px; + height: 100%; + font-size: 16px; + line-height: 50px; + overflow: hidden; + opacity: 0.3; + filter:alpha(opacity=30); + visibility: hidden; +} +.userbar-logoSibling .userbar_split { + float: right; + width: 1px; + background-color: #fff; + opacity: 0.2; + filter:alpha(opacity=20); +} +div.settings-dropdown { + width: 118px; +} +.userbar-btns { + visibility: hidden; + position: absolute; + left: 0; + top: 24px; +} +/*.box-search .box-search_form .input input { + width: 450px; +} +.box-search .box-search_form .input { + margin-right: 9px; +}*/ +.userbar-logo { + /*margin-left: 200px;*/ + max-width: 345px; +} +.userbar-date-wrapper { + float: right; + position: relative; + z-index: 100; + background-repeat: no-repeat; +} +div.userbar-date { + position: relative; + right: auto; + float: right; + /*margin-left: 20px; + margin-right: 20px;*/ + margin-top: 0; + /*overflow: hidden;*/ + width: 130px; + padding: 11px 18px 9px; + /*padding-top: 9px; + padding-bottom: 9px;*/ +} +.userbar-date br { + display: block !important; +} +.userbar-date .calendar_bg { + display: inline !important; + float: right; + width: 30px; + height: 30px; + font-size: 14px; + font-weight: 700; + line-height: 36px; + padding: 0; + margin-left: 8px; + text-align: center; + color: #fff; + background: url(../img/calendar.png?__sprite) no-repeat; +} +.weather-wrap { + position: relative; + float: right; +} +body .userbar-weather { + width: auto; + float: right; +} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.lv2.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.lv2.css new file mode 100755 index 000000000..b7be5bb0b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.lv2.css @@ -0,0 +1,11 @@ +/*for lv2*/ +body .userbar-wrap { + background-image: none !important; + background: #595959 !important; + background: rgba(0,0,0,0.6) !important; +} +body .module-mask { + background: rgba(0,0,0,0.2); + filter:progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr='#33000000', endColorstr='#33000000'); + -ms-filter:"progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#33000000', endColorstr='#33000000')"; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.lv2.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.lv2.more.css new file mode 100755 index 000000000..47baf2bc3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.lv2.more.css @@ -0,0 +1,119 @@ +body .userbar-weather ul.fl:hover { + background: #474747; + background: rgba(0,0,0,0.2); +} + +body.header-fixed .account-dropdown_wrap { + /*top: 30px;*/ +} +body .account-dropdown_wrap { + /*top: 50px;*/ + box-shadow: none; + /*border-color: #4C474A; + border-color: rgba(0,0,0,0.7);*/ + border-width: 0; +} +body .wrap-message-content,body .account-loginfo_wrap { + background: #595959; + background: rgba(0,0,0,0.6); + border: 1px solid #4C474A; + border-color: rgba(0,0,0,0.7); + border-top-width: 0; +} +body .account-message_wrap,body .wrap-message-content { + margin-top: 6px; + border-bottom-width: 0; +} +body .message-no-item span { + color: #fff; +} +body .wrap-message-content li { + border-bottom-color: #3B383B; + border-bottom-color: rgba(0,0,0,0.4); +} +body .wrap-message-content li:hover { + background: #474747; + background: rgba(0,0,0,0.2); +} +body .account_arrow { + border-bottom-color: #595959; + border-bottom-color: rgba(0,0,0,0.6); + top: -6px; +} +body .login-tip_con { + height: 28px; + line-height: 28px; +} +body .account_login-tip { + border-right: 0; +} +body .wrap-message-content .message-target { + color: #C2C2C2; +} +body .message-target:hover span { + color:#ffffff; +} +body .message-over-item .message-target { + color: #8c8c8c; +} +body .ico-message-delete { + background: url("../img/icon-delete.png?__sprite") no-repeat left top; +} +body .ico-message-delete:hover{ + background: url("../img/icon-delete-hover.png?__sprite") no-repeat left top; +} +body .ico-message-type1,body .ico-message-type2 { + background: url("../img/icon-msg-notice-rtl.png?__sprite") no-repeat left top; +} +body .message-over-item .ico-message-type1,body .message-over-item .ico-message-type2{ + background: url("../img/icon-msg-notice-over-rtl.png?__sprite") no-repeat left top; +} +body .account_logout_name { + color: #ffffff; +} +body .account_logout_email { + color: #8c8c8c; +} +body .account-loginfo_wrap img { + border-color: #EFFCF9; + border-color: rgba(255,255,255, 0.6); +} + +/*logo*/ +body .userbar-logo_tip { + background: #595959; + background: rgba(0,0,0,.6); + border: 1px solid #4C474A; + border-color: rgba(0,0,0,.7); + border-top-width: 0; + top: 56px; +} +body .userbar-logo_tip .arrow_bg { + display: none; +} +body .userbar-logo_tip .arrow { + border-width: 6px; + top: -12px; + border-bottom-color: #595959; + border-bottom-color: rgba(0,0,0,0.6); +} +body .userbar-logo_tip a { + color: #FAFCFA; +} +body .userbar-logo_tip a:hover { + /*color: #ffffff;*/ + text-decoration: underline; +} +body .userbar-logo_tip .tip-close { + background: url("../img/icon-delete.png?__sprite") no-repeat left top; +} +body .userbar-logo_tip .tip-close:hover{ + background: url("../img/icon-delete-hover.png?__sprite") no-repeat left top; +} +body .userbar-logo_tip .tipLinkArrow { + background: url("../img/icon-logotips-rtl.png?__sprite") no-repeat left top; + height: 10px; +} +body .userbar-logo_tip { + color: #E2E2E2; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.more.css new file mode 100755 index 000000000..a985edb2e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.more.css @@ -0,0 +1,1030 @@ +/*============userbar=============*/ +body .userbar-tool { + /*width: 240px; + margin-top: 4px; + position: relative;*/ + position: absolute; + left: 0; + overflow: visible; + z-index: 101; + display: block; +} +.userbar-wrap { + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(0,176,117)),color-stop(1, rgb(0,171,114))); + background-image:-webkit-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-o-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff00b075,endColorstr=#ff00ab72,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff00b075,endColorstr=#ff00ab72,GradientType=0);*/ +} +.userbar a:hover { + text-decoration: none; +} +.weather-wrap .weather-more_wrap { + background: #0c815a; + overflow: visible; + height: 0; + border-top: 0 none; + zoom: 1; +} +.weather-more_show { + height: auto; + border-top: 1px solid #0a6f4e; +} +.weather-more_line { + -moz-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -o-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + border-bottom: 1px solid #0a6f4e; + +} + + + + +div.settings-dropdown { + top: 50px; + overflow: visible; + box-shadow: 2px 2px 2px #DEDEDE, -2px 0px 2px #DEDEDE; +} +ul.settings-site { + padding: 5px 3px; +} +ul.settings-site a { + height: 22px; + line-height: 22px; + width: 72px; + padding: 0 20px; +} +ul.settings-site a:hover { + background-color: #00b075; + color: #fff; +} +.settings-site a.cur:hover { + color: #00ac72; +} +/* +.select_theme { + background-color: #D2F3EA; +} +ul.select_theme { + padding-right: 25px; + padding-top: 10px; + padding-bottom: 10px; +}*/ +.settings-arrow, .settings-arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 6px dashed transparent; +} +.settings-arrow { + border-bottom-color: #bee2d6; + border-bottom-style: solid; + top: -12px; + left: 10px; +} +.settings-arrow_bg { + border-bottom-color: #EBFCF7; + border-bottom-style: solid; + margin: -6px -7px 0 0; +} +.module-mask { + background:rgba(255, 255, 255, 0.1); + filter:progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr='#19FFFFFF', endColorstr='#19FFFFFF'); + -ms-filter:"progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#19FFFFFF', endColorstr='#19FFFFFF')"; + cursor: pointer; +} +/* +.body-theme_2 .settings-arrow { + border-bottom-color: #d4e0eb; +} +.body-theme_2 .settings-arrow_bg { + border-bottom-color: #eef3f8; +} +.body-theme_2 .select_theme { + background-color: #CDE2F7; +} +.body-theme_2 .settings-site a:hover { + background-color: #1188f7; + color: #fff; +} +.body-theme_2 .settings-site a.cur { + color: #1188f7; +} +.body-theme_2 .settings-site a.cur:hover { + color: #1188f7; + background-color: transparent; +} +.body-theme_3 .settings-arrow { + border-bottom-color: #ecdfe1; +} +.body-theme_3 .settings-arrow_bg { + border-bottom-color: #fcf6f7; +} +.body-theme_3 .select_theme { + background-color: #FCE8EA; +} +.body-theme_3 .settings-site a:hover { + background-color: #ff617b; + color: #fff; +} +.body-theme_3 .settings-site a.cur { + color: #ff617b; +} +.body-theme_3 .settings-site a.cur:hover { + color: #ff617b; + background-color: transparent; +}*/ + +/*weather*/ + .weather_last, .weather-info .dot_img, .weather-info .temperature_hum, .userbar-weather li.weather_last { + display: none; +} +body .weather-info { + width: auto; +} +.weather-info .text { + visibility: visible; + font-size: 12px; +} +.weather-info .temperature_p { + font-size: 12px; +} +.userbar-weather ul.fl { + height: 45px; + padding-top: 5px; + margin-right: 0; + margin-top: 0; + width: auto; + padding-right: 18px; + padding-left: 18px; + cursor: pointer; +} +.userbar-weather ul.fl:hover { + background-color: #06B67B; +} +.weather-wrap .userbar-weather { + margin-left: 0; + height: 50px; + padding-top: 0; + z-index: 1; +} +.userbar-weather .fl li { + margin-left: 0; +} +div.userbar-weather_console { + position: absolute; + right: 100px; + top: 74px; + height: auto; + display: none; +} +div.userbar-weather_console a { + color: #000000; + font-size: 14px; + font-weight: 700; +} +#weatherView li img { + width: auto; +} +.userbar-weather .weather-info span { + font-weight: 500; +} +.userbar-weather_console .weather-days { + display: none; +} +.weather-wrap .weather-more_wrap { + position: absolute; + right: -1px; + top: 50px; + height: auto; + display: none; + border: 1px solid #BEE2D6; + box-shadow: 2px 2px 2px #DEDEDE, -2px 0 2px #DEDEDE; +} +.weather-wrap .weather-more { + display: block; + width: 325px; + overflow: hidden; + background: #F0FFFC; +} +.weather-wrap .weather-more li { + padding: 16px 0; + height: 98px; + overflow: hidden; + color: #899E99; + width: 162px; + margin-top: 1px; + background: #D6F8EF; + float: right; +} +.weather-wrap .weather-more .temperature_big, .weather-wrap .weather-more .humidity { + color: #000000; +} +.weather-wrap .weather-more li img { + padding: 14px 0; +} +body .weather-more_odd { + margin-right: 1px; + _margin-right: 0; + -moz-box-shadow: none; + -webkit-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; +} +.weather-wrap .weather-more .weather-more_today { + float: none; + text-align: right; + width: auto; + height: auto; + padding: 10px 20px 26px; + background: transparent; + overflow: hidden; + position: relative; +} +.weather-more_today .temperature_big { + font-size: 18px; + padding-right: 30px; +} +.weather-more_today .dot_img_head { + margin-right: 14px; + margin-top: 6px; +} +.weather-wrap .dot_img_head { + margin-bottom: -4px; + background: url(../img/drop.png?__sprite) no-repeat; +} +.weather-more_wrap .weather-more_line { + border: none; +} +.weather-more .humidity { + font-size: 13px; + padding: 0; + margin-left: 26px; +} +.weather-more_today .humidity { + margin-left: 92px; + margin-top: 5px; +} +.weather-more_today p { + margin-top: 10px; + margin-bottom: 10px; + color: #000000; +} +.weather-more_today p:first-child { + padding-right: 140px !important; + color: #899E99 !important; +} +.weather-wrap .weather-more .weather-more_today img { + position: absolute; + top: 50px; + right: 16px; + padding: 0; +} +.weather-more_today .weather-more_tip-remind { + padding-right: 0; + color: #899E99; + font-weight: 500; + white-space: nowrap; + position: absolute; + bottom: 20px; + right: 72px; +} +body div.userbar-weather_city-cur a { + background: url(../img/select-city_tip.png) no-repeat left top; + padding-left: 24px; + display: inline-block; + min-height: 14px; +} +.weather-wrap_arrow, .weather-wrap_arrow-bg { + position: absolute; + height: 0; + width: 0; + border: 6px solid transparent; +} +.weather-wrap_arrow { + border-bottom-color: #bee2d6; + bottom: -1px; + right: 64px; + display: none; + z-index: 2; +} +.weather-wrap_arrow-bg { + border-bottom-color: #EBFCF7; + margin: -6px -7px 0 0; +} +div.userbar-weather_tip { + left: 0; + right: 15px; + top: 44px; + width: 200px; + background-color: #FEFEFE; + border-color: #BEE2D6; + border-top-color: #00AB72; + background-image: -moz-linear-gradient(top, #FFFFFF, #FAFDFC); + background-image: -webkit-linear-gradient(top, #FFFFFF, #FAFDFC); + background-image: -ms-linear-gradient(top, #FFFFFF, #FAFDFC); + background-image: -o-linear-gradient(top, #FFFFFF, #FAFDFC); + background-image: linear-gradient(top, #FFFFFF, #FAFDFC); + border-radius: 4px; + padding: 2px 26px 2px 14px; + height: 26px; +} +div.userbar-weather_tip .arrow { + border-bottom-color: #9BDBC3; + border-width: 7px; + top: -14px; + right: 22px; +} +div.userbar-weather_tip .arrow_bg { + border-bottom-color: #FFFFFF; + margin: -5px -6px 0 -8px; + border-width: 6px; +} +.city-select .box-prompt-inner, .weather-wrap div.city-select { + border: none; +} +.weather-wrap div.city-select { + left: 0; + right: -101px; + top: -24px; + width: 285px; + border: 1px solid #BEE2D6; + box-shadow: 2px 2px 2px #DEDEDE, -2px 0 2px #DEDEDE; + border-top-width: 0; + background: #F0FFFC; + padding: 38px 20px 80px; + overflow: hidden; + color: #676566; + font-size: 14px; +} +.city-select .weather_cur-city { + font-size: 20px; + font-weight: 600; + height: 20px; + margin-bottom: 30px; +} +.city-select .weather_close-btn { + position: absolute; + top: 16px; + left: 20px; + font-size: 18px; + color: #B3E0D1; +} +.weather-wrap .city-select select { + width: 260px; + height: 26px; + line-height: 26px; + color: #000000; + font-size: 14px; + padding-right: 4px; +} +.weather-wrap .city-select label { + font-size: 14px; + margin-top: 10px; + margin-bottom: 8px; +} +.weather-wrap .city-select .btn-bar { + width: auto; + margin-top: 30px; + text-align: right; +} +.weather-wrap .mod-btn_normal, .weather-wrap .mod-btn_cancel { + width: 110px; + float: none; + display: inline-block; + border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + height: 26px; + line-height: 26px; +} +.weather-wrap .mod-btn_normal { + margin-left: 34px; + background: url(../img/save-city_normal.png?__sprite) no-repeat; +} +.weather-wrap .mod-btn_normal:hover { + background: url(../img/save-city_hover.png?__sprite) no-repeat; +} +.weather-wrap .mod-btn_normal:active { + background: url(../img/save-city_click.png?__sprite) no-repeat; +} +.weather-wrap .mod-btn_normal .ui-button-text { + color: #ffffff; +} +.weather-wrap .mod-btn_cancel .ui-button-text { + color: #666666; +} +.weather-wrap .weather-tip_def { + width: 9px; + height: 9px; + background: url(../img/arrow2-rtl.png?__sprite) no-repeat; + position: absolute; + left: 2px; + bottom: 3px; + pointer-events: none; + cursor: pointer; + z-index: 1; +} +.weather-wrap .weather-tip_up { + background: url(../img/arrow1-rtl.png?__sprite) no-repeat; + bottom: 0; + top: 2px; +} + +/*.body-theme_2 .userbar-weather ul.fl:hover { + background-color: #2D90ED; +} +.body-theme_2 .weather-wrap .weather-more { + background: #EEF3F8; +} +.body-theme_2 .weather-wrap .weather-more li { + background: #D3E5F6; +} +.body-theme_2 .weather-more li.weather-more_today { + background: transparent; +} +.body-theme_2 .weather-wrap div.city-select { + background: #EEF3F8; + border-color: #B9CFE4; +} +.body-theme_2 .weather-wrap_arrow-bg { + border-bottom-color: #EEF3F8; +} +.body-theme_2 .weather-wrap_arrow { + border-bottom-color:#B9CFE4; +} +.body-theme_2 .weather-wrap .mod-btn_normal { + background: url(../img/save-city_normal_2.png?__sprite) no-repeat; +} +.body-theme_2 .weather-wrap .mod-btn_normal:hover { + background: url(../img/save-city_hover_2.png?__sprite) no-repeat; +} +.body-theme_2 .weather-wrap .mod-btn_normal:active { + background: url(../img/save-city_click_2.png?__sprite) no-repeat; +} +.body-theme_2 .city-select .weather_close-btn { + color: #81B6E7; +} +.body-theme_2 .weather-wrap .weather-more_wrap { + border-color: #B9CFE4; +} +.body-theme_3 .userbar-weather ul.fl:hover { + background-color: #FCA1B1; +} +.body-theme_3 .weather-wrap .weather-more { + background: #FCF6F7; +} +.body-theme_3 .weather-wrap .weather-more li { + background: #FCE7EA; +} +.body-theme_3 .weather-more li.weather-more_today { + background: transparent; +} +.body-theme_3 .weather-wrap div.city-select { + background: #FCF6F7; + border-color: #DDC8CB; +} +.body-theme_3 .weather-wrap_arrow-bg { + border-bottom-color: #FCF6F7; +} +.body-theme_3 .weather-wrap_arrow { + border-bottom-color: #DDC8CB; +} +.body-theme_3 .weather-wrap .mod-btn_normal { + background: url(../img/save-city_normal_3.png?__sprite) no-repeat; +} +.body-theme_3 .weather-wrap .mod-btn_normal:hover { + background: url(../img/save-city_hover_3.png?__sprite) no-repeat; +} +.body-theme_3 .weather-wrap .mod-btn_normal:active { + background: url(../img/save-city_click_3.png?__sprite) no-repeat; +} +.body-theme_3 .city-select .weather_close-btn { + color: #F9BBC5; +} +.body-theme_3 .weather-wrap .weather-more_wrap { + border-color: #DDC8CB; +}*/ + +/*吸顶*/ + .header-fixed .userbar-wrap { + position: fixed; + width: 100%; + top: 0; + right: 0; + background-image: none; + background: rgba(0, 173, 115, 0.8); +} +/* +.body-theme_2.header-fixed .userbar-wrap { + background: rgba(16, 130, 236, 0.8); +} +.body-theme_3.header-fixed .userbar-wrap { + background: rgba(249, 143, 160, 0.8); +}*/ + +.header-fixed .userbar-wrap, .header-fixed .userbar, .header-fixed #indexLogo, .header-fixed .userbar-logo { + height: 30px; +} +.header-fixed #indexLogo { + float: right; + width: 94px; + background: url(../img/logo_test.png) no-repeat right center; +} +.header-fixed #indexLogo img { + display: none !important; +} +.header-fixed .userbar-logo { + /*margin-left: 251px;*/ +} +.header-fixed .userbar-logo_slogan, .header-fixed .userbar-date .calendar_bg, .header-fixed .userbar-date br { + display: none !important; +} +.header-fixed .userbar-logo_tip, .header-fixed .tear-page, .header-fixed .userbar-weather_tip { + display: none !important; +} +.header-fixed #weatherView li img { + width: 20px; + height: 18px; + margin-top: 2px; +} +.header-fixed .userbar-date { + /*padding-top: 0; + padding-bottom: 0; + margin-left: 12px; + margin-right: 12px;*/ + padding: 0 16px; + line-height: 30px; + width: auto !important; +} +.header-fixed .weather-info .text { + margin-left: 4px; + float: right; + display: inline; + margin-top: 2px; +} +.header-fixed .weather-wrap .userbar-weather, .header-fixed .account_trig, .header-fixed .setting-btn-wrap { + height: 30px; +} +.header-fixed .account_trig img { + width: 14px; + height: 14px; +} +.header-fixed .userbar-weather ul.fl { + height: 25px; + padding: 2px 16px 3px; +} +.header-fixed .weather-info { + margin-top: 2px; + overflow: hidden; +} +.header-fixed div.userbar-weather_console { + top: 54px; +} +.header-fixed .weather-wrap .weather-more_wrap, .header-fixed .account_logout, .header-fixed div.settings-dropdown { + top: 30px; +} +.header-fixed .account_title, .header-fixed .userbar_split { + line-height: 30px; +} +.header-fixed .account_login { + top: 20px; +} +.header-fixed .settings .settings-btn { + height: 30px; +} +.header-fixed .settings-btn img { + width: 14px; + height: 14px; +} +.header-fixed .settings .settings-btn_word { + line-height: 30px; +} +.header-fixed .account-login_suc .account_trig img { + width: 20px; + height: 20px; + border-radius: 10px; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -o-border-radius: 10px; + -ms-border-radius: 10px; +} +.header-fixed .temperature_p { + float: left; + margin-top: 4px; +} +.header-fixed .userbar-weather img { + margin-left: 14px; + margin-top: 4px; +} +.header-fixed .newerguide-tip { + _display: none; + display: none !important; +} +.userbar-weather_city-cur { + white-space: nowrap; + position: absolute; + right: -78px; +} +.userbar-tool .userbar_split { + width: 4px\9; + color: #ffffff; + margin-right: -2px; + margin-right: -3px\9; +} + +.header-test-holder { + display: none; + height: 50px; +} +.header-fixed .header-test-holder { + display: block; +} + + +/*页头吸顶高度为40px*/ +.header-fixed-up .userbar-logoSibling { + display: none; + display: none !important; +} +.header-fixed-up .userbar-wrap, .header-fixed-up .userbar, .header-fixed-up #indexLogo, .header-fixed-up .userbar-logo { + height: 40px; +} +.header-fixed-up .account_trig, .header-fixed-up .setting-btn-wrap { + height: 40px; +} +.header-fixed-up .account_logout, .header-fixed-up div.settings-dropdown { + top: 40px; +} +.header-fixed-up .account_title, .header-fixed-up .userbar_split { + line-height: 40px; +} +.header-fixed-up .account_login { + top: 30px; +} +.header-fixed-up .settings .settings-btn { + height: 40px; +} +.header-fixed-up .settings .settings-btn_word { + line-height: 40px; +} + +/*页头吸顶高度为40px时的搜索框*/ +/*普通搜索框*/ + .header-fixed-up .userbar-btns, .header-fixed-up .box-search_tab, .header-fixed-up .box-search_hsrch { + display: none; + display: none !important; +} +.header-fixed-up .box-search_wrap { + position: fixed; + top: 3px; + z-index: 499; + margin-right: 110px; +} +.header-fixed-up .sg_tri .sg_btn .sg_new_num, +.header-fixed-up .sg_v_tri .sg_v_btn .sg_v_new_num { + top: -7px; +} +.header-fixed-up .box-search_inner { + height: auto; +} +.header-fixed-up #searchGroupForm { + /*overflow: hidden;*/ +} +.header-fixed-up .btn-search { + border-width: 0; + width: auto; +} +.header-fixed-up .btn-search_c { + position: absolute; + left: 16px; + top: 6px; + z-index: 14; + text-indent: -1000px; + white-space: nowrap; + overflow: hidden; + height: 23px; + width: 23px; + background: url(../img/i-search.png?__sprite) no-repeat; + background-color: #00AC72; + border-radius: 2px; + -ms-border-radius: 2px; +} +.header-fixed-up .btn-search_c:hover { + background-color: #089868; +} +.header-fixed-up .box-search_form { + padding-right: 0; +} +.header-fixed-up .box-search_form .input { + padding-left: 28px; + background-color: white; +} +.header-fixed-up .box-search_form .input input { + /*text-indent: 50px;*/ + margin-right: 50px; +} +.header-fixed-up .box-search_logo_wrap { + position: absolute; + right: 10px; + top: 20px; + height: auto; + width: auto; +} +.header-fixed-up .box-search_logo img { + width: 16px; + height: 16px; + margin: 6px 8px 5px 6px; +} +.header-fixed-up .box-search_logo dt, .header-fixed-up .box-search_logo dd { + padding: 0; +} +.header-fixed-up .box-search_logo a { + /*border-right: 1px solid #B1B1B1;*/ + height: 27px; +} +.header-fixed-up .box-search_logo dt { + background-color: #F0F0F0; + background-image: -moz-linear-gradient(top, #FEFEFE, #E3E2E2); + background-image: -webkit-linear-gradient(top, #FEFEFE, #E3E2E2); + background-image: -ms-linear-gradient(top, #FEFEFE, #E3E2E2); + background-image: -o-linear-gradient(top, #FEFEFE, #E3E2E2); + background-image: linear-gradient(top, #FEFEFE, #E3E2E2); +} +.header-fixed-up .box-search_logos_show dt { + background-image: none; + width: 49px; +} +.header-fixed-up .box-search_form .box-search_focus { + border-color: #12845D; +} +.header-fixed-up .sug-search, .header-fixed-up .baidu_sug, .header-fixed-up .baidu_video_sug { + width: 516px; + right: 48px; +} +.header-fixed-up .box-search_logo dt a { + background: url(../img/i-arrow.png) no-repeat 11px 13px; + border-left: 1px solid #B1B1B1; +} +.header-fixed-up .box-search_logos_show dt a { + background: url(../img/i-arrow-open.png) no-repeat 11px 13px; +} +.header-fixed-up .box-search_logos_show { + height: 0; + overflow: visible; +} +.header-fixed-up .box-search_logos_show dd { + background-color: #fff; + text-align: right; + margin-right: -1px; +} +.header-fixed-up .box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; +} +.header-fixed-up .box-search_logo .box-search_logo_first { + border-top: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo .box-search_logo_last { + border-bottom: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo dd a { + white-space: nowrap; + /*line-height: 27px;*/ + color: #8C8B8B; + border-left: 1px solid #C0C0C0; + border-right: 1px solid #C0C0C0; +} +.header-fixed-up .box-search_logo dd a:hover { + color: #5D5D5D; +} +.box-search-logo-item-tips { + display: none; +} +.header-fixed-up .box-search-logo-item-tips { + display: inline; + vertical-align: middle; +} +.header-fixed-up .btn-search_ico { + display: none; + display: none !important; +} +.header-fixed-up #kbd { + position: fixed !important; + top: 38px !important; + bottom: 0px !important; +} +.header-fixed-up .baidu_sug, +.header-fixed-up .baidu_video_sug { + margin-right: 0; +} + + +.header-fixed-up .box-search_logo_disabled dt a { + background: 0 0; +} +.header-fixed-up .box-search_logo_disabled dt { + width: 49px; +} +.header-fixed-up .box-search_logo_disabled dt a { + padding-left: 1px; +} +.header-fixed-up .box-search .box-search_logo_disabled dt { + background: none; + background-color: #F0F0F0; + background-image: -moz-linear-gradient(top,#FEFEFE,#E3E2E2); + background-image: -webkit-linear-gradient(top,#FEFEFE,#E3E2E2); + background-image: -ms-linear-gradient(top,#FEFEFE,#E3E2E2); + background-image: -o-linear-gradient(top,#FEFEFE,#E3E2E2); + background-image: linear-gradient(top,#FEFEFE,#E3E2E2); +} + + + +/***倒计时&&日历增强***/ +body .userbar-date a { + display: block; + /*text-align: center;*/ +} +.userbar-date-cal { + cursor: pointer; +} +body .calendar-open { + background-color: #06B67B; +} +.userbar-date-cal .date-tip { + width: 9px; + height: 9px; + background: url(../img/arrow2-rtl.png?__sprite) no-repeat; + position: absolute; + left: 2px; + bottom: 3px; + pointer-events: none; + cursor: pointer; +} +.date-open .date-tip { + background: url(../img/arrow1-rtl.png?__sprite) no-repeat; + bottom: 0; + top: 2px; +} +.userbar-date-cal .calendar-wrapper { + position: absolute; + top: 50px; + right: -1px; + background-color: #F0FFFB; + /*width: 376px; + height: 384px;*/ + /*border: 1px solid #BEE2D6;*/ + box-shadow: 2px 2px 2px #DEDEDE, -2px 0 2px #DEDEDE; + border-top-width: 0; + cursor: default; + display: none; +} +.date-open .calendar-wrapper { + display: block; +} +.header-fixed .userbar-date-cal .calendar-wrapper { + top: 30px; +} +.header-fixed-up .userbar-date-cal .calendar-wrapper { + top: 40px; +} +.userbar-date-cal .ui-arrow-t { + right: 52px; + border-bottom-color: #F0FFFB; +} +.userbar-date-cal .cal-btn { + display: inline-block; + max-width: 94%; + height: 34px; + line-height: 34px; + color: #07b67b; + font-size: 12px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + bottom: 0; + left: 12px; +} +.header-fixed .down-wrapper { + display: none !important; +} +.header-fixed .date-wrapper { + display: block !important; +} + +/*极端天气提醒*/ +.weather-wrap .userbar-weather_tip .tips-close { + width: 6px; + height: 6px; + background: url(../img/del.png?__sprite) no-repeat; + top: 6px; + left: 6px; +} +.weather-wrap .userbar-weather_tip .tips-light { + width: 15px; + height: 17px; + background: url(../img/light_new.png?__sprite) no-repeat; + right: 6px; + top: 6px; +} +.weather-wrap .userbar-weather_tip p { + overflow: hidden; + text-indent: 0; + white-space: normal; + line-height: normal; + margin: 0; + margin-top: -2px; + height: 30px; +} +.weather-wrap .userbar-weather_tip .weather-remind-outer { + display: table; + height: 30px; + font-weight: normal; +} +.weather-wrap .userbar-weather_tip .weather-remind-inner { + display: table-cell; + vertical-align: middle; + word-break: break-word; + font-weight: normal; +} + +/*倒计时增强*/ +.userbar-date-new_mod { + box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -webkit-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -o-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -moz-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; + -ms-box-shadow: rgba(0,0,0,0.1) 0px 0px 0px 1px inset; +} +.userbar-date-new_mod .userbar-date { + background: none !important; + width: auto !important; + float: none !important; +} +.userbar-date-new_mod .date-tip { + display: none !important; +} +.userbar-date-new_mod .calendar-open { + background-color: rgba(255,255,255, 0.2) !important; +} +/*@media \0screen { + .userbar-date-new_mod .calendar-open { + filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#33FFFFFF', endColorstr='#33FFFFFF'); + } +}*/ +.userbar-date-new_mod .down-tip { + visibility: hidden; +} +.userbar-date-new_mod .down-dhm .down-hm, +.userbar-date-new_mod .down-dhm br { + display: none !important; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-day, +.userbar-date-new_mod .userbar-date .down-wrapper .down-dhm { + float: none; + display: block; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-day { + margin-top: -3px; + color: #ff0006; + width: 36px; + float: left; + margin-left: 0; + overflow: hidden; +} +.userbar-date-new_mod .userbar-date .down-wrapper .down-d { + color: #FFFFFF; + display: block; + font-size: 10px; + -webkit-transform: scale(0.8); + margin-top: 24px; + margin-left: -4px; +} +.userbar-date-new_mod .userbar-date .down-wrapper, +.userbar-date-new_mod .down-wrapper .down-time { + overflow: visible; +} + +.userbar-date-new_mod2 .down-wrapper .down-time { + float: right; +} +.header-fixed .userbar-date-new_mod { + background: none !important; + width: auto !important; + box-shadow: 0; + -webkit-box-shadow: none; + -o-box-shadow: none; + -moz-box-shadow: none; + -ms-box-shadow: none; +} +.header-fixed .calendar-open { + background-color: #06B67B !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.ps.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.ps.css new file mode 100755 index 000000000..888738bcc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-com/rtl-s/rtl.ps.css @@ -0,0 +1,16 @@ +/*for PS*/ +.header-fixed-up .radios { + display: none; + display: none !important; +} +body.header-fixed-up .box-search_logo dt { + padding-left: 18px; + background-color: #F0F0F0; + background: url(../img/btn-rtl.png) no-repeat right top; + border-left: 1px solid #B1B1B1; + cursor: pointer; +} +body.header-fixed-up .box-search_logos_show dt { + width: 30px; + background: url(../img/i-arrow-open.png) no-repeat 10px 12px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-main.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-main.tpl new file mode 100755 index 000000000..28dc09cb8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header-main.tpl @@ -0,0 +1,7 @@ + +<%* 页头的抽样逻辑都需要在这里添加 *%> +<%if !empty($body.headerTest.widget)%> + <%widget name="common:widget/header/`$body.headerTest.widget`.tpl"%> +<%else%> + <%widget name="common:widget/header/header.tpl"%> +<%/if%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header.tpl new file mode 100755 index 000000000..4eda8186b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/header.tpl @@ -0,0 +1,40 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> +<%widget name="common:widget/header/add-fav-bar/add-fav-bar.tpl"%> +
                            +
                            + <%widget name="common:widget/header/logo/logo.tpl"%> +
                            + <%widget name="common:widget/header/site-switch/site-switch.tpl"%> + <%widget name="common:widget/header/account/account.tpl"%> + <%widget name="common:widget/header/userbar-btn/userbar-btn.tpl"%> +
                            + <%if isset($body.banner.src)%> + <%widget name="common:widget/header/banner/banner.tpl"%> + <%else%> + <%widget name="common:widget/header/clock/clock.tpl"%> + <%widget name="common:widget/header/weather/weather.tpl"%> + <%/if%> + + <%if !empty($body.newerguide.isShow)%> + <%widget name="common:widget/header/newerguide/newerguide.tpl"%> + <%/if%> +
                            + <%if !empty($body.tearPage.isShow)%> + <%widget name="common:widget/header/tear-page/tear-page.tpl"%> + <%/if%> +
                            +
                            +
                            +
                              +
                              +
                              + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/rtl/rtl.more.css"%> <%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/img/logo_new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/img/logo_new.png new file mode 100755 index 000000000..9dab6d6cc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/img/logo_new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/img/logo_new_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/img/logo_new_rtl.png new file mode 100755 index 000000000..67c8cad2f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/img/logo_new_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_ative.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_ative.png new file mode 100755 index 000000000..12bb63a4f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_ative.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_gray.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_gray.png new file mode 100755 index 000000000..efb7884bf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_gray.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_normal.png new file mode 100755 index 000000000..a2ab6e855 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/del_normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/i-logotips.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/i-logotips.png new file mode 100755 index 000000000..2007de5da Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/img/i-logotips.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/logo-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/logo-async.js new file mode 100755 index 000000000..038ae38fa --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/logo-async.js @@ -0,0 +1,234 @@ +// welcome tip + +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var helper = require("common:widget/ui/helper/helper.js"); +require("common:widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js"); + +window.Gl || (window.Gl = {}); + +var confAct = conf.logoActivity || {}, + curUa = navigator.userAgent.toLowerCase().match(/(msie|firefox|chrome)/), + curBrowser = curUa ? curUa[1] : "", + actLogo = {}, + actTips = {}; + +curBrowser = ((curBrowser === "msie") || (document.documentMode == 11)) ? "ie" : curBrowser; +actLogo = confAct[curBrowser] ? confAct[curBrowser].logo : null; +actTips = confAct[curBrowser] ? confAct[curBrowser].logoTips : null; + +function isNotEmpty(str) { + return ($.trim(str) !== ""); +} + +Gl.logo = function (type) { + var indexLogo = $("#indexLogo"), + indexLogoImg = $("#indexLogoImg"), + secLogoImg = $("#secLogoImg"), + indexSlogan = $(".userbar-logo_slogan"); + + if (type !== "index") { + indexLogoImg.hide(); + secLogoImg.show(); + } else { + if (confAct.isHidden === "0" && actLogo) { + var imgSrc = actLogo["src"], + logoUrl = actLogo["url"], + sloganTxt = actLogo["slogan"], + sloganSz = actLogo["sloganSize"], + indexTtl = actLogo["indexTitle"]; + indexLogoImg.attr("src", imgSrc); + indexLogo.attr("href", logoUrl); + indexSlogan.html(sloganTxt); + isNotEmpty(sloganSz) && indexSlogan.css("font-size", sloganSz); + indexLogo.attr("title", indexTtl); + indexLogoImg.attr("title", indexTtl); + indexLogoImg.attr("alt", indexTtl); + } + } + + indexLogo.on("click", function ( e ) { + var logoTip = $("#logoTips").eq(0), + noJump = conf.logo.noJump; + UT.send({ + position: "logo", + modId: "logo", + type: "click" + }); + if(logoTip && isNotEmpty(conf.logo.autoCloseTip)) { + logoTip.hide(); + $.cookie("Gh_l", conf.logoTips.country || "jp"); + } + if( type === "index" && conf.logo.notOpenNew === "true" ){ + e.preventDefault(); + return; + } + else if (type === "index" && ($(this).attr("href") === '/' || $(this).attr("href").match(/^\/\?/))) + $(this).sethome(); + else if (type === "index"){//如果有passQueryParam,则点击链接要带上这个参数 + var url = $(this).attr("href"), + paramKey = conf.logo.passQueryParam.trim(); + url = helper.appendQueryToUrl(url, paramKey); + if( noJump && conf.pageType == "index"){ + return; + } + //!noJump && (conf.pageType != "index") && + window.open(url); + } + else{ + if( noJump && conf.pageType == "index"){ + return; + } + //!noJump && (conf.pageType != "index") && + window.location.href = $(this).attr("href") || "/"; + } + }); +} + +Gl.logoTips = function () { + if(!(this instanceof Gl.logoTips)) return new Gl.logoTips(); + + var that = this; + that.tip = $("#logoTips"); + that.tipLink = $("#tipLink"); + that.closeBtn = $("#tipClose"); + that.conf = conf.logoTips; + + that.init(); + if(conf.pageType === "index") { + that.fixActTips(confAct.isHidden, actTips); + } +} +Gl.logoTips.prototype = { + constructor: Gl.logoTips, + + init: function () { + var that = this; + var myConf; + if(confAct.isHidden === "0" && actTips) { + myConf = confAct.logoTips; + } else { + myConf = that.conf; + } + if (myConf.show) { + //点击logotips跳转分类区在二级页不适用 + if((!conf.pageType || conf.pageType != "index") && /^{[0-9]+}$/.test(that.tipLink.attr("href"))){ + that.tip.hide(); + return; + } + that.bindEvent(); + if (myConf.alwaysShow) { + that.show(); + } else if (myConf.userOption) { + (!$.cookie("Gh_l") || $.cookie("Gh_l") !== that.conf.country) && that.show(); + } else { + $.cookie("oldFriend", null); + that.setStore("oldFriend", myConf.version, function() { + that.show(); + }); + } + } + }, + bindEvent: function () { + var that = this; + that.tipLink.on("click", function (e) { + var href = $(this).attr("href"); + e.preventDefault(); + if(href && href !== "#"){//如果有passQueryParam,则点击链接要带上这个参数 + //针对点击logotips可跳转到指定分类区的处理 + if (/^{[0-9]+}$/.test(href)) { + var sortIndex = href.substring(1, href.length-1); + var sortSite = $("dl[log-index="+sortIndex+"]", ".box-sort"); + var sortMarginTop = conf.logoTips.sortMarginTop || 40; + var sortDisappearTime = conf.logoTips.sortDisappearTime || 1500; + if(sortSite.length>0){ + var embedHome = $("#embed-iframe-nav .home"); + if(embedHome.length>0 && !embedHome.hasClass("current")){ + embedHome.trigger("click"); + } + $(window).scrollTop(sortSite.offset().top - sortMarginTop); + var sortSiteHeight = sortSite.height()-2; + //按需加载导致获取高度可能有问题,采用一定延时 + if (sortIndex>4 && sortSiteHeight<50) { + setTimeout(function(){ + sortSiteHeight = sortSite.height()-2; + sortSite.height(sortSiteHeight); + }, 50); + }else{ + sortSite.height(sortSiteHeight); + } + sortSite.addClass("selected"); + setTimeout(function(){ + sortSite.removeClass("selected"); + sortSite.height(sortSiteHeight+2); + }, sortDisappearTime); + } + }else{ + var url = $(this).attr("href"), + paramKey = that.conf.passQueryParam.trim(); + url = helper.appendQueryToUrl(url, paramKey); + window.open(url, "_blank"); + } + } + if(confAct.isHidden === "0" && actTips) { + confAct.logoTips.userOption && $.cookie("Gh_l",that.conf.country); + } else { + that.conf.userOption && $.cookie("Gh_l",that.conf.country); + } + that.tip.hide(); + UT.send({ + position: "logoTipsLink", + modId: "logo", + type: "click" + }); + }); + that.closeBtn.on("mouseenter", function () { + $(this).addClass("tip-close_hover"); + }); + that.closeBtn.on("mouseleave", function () { + $(this).removeClass("tip-close_hover"); + }); + that.closeBtn.on("click", function (e) { + e.preventDefault(); + that.tip.hide(); + UT.send({ + position: "logoTipsClose", + ac:"b", + modId: "logo", + type: "click" + }); + $.cookie("Gh_l",that.conf.country); + }); + }, + show: function () { + var that = this, + timeout = parseInt(that.conf.tipsHideTime, 10); + that.tip.show(); + if (timeout) { + setTimeout(function() { + that.tip.hide(); + }, timeout); + } + return true; + }, + setStore: function (key, value, callback, expires) { + var that = this; + $.store(key) !== value && callback(); + $.store(key, value, {expires: expires || 2000}); + }, + fixActTips: function(isHidden, data) { + var that = this; + if(isHidden === "0" && data) { + isNotEmpty(data["tipsWidth"]) && that.tip.css("width", data["tipsWidth"]); + that.tipLink.attr("href", data["url"]); + that.tip.children('p').first().contents().filter(function() { + return this.nodeType === 3; + }).replaceWith(data["text"]); + if (isNotEmpty(data["closeText"])) { + that.tipLink.html(data["closeText"] + ''); + } else { + that.tipLink.html(''); + } + } + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/logo.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/logo.tpl new file mode 100755 index 000000000..66ccb8fe6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/logo.tpl @@ -0,0 +1,108 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/logo/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/logo/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%style%> +<%if !empty($body.headerTest.widget)%> +.userbar-logo { + width: <%if $head.dir=='ltr'%><%$body.headerTest.logoWidth|default:'280'%><%else%><%$body.headerTest.logoWidth|default:'345'%><%/if%>px; +} +<%/if%> +<%/style%> + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/logo/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/logo/rtl/rtl.more.css"%> <%/if%> + + +<%if $head.dir=="ltr"%> +<%$defaultLogoPath="/widget/header/img/logo_new.png"%> +<%else%> +<%$defaultLogoPath="/widget/header/img/logo_new_rtl.png"%> +<%/if%> + + + +<%script%> + //logo + conf.logo = { + passQueryParam: "<%$body.logo.passQueryParam%>", + notOpenNew : "<%$body.logo.notOpenNew%>", + autoCloseTip: "<%$body.logo.autoCloseTip%>", + noJump: "<%$body.logo.noJump%>" + }; + // logo tips + conf.logoTips = { + show: "<%$body.logoTips.show%>", + alwaysShow: "<%$body.logoTips.alwaysShow%>", + version: "<%$body.logoTips.version%>", + userOption: "<%$body.logoTips.userOption%>", + country: conf.country, + passQueryParam: "<%$body.logo.passQueryParam%>", + sortDisappearTime: "<%$body.logoTips.sortDisappearTime%>", + sortMarinTop: "<%$body.logoTips.sortMarinTop%>", + tipsHideTime: "<%$body.logoTips.tipsHideTime%>" + }; + + // logo activity + conf.logoActivity = <%json_encode($body.logoActivity)%>; + + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/header/logo/logo-async.js"], function ($) { + Gl.logo(conf.pageType); + Gl.logoTips(); + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/ltr/ltr.css new file mode 100755 index 000000000..830a8573e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/ltr/ltr.css @@ -0,0 +1,20 @@ +/* Site's logo */ + +.userbar-logo { + height: 50px; + position: relative; + z-index: 10; + font-size: 12px; +} +.userbar-logo_slogan { + position: absolute; + font-size: 13px; + left: 44px; + top: 30px; + white-space: nowrap; +} +.userbar-logo_tip { + display: none; + position: absolute; + visibility: hidden; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/ltr/ltr.more.css new file mode 100755 index 000000000..685759db7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/ltr/ltr.more.css @@ -0,0 +1,68 @@ +.userbar-logo_tip { + position: absolute; + top: 49px; + left: 0; + padding: 5px 13px 5px 7px; + width: 230px; + max-width: 230px; + border: 1px solid #bee2d6; + border-bottom-color: #98d7c2; + color: #454545; + background-color: #fcfefd; + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(254,255,255)),color-stop(0.44, rgb(253,254,254)),color-stop(1, rgb(251,253,252))); + background-image:-webkit-linear-gradient(-90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + background-image:-o-linear-gradient(-90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + background-image:linear-gradient(-90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -o-border-radius: 10px; + border-radius: 10px; + + visibility: visible !important; +} +.userbar-logo_tip a{ + color: #00b075; +} +.userbar-logo_tip p a:hover{ + text-decoration: underline; +} +.userbar-logo_tip .arrow, .userbar-logo_tip .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 8px dashed transparent; +} +.userbar-logo_tip .arrow { + border-bottom-color: #bee2d6; + border-bottom-style: solid; + top: -17px; + left: 19px; +} +.userbar-logo_tip .arrow_bg { + border-bottom-color: #fcfefd; + border-bottom-style: solid; + margin: -7px 0 0 -8px; + _margin-top: -22px; +} +.userbar-logo_tip .tip-close { + display: block; + width: 12px; + height: 12px; + position: absolute; + top: 4px; + right: 4px; + background: url(../img/i-logotips.png?__sprite) no-repeat; + cursor: pointer; +} +.userbar-logo_tip .tip-close_hover { + background: url(../img/i-logotips.png?__sprite) no-repeat; +} +.userbar-logo_tip .tipLinkArrow{ + position: relative; + display: inline-block; + width: 12px; + height: 12px; + background: url(../img/i-logotips.png?__sprite) no-repeat -12px -1px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/rtl/rtl.css new file mode 100755 index 000000000..9a8292a1a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/rtl/rtl.css @@ -0,0 +1,18 @@ +.userbar-logo { + height: 50px; + position: relative; + z-index: 10; + font-size: 12px; +} +.userbar-logo_slogan { + position: absolute; + font-size: 13px; + right: 150px; + top: 30px; + white-space: nowrap; +} +.userbar-logo_tip { + display: none; + visibility: hidden; + position: absolute; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/rtl/rtl.more.css new file mode 100755 index 000000000..ad12940f4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/logo/rtl/rtl.more.css @@ -0,0 +1,68 @@ +.userbar-logo_tip { + position: absolute; + top: 49px; + right: 0; + padding: 5px 7px 5px 17px; + width: 230px; + max-width: 230px; + border: 1px solid #bee2d6; + border-bottom-color: #98d7c2; + color: #454545; + background-color: #fcfefd; + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(254,255,255)),color-stop(0.44, rgb(253,254,254)),color-stop(1, rgb(251,253,252))); + background-image:-webkit-linear-gradient(-90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + background-image:-o-linear-gradient(-90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + background-image:linear-gradient(-90deg,rgb(254,255,255) 0%,rgb(253,254,254) 44%,rgb(251,253,252) 100%); + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -o-border-radius: 10px; + border-radius: 10px; + + visibility: visible !important; +} +.userbar-logo_tip a{ + color: #00b075; +} +.userbar-logo_tip p a:hover{ + text-decoration: underline; +} +.userbar-logo_tip .arrow, .userbar-logo_tip .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 8px dashed transparent; +} +.userbar-logo_tip .arrow { + border-bottom-color: #bee2d6; + border-bottom-style: solid; + top: -17px; + right: 19px; +} +.userbar-logo_tip .arrow_bg { + border-bottom-color: #fcfefd; + border-bottom-style: solid; + margin: -7px -8px 0 0; + _margin-top: -22px; +} +.userbar-logo_tip .tip-close { + display: block; + width: 12px; + height: 12px; + position: absolute; + top: 4px; + left: 4px; + background: url(../img/i-logotips.png?__sprite) no-repeat; + cursor: pointer; +} +.userbar-logo_tip .tip-close_hover { + background: url(../img/i-logotips.png?__sprite) no-repeat; +} +.userbar-logo_tip .tipLinkArrow{ + position: relative; + display: inline-block; + width: 12px; + height: 9px; + background: url(../img/i-logotips.png?__sprite) no-repeat -3px -12px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/ltr/ltr.css new file mode 100755 index 000000000..6a6797bb7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/ltr/ltr.css @@ -0,0 +1,58 @@ +/*============userbar=============*/ + +.userbar-wrap { + background: #00ad73; + border-bottom: 1px solid #009e69; + _border-bottom: 0 none; + min-width: 960px; + position: relative; + height: 50px; +} +.userbar { + height: 50px; + margin: 0 auto; + color: #fff; + position: relative; + z-index: 9; +} +.userbar-tool { + display: none; +} +/*.userbar-tool { + width: 220px; + margin-top: 4px; + position: relative; + overflow: visible; + z-index: 11; +} + +.userbar a:hover { + text-decoration: none; +} +.weather-more_wrap { + background: #0c815a; + overflow: hidden; + height: 0; + border-top: 0 none; + border-bottom: 1px solid #fff; + zoom: 1; +} +.weather-more_show { + height: auto; + border-top: 1px solid #0a6f4e; +} +.weather-more_line { + -moz-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -o-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + border-bottom: 1px solid #0a6f4e; + +}*/ +.weather-more { + display: none; +} + +.weather-more_wrap { + border-bottom: 1px solid #fff; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/ltr/ltr.more.css new file mode 100755 index 000000000..ab8e8e21e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/ltr/ltr.more.css @@ -0,0 +1,45 @@ +/*============userbar=============*/ +.userbar-tool { + width: 220px; + margin-top: 4px; + position: relative; + overflow: visible; + z-index: 11; + display: block; +} +.userbar-wrap { + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(0,176,117)),color-stop(1, rgb(0,171,114))); + background-image:-webkit-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-o-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff00b075,endColorstr=#ff00ab72,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff00b075,endColorstr=#ff00ab72,GradientType=0);*/ +} + +.userbar a:hover { + text-decoration: none; +} +.weather-more_wrap { + background: #0c815a; + overflow: hidden; + height: 0; + border-top: 0 none; + zoom: 1; +} +.weather-more_show { + height: auto; + border-top: 1px solid #0a6f4e; +} +.weather-more_line { + -moz-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -o-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + border-bottom: 1px solid #0a6f4e; + +} +.weather-more { + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-delete-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-delete-hover.png new file mode 100755 index 000000000..6753dcb38 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-delete-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-delete.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-delete.png new file mode 100755 index 000000000..1bbe226de Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-delete.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-new.png new file mode 100755 index 000000000..c5417dc1d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-over-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-over-rtl.png new file mode 100755 index 000000000..213bb14c2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-over-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-over.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-over.png new file mode 100755 index 000000000..36afab5cf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-over.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-rtl.png new file mode 100755 index 000000000..7ed2d4470 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice.png new file mode 100755 index 000000000..1aaa863a6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/img/icon-msg-notice.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/ltr/ltr.more.css new file mode 100755 index 000000000..3cf32d584 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/ltr/ltr.more.css @@ -0,0 +1,23 @@ +.wrap-message{float: left;position: relative;} +.wrap-message-content{position: relative; background: #F0FFFB;width: 280px;} +.wrap-message-content li{border-bottom: 1px solid #BFF1E4;} +.wrap-message-content li:hover{background-color: #d6f8ef;} +.wrap-message-content .message-target{float:left;color: #666666;width: 255px;font-size: 12px;min-height: 58px;} +.message-target:hover span{color:#00ad72;} +a.message-target:hover span{text-decoration: underline;} +.message-over-item .message-target{color: #999999;} +.message-over-item .message-target:hover span{color: #777777;} +.message-target span{display: block;width: 200px;float: left;margin: 19px 0 10px 10px;} +.ico-message-delete{float: right;margin-top: 10px;margin-right:10px;display: none;width: 11px;height: 11px;background: url("../img/icon-delete.png?__sprite") no-repeat;} +.ico-message-delete:hover{cursor: pointer; background: url("../img/icon-delete-hover.png?__sprite") no-repeat;} +.wrap-message-content li:hover .ico-message-delete{display: block;} +.ico-message-new{position: absolute;right: 10px;top: 10px;width: 12px;height: 12px;background: url("../img/icon-msg-new.png?__sprite") no-repeat;} +.ico-message-type{width: 28px;height: 25px;float: left;margin-left: 15px;margin-top: 17px;background: url("../img/icon-msg-notice.png?__sprite") no-repeat;} +.ico-message-type1, .ico-message-type2{background: url("../img/icon-msg-notice.png?__sprite") no-repeat;} +.message-over-item .ico-message-type{background-image: url("../img/icon-msg-notice-over.png?__sprite");} +.message-over-item .ico-message-type1, .message-over-item .ico-message-type2{background-image: url("../img/icon-msg-notice-over.png?__sprite");} +.message-no-item{line-height: 58px;text-align: center;} +.message-no-item span{width: 100%;overflow: hidden;color: #aaaaaa;text-overflow:ellipsis;white-space: nowrap;} + +/****** 固定页头调整 *****/ +.header-fixed .ico-message-new{top: 4px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/message-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/message-async.js new file mode 100755 index 000000000..40feefc2c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/message-async.js @@ -0,0 +1,278 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var Helper = require("common:widget/ui/helper/helper.js"); +var Md5 = require('common:widget/ui/md5/md5.js'); +var UT = require("common:widget/ui/ut/ut.js"); + +/***************************** +消息盒子 +------------------------------ +MRD地址:http://10.65.211.71:8200/doc/61aa0959-2f0b-4761-8073-41455e74e7ae +------------------------------ +可传入的参数说明 + apiUrlPrefix:API请求的前缀 + apiUrlParam:API请求的参数 + noMsgContent:无消息时显示的文本 + maxNumber:消息数的最大值 + msgLineHeight:每条消息的最大显示高度(溢出省略) + +*****************************/ +var Message = function(userOption){ + var defaultOption = { + records: [], + deletedIds: [], + clickedIds: [], + htmlTpl: '
                            • ' + + '<#{tagName} #{attrs} class="message-target" data-sort="msgcontent" data-val="#{id}">' + + '' + + '#{description}' + + '' + + '' + +'
                            • ', + apiUrlPrefix: conf.apiUrlPrefix, + apiUrlParam: "?app=msgbox&act=contents&num=5&country=" + conf.country, + noMsgContent: "There is no message.", + maxNumber: 5, + msgLineHeight: 30, + _callbacks: {} + } + $.extend(this, defaultOption, userOption); +}; + +Message.prototype = { + + constructor: Message, + + //模型绑定事件 + bind: function(ev, callback){ + (this._callbacks[ev] || (this._callbacks[ev] = [])).push(callback); + }, + + //触发模型事件 + trigger: function(ev){ + var callbacks; + if (!(callbacks = this._callbacks[ev])) { + return this; + } + $.each(callbacks, function(){ + this(); + }); + }, + + /*新增消息(暂时无用) + addRecord: function(message){ + if (this.records.length < this.maxNumber) { + this.records.push(message); + this.trigger("change"); + } + },*/ + + //删除消息 + delRecord: function(delId){ + var locRecords = this.records; + var matchIndex; + for(matchIndex=0; matchIndex= 0) { + return; + } + var cookieIds = $.cookie(cookieName); + if (cookieIds) { + if (ids.length >= this.maxNumber) { + var minIndex = 0; + for(var i=1; i"; + }else{ + var clickedIds = this.clickedIds; + for(var i=0; i= 0 ? "message-over-item" : "" + })); + } + } + this.contentWrap.find("ul").empty().append(content); + // this.linesEllipsis(this.contentWrap.find("li a span")); + }, + + //多行的溢出省略(工具函数) + // linesEllipsis: function(jqDom){ + // var self = this; + // jqDom.each(function(i){ + // var jqThis = $(this); + // while (jqThis.outerHeight() > self.msgLineHeight) { + // jqThis.text(jqThis.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "...")); + // } + // }); + // }, + + //定义一些需要用到的变量 + defineVar: function(){ + this.newIcon = $(".ico-message-new"); + this.messageBox = $(".box-message"); + this.contentWrap = $(".wrap-message-content"); + this.lastTimestamp = parseInt($.cookie("msgTimestamp") || 0); + }, + + //事件绑定 + bindEvent: function(){ + var self = this; + this.messageBox.one("mouseenter", function(){ + self.trigger("change"); + self.newIcon.addClass("hide"); + $.cookie("msgHoverd", "1", {expires: 30}); + }); + this.bind("change", $.proxy(this.updateTpl, this)); + $(document.body).on("click", function(e){ + var target = $(e.target), + messageTarget = target.closest(".message-target"); + if(target.hasClass("ico-message-delete")){ + var id = target.parent().attr("data-id"); + self.delRecord(id); + e.preventDefault(); + }else if(messageTarget.length>0 && messageTarget.is("a") && !target.closest("li").hasClass("message-over-item")){ + var id= target.closest("li").attr("data-id"); + self.addClickedId(id); + } + }); + // 对不是a链接的消息,使其hover之后就变灰 + this.messageBox.on("mouseenter", ".account-dropdown_wrap li", function(e){ + // 保证已经初始化了DOM + // self.trigger("change"); + var target = $(e.target), + messageTarget = target.closest("li"); + if(messageTarget.find(".message-target").is("span") && !target.closest("li").hasClass("message-over-item")){ + var id= target.closest("li").attr("data-id"); + // 将hover统一当作click,统一效果(可能不是很符合语义,升级带来的问题) + self.addClickedId(id); + self.trigger( "change" ); + } + }); + }, + + //是否有新消息的判断 + judgeFresh: function(timestamp){ + var hoverdCookie = $.cookie("msgHoverd"); + var timeCookie = this.lastTimestamp; + if (timestamp > timeCookie || (timestamp == timeCookie && !hoverdCookie)) { + UT.send({ + modId: "msgbox", + type: "others", + sort: "show", + position: "newicon" + }); + this.newIcon.removeClass("hide"); + } + $.cookie("msgTimestamp", timestamp, {expires: 30}); + }, + + //消息数据的请求 + ajaxLoad: function(){ + var self = this; + var apiUrl = this.apiUrlPrefix + this.apiUrlParam; + $.ajax({ + // test + // url : "/resource/fe/message.json", + // dataType : "json", + // cache : true, + url: apiUrl, + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + Md5(this.apiUrlParam, 16), + cache: false, + success: function(data){ + var content = data.content; + if (content.data.length) { + self.judgeFresh(content.data[0].timestamp); + self.records = content.data; + self.filterRecord(); + } + } + }); + }, + + //初始化 + init: function(){ + this.defineVar(); + this.bindEvent(); + this.initDelId(); + this.initClkId(); + this.ajaxLoad(); + } +}; + +module.exports = Message; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/message.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/message.tpl new file mode 100755 index 000000000..c1a41652e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/message.tpl @@ -0,0 +1,20 @@ +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/message/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header/message/rtl/rtl.more.css"%> +<%/if%> + + + +<%script%> +window.conf || (window.conf = {}); +conf.messageBox = <%json_encode($body.messageBox)%>; +require.async(["common:widget/ui/jquery/jquery.js", "common:widget/header/message/message-async.js"], function($, Message){ + $(function(){ + var message = new Message(conf.messageBox); + message.init(); + }); +}); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/rtl/rtl.more.css new file mode 100755 index 000000000..5ec7c9aa2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/message/rtl/rtl.more.css @@ -0,0 +1,25 @@ +.wrap-message{float: right;position: relative;} +.wrap-message-content{position: relative; background: #F0FFFB;width: 280px;} +.wrap-message-content li{border-bottom: 1px solid #BFF1E4;} +.wrap-message-content li:hover{background-color: #d6f8ef;} +.wrap-message-content .message-target{float:right;color: #666666;width: 255px;font-size: 12px;min-height: 58px;} +.message-target:hover span{color:#00ad72;} +a.message-target:hover span{color:#00ad72; text-decoration: underline;} +.message-over-item .message-target{color: #999999;} +.message-over-item .message-target:hover span{color: #777777;} +.message-target span{display: block;width: 200px;float: right;margin: 19px 10px 10px 0;} +.ico-message-delete{color: #9dd2bf;float: left;margin-top: 10px;margin-left:10px;display: none;width: 11px;height: 11px;background: url("../img/icon-delete.png?__sprite") no-repeat;} +.ico-message-delete:hover{cursor: pointer;background: url("../img/icon-delete-hover.png?__sprite") no-repeat;} +.wrap-message-content li:hover .ico-message-delete{display: block;} +.ico-message-new{position: absolute;left: 10px;top: 10px;width: 12px;height: 12px;background: url("../img/icon-msg-new.png?__sprite") no-repeat;} +.ico-message-type{width: 28px;height: 25px;float: right;margin-right: 15px;margin-top: 17px;background: url("../img/icon-msg-notice-rtl.png?__sprite") no-repeat;} +.ico-message-type1, +.ico-message-type2{background: url("../img/icon-msg-notice-rtl.png?__sprite") no-repeat;} +.message-over-item .ico-message-type{background-image: url("../img/icon-msg-notice-over-rtl.png?__sprite");} +.message-over-item .ico-message-type1, +.message-over-item .ico-message-type2{background-image: url("../img/icon-msg-notice-over-rtl.png?__sprite");} +.message-no-item{line-height: 58px;text-align: center;} +.message-no-item span{width: 100%;overflow: hidden;color: #aaaaaa;text-overflow:ellipsis;white-space: nowrap;} + +/****** 固定页头调整 *****/ +.header-fixed .ico-message-new{top: 4px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/img/cancel.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/img/cancel.png new file mode 100755 index 000000000..aa724e5cd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/img/cancel.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/img/finger.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/img/finger.gif new file mode 100755 index 000000000..20418e687 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/img/finger.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/ltr/ltr.css new file mode 100755 index 000000000..68fda95df --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/ltr/ltr.css @@ -0,0 +1 @@ +.newerguide-tip{ display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/ltr/ltr.more.css new file mode 100755 index 000000000..ca7d6b0b8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/ltr/ltr.more.css @@ -0,0 +1,49 @@ +.newerguide-tip { + display: none; + position: absolute; + left: 20px; + top: 130px; + width: 220px; + height: 41px; + color: #585E5C; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -o-border-radius: 10px; + border-radius: 10px; + z-index: 8; + border: 1px solid #7BC6AC; + border-bottom-width: 2px; + background-color: #F7FFFD; +} +.newerguide-content { + margin: 6px 14px 6px 4px; + padding-left: 24px; + background: url("../img/finger.gif") no-repeat; +} +.newerguide-close { + position: absolute; + right: 6px; + top: 10px; + width: 7px; + height: 7px; + cursor: pointer; + background: url("../img/cancel.png?__sprite") no-repeat; +} +.guide-arrow, .arrow-inner { + position: absolute; + height: 0; + width: 0; + border: 12px dashed transparent; +} +.guide-arrow { + border-top-color: #7BC6AC; + border-top-style: solid; + bottom: -24px; + left: 26px; +} +.arrow-inner { + border-width: 9px; + border-top-color: #F7FFFD; + border-top-style: solid; + margin: -12px 0 0 -9px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/newerguide-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/newerguide-async.js new file mode 100755 index 000000000..cbeb465ed --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/newerguide-async.js @@ -0,0 +1,150 @@ +/** + * @author: chenguangyin + * + * @descrip: 本模块的目的是引导用户访问我们的页面信息,具体过程如下: + * 用户如果在页面没有进行任何有效点击,当鼠标经过logo旁边时(访问地址栏)显示引导信息 + * 关闭引导信息有三种方式: + * 1. 点击X按钮,可配置以后是否出现或者永不出现 + * 2. 点击有效区域(搜索框、页面内容等),可配置以后是否出现或者永不出现 + * 3. 刷新页面 + * + **/ + + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + newerguide = {}, + /* 用到的相关元素 */ + CONF = { + head: $("#top"), + logo: $(".userbar-logo", "#top").eq(0), + tip: $("#newerguide"), + tipClose: $("#newerguideClose"), + form: $("#searchGroupForm") + }; + +newerguide.isSHow = false; /* 引导框是否显示 */ +newerguide.clicked = false; /* 是否点击过页面有效区域 */ + +/* 根据CMS配置的位置信息设置引导框位置,并显示 */ +newerguide.showTips = function() { + CONF.tip && CONF.tip.css(this.data.position).show(); + this.isShow = true; +}; + +/* 隐藏引导框 */ +newerguide.hideTips = function(status, value) { + var that = this; + + CONF.tip.hide(); + that.isShow = false; + that.handleCommand(status); + that.sendUT(value); +}; + +/* 根据参数发送不同的统计 */ +newerguide.sendUT = function(value) { + UT.send({ + type: "others", + sort: value, + position: "newerguide", + modId: "newerguide" + }); +}; + +/* 保存cookie,cookie时间为10年 */ +newerguide.setCookie = function() { + $.cookie("newerguide", "close", { + expires: 10*365 + }); +}; + +/* 删除cookie */ +newerguide.deleteCookie = function() { + $.cookie("newerguide", null); +}; + +/** + * @params event对象 + * @return boolean值,在区域内发生为true + * @descrip 验证鼠标事件是否发生在相应区域 + * + **/ +/* +newerguide.showConfirm = function(e) { + var eventX = e.pageX, + logoX = CONF.logo.offset().left; + + if ($("html").attr("dir") === "ltr") { + return (eventX - logoX > 250) ? false : true; + } else { + return (logoX - eventX > 250) ? false : true; + } +}; +*/ + +/** + * @params 控制引导框显示时间的CMS指令 + * @descrip 当要求下次显示时删除cookie,否则保存cookie + * + **/ +newerguide.handleCommand = function(order) { + if (order === "") { + this.setCookie(); + } else { + this.deleteCookie(); + } +}; + +/* 绑定事件 */ +newerguide.bindEvent = function() { + var that = this, + data = that.data; + + /* 判断鼠标是否经过有效区域并处理,同时发送引导出现次数统计 */ + CONF.head.on("mouseenter", function(e) { + /*if (!that.clicked && !$.cookie("newerguide") && that.showConfirm(e) && !that.isShow) {*/ + if (!that.clicked && !$.cookie("newerguide") && !that.isShow) { + that.showTips(); + that.sendUT("show"); + } + }); + + /* 鼠标点击X按钮关闭引导框,并发送X的点击次数统计 */ + CONF.tipClose.on("click", function() { + that.hideTips(data.isShowAgainBtn, "close"); + }); + + /* 点击有效区域(a)时移除引导框,发送统计 */ + $(document).on("click", function(e) { + if($(e.target).closest("a").length === 1) { + if (!$.cookie("newerguide") && that.isShow) { + that.hideTips(data.isShowAgainArc, "link"); + } + that.clicked = true; + } + + }); + + /* 补充有效区域,点击表单时也应处理 */ + CONF.form.on("click", function() { + if (!$.cookie("newerguide") && that.isShow) { + that.hideTips(data.isShowAgainArc, "link"); + } + that.clicked = true; + }); + +}; + +/** + * @params CMS配置信息 + * @descrip 模块初始化 + * + **/ +newerguide.init = function(data) { + this.data = data; + this.bindEvent(); +}; + + +module.exports = newerguide; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/newerguide.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/newerguide.tpl new file mode 100755 index 000000000..2229b1abf --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/newerguide.tpl @@ -0,0 +1,36 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/newerguide/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/newerguide/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/newerguide/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/newerguide/rtl/rtl.more.css"%> <%/if%> + +
                              +

                              <%$body.newerguide.text%>

                              + +
                              +
                              +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.newerguide", function () { + require.async("common:widget/header/newerguide/newerguide-async.js", function (newerguide) { + newerguide.init({ + position: { + <%if $head.dir=='ltr'%>left<%else%>right<%/if%>: "<%$body.newerguide.left%>px", + top: "<%$body.newerguide.top%>px" + }, + isShowAgainArc: "<%$body.newerguide.isShowAgainArc%>",/* 控制引导框在点击有效区域后下次是否出现 */ + isShowAgainBtn: "<%$body.newerguide.isShowAgainBtn%>"/* 控制引导框在点击关闭按钮后下次是否出现 */ + }); + }); + }); + + $(function () { + $(window).trigger("e_go.newerguide"); + }); + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/rtl/rtl.css new file mode 100755 index 000000000..68fda95df --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/rtl/rtl.css @@ -0,0 +1 @@ +.newerguide-tip{ display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/rtl/rtl.more.css new file mode 100755 index 000000000..3c2ea78d0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/newerguide/rtl/rtl.more.css @@ -0,0 +1,51 @@ +.newerguide-tip { + display: none; + position: absolute; + right: 20px; + top: 130px; + width: 220px; + height: 41px; + color: #585E5C; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -o-border-radius: 10px; + border-radius: 10px; + z-index: 8; + border: 1px solid #7BC6AC; + border-bottom-width: 2px; + background-color: #F7FFFD; +} +.newerguide-content { + margin: 6px 4px 6px 14px; + padding-right: 24px; + background: url("../img/finger.gif") no-repeat; + background-position: right top; +} +.newerguide-close { + position: absolute; + left: 6px; + top: 10px; + width: 7px; + height: 7px; + cursor: pointer; + background: url("../img/cancel.png?__sprite") no-repeat; +} +.guide-arrow, .arrow-inner { + position: absolute; + height: 0; + width: 0; + border: 12px dashed transparent; +} +.guide-arrow { + border-top-color: #7BC6AC; + border-top-style: solid; + bottom: -24px; + right: 26px; +} +.arrow-inner { + border-width: 9px; + border-top-color: #F7FFFD; + border-top-style: solid; + left: -9px; + top: -12px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/rtl/rtl.css new file mode 100755 index 000000000..4c1886492 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/rtl/rtl.css @@ -0,0 +1,26 @@ +/*============userbar=============*/ + +.userbar-wrap { + background: #00ad73; + border-bottom: 1px solid #009e69; + _border-bottom: 0 none; + min-width: 960px; + position: relative; + height: 50px; +} +.userbar { + height: 50px; + margin: 0 auto; + color: #fff; + position: relative; + z-index: 9; +} +.userbar-tool { + display: none; +} +.weather-more { + display: none; +} +.weather-more_wrap { + border-bottom: 1px solid #fff; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/rtl/rtl.more.css new file mode 100755 index 000000000..1c5cd8561 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/rtl/rtl.more.css @@ -0,0 +1,41 @@ +/*============userbar=============*/ +.userbar-tool { + width: 240px; + margin-top: 4px; + position: relative; + overflow: visible; + z-index: 11; + display: block; +} +.userbar-wrap { + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(0,176,117)),color-stop(1, rgb(0,171,114))); + background-image:-webkit-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-o-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + background-image:linear-gradient(-90deg,rgb(0,176,117) 0%,rgb(0,171,114) 100%); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff00b075,endColorstr=#ff00ab72,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff00b075,endColorstr=#ff00ab72,GradientType=0);*/ +} +.userbar a:hover { + text-decoration: none; +} +.weather-more_wrap { + background: #0c815a; + overflow: hidden; + height: 0; + border-top: 0 none; + zoom: 1; +} +.weather-more_show { + height: auto; + border-top: 1px solid #0a6f4e; +} +.weather-more_line { + -moz-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -o-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + border-bottom: 1px solid #0a6f4e; + +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/img/i-settings-btn-open.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/img/i-settings-btn-open.png new file mode 100755 index 000000000..ae4cd8c22 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/img/i-settings-btn-open.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/img/i-settings-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/img/i-settings-btn.png new file mode 100755 index 000000000..c571adaf0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/img/i-settings-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/ltr/ltr.css new file mode 100755 index 000000000..3c6afee34 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/ltr/ltr.css @@ -0,0 +1 @@ +.settings, .settings-btn{ visibility: hidden;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/ltr/ltr.more.css new file mode 100755 index 000000000..85dd20474 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/ltr/ltr.more.css @@ -0,0 +1,76 @@ +.settings { + float: right; + position: relative; + visibility: visible !important; +} +.settings-btn { + position: relative; + z-index: 12; + visibility: visible !important; + width: 18px; + height: 19px; + border: 1px solid #00af75; + background: url(../img/i-settings-btn.png?__sprite) no-repeat; + display: block; +} +.settings-dropdown,.settings-site { + display: none; +} + +/*---------more:----------*/ + +.settings-site { + display: block; +} +.settings-btn_open { + background: url(../img/i-settings-btn-open.png?__sprite) no-repeat; + border: 1px solid #bee2d6; + border-bottom: 0 none; + -moz-border-radius: 2px 2px 0 0; + -webkit-border-radius: 2px 2px 0 0; + -o-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +.settings-dropdown { + display: none; + position: absolute; + background-color: #ebfcf7; + border: 1px solid #bee2d6; + top: 19px; + right: 0; + width: 162px; + overflow: hidden; + z-index: 11; +} +.settings-site { + display: block; + overflow: hidden; + padding: 5px 10px; +} +.settings-site li { + display: block; + float: left; +} +.settings-site a { + display: block; + width: 61px; + height: 30px; + line-height: 30px; + padding: 0 5px; + font-size: 12px; + color: #454545; +} +.settings-site a:hover { + background-color: #d9f3ea; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.settings-site .cur { + color: #00ac72; + cursor: default; +} +.settings-site .cur:hover { + background-color: transparent; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/rtl/rtl.css new file mode 100755 index 000000000..3c6afee34 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/rtl/rtl.css @@ -0,0 +1 @@ +.settings, .settings-btn{ visibility: hidden;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/rtl/rtl.more.css new file mode 100755 index 000000000..c98fd2761 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/rtl/rtl.more.css @@ -0,0 +1,77 @@ +.settings { + float: left; + position: relative; + visibility: visible !important; +} +.settings-btn { + position: relative; + z-index: 12; + visibility: visible !important; + width: 18px; + height: 19px; + border: 1px solid #00af75; + background: url(../img/i-settings-btn.png?__sprite) no-repeat; + display: block; +} +.settings-dropdown,.settings-site { + display: none; +} + +/*----------more------------*/ + +.settings-site { + display: block; +} + +.settings-btn_open { + background: url(../img/i-settings-btn-open.png?__sprite) no-repeat; + border: 1px solid #bee2d6; + border-bottom: 0 none; + -moz-border-radius: 2px 2px 0 0; + -webkit-border-radius: 2px 2px 0 0; + -o-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +.settings-dropdown { + display: none; + position: absolute; + background-color: #ebfcf7; + border: 1px solid #bee2d6; + top: 19px; + left: 0; + width: 162px; + overflow: hidden; + z-index: 11; +} +.settings-site { + display: block; + overflow: hidden; + padding: 5px 10px; +} +.settings-site li { + display: block; + float: right; +} +.settings-site a { + display: block; + width: 61px; + height: 30px; + line-height: 30px; + padding: 0 5px; + font-size: 12px; + color: #454545; +} +.settings-site a:hover { + background-color: #d9f3ea; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.settings-site .cur { + color: #00ac72; + cursor: default; +} +.settings-site .cur:hover { + background-color: transparent; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/site-switch-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/site-switch-async.js new file mode 100755 index 000000000..1a0427601 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/site-switch-async.js @@ -0,0 +1,66 @@ +/* +* Setting btn including site switching and theme features +* @ by FK +*/ +var $ = require("common:widget/ui/jquery/jquery.js"); +window.Gl || (window.Gl = {}); + +Gl.settings = function () { + var btn = $("#settingBtn"), + dropdown = $("#settingDropdown"), + siteList = $("#siteList"), + curCountry = $("li.site_" + conf.country + " a", siteList), + status = 0, // Status of whether the dropdown is show, 0: hide; 1: show + _this = {}, // Copy objects to this function's return value + + bindEvent = function () { + btn.on("click.old", function (e) { + e.preventDefault(); + if (!status) { + Gl.settings.open(); + } else { + Gl.settings.close(); + } + }); + $(document).on("click", function (e) { + var el = e.target; + // Shut the dropdown when clicking on other areas + el !== btn[0] && el !== dropdown[0] && !$.contains(dropdown[0], el) && Gl.settings.close(); + }); + $("a", siteList).on("click", function (e) { + e.preventDefault(); + if (e.target !== curCountry[0]) { + var la = $(this).attr("data-la"); + // Set cookie for the Accept-language judging + la !== "" && $.cookie("LA", $(this).attr("data-la"), {expires: 2000, domain: "hao123.com"}); + Gl.settings.close(); + // Open target site + window.open($(this).attr("href"), $(this).attr("target")); + } + }); + + } + + // Open the dropdown list + _this.open = function () { + btn.addClass("settings-btn_open"); + dropdown.show(); + status = 1; // Set status to open + }; + + // Shut the dropdown list + _this.close = function () { + btn.removeClass("settings-btn_open"); + dropdown.hide(); + status = 0; // Set status to close + }; + + // init + _this.init = function () { + curCountry.addClass("cur"); + bindEvent(); + }; + + return _this; +}(); + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/site-switch.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/site-switch.tpl new file mode 100755 index 000000000..07329fe8f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/site-switch/site-switch.tpl @@ -0,0 +1,72 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/site-switch/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/site-switch/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/site-switch/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/site-switch/rtl/rtl.more.css"%> <%/if%> + +
                              + + +
                              + <%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.siteswitch", function () { + require.async("common:widget/header/site-switch/site-switch-async.js", function () { + Gl.settings.init(); + }); + }); + + $(function () { + $(window).trigger("e_go.siteswitch"); + }); + + $("#settingBtn").one("mouseenter", function () { + $(window).trigger("e_go.siteswitch"); + }); + }); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-christmas.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-christmas.png new file mode 100755 index 000000000..65b6d7bb8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-christmas.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-newyear.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-newyear.png new file mode 100755 index 000000000..efa9e128c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-newyear.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-transform.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-transform.png new file mode 100755 index 000000000..06da9f8aa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/img/i-transform.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/ltr/ltr.css new file mode 100755 index 000000000..ae164ae28 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/ltr/ltr.css @@ -0,0 +1 @@ +.mod-skin-trans {visibility: hidden;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/ltr/ltr.more.css new file mode 100755 index 000000000..69740aa49 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/ltr/ltr.more.css @@ -0,0 +1,41 @@ +body .mod-skin-trans { + visibility: visible; + float: right; + padding-left: 10px; +} +.header-fixed .mod-skin-trans,.header-fixed .mod-skin-trans+.userbar_split { + display: none; +} +.mod-skin-trans .i-st-btn { + height: 26px; + line-height: 26px; + border: 1px solid #039266; + /*border-color: #8F8085 #1DCA90 #1DC990 #8F7D83;*/ + border-top-color: #027955; + border-radius: 2px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + cursor: pointer; + background-color: #039266; + color: #ffffff; + font-size: 13px; + padding-left: 6px; + padding-right: 6px; + margin-top: 12px; + transition: all .2s; +} +.mod-skin-trans .i-st-btn:hover { + background-color: #11C08A; + border-color: #11C08A; + border-top-color: #0D976D; +} +.mod-skin-trans .i-st-ico { + float: left; + width: 20px; + height: 20px; + margin-top: 3px; + margin-right: 4px; + display: inline; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/rtl/rtl.css new file mode 100755 index 000000000..ae164ae28 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/rtl/rtl.css @@ -0,0 +1 @@ +.mod-skin-trans {visibility: hidden;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/rtl/rtl.more.css new file mode 100755 index 000000000..3d004e8a2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/rtl/rtl.more.css @@ -0,0 +1,41 @@ +body .mod-skin-trans { + visibility: visible; + float: left; + padding-right: 10px; +} +.header-fixed .mod-skin-trans,.header-fixed .mod-skin-trans+.userbar_split { + display: none; +} +.mod-skin-trans .i-st-btn { + height: 26px; + line-height: 26px; + border: 1px solid #039266; + /*border-color: #8F8085 #1DCA90 #1DC990 #8F7D83;*/ + border-top-color: #027955; + border-radius: 2px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + cursor: pointer; + background-color: #039266; + color: #ffffff; + font-size: 13px; + padding-left: 6px; + padding-right: 6px; + margin-top: 12px; + transition: all .2s; +} +.mod-skin-trans .i-st-btn:hover { + background-color: #11C08A; + border-color: #11C08A; + border-top-color: #0D976D; +} +.mod-skin-trans .i-st-ico { + float: right; + width: 20px; + height: 20px; + margin-top: 3px; + margin-left: 4px; + display: inline; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/skin-trans-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/skin-trans-async.js new file mode 100755 index 000000000..d52497116 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/skin-trans-async.js @@ -0,0 +1,95 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +require("common:widget/header/skinbox/skinbox-async.js"); +require("common:widget/header/skinbox/skin-mod.js"); + +var _conf = conf.skinTrans, + d_skin = _conf.defaultSkin, + d_word = _conf.defaultWords, + d_icon = _conf.defaultIcon, + d_freq = parseInt(_conf.frequency, 10), + t_word = _conf.transWords, + t_icon = _conf.transIcon, + $wrap = $("#" + _conf.id), + $btn = $wrap.find(".i-st-btn"), + $icon = $wrap.find(".i-st-ico"), + $tip = $wrap.find(".i-st-tip"), + $win = $(window); + +var modId = "skin-trans", + isFirst = 0, + dataGroup = []; + +var controller = { + init: function() { + var that = this; + if (d_skin == that.getCurrentSkin()) { + t_icon && $icon.css("background-image", "url(" + t_icon + ")"); + t_word && $tip.html(t_word); + } else { + d_icon && $icon.css("background-image", "url(" + d_icon + ")"); + d_word && $tip.html(d_word); + } + that.fixSkin(); + that.bindEvent(); + }, + fixSkin: function() { + var data = conf.skin.data, + len = data.length; + for (var i = 0; i < len; i++) { + dataGroup.push(data[i].key); + } + if (d_freq > 0) { + for (var j = 0; j < d_freq; j++) { + dataGroup.push("no"); + } + } + }, + getRandomSkin: function() { + var that = this; + !dataGroup.length && that.fixSkin(); + return dataGroup.splice(parseInt(dataGroup.length * Math.random(), 10), 1); + }, + getCurrentSkin: function() { + + var skin = $.store("lastSkin") || $.cookie("lastSkin"); + if (skin) { + skin = skin.split("|")[0]; + } + return skin || "no"; + }, + bindEvent: function() { + var that = this; + $btn.on("click", function(e) { + ++isFirst; + if (isFirst === 1 && d_skin != that.getCurrentSkin()) { + $win.trigger( "skinTrans.recommendedSelect" ); + t_word && $tip.html(t_word); + // 切换到推荐皮肤 + $win.trigger("skin.change", d_skin); + } else { + // 随机切换皮肤 + $win.trigger("skin.change", that.getRandomSkin()); + } + UT.send({ + type: "click", + modId: modId, + position: "btn", + ac: "b" + }); + }); + $win.on("beforeunload", function() { + UT.send({ + type: "others", + modId: modId, + position: that.getCurrentSkin() + }); + }); + // 提供给外部使用 + $win.on( "skinTrans.recommendedSelect", function(){ + t_icon && $icon.css("background-image", "url(" + t_icon + ")"); + } ); + } +}; + +module.exports = controller; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/skin-trans.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/skin-trans.tpl new file mode 100755 index 000000000..ffcdbcb58 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skin-trans/skin-trans.tpl @@ -0,0 +1,40 @@ +<%style%> +<%if $head.dir=='ltr'%> + @import url('/widget/header/skin-trans/ltr/ltr.css?__inline'); + <%if $body.skinTrans.padding == '1'%> +.mod-skin-trans { + padding-right: 10px; +} + <%/if%> +<%else%> + @import url('/widget/header/skin-trans/rtl/rtl.css?__inline'); + <%if $body.skinTrans.padding == '1'%> +.mod-skin-trans { + padding-left: 10px; +} + <%/if%> +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/skin-trans/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header/skin-trans/rtl/rtl.more.css"%> +<%/if%> + +
                              +
                              + +
                              +
                              + +<%script%> + conf.skinTrans = <%json_encode($body.skinTrans)%>; + conf.skinTrans.id = conf.skinTrans.id || "skinTrans"; + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/header/skin-trans/skin-trans-async.js"], function($, control) { + $(window).trigger("slide.skin"); // 触发皮肤加载文件 + $(window).trigger("append.skin"); // 触发皮肤加载文件 + control && control.init && control.init(); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/green-current.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/green-current.png new file mode 100755 index 000000000..da133c94a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/green-current.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/green-not-current.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/green-not-current.png new file mode 100755 index 000000000..f67f0f2e5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/green-not-current.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/hot-ltr.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/hot-ltr.png new file mode 100755 index 000000000..66580ec43 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/hot-ltr.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/hot-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/hot-rtl.png new file mode 100755 index 000000000..d9ccdbccc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/hot-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-head-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-head-close.png new file mode 100755 index 000000000..793312ade Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-head-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-head-open.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-head-open.png new file mode 100755 index 000000000..396ef063c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-head-open.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-selected.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-selected.png new file mode 100755 index 000000000..52d6d5893 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/ico-skinbox-selected.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/new-ltr.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/new-ltr.png new file mode 100755 index 000000000..52fa160af Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/new-ltr.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/new-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/new-rtl.png new file mode 100755 index 000000000..8dc06b298 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/img/new-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.css new file mode 100755 index 000000000..7289bcdff --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.css @@ -0,0 +1,2 @@ +.skinbox-wrap{visibility: hidden;} +#skin-bgimage{ position:absolute; width:100%; height:92%; z-index:-2; background-position:center 0; background-repeat:no-repeat;-webkit-transform:translate3d(0px, 0px, 0px); } \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.more.css new file mode 100755 index 000000000..089ebd0b7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.more.css @@ -0,0 +1,68 @@ +.skinbox-wrap{visibility: visible !important; float: right; position: relative;} +.skinbox-wrap:hover{cursor: pointer;} +.skinbox-header{height: 50px;line-height: 50px;padding: 0 10px;display: block;} +.ico-skinbox{background: url("../img/ico-skinbox-head-open.png?__sprite") no-repeat; width: 20px;height: 20px;float: left;margin-top: 15px;} +.title-skinbox{color:#fff;} +.skinbox-header .ico-skinbox-triangle{position: absolute;left: 17px;top:38px;width: 0;height: 0;border-left: 3px solid transparent;border-right: 3px solid transparent;border-top: 3px solid #ffffff;opacity: 0.5;filter: alpha(opacity=50);} +.skinbox-more-hide .ico-skinbox-triangle{left:16px;top:45px;border-top-width: 0px; border-left-width: 5px;border-right-width: 5px;border-bottom: 5px solid #087c55;opacity: 1;filter: alpha(opacity=100);} +.skinbox-more-hide .ico-skinbox{background: url("../img/ico-skinbox-head-close.png?__sprite") no-repeat;} + +.skinbox-more-wrap{height:0px;background: #0c815a;overflow: hidden;display: none;border-top: 1px solid #0a6f4e;border-bottom:1px solid #0a6f4e;-moz-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset;-webkit-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset;-o-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; box-shadow: 0 0 4px rgba(0,0,0,0.1) inset;} +.skinbox-content-wrap{position: relative;} +.skin-clickarea{position: absolute;cursor: pointer;} + +.skinbox-item{width: 154px;height: 84px;border:3px solid #0e7855;float: left;margin-left: 10px;margin-top: 28px;position: relative;} +.skinbox-item:hover{cursor: pointer;border-color: #87cab3;} +.skinbox-item .tips{ + display: block; + width: 42px; + height: 42px; + position: absolute; + left: -2px; + top: -2px; +} +.skinbox-item .hot{ + background: url(../img/hot-ltr.png?__sprite) no-repeat; +} +.skinbox-item .new{ + background: url(../img/new-ltr.png?__sprite) no-repeat; +} +.skinbox-item-selected{border-color: #87cab3;} +.skinbox-item-selected .ico-skinbox-selected{width:24px;height:24px;position: absolute;right: 0;top: 0;background: url("../img/ico-skinbox-selected.png?__sprite") no-repeat;background-color: #00ac72;} +.skinbox-item-default{margin-left: 60px;} +.skinbox-item-default p{position: absolute;color: #ffffff;font-size: 20px;top: 20px;left:30px;font-weight: bold;} +.skinbox-normal-wrap .skinbox-mask{display: none;position: absolute;left: 0;bottom: 0;height: 24px;line-height: 24px;color: #ffffff;padding-left: 5px;background: #000000;width: 149px;opacity: 0.5;filter:alpha(opacity=50);overflow: hidden;text-overflow:ellipsis;white-space: nowrap;} +.skinbox-item:hover .skinbox-mask{display: block;} +.skinbox-item-default:hover .skinbox-mask{position: absolute;width: 100%;height: 100%;background-color: #000;opacity:0.8;filter:alpha(opacity=80);background:rgba(0,0,0,0.5);top:0;left: 0;} + +/********************* slide ctrl adjust **************************/ +.skinbox-normal-wrap .ui-nav{text-align: center;} +.skinbox-normal-wrap .nav-item-list{position: relative;} +.skinbox-normal-wrap .wrap{float: left;overflow: hidden;} +.skinbox-normal-wrap .nav-item{float: left;} +.skinbox-normal-wrap .prev, .skinbox-normal-wrap .next{position: absolute;width: 50px;height: 50px;background: #0b7652;color: #85bba9;top: 48px;font-size: 80px;border-radius: 2px;-ms-border-radius: 2px;-o-border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;font-family:arial,Tahoma,helvetica,clean,sans-serif;} +.skinbox-normal-wrap .next{right:0;} +.skinbox-normal-wrap .prev:hover, .skinbox-normal-wrap .next:hover{cursor: pointer;color: #cee4dc;} +.skinbox-normal-wrap .arrow-prev, .skinbox-normal-wrap .arrow-next{position: relative;top: -30px;} +.skinbox-normal-wrap .switch{clear: both;} +.skinbox-normal-wrap .switch-item{ display: inline-block;width: 33px;height:12px;background: url("../img/green-not-current.png?__sprite") no-repeat;margin:10px;} +.skinbox-normal-wrap .switch-item:hover{cursor: pointer;} +.skinbox-normal-wrap .switch-item-current{background: url("../img/green-current.png?__sprite") no-repeat;} + +/********************* many pic adjust **************************/ +.skin-many-pic-true .skinbox-item{height: 65px;} +.skin-many-pic-true .skinbox-item{margin-top: 20px;} +.skin-many-pic-true .row-second{margin-top: 10px;} +.skin-many-pic-true .column-first{margin-left: 0px;} +.skin-many-pic-true .wrap{margin-left: -160px; height: 172px;} +.skin-many-pic-true .nav-item{width: 850px;} +.skin-many-pic-true .nav-item .skinbox-item:first-child{margin-left: 170px;} +.skin-many-pic-true .skinbox-item-default{z-index: 1;} +.skin-many-pic-true .prev, .skin-many-pic-true .next{top: 70px;} + +/************************ header-fixed adjust *******************************/ +.header-fixed .skinbox-header{height: 30px;line-height: 30px;} +.header-fixed .skinbox-more-wrap{display: none !important;} +.header-fixed .skinbox-wrap{display: none;} +.header-fixed .skinbox-wrap + .userbar_split{display: none;} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.more.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.more.flow.css new file mode 100755 index 000000000..16be4b236 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/ltr/ltr.more.flow.css @@ -0,0 +1,8 @@ +/* @media(min-width: 1024px){ + .flow-on .skinbox-item-default{ + margin-left: 90px; + } +} */ +.w1020 .skinbox-item-default{ + margin-left: 90px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.css new file mode 100755 index 000000000..73a34dbe9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.css @@ -0,0 +1,2 @@ +.box-skin{visibility: hidden;} +#skin-bgimage{ position:absolute; width:100%; height:92%; z-index:-2; background-position:center 0; background-repeat:no-repeat;-webkit-transform:translate3d(0px, 0px, 0px); } \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.flow.css new file mode 100755 index 000000000..8f3ed003c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.flow.css @@ -0,0 +1,3 @@ +.w1020 .skinbox-item-default{ + margin-right: 90px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.more.css new file mode 100755 index 000000000..29c6e9b36 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/rtl/rtl.more.css @@ -0,0 +1,67 @@ +.skinbox-wrap{visibility: visible !important; float: left; position: relative;} +.skinbox-wrap:hover{cursor: pointer;} +.skinbox-header{height: 50px;line-height: 50px;padding: 0 10px;display: block;} +.ico-skinbox{background: url("../img/ico-skinbox-head-open.png?__sprite") no-repeat; width: 20px;height: 20px;float: right;margin-top: 15px;} +.title-skinbox{color:#fff;} +.skinbox-header .ico-skinbox-triangle{position: absolute;right: 17px;top:38px;width: 0;height: 0;border-left: 3px solid transparent;border-right: 3px solid transparent;border-top: 3px solid #ffffff;opacity: 0.5;filter: alpha(opacity=50);} +.skinbox-more-hide .ico-skinbox-triangle{right:15px;top:45px;border-top-width: 0px; border-left-width: 5px;border-right-width: 5px;border-bottom: 5px solid #087c55;opacity: 1;filter: alpha(opacity=100);} +.skinbox-more-hide .ico-skinbox{background: url("../img/ico-skinbox-head-close.png?__sprite") no-repeat;} + +.skinbox-more-wrap{height: 0px;background: #0c815a;overflow: hidden;display: none;border-top: 1px solid #0a6f4e;border-bottom:1px solid #0a6f4e;-moz-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset;-webkit-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset;-o-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; box-shadow: 0 0 4px rgba(0,0,0,0.1) inset;} +.skinbox-content-wrap{position: relative;} +.skin-clickarea{position: absolute;cursor: pointer;} + +.skinbox-item{width: 154px;height: 84px;border:3px solid #0e7855;float: right;margin-right: 10px;margin-top: 28px;position: relative;} +.skinbox-item:hover{cursor: pointer;border-color: #87cab3;} +.skinbox-item .tips{ + display: block; + width: 42px; + height: 42px; + position: absolute; + right: -2px; + top: -2px; +} +.skinbox-item .hot{ + background: url(../img/hot-rtl.png?__sprite) no-repeat; +} +.skinbox-item .new{ + background: url(../img/new-rtl.png?__sprite) no-repeat; +} +.skinbox-item-selected{border-color: #87cab3;} +.skinbox-item-selected .ico-skinbox-selected{width:24px;height:24px;position: absolute;left: 0;top: 0;background: url("../img/ico-skinbox-selected.png?__sprite") no-repeat;background-color: #00ac72;} +.skinbox-item-default{margin-right: 60px;} +.skinbox-item-default p{position: absolute;color: #ffffff;font-size: 15px;top: 20px;right:30px;font-weight: bold;} +.skinbox-normal-wrap .skinbox-mask{display: none;position: absolute;right: 0;bottom: 0;height: 24px;line-height: 24px;color: #ffffff;padding-right: 5px;background: #000000;width: 149px;opacity: 0.5;filter:alpha(opacity=50);overflow: hidden;text-overflow:ellipsis;white-space: nowrap;} +.skinbox-item:hover .skinbox-mask{display: block;} +.skinbox-item-default:hover .skinbox-mask{position: absolute;width: 100%;height: 100%;background-color: #000;opacity:0.8;filter:alpha(opacity=80);background:rgba(0,0,0,0.5);top:0;right: 0;} + +/********************* slide ctrl adjust **************************/ +.skinbox-normal-wrap .ui-nav{text-align: center;} +.skinbox-normal-wrap .nav-item-list{position: relative;} +.skinbox-normal-wrap .wrap{float: right;overflow: hidden;} +.skinbox-normal-wrap .nav-item{float: right;} +.skinbox-normal-wrap .prev, .skinbox-normal-wrap .next{position: absolute;width: 50px;height: 50px;background: #0b7652;color: #85bba9;top: 48px;font-size: 80px;border-radius: 2px;-ms-border-radius: 2px;-o-border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;font-family:arial,Tahoma,helvetica,clean,sans-serif;} +.skinbox-normal-wrap .next{left:0;} +.skinbox-normal-wrap .prev:hover, .skinbox-normal-wrap .next:hover{cursor: pointer;color: #cee4dc;} +.skinbox-normal-wrap .arrow-prev, .skinbox-normal-wrap .arrow-next{position: relative;top: -30px;} +.skinbox-normal-wrap .switch{clear: both;} +.skinbox-normal-wrap .switch-item{ display: inline-block;width: 33px;height:12px;background: url("../img/green-not-current.png?__sprite") no-repeat;margin:10px;} +.skinbox-normal-wrap .switch-item:hover{cursor: pointer;} +.skinbox-normal-wrap .switch-item-current{background: url("../img/green-current.png?__sprite") no-repeat;} + +/********************* many pic adjust **************************/ +.skin-many-pic-true .skinbox-item{height: 65px;} +.skin-many-pic-true .skinbox-item{margin-top: 20px;} +.skin-many-pic-true .row-second{margin-top: 10px;} +.skin-many-pic-true .column-first{margin-right: 0px;} +.skin-many-pic-true .wrap{margin-right: -160px; height: 172px;} +.skin-many-pic-true .nav-item{width: 850px;} +.skin-many-pic-true .nav-item .skinbox-item:first-child{margin-right: 170px;} +.skin-many-pic-true .skinbox-item-default{z-index: 1;} +.skin-many-pic-true .prev, .skin-many-pic-true .next{top: 70px;} + +/************************ header-fixed adjust *******************************/ +.header-fixed .skinbox-header{height: 30px;line-height: 30px;} +.header-fixed .skinbox-more-wrap{display: none !important;} +.header-fixed .skinbox-wrap{display: none;} +.header-fixed .skinbox-wrap + .userbar_split{display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skin-mod.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skin-mod.js new file mode 100755 index 000000000..be320105b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skin-mod.js @@ -0,0 +1,260 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var Helper = require("common:widget/ui/helper/helper.js"); + +var WINDOW = $(window); +var BODY = $(document.body); + +/* + * 换肤插件 + * loadTime: + 1. "" - 默认值,即刻加载 + 2. 数字 - 延迟加载,毫秒数 + * recommandSkin:设置推荐皮肤 + * data: + key为皮肤关键字; + value是一个对象,必须包含"bgImgSrc"属性(皮肤图片URL); + * 使用示例: + var skin = new Skin({ + recommandSkin: "music", + data: { + music: { + bgImgSrc: "http://xxx.com/a.jpg" + }, + baozou: { + bgImgSrc: "http://xxx.com/b.jpg" + } + } + }); + skin.init(); + */ + +var Skin = function(userOption) { + var defaultOptions = { + loadTime: "", + recommandSkin: "", + mainWidth: 960, + data: [] + }; + $.extend(this, defaultOptions, userOption); + + this.bgContainer = $("#skin-bgimage"); + this.leftClickArea = $("#skin-clickarea-left"); + this.rightClickArea = $("#skin-clickarea-right"); + this.clickArea = $(".skin-clickarea"); + this.modId = "skinbox"; +}; + +Skin.prototype = { + + constructor: Skin, + + //设置皮肤,若skin为空字符串则关闭皮肤 + setSkin: function(skin, bgImgSrc) { + if (bgImgSrc) { + var removedSkin = conf.skin.current; + var skinItem = this._getSkinDataByKey(skin); + var needClass = skinItem.type ? ("skin skin-type-dark skin-"+skin) : ("skin skin-"+skin); + var bodyBg = BODY.css("background-color"); + var htmlBg = $("html").css("background-color"); + + this.bgContainer.css({ "background-image": "url(" + bgImgSrc + ")" }); + + // 背景图片支持Y方向重复 + if (skinItem.isRepeat === "1") { + this.bgContainer.css({ "background-repeat": "repeat-y" }); + } else { + this.bgContainer.css({ "background-repeat": "no-repeat" }); + } + + this._resetLogo(skinItem.type); + $.cookie("lastSkin", null); + $.store("lastSkin", skin+"|"+conf.skin.recommandSkin, {expires: 100}); + conf.skin.current = skin; + if(skinItem.color){ + BODY.css({ + "background-color": skinItem.color, + "z-index": 0 + }); + }else if(bodyBg != htmlBg){ + BODY.css({ + "background-color": htmlBg, + "z-index": 0 + }); + } + BODY.removeClass("skin-"+removedSkin+" skin-type-dark").addClass(needClass); + }else if (bgImgSrc === "" || bgImgSrc == "no") { + this.emptySkin(); + } + }, + + //清空皮肤 + emptySkin: function(){ + var removedSkin = conf.skin.current; + this.bgContainer.css({ "background-image": "" }); + this._resetLogo(); + $.cookie("lastSkin", null); + $.store("lastSkin", "no|"+conf.skin.recommandSkin, {expires: 100}); + conf.skin.current = "no"; + BODY.removeClass("skin skin-type-dark skin-"+removedSkin).css("background-color", $("html").css("background-color")); + }, + + //可点击区域的重置 + setClickArea: function(skin, clickData){ + var self = this; + WINDOW.off("resize.skin"); + self.clickArea.off("click.skin"); + if(clickData && clickData.length>0 && clickData[0].landingpage){ + self._clickAreaAjust(clickData[0]); + WINDOW.on("resize.skin", $.proxy(self._clickAreaAjust, self, clickData[0])); + self.clickArea.on("click.skin", function(){ + window.open(self._updateLandingpage(clickData[0].landingpage)); + UT.send({ + modId: self.modId, + ac: "b", + position: "background", + sort: skin + }); + }); + }else{ + self.clickArea.width(0); + } + }, + + _resetLogo: function(type){ + $("#searchGroupLogos img").each(function(){ + var dataSrc = $(this).attr("data-src"), + realSrc = $(this).attr("src"), + oldSrc = realSrc || dataSrc || ""; + + if(!type){ + if(realSrc) { + $(this).attr("src", oldSrc.replace(/\/dark\//, "/")); + } else { + $(this).attr("data-src", oldSrc.replace(/\/dark\//, "/")); + } + }else if(!/\/dark\//.test(oldSrc)){ + var prefix = oldSrc.substring(0, oldSrc.lastIndexOf("/")); + var suffix = oldSrc.substring(oldSrc.lastIndexOf("/")); + if(realSrc) { + $(this).attr("src", prefix+"/dark"+suffix); + } else { + $(this).attr("data-src", prefix+"/dark"+suffix); + } + } + }); + }, + + _getSkinDataByKey: function(skin){ + var data = this.data; + var skinData = {}; + for(var i=0; i
                              "); + this.bgContainer = $("#skin-bgimage"); + },*/ + + //绑定事件 + _bindEvent: function() { + var self = this; + //class为"ui-skin-close"的元素点击时将关闭 + //BODY.on("click", ".skinbox-item-default", $.proxy(self.emptySkin, self)); + //class为"ui-skin-item"的元素点击时将设置皮肤(取属性值"data-value") + BODY.on("click", ".skinbox-item", function(){ + if($(this).hasClass("skinbox-item-selected")){ + return; + } + $(".skinbox-item-selected").removeClass("skinbox-item-selected"); + $(this).addClass("skinbox-item-selected"); + var skin = $(this).attr("data-value"); + var skinData = self._getSkinDataByKey(skin); + self.setSkin(skin, skinData.bgImgSrc); + self.setClickArea(skin, skinData.clickArea); + // 判断,当当前选中的皮肤和皮肤skinTrans上推荐的皮肤一致时,改变skinTrans上的icon + if( skin === conf.skinTrans.defaultSkin ){ + $( window ).trigger( "skinTrans.recommendedSelect" ); + } + UT.send({ + modId: self.modId, + ac: "b", + position: "thumbnail", + sort: skin + }); + }); + }, + + // 提供外部换肤接口 + _setTrigger: function() { + var self = this; + WINDOW.on("skin.change", function(e, arg1) { + $(".skinbox-item-selected").removeClass("skinbox-item-selected"); + BODY.find(".skinbox-item[data-value='" + arg1 + "']").addClass("skinbox-item-selected"); + var skinData = self._getSkinDataByKey(arg1); + self.setSkin(arg1, skinData.bgImgSrc); + self.setClickArea(arg1, skinData.clickArea); + }); + }, + + //具体设置可点击区域的样式 + _clickAreaAjust: function(data){ + var divWidth = parseInt(data.width); + var mainWidth = parseInt(this.mainWidth); + var windowWidth = WINDOW.width(); + var margin = (windowWidth - mainWidth)/2; + if(windowWidth <= mainWidth){ + margin = 0; + divWidth = 0; + }else if(divWidth > margin){ + divWidth = margin; + } + var firstLeft = margin - divWidth; + var secondLeft = firstLeft + mainWidth + divWidth; + this.leftClickArea.css({left:firstLeft, width:divWidth, height:data.height}); + this.rightClickArea.css({left:secondLeft, width:divWidth, height:data.height}); + }, + + //第一次载入时机、策略(分拆) + /*_firstLoad: function(){ + var skinCookie = $.cookie("lastSkin"); + var skin = this.recommandSkin ? this.recommandSkin : skinCookie; + //如果skin不为空,则进行皮肤设置 + if (skin) { + var time = this.loadTime; + var self = this; + //即刻加载 + if (time === "") { + self.setSkin(skin); + //延迟加载 + }else{ + setTimeout($.proxy(self.setSkin, self, skin), time); + } + } + },*/ + + //插件初始化 + init: function() { + var that = this; + that._bindEvent(); + that._setTrigger(); + } +}; + +module.exports = Skin; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skinbox-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skinbox-async.js new file mode 100755 index 000000000..25387866a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skinbox-async.js @@ -0,0 +1,275 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var Slide = require("common:widget/ui/cycletabs/cycletabs.js"); +var Helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); + +$(function(){ + var modId = "skinbox"; + var confSkin = conf.skin; + var skinData = confSkin.data; + var headerIcon = $(".skinbox-header"); + var moreWrap; + var BODY = $(document.body); + var WINDOW = $(window); + var headerDesc = headerIcon.find(".title-skinbox"); + var isAnimate = false; + var manyPic = confSkin.manyPic && confSkin != "0" ? "true" : "false"; + var skinMoreTpl = '
                              ' + + '
                              ' + + '
                              ' + + '' + + '

                              #{title}

                              ' + + '' + + '
                              ' + + '
                              ' + + '
                              ' + + '
                              '; + var skinItemTpl = "
                              " + + "#{tipType}" + + "" + + "
                              #{title}
                              " + + "" + + "
                              "; + + headerIcon.one("click", function(){ + var fullNum = manyPic == "true" ? 9 : 4; + var height = manyPic == "true" ? 65 : 84; + //内容拼接 + $("#top").after(Helper.replaceTpl(skinMoreTpl, $.extend({ + "manyPic": manyPic, + "height": height + }, skinData[0]))); + moreWrap = $(".skinbox-more-wrap"); + + //数据拼接 + var tempData = []; + var tempItemStr = ""; + var tempId = 1; + var rowClass = ""; + for(var i=1; i 4 || modNum == 0 ? (modNum == 5 ? "column-first row-second" : "row-second") : "row-first"; + tempItemStr += Helper.replaceTpl(skinItemTpl, $.extend({ + "tipType" : tipType ? ( tipType == "hot" ? "" : ( tipType == "new" ? "" : "" ) ) : "", + "rowClass": rowClass, + "height": height + }, curData)); + if (i==skinData.length-1 || modNum==0) { + tempData.push({ + "content": tempItemStr, + "id": tempId + }); + } + } + + //调用slide组件 + var options = { + offset: 0, + navSize: 1, + itemSize: manyPic == "true" ? 850 : 680, + scrollDuration: 500, + quickSwitch: true, + dir: conf.dir, + containerId: ".skinbox-normal-wrap", + data: tempData + }; + var skinSlide = new Slide.NavUI(); + skinSlide.init(options); + //项数不到两屏时,隐藏控制Handler + if(skinData.length < fullNum + 2){ + $(".ctrl, .switch", moreWrap).hide(); + } + + //已选中皮肤的跟新状态 + $(".skinbox-item[data-value="+conf.skin.current+"]", moreWrap).addClass("skinbox-item-selected"); + + }).on("click", function(e){ + //fix ie8 bug(原来使用的是slideToggle) + if(isAnimate){ + return false; + } + isAnimate = true; + var containerHeight = manyPic == "true" ? 200 : 150; + if (headerIcon.hasClass("skinbox-more-hide")) { + moreWrap.animate({ + height:0 + }, 400, function(){ + moreWrap.hide(); + headerIcon.removeClass("skinbox-more-hide"); + headerDesc.text(confSkin.iconLiteral); + isAnimate = false; + }); + }else{ + moreWrap.show().animate({ + height: containerHeight + }, 400, function(){ + headerIcon.addClass("skinbox-more-hide"); + headerDesc.text(confSkin.closeLiteral); + isAnimate = false; + }); + } + UT.send({ + modId: modId, + position: "header", + sort: headerIcon.hasClass("skinbox-more-hide") ? "close" : "open" + }); + e.preventDefault(); + }); + + BODY.on("click", function(e){ + var target = $(e.target); + //非目标区域的点击将关闭皮肤盒子.skinbox-wrap + if(target.parents(".skinbox-more-wrap, .skinbox-wrap").length <= 0 && target.closest(".i-st-btn").length <= 0 && !target.hasClass("skinbox-more-wrap") && moreWrap && moreWrap.css("display") == "block"){ + if (isAnimate) { + return false; + } + isAnimate = true; + moreWrap.animate({ + height:0 + }, 400, function(){ + moreWrap.hide(); + headerIcon.removeClass("skinbox-more-hide"); + headerDesc.text(confSkin.iconLiteral); + isAnimate = false; + }); + } + //更新选中状态 + }).on("click", ".skinbox-normal-wrap .prev, .skinbox-normal-wrap .next, .skinbox-normal-wrap .switch", function(e){ + var target = $(e.target); + $(".skinbox-item-selected", moreWrap).removeClass("skinbox-item-selected"); + $(".skinbox-item[data-value="+confSkin.current+"]", moreWrap).addClass("skinbox-item-selected"); + if (target.hasClass("next") || target.hasClass("arrow-next")) { + UT.send({ + modId: modId, + ac: "b", + position: "switch", + sort: "next" + }); + }else if(target.hasClass("prev") || target.hasClass("arrow-prev")){ + UT.send({ + modId: modId, + ac: "b", + position: "switch", + sort: "prev" + }); + } + }); + + //顶部icon区的hover效果 + $(".skinbox-wrap").on("hover", function(){ + headerIcon.toggleClass("module-mask"); + }); + + //皮肤装载(由skin-mod.js分拆出来) + var skinCookie = $.store("lastSkin") || $.cookie("lastSkin"); + var skin = confSkin.recommandSkin; + var filtered = confSkin.filter; + if((skin && skin != "no") && (filtered && filtered != "0")){ + var browserInfo = $.browser; + if(browserInfo.mozilla || browserInfo.msie){ + skin = confSkin.recommandSkin; + }else{ + skin = ""; + conf.skin.recommandSkin = ""; + } + } + if(skinCookie && skinCookie.indexOf("|") >= 0){ + var skinCookies = skinCookie.split("|"); + if(skin == skinCookies[1] || skin == ""){ + skin = skinCookies[0]; + } + } + if (skin) { + var time = confSkin.loadTime; + if (time === "" || time <= 15) { + setSkin(skin); + }else{ + setTimeout($.proxy(setSkin, null, skin), time); + } + } + //设置皮肤 + function setSkin(skin){ + for(var i=0;i0 && skinItem.clickArea[0].landingpage) { + setClickArea(skin, skinItem.clickArea[0]); + WINDOW.on("resize.skin", $.proxy(setClickArea, null, skin, skinItem.clickArea[0])); + } + } + } + } + //设置可点击区域 + function setClickArea(skin, data){ + var divWidth = parseInt(data.width); + var mainWidth = 960; + var windowWidth = WINDOW.width(); + var margin = (windowWidth - mainWidth)/2; + if(windowWidth <= mainWidth){ + margin = 0; + divWidth = 0; + }else if(divWidth > margin){ + divWidth = margin; + } + var firstLeft = margin - divWidth; + var secondLeft = firstLeft + mainWidth + divWidth; + $("#skin-clickarea-left").css({left:firstLeft, width:divWidth, height:data.height}); + $("#skin-clickarea-right").css({left:secondLeft, width:divWidth, height:data.height}); + $(".skin-clickarea").on("click.skin", function(){ + window.open(updateLandingpage(data.landingpage)); + UT.send({ + modId: "skinbox", + ac: "b", + position: "background", + sort: skin + }); + }); + } + //深色换肤搜索框Logo + function setDarkLogo(){ + $("#searchGroupLogos img").each(function(){ + var dataSrc = $(this).attr("data-src"), + realSrc = $(this).attr("src"), + oldSrc = realSrc || dataSrc || ""; + + var prefix = oldSrc.substring(0, oldSrc.lastIndexOf("/")); + var suffix = oldSrc.substring(oldSrc.lastIndexOf("/")); + + if (realSrc) { + $(this).attr("src", prefix+"/dark"+suffix); + } else { + $(this).attr("data-src", prefix+"/dark"+suffix); + } + }); + } + //带uid设置 + function updateLandingpage(url){ + var paramKey = confSkin.passQueryParam || "uid", + paramVal = Helper.getQuery(location.href)[paramKey]; + if(paramVal){ + url += (url.indexOf("?") != -1 ? "&" : "?") + paramKey + "=" + paramVal; + } + return url; + } +}); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skinbox.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skinbox.tpl new file mode 100755 index 000000000..d584d484a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/skinbox/skinbox.tpl @@ -0,0 +1,54 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/skinbox/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/skinbox/rtl/rtl.css?__inline'); +<%/if%> +<%if !empty($body.skinBox.iconImg)%> +body .ico-skinbox { + background: url(<%$body.skinBox.iconImg%>) no-repeat left top; +} +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/skinbox/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/header/skinbox/rtl/rtl.more.css"%> +<%/if%> + + + +<%script%> +conf.skin = <%json_encode($body.skinBox)%>; + +require.async("common:widget/ui/jquery/jquery.js", function($){ + $(window).one("append.skin", function(){ + require.async("common:widget/header/skinbox/skinbox-async.js"); + }); + $(window).one("slide.skin", function(){ + require.async("common:widget/header/skinbox/skin-mod.js", function(Skin){ + var skin = new Skin(conf.skin); + skin.init(); + }); + }); + $(".skinbox-header").one("click", function(e){ + $(window).trigger("slide.skin"); + e.preventDefault(); + }).one("mouseenter", function(){ + $(window).trigger("append.skin"); + }); + $(function(){ + $(window).trigger("append.skin"); + }); +}); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/close-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/close-rtl.png new file mode 100755 index 000000000..06e82eff2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/close-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/close.png new file mode 100755 index 000000000..96201a26e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/del_active.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/del_active.png new file mode 100755 index 000000000..691b86857 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/del_active.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/del_grey.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/del_grey.png new file mode 100755 index 000000000..ae2b84f17 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/img/del_grey.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/ltr/ltr.css new file mode 100755 index 000000000..61952cf07 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/ltr/ltr.css @@ -0,0 +1,3 @@ +.tear-page{visibility: hidden;} +.body_bg { width: 100%; height: 500px; position: absolute; left: 0; z-index: -5; background-position: center 0; background-repeat: no-repeat; zoom: 1;} +.bg-content-clickable{ position: absolute; cursor: pointer; } \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/ltr/ltr.more.css new file mode 100755 index 000000000..6630c7206 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/ltr/ltr.more.css @@ -0,0 +1,6 @@ +.tear-page{position: absolute;right: 0px; top: 0px; width: 52px;height: 50px;overflow: hidden;z-index: 9; visibility: visible !important;} +.tear-page img, .tear-page i{position: absolute;left: 0px;top: 0px;} +.i-tear-page{display: block;width: 52px; height: 50px;background: url(../img/close.png?__sprite) no-repeat;} +.tear-page .i-tear-page-close{display: block;left: 12px;top:25px;width: 12px;height: 12px; background: url(../img/del_grey.png?__sprite) no-repeat;} +.tear-page .i-tear-page-close:hover{cursor: pointer;background: url(../img/del_active.png?__sprite) no-repeat;} +.tear-page .tear-page_btn { display: block; height: 20px; width: 58px; position: absolute; cursor: pointer; right: 0px; top: 0px; overflow: hidden;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/rtl/rtl.css new file mode 100755 index 000000000..f3f3d0267 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/rtl/rtl.css @@ -0,0 +1 @@ +.tear-page{ visibility: hidden;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/rtl/rtl.more.css new file mode 100755 index 000000000..7b2c1690a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/rtl/rtl.more.css @@ -0,0 +1,6 @@ +.tear-page{position: absolute;left: 0px; top: 0px; width: 52px;height: 50px;overflow: hidden;z-index: 9; visibility: visible !important;} +.tear-page img, .tear-page i{position: absolute;right: 0px;top: 0px;} +.i-tear-page{display: block;width: 52px; height: 50px;background: url(../img/close-rtl.png?__sprite) no-repeat;} +.tear-page .i-tear-page-close{display: block;right: 12px;top:25px;width: 12px;height: 12px; background: url(../img/del_grey.png?__sprite) no-repeat;} +.tear-page .i-tear-page-close:hover{cursor: pointer;background: url(../img/del_active.png?__sprite) no-repeat;} +.tear-page .tear-page_btn { display: block; height: 20px; width: 58px; position: absolute; cursor: pointer; left: 0px; top: 0px; overflow: hidden;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/tear-page-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/tear-page-async.js new file mode 100755 index 000000000..a5786a53e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/tear-page-async.js @@ -0,0 +1,188 @@ +//requirement +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var DateUI = require("common:widget/ui/date/date.js"); +var UT = require("common:widget/ui/ut/ut.js"); + +window.Gl || (window.Gl = {}); +$(function(){ + var lastCloseDay = $.cookie("Gh_t"); + var currentDay = DateUI.format("dd"); + var modId = "tearpage"; + var isCompleteHover; + //展现策略 + if(currentDay != lastCloseDay){ + var container = $(".tear-page"); + var content = $(".tear-page textarea").text(); + container.html(content); + var closeBtn = $(".i-tear-page-close"); + var backImg = $(".tear-page img"); + Gl.tearPage || (Gl.tearPage = {}); + //使用皮肤 + if (conf.tearPage.useSkin) { + var divWidth = conf.tearPage.clickWidth || 0; + var divHeight = conf.tearPage.clickHeight || 0; + var lazyTime = conf.tearPage.timeout || 1000; + var skinMod = conf.tearPage.modId || "skin"; + var parentSelector = conf.tearPage.parentSelector || "div[alog-alias=p-1]"; + var body = $(document.body); + var mainWidth = 960; + var windowWidth = $(window).width(); + var margin = (windowWidth - mainWidth)/2; + if(windowWidth <= mainWidth){ + margin = 0; + divWidth = 0; + }else if(divWidth > margin){ + divWidth = margin; + } + var firstLeft = margin - divWidth; + var secondeLeft = firstLeft + mainWidth + divWidth; + var bodyBgContent = "
                              " + + "
                              " + + "
                              "; + bodyBgContent = helper.replaceTpl(bodyBgContent, { + firstLeft: firstLeft, + secondeLeft: secondeLeft, + divWidth: divWidth, + divHeight: divHeight + }); + //皮肤可点击 + if (conf.tearPage.landingpage) { + $(window).on("resize", function(){ + divWidth = conf.tearPage.clickWidth || 0; + windowWidth = $(window).width(); + margin = (windowWidth - mainWidth)/2; + if(windowWidth <= mainWidth){ + margin = 0; + divWidth = 0; + }else if(divWidth > margin){ + divWidth = margin; + } + firstLeft = margin - divWidth; + secondeLeft = firstLeft + mainWidth + divWidth; + $(".bg-content-clickable").eq(0).css({ + width: divWidth, + left: firstLeft + }).end().eq(1).css({ + width: divWidth, + left: secondeLeft + }); + }); + $(document).on("click", ".bg-content-clickable", function(){ + UT.send({ + "type": "click", + "position": "bgimage", + "modId": skinMod + }); + window.open(conf.tearPage.landingpage); + }); + } + Gl.tearPage.hasBg = conf.tearPage.hasBg; // 背景图是否存在 + Gl.tearPage.makeBg = function() { // 生成背景图 + $(parentSelector).append(bodyBgContent); + $("#bodyBg").css("background-image", "url(" + conf.tearPage.bgImg + ")"); + body.addClass("have-skin"); + }; + var setTearBg = setTimeout(function() { + if((Gl.tearPage.hasBg === '1' && $.cookie("Gh_so") === null) || $.cookie("Gh_so") === "1") { + Gl.tearPage.makeBg(); + } + }, lazyTime); + //点击换肤按钮 + $("#tearBtn").on("click", function(e) { + if(setTearBg) { + clearTimeout(setTearBg); + setTearBg = 0; + } + if($("#bodyBg").length === 0) { + Gl.tearPage.makeBg(); + } + if((Gl.tearPage.hasBg === '1' && $.cookie("Gh_so") === null) || $.cookie("Gh_so") === "1") { + $("#bodyBg, .bg-content-clickable").hide(); + backImg.attr("src", backImg.attr("data-open-src")); + Gl.tearPage.hasBg = '0'; + $.cookie("Gh_so", "0"); + UT.send({ + "type": "click", + "position": "button", + "sort": "close", + "modId": skinMod + }); + body.removeClass("have-skin"); + } else { + $("#bodyBg, .bg-content-clickable").show(); + backImg.attr("src", backImg.attr("data-restore-src")); + Gl.tearPage.hasBg = '1'; + $.cookie("Gh_so", "1"); + UT.send({ + "type": "click", + "position": "button", + "sort": "open", + "modId": skinMod + }); + body.addClass("have-skin"); + } + e.preventDefault(); + e.stopPropagation(); + }); + }; + + //hover效果切换 + container.removeClass("hide").hover(function(){ + isCompleteHover = 0; + backImg.attr("src", backImg.attr("data-open-src")); + + // 巴西音乐节 + if((Gl.tearPage.hasBg === '1' && $.cookie("Gh_so") === null) || $.cookie("Gh_so") === "1") { + backImg.attr("src", backImg.attr("data-restore-src")); + }else{ + backImg.attr("src", backImg.attr("data-open-src")); + } + + container.clearQueue().animate({ + width: (conf.tearPage.width || '200') + 'px' + }, { + duration: 500, + always: function(){ + closeBtn.removeClass("hide"); + $("#tearBtn").show();// 巴西音乐节 + } + }); + }, function(){ + isCompleteHover = 1; + closeBtn.addClass("hide"); + container.clearQueue().animate({ + width: "52px" + }, { + duration: 500, + always: function(){ + if(isCompleteHover){ + backImg.attr("src", backImg.attr("data-close-src")); + $("#tearBtn").hide();// 巴西音乐节 + } + } + }); + }).click(function(e){//如果有passQueryParam,则点击链接要带上这个参数 + var url = $(this).attr("href"), + paramKey = conf.tearPage.passQueryParam.trim(); + url = helper.appendQueryToUrl(url, paramKey); + UT.send({ + "position": "banner", + "modId": modId + }); + window.open(url); + e.preventDefault(); + }); + //关闭按钮点击响应(关闭仅对当天有效) + closeBtn.on("click", function(e){ + container.addClass("hide"); + $.cookie("Gh_t", currentDay, {expires: 1}); + UT.send({ + "position": "button", + "modId": modId + }); + e.preventDefault(); + e.stopPropagation(); + }); + } +}); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/tear-page.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/tear-page.tpl new file mode 100755 index 000000000..cd1597ee3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/tear-page/tear-page.tpl @@ -0,0 +1,56 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/tear-page/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/tear-page/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/tear-page/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/tear-page/rtl/rtl.more.css"%> <%/if%> + +<%assign var="tearSkin" value=$body.tearPage.skin%> + + + + + +<%script%> + conf.tearPage = { + passQueryParam: "<%$body.tearPage.passQueryParam%>", + hasBg: "<%$tearSkin.initBgImg%>", + bgImg: "<%$tearSkin.image%>", + width: "<%$tearSkin.width%>", + <%if !empty($tearSkin.timeout)%> + timeout: <%$tearSkin.timeout%>, + <%/if%> + useSkin: "<%empty($tearSkin.isHidden)%>", + modId: "<%$tearSkin.modId%>", + parentSelector: "<%$tearPage.parentSelector%>" + <%if empty($tearSkin.isHidden) && !empty($tearSkin.clickArea)%> + ,clickWidth: <%$tearSkin.clickArea.width%>, + clickHeight: <%$tearSkin.clickArea.height%>, + landingpage: "<%$tearSkin.clickArea.landingpage%>" + <%/if%> + }; + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.tearpage", function () { + require.async("common:widget/header/tear-page/tear-page-async.js"); + }); + $(function () { + $(window).trigger("e_go.tearpage"); + }); + $(".tear-page").one("mouseenter", function () { + $(window).trigger("e_go.tearpage"); + }); + }); +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin1-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin1-hover.png new file mode 100755 index 000000000..46f04da94 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin1-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin1.png new file mode 100755 index 000000000..aa75a23f2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin2-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin2-hover.png new file mode 100755 index 000000000..840f810b3 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin2-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin2.png new file mode 100755 index 000000000..549c2c42f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin3-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin3-hover.png new file mode 100755 index 000000000..243ea5be3 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin3-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin3.png new file mode 100755 index 000000000..9293218fb Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/img/i-theme-skin3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/ltr-s/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/ltr-s/ltr.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/ltr-s/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/ltr-s/ltr.more.css new file mode 100755 index 000000000..bc0742c06 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/ltr-s/ltr.more.css @@ -0,0 +1,48 @@ +/*.select_theme, +.select_theme_hover,*/ +/*.select_theme .skin_1, +.select_theme .skin_1 span, +.select_theme .skin_2, +.select_theme .skin_2 span, +.select_theme .skin_3, +.select_theme .skin_3 span{ + background: url("./theme_bg.png") top left no-repeat; +}*/ + +.select_theme{ + /*display: none; + position: absolute; z-index: 9; top: 0; right: 0; width: 25px; height: 25px; overflow: hidden; padding-right: 5px; padding-top: 5px; + background-color: #EDF0EF; white-space:nowrap; + + -webkit-transition: width .2s ease-out; + -moz-transition: width .2s ease-out; + -o-transition: width .2s ease-out; + transition: width .2s ease-out;*/ + display: block; + clear: both; + overflow: hidden; + border-top: 1px solid #bee2d6; + padding: 5px 15px; + zoom: 1; +} + +/*.select_theme_hover{ + width: 90px; +}*/ +.select_theme li{ width: 20px; height: 20px; /*background: #f00; float: right;*/ float: left; /*margin-right: 1px;*/ margin-right: 5px; cursor: pointer; /*display: none;*/} + +/*.select_theme_hover{ background-position: 0 -31px;} +.select_theme_hover li{ background-position: 0 -31px; display: inline-block;}*/ + +.select_theme span{ /*display: none;*/ width: 20px; height: 20px;} + +.select_theme .skin_cur{ + background: #ff0; cursor: default; +} +.select_theme .skin_cur span{ display: inline-block;} +.select_theme .skin_1{ background: url(../img/i-theme-skin1.png?__sprite) no-repeat;} +.select_theme .skin_1 span{ background: url(../img/i-theme-skin1-hover.png?__sprite) no-repeat;} +.select_theme .skin_2{ background: url(../img/i-theme-skin2.png?__sprite) no-repeat;} +.select_theme .skin_2 span{ background: url(../img/i-theme-skin2-hover.png?__sprite) no-repeat;} +.select_theme .skin_3{ background: url(../img/i-theme-skin3.png?__sprite) no-repeat;} +.select_theme .skin_3 span{ background: url(../img/i-theme-skin3-hover.png?__sprite) no-repeat;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/rtl-s/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/rtl-s/rtl.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/rtl-s/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/rtl-s/rtl.more.css new file mode 100755 index 000000000..bc0742c06 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/rtl-s/rtl.more.css @@ -0,0 +1,48 @@ +/*.select_theme, +.select_theme_hover,*/ +/*.select_theme .skin_1, +.select_theme .skin_1 span, +.select_theme .skin_2, +.select_theme .skin_2 span, +.select_theme .skin_3, +.select_theme .skin_3 span{ + background: url("./theme_bg.png") top left no-repeat; +}*/ + +.select_theme{ + /*display: none; + position: absolute; z-index: 9; top: 0; right: 0; width: 25px; height: 25px; overflow: hidden; padding-right: 5px; padding-top: 5px; + background-color: #EDF0EF; white-space:nowrap; + + -webkit-transition: width .2s ease-out; + -moz-transition: width .2s ease-out; + -o-transition: width .2s ease-out; + transition: width .2s ease-out;*/ + display: block; + clear: both; + overflow: hidden; + border-top: 1px solid #bee2d6; + padding: 5px 15px; + zoom: 1; +} + +/*.select_theme_hover{ + width: 90px; +}*/ +.select_theme li{ width: 20px; height: 20px; /*background: #f00; float: right;*/ float: left; /*margin-right: 1px;*/ margin-right: 5px; cursor: pointer; /*display: none;*/} + +/*.select_theme_hover{ background-position: 0 -31px;} +.select_theme_hover li{ background-position: 0 -31px; display: inline-block;}*/ + +.select_theme span{ /*display: none;*/ width: 20px; height: 20px;} + +.select_theme .skin_cur{ + background: #ff0; cursor: default; +} +.select_theme .skin_cur span{ display: inline-block;} +.select_theme .skin_1{ background: url(../img/i-theme-skin1.png?__sprite) no-repeat;} +.select_theme .skin_1 span{ background: url(../img/i-theme-skin1-hover.png?__sprite) no-repeat;} +.select_theme .skin_2{ background: url(../img/i-theme-skin2.png?__sprite) no-repeat;} +.select_theme .skin_2 span{ background: url(../img/i-theme-skin2-hover.png?__sprite) no-repeat;} +.select_theme .skin_3{ background: url(../img/i-theme-skin3.png?__sprite) no-repeat;} +.select_theme .skin_3 span{ background: url(../img/i-theme-skin3-hover.png?__sprite) no-repeat;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme-async.js new file mode 100755 index 000000000..9a809b7ec --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme-async.js @@ -0,0 +1,131 @@ +/* +* Weather +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"); +/** + * NOTICE please, turn on this module you should: + * + * 1. init function(fire before domReady and auguments[0] is the path of + * theme resource) + * + * G.theme.init("/static/web/common/theme/"); + * + * 2. add style: + * .select_theme{display:block !important;} + * + * update: 20130320 | by WMF + * + * 1. handle css loading before domReady + * 2. base on jQuery 1.9.x + */ +window.G || (window.G = {}); +G.theme = { + init: function(themePath) { + this.themeId = "themeLinkNodeRef"; + this.cookieName = "hao123themename"; + this.themePath = themePath || "./theme/"; + this.defaultThemeName = "1"; + this.themeName = $.cookie(this.cookieName); + this.load(); + window.jQuery && $(function() { + if(!$("#themeSelect")[0]) return; + /*$("#themeSelect").on("mouseenter", function(e) { + $(this).addClass("select_theme_hover") + }).on("mouseleave", function(e) { + $(this).removeClass("select_theme_hover") + });*/ + + $("#themeSelect li").on("click", function(event){ + var el = $(this)[0]; + UT.send({ + position: "changeStyle", + type:"click", + sort: $(this).attr("data-theme"), + value: $(this).attr("data-theme"), + modId:"theme" + }); + + el.tagName === "LI" && !$(this).hasClass("skin_cur") && G.theme.setTheme(el); + }); + G.theme.initSelect(); + }); + return this; + }, + + load: function(themeName) { + themeName = themeName || this.themeName; + if(!themeName) return; + var themeNodeRef = document.getElementById(this.themeId), + // href = this.themePath + themeName + "/css/index.css"; + + // supports fis + href = { + "1": __uri("./theme/1/css/index.css"), + "2": __uri("./theme/2/css/index.css"), + "3": __uri("./theme/3/css/index.css"), + "4": __uri("./theme/3/css/index.css") + }[themeName]; + + if(themeNodeRef) { + themeNodeRef.href = href; + } else { + // var ref = document.getElementsByTagName('script')[0], + var ref = document.body || document.getElementsByTagName('script')[0], + node = document.createElement("LINK"); + node.id = this.themeId; + node.type = "text/css"; + node.rel = "stylesheet"; + node.href = href; + ref.appendChild(node); + } + + // add a Hook on + !function() { + document.body + ? (document.body.className = document.body.className.replace(/body-theme_[^\s$]/g, " ").replace(/^\s+|\s+$/g, "").replace(/\s{2,}/g, " ") + " body-theme_" + themeName) + : setTimeout(arguments.callee, 64); + }(); + }, + + getName: function(el) { + return el.getAttribute("data-theme"); + }, + + initSelect: function() { + var themeName = this.themeName || this.defaultThemeName, + lis = document.getElementById("themeSelect").getElementsByTagName("LI"), + l = lis.length, + i = 0, + li; + for(; i +<%if $head.dir=='ltr'%> +@import url('/widget/header/theme/ltr-s/ltr.css?__inline'); +<%else%> +@import url('/widget/header/theme/rtl-s/rtl.css?__inline'); +<%/if%> +<%/style%> +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/theme/ltr-s/ltr.more.css"%> <%else%> <%require name="common:widget/header/theme/rtl-s/rtl.more.css"%> <%/if%> + + + <%script%> + require.async(["common:widget/header/theme/theme-async.js"],function(){ + G.theme.init("/widget/header/theme/theme/"); + }); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/1/css/index.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/1/css/index.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/css/index.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/css/index.css new file mode 100755 index 000000000..a7b26ea29 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/css/index.css @@ -0,0 +1,317 @@ +body .site-switch_container{ position: absolute; top: 28px; left: 140px; z-index: 99;} +body .site-switch{ position: static;} +/*.userbar{ position: relative;}*/ + +body .userbar-btn i, +body .custom_item .btn, +body .hotsite-custom_list .add-btn, +body .custom_item .sprite-del_normal, +body .custom_item .sprite-modify_normal, +body .site-switch a, +body .weather-days_click p, +body .userbar-weather_city-cur a, +body .bar-addfav_icon, +body .bar-addfav_btn, +body .userbar-btn a{ background: url("../img/bg.png") 0 0 no-repeat;} + + +/*.select_theme, +.select_theme_hover{ background: #EDF0EF url("../img/theme_bg.png") 0 0 no-repeat;}*/ + +body .hotsite-custom_bar a, +body .hotsite-custom_bar a:hover, +body .hotsite-custom .bar_open a, +body .hotsite-custom .bar_open a:hover, +body .hotsite-custom_list .add-btn, +body .news-item_txt, +body .news-btn_type i, +body .charts-order, +body .mod-joke .joke_refresh, +body .scroll-arrow, +body .news-btn_type i, +body .top-arrow, +body .bottom-arrow, +body .hotsite-custom_list .add-btn-ico{ background: url("../img/i-news_item.png") no-repeat 0 0;} + + +body .bar-addfav_icon {background-position: 0 -1068px;} + +body .bar-addfav{ border-bottom: 1px solid #0064C0;} + +body .charts-song:hover, body .charts-singer:hover { color: #1188F7;} + + +body .mod-joke .joke_content:hover{ color: #1188F7;} + +#indexLogo{ + float: left; width: 130px; height: 50px; + background: url(../img/logo_new.png); + _background: url(/static/web/tw/img/logo_new.png); +} +#indexLogoImg{display: none;} +body .news-btn_type:hover{ border-color: #7EB8EB;} +body .bar-addfav_btn{ background-position: 0 -1008px; background-repeat: repeat-x; + + border-color: #82BBEF; +} + +body .bar-addfav_btn:hover{ + background-position: 0 -1028px; border-color: #1188F7; +} + +body .site-switch a{ background-position: right -432px;} +body .custom_item .sprite-del_normal{ background-position: 0 -639px;} +body .custom_item .sprite-modify_normal{ background-position: -1px -931px;} +body .hotsite-custom_bar a{ background-position: -1px -233px;} +body .hotsite-custom_bar a:hover{ background-position: -1px -254px;} +body .hotsite-custom .bar_open a{ background-position: -1px -296px;} +body .hotsite-custom .bar_open a:hover{ background-position: -1px -317px;} +body .hotsite-custom_list .add-btn{ background-position: 0 -685px; background-repeat: repeat-x; border:1px solid; border-color:#ebebeb #ebebeb #d9dcde #ebebeb; color:#909191;} + +body .hotsite-custom_list .add-btn-ico{ background-position: -12px -99px;} +body dl.sortsite dt .arrow_r{ border-left-color: #5998FE;} +body .bar-addfav_title, body .bar-addfav_text{ color: #1188F7;} + +body .charts_more .arrow_r{ color: #5998FE;} +body .select_theme_hover{ background-position: 0 -31px;} +body .mod-joke .joke_refresh{ background-position:0 -168px;} +body .ui-tip .arrow{border-top-color: #5998FE;} +body .ui-tip{ border-color: #5998FE;} +body .news-btn_type i{ background-position: -12px -96px;} +body .top-arrow { background-position: -15px -114px;} +body .bottom-arrow{background-position: -15px -131px;} + +body .userbar-wrap { + background: #1082EC; + border-bottom: 1px solid #0069CA; + _border-bottom: 0 none; + + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(17,136,247)),color-stop(1, rgb(16,127,230))); + background-image:-webkit-linear-gradient(-90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + background-image:-o-linear-gradient(-90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + background-image:linear-gradient(-90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff1188f7,endColorstr=#ff107fe6,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff1188f7,endColorstr=#ff107fe6,GradientType=0);*/ +} + + +body .site-switch{ + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(16,135,245)),color-stop(1, rgb(3,118,225))); + background-image:-webkit-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + background-image:-o-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + background-image:linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + border-color:#0070D8; + border-width:1px; + border-style:solid; + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff1087f5,endColorstr=#ff0376e1,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff1087f5,endColorstr=#ff0376e1,GradientType=0);*/ +} + +body .weather-days_click p{ background-position: 50% -552px;} +body .userbar-weather_city-cur a{ background-position: right -431px;} +body .site-switch_hover { + background: #0070D8; +} + +body .site-switch_content { + border: 1px solid #fefefe; + background: #E2EAEF; +} +body .site-switch_container a { + color: #333; +} +body .site-switch_content a{ background-image: none;} + +body .site-switch_container a:hover { + background-color: #C0DAEF; +} + +body .ui-button .ui-button-text, +body .mod-btn_normal .ui-button-text{ color: #05ae76;} + + + +body .box-prompt{ background: #E2EAEF; + border: 1px solid #ceded9; + border-bottom: 1px solid #beccc7; +} + +body .weather-more_wrap { + /*background: #0c815a; + border-top: 1px solid #0a6f4e; + border-bottom: 1px solid #0a6f4e;*/ +} +body .weather-days { + border: 1px solid #0070D8; + border-bottom: 0 none; + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(16,135,245)),color-stop(1, rgb(3,118,225))); +background-image:-webkit-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +background-image:-o-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +background-image:-ms-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +background-image:linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +} +body .weather-days_click { + border: 1px solid #0069CA; + border-bottom: 0 none; +} +body .weather-days:hover { + background: #0070D8; +} +body .weather-days_click p{ background-position: 50% -552px;} +body .userbar-btn a { + background-position: 0 -84px; + background-repeat: repeat-x; + color: #0069CA; + border: 1px solid #0070D8; +} +body .userbar-btn i{ + background-image: url("../img/bg.png") !important; +} +body .userbar-btn .userbar-sethome { + background-position: 0 0; +} +body .userbar-btn .userbar-addfav { + background-position: 0 -18px; +} +body .userbar-btn .userbar-down { + background-position: 0 -38px; +} +body .userbar-btn .userbar-btn_click .userbar-sethome { + background-position: 0 -710px; +} +body .userbar-btn .userbar-btn_click .userbar-addfav { + background-position: 0 -729px; +} +body .userbar-btn .userbar-btn_click .userbar-down { + background-position: 0 -748px; +} +body .weather-more_wrap{ background: #0070D8;} +body .weather-more_show { height: auto; border-top: 1px solid #0069CA;} +body .weather-more_line{border-bottom: 1px solid #0069CA;} +body .weather-more_odd{ background: #0069CA;} +body .box-search_tab a.cur { color:#0069CA;} +body .hotsite_b{ border: 1px solid #DFE4E6;} + +body .hotsite-custom{ border-color: #D9E8FF;} +body .sortsite dt a, +body .charts_menu a:hover, +body .charts_menu .cur, +body .charts_menu .cur:hover, +body .charts-imgitem a:hover, +body .toolbar-v .charts_menu a:hover, +body .charts_more{ color: #1188F7;} +body .mod-btn_cancel .ui-button-text{ color: #e25856;} + +body .i-toolbar{ background: url(../img/i-news_item.png) no-repeat -16px -150px;} +body .i-toolbar-0, +body .i-toolbar-1, +body .i-toolbar-2{ background-position: 0 -150px;} +body .toolbar-v dd em{ color: #047AE3;} + +body .cur .i-hotsite, body .hotsite-tabs_btn:hover .i-hotsite { + background: url(../img/i-news_item.png) no-repeat 0 -360px; +} +body .cur .i-history, body .hotsite-tabs_btn:hover .i-history { + background: url(../img/i-news_item.png) no-repeat 0 -376px; +} +body .hotsite-tabs_btn:hover {color: #1188f7;} +body .hotsite-tabs .cur {color: #1188f7;border-bottom: 2px solid #1188f7;} +body .hist-block {background: #1188f7;} +body .hotsite-hist_bg {color: #1188f7;} +body .hotsite-hist_bg i{ + background: url(../img/i-news_item.png) no-repeat 0 -390px; +} +body .hist-icon {background: url(../img/i-news_item.png) no-repeat 0 -462px;} + +body .settings-btn { + border: 1px solid #1185f2; + background: url(../img/bg.png) no-repeat 3px -1137px #1185f2; +} +body .settings-btn_open { + border: 1px solid #d4e0eb; + border-bottom: 0 none; + background: url(../img/bg.png) no-repeat 3px -1154px #eef3f8; +} +body .settings-dropdown { + border: 1px solid #d4e0eb; + background-color: #eef3f8; +} +body .select_theme { + border-top: 1px solid #d4e0eb; +} +body .settings-site .cur { + color: #1188f7; +} +body .settings-site a:hover { + background-color: #d6e2ef; +} +body .box-bot .t a:hover{ color: #1188F7;} + + +body .news-tab li.nav-item-current{color: #1188f7;} +body .playlist .arrow_r{color:#1188f7;} +body .playlist .arrow_r_disabled{color:#DEDEDE;} +div#current_indicator{border-bottom:3px solid #1188f7;} +body .playlist-tab li.cur{color:#1188f7;} +ul.playlist-tab .hover{color:#1188f7;} +body .playlist-body .cur .playlist-song, body .playlist-body .cur_pause .playlist-song {color:#1188f7;} +body .news-item a:hover .title, body .news-item_dbline a:hover .desc {color:#1188f7;text-decoration: underline;} +body .news-tab .ui-nav .arrow-prev, body .news-tab .ui-nav .arrow-next{background-image: url(../img/i-news-icon-blue.png) !important;} +body .news-tab .ui-nav .arrow-prev{background-position: -22px -1px;background-repeat:no-repeat;} +body .news-tab .ui-nav .arrow-next{background-position: -36px -1px;background-repeat:no-repeat;} +body .news-tab .ui-nav .prev-hover span.arrow-prev{background-position: -4px -1px;} +body .news-tab .ui-nav .next-hover span.arrow-next{background-position: -54px -1px;} +body .playing{background: url(../img/icon_playing.gif) no-repeat scroll 0 0 transparent;} +body .user_controller {background: url(../img/icon_player.png) no-repeat scroll 0 0 transparent;} +body .player-controller i{background-image: url(../img/icon_player.png);} +body .playlist-body .cur .playlist-order{background-image: url(../img/icon_player.png);} +body .playlist-body .cur_pause .playlist-order{background-image: url(../img/icon_player.png);} + +body .mod-login{border-color: #0070d8;} +body .userbar-btn a{background:#0d83f1;color:white;} +body .userbar-btn i{background-image:url(../img/bg.png);} +body .dot_img{background:url(../img/bg.png) 0 -1244px no-repeat;} +body .dot_img_head{background:url(../img/bg.png) -9px -1244px no-repeat;} + +body .cur .i-notepad, body .hotsite-tabs_btn:hover .i-notepad { + background: url(../img/i-news_item.png) no-repeat 0 -489px; +} +body .close .i-notepad, body .cur:hover .i-notepad { + background: url(../img/i-news_item.png) no-repeat 0 -507px; +} + +span.hsrch_word a:hover{color:#1188f7;} +body .news-slide .nav-item a:hover .title { +color: #1188f7; +text-decoration: underline; +} +body .charts-order { + background-position: 0 -150px; +} +body .charts-order_grey{ + background-position: -15px -150px; +} +body .mod-side .news-tab li.nav-item-current{color: #1188f7;} + + +/****** 皮肤盒子 ******/ +body .skinbox-more-wrap{background: #0070D8;border-top-color: #0069CA;border-bottom-color:#0069ca; } +body .skinbox-normal-wrap .switch-item{border-color: #0070D8;} +body .skinbox-more-hide .ico-skinbox-triangle{border-bottom-color: #0069ca;} +body .skinbox-normal-wrap .prev, body .skinbox-normal-wrap .next{background: #0161c2;color: #80b0e1;} +body .skinbox-item{border-color: #0358b2;} +body .skinbox-item-selected, body .skinbox-item:hover{border-color: #80b6ed;} +body .skinbox-normal-wrap .switch-item{background: url("../img/blue-not-current.png?__sprite") no-repeat;} +body .skinbox-normal-wrap .switch-item-current{background: url("../img/blue-current.png?__sprite") no-repeat;} +body .skinbox-item-selected .ico-skinbox-selected{background-color: #0084fa;} + +/****** 消息盒子 ******/ +body .wrap-message-content li{border-bottom-color:#d4e0eb;} +body .wrap-message-content{background-color: #EEF3F8;} +body .wrap-message-content li:hover{background-color: #D3E5F6} +body .message-target:hover span{color: #1188f7;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/css/index_dev.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/css/index_dev.css new file mode 100755 index 000000000..47eb69cc1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/css/index_dev.css @@ -0,0 +1,249 @@ +.site-switch_container{ position: absolute; top: 28px; left: 140px; z-index: 99;} +.site-switch{ position: static;} +/*.userbar{ position: relative;}*/ + +.userbar-btn i, +.custom_item .btn, +.hotsite-custom_list .add-btn, +.custom_item .sprite-del_normal, +.custom_item .sprite-modify_normal, +.site-switch a, +.weather-days_click p, +.userbar-weather_city-cur a, +.bar-addfav_icon, +.bar-addfav_btn, +.userbar-btn a{ background: url("../img/bg.png") 0 0 no-repeat;} + + +/*.select_theme, +.select_theme_hover{ background: #EDF0EF url("../img/theme_bg.png") 0 0 no-repeat;}*/ + +.hotsite-custom_bar a, +.hotsite-custom_bar a:hover, +.hotsite-custom .bar_open a, +.hotsite-custom .bar_open a:hover, +.hotsite-custom_list .add-btn, +.news-item_txt, +.news-btn_type i, +.charts-order, +.mod-joke .joke_refresh, +.scroll-arrow, +.news-btn_type i, +.top-arrow, +.bottom-arrow, +.hotsite-custom_list .add-btn-ico{ background: url("../img/i-news_item.png") no-repeat 0 0;} + + +.bar-addfav_icon {background-position: 0 -1068px;} + +.bar-addfav{ border-bottom: 1px solid #0064C0;} + +.charts-song:hover, .charts-singer:hover { color: #1188F7;} + + +.mod-joke .joke_content:hover{ color: #1188F7;} + +#indexLogo{ + float: left; width: 130px; height: 50px; + background: url(../img/logo_new.png); + _background: url(/static/web/tw/img/logo_new.png); +} +#indexLogoImg{display: none;} +.news-btn_type:hover{ border-color: #7EB8EB;} +.bar-addfav_btn{ background-position: 0 -1008px; background-repeat: repeat-x; + + border-color: #82BBEF; +} + +.bar-addfav_btn:hover{ + background-position: 0 -1028px; border-color: #1188F7; +} + +.site-switch a{ background-position: right -432px;} +.custom_item .sprite-del_normal{ background-position: 0 -639px;} +.custom_item .sprite-modify_normal{ background-position: -1px -931px;} +.hotsite-custom_bar a{ background-position: -1px -233px;} +.hotsite-custom_bar a:hover{ background-position: -1px -254px;} +.hotsite-custom .bar_open a{ background-position: -1px -296px;} +.hotsite-custom .bar_open a:hover{ background-position: -1px -317px;} +.hotsite-custom_list .add-btn{ background-position: 0 -685px; background-repeat: repeat-x; border:1px solid; border-color:#ebebeb #ebebeb #d9dcde #ebebeb; color:#909191;} + +.hotsite-custom_list .add-btn-ico{ background-position: -12px -96px;} +.sortsite dt .arrow_r{ border-left-color: #5998FE;} +.bar-addfav_title, .bar-addfav_text{ color: #1188F7;} + +.charts_more .arrow_r{ color: #5998FE;} +.select_theme_hover{ background-position: 0 -31px;} +.mod-joke .joke_refresh{ background-position:0 -168px;} +.ui-tip .arrow{border-top-color: #5998FE;} +.ui-tip{ border-color: #5998FE;} +.news-btn_type i{ background-position: -12px -96px;} +.top-arrow { background-position: -15px -114px;} +.bottom-arrow{background-position: -15px -131px;} +.userbar-wrap { + background: #1082EC; + border-bottom: 1px solid #0069CA; + _border-bottom: 0 none; + + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(17,136,247)),color-stop(1, rgb(16,127,230))); + background-image:-webkit-linear-gradient(-90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + background-image:-o-linear-gradient(-90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + background-image:linear-gradient(-90deg,rgb(17,136,247) 0%,rgb(16,127,230) 100%); + -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff1188f7,endColorstr=#ff107fe6,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff1188f7,endColorstr=#ff107fe6,GradientType=0); +} + + +.site-switch{ + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(16,135,245)),color-stop(1, rgb(3,118,225))); + background-image:-webkit-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + background-image:-o-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + background-image:linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); + border-color:#0070D8; + border-width:1px; + border-style:solid; + -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff1087f5,endColorstr=#ff0376e1,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff1087f5,endColorstr=#ff0376e1,GradientType=0); +} + +.weather-days_click p{ background-position: 50% -552px;} +.userbar-weather_city-cur a{ background-position: right -431px;} +.site-switch_hover { + background: #0070D8; +} + +.site-switch_content { + border: 1px solid #fefefe; + background: #E2EAEF; +} +.site-switch_container a { + color: #333; +} +.site-switch_content a{ background-image: none;} + +.site-switch_container a:hover { + background-color: #C0DAEF; +} + +.ui-button .ui-button-text, +.mod-btn_normal .ui-button-text{ color: #05ae76;} + + + +.box-prompt{ background: #E2EAEF; + border: 1px solid #ceded9; + border-bottom: 1px solid #beccc7; +} + +.weather-more_wrap { + /*background: #0c815a; + border-top: 1px solid #0a6f4e; + border-bottom: 1px solid #0a6f4e;*/ +} +.weather-days { + border: 1px solid #0070D8; + border-bottom: 0 none; + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(16,135,245)),color-stop(1, rgb(3,118,225))); +background-image:-webkit-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +background-image:-o-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +background-image:-ms-linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +background-image:linear-gradient(-90deg,rgb(16,135,245) 0%,rgb(3,118,225) 100%); +} +.weather-days_click { + border: 1px solid #0069CA; + border-bottom: 0 none; +} +.weather-days:hover { + background: #0070D8; +} +.weather-days_click p{ background-position: 50% -552px;} +.userbar-btn a { + background-position: 0 -84px; + background-repeat: repeat-x; + color: #0069CA; + border: 1px solid #0070D8; +} + +.weather-more_wrap{ background: #0070D8;} +.weather-more_show { height: auto; border-top: 1px solid #0069CA;} +.weather-more_line{border-bottom: 1px solid #0069CA;} +.weather-more_odd{ background: #0069CA;} +.box-search_tab a.cur { color:#0069CA;} +.hotsite_b{ border: 1px solid #DFE4E6;} + +.hotsite-custom{ border-color: #D9E8FF;} +.sortsite dt a, +.charts_menu a:hover, +.charts_menu .cur, +.charts_menu .cur:hover, +.charts-imgitem a:hover, +.toolbar-v .charts_menu a:hover, +.charts_more{ color: #1188F7;} +.mod-btn_cancel .ui-button-text{ color: #e25856;} + +.i-toolbar{ background: url(../img/i-news_item.png) no-repeat -16px -150px;} +.i-toolbar-0, +.i-toolbar-1, +.i-toolbar-2{ background-position: 0 -150px;} +.toolbar-v dd em{ color: #047AE3;} + +.box-bot .t a:hover{ color: #1188F7;} + +.cur .i-hotsite, .hotsite-tabs_btn:hover .i-hotsite { + background: url(../img/i-news_item.png) no-repeat 0 -360px; +} +.cur .i-history, .hotsite-tabs_btn:hover .i-history { + background: url(../img/i-news_item.png) no-repeat 0 -376px; +} +.hotsite-tabs_btn:hover {color: #1188f7;} +.hotsite-tabs .cur {color: #1188f7;border-bottom: 2px solid #1188f7;} +.hist-block {background: #1188f7;} +.hotsite-hist_bg {background: url(../img/i-news_item.png) no-repeat 0 -390px; color: #1188f7;} +.hist-icon {background: url(../img/i-news_item.png) no-repeat 0 -462px;} + +.settings-btn { + border: 1px solid #1185f2; + background: url(../img/bg.png) no-repeat 3px -1137px #1185f2; +} +.settings-btn_open { + border: 1px solid #d4e0eb; + border-bottom: 0 none; + background: url(../img/bg.png) no-repeat 3px -1154px #eef3f8; +} +.settings-dropdown { + border: 1px solid #d4e0eb; + background-color: #eef3f8; +} +.select_theme { + border-top: 1px solid #d4e0eb; +} +.settings-site .cur { + color: #1188f7; +} +.settings-site a:hover { + background-color: #d6e2ef; +} + +.news-tab li.nav-item-current{color: #1188f7;} +.playlist .arrow_r{color:#1188f7;} +.playlist .arrow_r_disabled{color:#DEDEDE;} +div#current_indicator{border-bottom:3px solid #1188f7;} +.playlist-tab li.cur{color:#1188f7;} +ul.playlist-tab .hover{color:#1188f7;} +.playlist-body .cur .playlist-song, .playlist-body .cur_pause .playlist-song {color:#1188f7;} +.news-item a:hover .title, .news-item_dbline a:hover .desc {color:#1188f7;text-decoration: underline;} +.news-tab .ui-nav .arrow-prev, .news-tab .ui-nav .arrow-next{background-image: url(../img/i-news-icon-blue.png);} +.news-tab .ui-nav .arrow-prev{background-position: -22px -1px;background-repeat:no-repeat;} +.news-tab .ui-nav .arrow-next{background-position: -36px -1px;background-repeat:no-repeat;} +.news-tab .ui-nav .prev-hover span.arrow-prev{background-position: -4px -1px;} +.news-tab .ui-nav .next-hover span.arrow-next{background-position: -54px -1px;} +.playing{background: url(../img/icon_playing.gif) no-repeat scroll 0 0 transparent;} +.user_controller {background: url(../img/icon_player.png) no-repeat scroll 0 0 transparent;} +.player-controller i{background-image: url(../img/icon_player.png);} +.playlist-body .cur .playlist-order{background-image: url(../img/icon_player.png);} +.playlist-body .cur_pause .playlist-order{background-image: url(../img/icon_player.png);} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/bg.png new file mode 100755 index 000000000..3dd8d91ff Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/blue-current.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/blue-current.png new file mode 100755 index 000000000..9e40ecdbe Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/blue-current.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/blue-not-current.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/blue-not-current.png new file mode 100755 index 000000000..230a39709 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/blue-not-current.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/i-news-icon-blue.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/i-news-icon-blue.png new file mode 100755 index 000000000..ae25cd238 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/i-news-icon-blue.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/i-news_item.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/i-news_item.png new file mode 100755 index 000000000..b90f1a05e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/i-news_item.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/icon_player.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/icon_player.png new file mode 100755 index 000000000..c8675f656 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/icon_player.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/icon_playing.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/icon_playing.gif new file mode 100755 index 000000000..cc23b09ab Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/icon_playing.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/logo_new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/logo_new.png new file mode 100755 index 000000000..778270cd2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/logo_new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/theme_bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/theme_bg.png new file mode 100755 index 000000000..1ee9a5efc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/2/img/theme_bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/css/index.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/css/index.css new file mode 100755 index 000000000..5b349315b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/css/index.css @@ -0,0 +1,315 @@ +body .site-switch_container{ position: absolute; top: 28px; left: 140px; z-index: 99;} +body .site-switch{ position: static;} +/*.userbar{ position: relative;}*/ + + + +body .mod-joke .joke_refresh { + background: url(/static/web/common/img/i-news_item.png?m6a55ad5ce7bd83c9ee12482edb38d563=1) 0 -168px no-repeat; +} + +body .userbar-btn i, +body .custom_item .btn, +body .hotsite-custom_list .add-btn, +body .custom_item .sprite-del_normal, +body .custom_item .sprite-modify_normal, +body .site-switch a, +body .weather-days_click p, +body .userbar-weather_city-cur a, +body .bar-addfav_icon, +body .bar-addfav_btn, +body .userbar-btn a{ background: url("../img/bg.png") 0 0 no-repeat;} + +/*.select_theme, +.select_theme_hover{ background: #EDF0EF url("../img/theme_bg.png") 0 0 no-repeat;}*/ + +body .hotsite-custom_bar a, +body .hotsite-custom_bar a:hover, +body .hotsite-custom .bar_open a, +body .hotsite-custom .bar_open a:hover, +body .hotsite-custom_list .add-btn, +body .news-item_txt, +body .news-btn_type i, +/*.news-label_type,*/ +body .charts-order, +body .mod-joke .joke_refresh, +body .scroll-arrow, +body .top-arrow, +body .bottom-arrow, +body .hotsite-custom_list .add-btn-ico{ background: url("../img/i-news_item.png") no-repeat 0 0;} + +body .news-item_txt{ background-position: 13px 10px;} +body .news-btn_type i{ background-position: -12px -96px;} +/*.news-label_type{ background-color: #fff; background-position: 10px -40px;}*/ +body .charts-order{ background-position: 0 -150px;} +body .mod-joke .joke_refresh{ background-position:0 -168px;} +body .scroll-arrow{ background-position: 0 0;} + +body .news-btn_type:hover{ border-color: #FFB2BF;} +body .mod-joke .joke_content:hover{ color: #FF617B;} +body .bar-addfav_icon {background-position: 0 -1068px;} + +body #indexLogo{ + float: left; width: 130px; height: 50px; + background: url(../img/logo_new.png); + _background: url(/static/web/tw/img/logo_new.png); +} +body #indexLogoImg{display: none;} + +body .custom_item .sprite-del_normal{ background-position: 0 -639px;} +body .custom_item .sprite-modify_normal{ background-position: -1px -931px;} +body .hotsite-custom_bar a{ background-position: -1px -234px;} +body .hotsite-custom_bar a:hover{ background-position: -1px -254px;} +body .hotsite-custom .bar_open a{ background-position: -1px -296px;} +body .hotsite-custom .bar_open a:hover{ background-position: -1px -317px;} +body .hotsite-custom_list .add-btn{ background-position: 0 -685px; background-repeat: repeat-x; border:1px solid; border-color:#ebebeb #ebebeb #d9dcde #ebebeb; color:#909191;} + +body .bar-addfav_btn{ background-position: 0 -1008px; background-repeat: repeat-x; + border-color: #EAB8C1; +} + +body .bar-addfav_btn:hover{ + background-position: 0 -1028px; border-color: #EC8294; +} + +body .site-switch a{ background-position: right -432px;} +body .hotsite-custom_list .add-btn-ico{ background-position: -12px -99px;} +body .bar-addfav_title, body .bar-addfav_text{ color: #EC8294;} +body .select_theme_hover{ background-position: 0 -31px;} + +body .charts-song:hover, body .charts-singer:hover { color: #FE6F7B;} + +body .sortsite dt .arrow_r{ border-left-color: #FFB2BF;} +body .charts_more .arrow_r{ color: #FF617B;} +body .ui-tip .arrow{border-top-color: #FFB2BF;} +body .ui-tip{ border-color: #FFB2BF;} +body .bar-addfav{ border-bottom: 1px solid #EC8294;} +body .top-arrow { background-position: -15px -114px;} +body .bottom-arrow{background-position: -15px -131px;} +body .userbar-wrap { + background: #F98FA0; + border-bottom: 1px solid #FB91A2; + _border-bottom: 0 none; + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(255,148,166)),color-stop(1, rgb(235,129,147))); + background-image:-webkit-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-o-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff94a6,endColorstr=#ffeb8193,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff94a6,endColorstr=#ffeb8193,GradientType=0);*/ +} + +body .site-switch, +body .weather-days{ + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(255,148,166)),color-stop(1, rgb(235,129,147))); + background-image:-webkit-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-o-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff94a6,endColorstr=#ffeb8193,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff94a6,endColorstr=#ffeb8193,GradientType=0);*/ + + border: 1px solid #E76F83; +} + +body .site-switch_hover, +body .weather-days:hover{ + background: #E76F83; +} + +body .site-switch_content { + border: 1px solid #fefefe; + background: #EEE5E6; +} + +body .site-switch_content a{ background-image: none;} + +body .site-switch_container{ border: 1px solid #eee;} +body .site-switch_container a { + color: #333; +} +body .site-switch_container a:hover { + background-color: #EFC6CD; +} + +body .ui-button .ui-button-text, +body .mod-btn_normal .ui-button-text{ color: #05ae76;} + +/*?*/ +body .box-prompt{ background: #FDF0F2; + border: 1px solid #ceded9; + border-bottom: 1px solid #beccc7; +} + +body .weather-more_wrap { + /*background: #0c815a; + border-top: 1px solid #0a6f4e; + border-bottom: 1px solid #0a6f4e;*/ +} +body .weather-days { + border-bottom: 0 none; +} + +body .weather-days_click { + border: 1px solid #F88D9F; + border-bottom: 0 none; +} +body .weather-days_click p{ background-position: 50% -552px;} +body .userbar-btn a { + background-position: 0 -84px; + background-repeat: repeat-x; + color: #FF617B; + border: 1px solid #DF6A7E; + border-bottom-color: #BE485C; +} +body .userbar-btn i{ + background-image: url("../img/bg.png") !important; +} +body .userbar-btn .userbar-sethome { + background-position: 0 0; +} +body .userbar-btn .userbar-addfav { + background-position: 0 -18px; +} +body .userbar-btn .userbar-down { + background-position: 0 -38px; +} +body .userbar-btn .userbar-btn_click .userbar-sethome { + background-position: 0 -710px; +} +body .userbar-btn .userbar-btn_click .userbar-addfav { + background-position: 0 -729px; +} +body .userbar-btn .userbar-btn_click .userbar-down { + background-position: 0 -748px; +} +body .userbar-weather_city-cur a{ background-position: right -431px;} + +body .weather-more_wrap{ background: #DF6A7E;} +body .weather-more_show { height: auto; border-top: 1px solid #DF6A7E;} +body .weather-more_line{border-bottom: 1px solid #FB91A2;} +body .weather-more_odd{ background: #CC4C62;} +body .box-search_tab a.cur { color:#FF617B;} +body .hotsite_b{ border: 1px solid #D7DDDE;} + +body .hotsite-custom{ border-color: #FFD9DF;} +body .sortsite dt a, +body .charts_menu a:hover, +body .charts_menu .cur, +body .charts_menu .cur:hover, +body .charts-imgitem a:hover, +body .toolbar-v .charts_menu a:hover, +body .charts_more{ color: #FF617B;} + +body .mod-btn_cancel .ui-button-text{ color: #e25856;} +body .i-toolbar{ background: url(../img/i-news_item.png) no-repeat -16px -150px;} +body .i-toolbar-0, +body .i-toolbar-1, +body .i-toolbar-2{ background-position: 0 -150px;} + +body .toolbar-v dd em{ color: #FB568B;} + +body .cur .i-hotsite, body .hotsite-tabs_btn:hover .i-hotsite { + background: url(../img/i-news_item.png) no-repeat 0 -360px; +} +body .cur .i-history, body .hotsite-tabs_btn:hover .i-history { + background: url(../img/i-news_item.png) no-repeat 0 -376px; +} +body .hotsite-tabs_btn:hover {color: #ff617b;} +body .hotsite-tabs .cur {color: #ff617b;border-bottom: 2px solid #ff617b;} +body .hist-block {background: #ff617b;} +body .hotsite-hist_bg {color: #ff617b;} +body .hotsite-hist_bg i{ + background: url(../img/i-news_item.png) no-repeat 0 -390px; +} +body .hist-icon {background: url(../img/i-news_item.png) no-repeat 0 -462px;} + +body .settings-btn { + border: 1px solid #fd92a4; + background: url(../img/bg.png) no-repeat 3px -1137px #fd92a4; +} +body .settings-btn_open { + border: 1px solid #ecdfe1; + border-bottom: 0 none; + background: url(../img/bg.png) no-repeat 3px -1154px #fcf6f7; +} +body .settings-dropdown { + border: 1px solid #ecdfe1; + background-color: #fcf6f7; +} +body .select_theme { + border-top: 1px solid #ecdfe1; +} +body .settings-site .cur { + color: #ff617b; +} +body .settings-site a:hover { + background-color: #f7e3e6; +} +body .box-bot .t a:hover{ color: #FF617B;} + +body .news-tab li.nav-item-current{color: #FF617B;} +body .playlist .arrow_r{color:#FF617B;} +body .playlist .arrow_r_disabled{color:#DEDEDE;} +body #current_indicator{border-bottom:3px solid #FF617B;} +body .playlist-tab li.cur{color:#FF617B;} +body ul.playlist-tab .hover{color:#FF617B;} +body .playlist-body .cur .playlist-song, body .playlist-body .cur_pause .playlist-song {color:#FF617B;} +body .news-item a:hover .title, body .news-item_dbline a:hover .desc {color:#FF617B;text-decoration: underline;} +body .news-tab .ui-nav .arrow-prev, body .news-tab .ui-nav .arrow-next{background-image: url(../img/i-news-icon-pink.png) !important;} +body .news-tab .ui-nav .arrow-prev{background-position: -22px -1px;background-repeat:no-repeat;} +body .news-tab .ui-nav .arrow-next{background-position: -36px -1px;background-repeat:no-repeat;} +body .news-tab .ui-nav .prev-hover span.arrow-prev{background-position: -4px -1px;} +body .news-tab .ui-nav .next-hover span.arrow-next{background-position: -54px -1px;} +body .playing{background: url(../img/icon_playing.gif) no-repeat scroll 0 0 transparent;} +body .user_controller {background: url(../img/icon_player.png) no-repeat scroll 0 0 transparent;} +body .player-controller i{background-image: url(../img/icon_player.png);} +body .playlist-body .cur .playlist-order{background-image: url(../img/icon_player.png);} +body .playlist-body .cur_pause .playlist-order{background-image: url(../img/icon_player.png);} + +body .mod-login{border-color: #e76f83;} +body .userbar-btn a{background:#fa8ea0;color:white;} +body .userbar-btn i{background-image:url(../img/bg.png);} +body .dot_img{background:url(../img/bg.png) 0 -1244px no-repeat;} +body .dot_img_head{background:url(../img/bg.png) -9px -1244px no-repeat;} + +body .cur .i-notepad, body .hotsite-tabs_btn:hover .i-notepad { + background: url(../img/i-news_item.png) no-repeat 0 -489px; +} +body .close .i-notepad, body .cur:hover .i-notepad { + background: url(../img/i-news_item.png) no-repeat 0 -507px; +} +body .dot_img_head{background:url(../img/bg.png) -9px -1244px no-repeat;} + +body .hsrch_word a:hover{color:#FF617B;} + +body .news-slide .nav-item a:hover .title { +color: #FF617B; +text-decoration: underline; +} +body .charts-order { + background-position: 0 -150px; +} +body i.charts-order_grey{ + background-position: -15px -150px; +} +body .mod-side .news-tab li.nav-item-current{color: #FF617B;} + +/****** 皮肤盒子 ******/ +body .skinbox-more-wrap{background: #df6a7e;border-top-color: #df6a7e;border-bottom-color:#fb91a2; } +body .skinbox-normal-wrap .switch-item{border-color: #df6a7e;} +body .skinbox-more-hide .ico-skinbox-triangle{border-bottom-color: #df6a7e;} +body .skinbox-normal-wrap .prev, body .skinbox-normal-wrap .next{background: #ce4a60;color: #e7a5b0;} +body .skinbox-item{border-color: #b75566;} +body .skinbox-item-selected, body .skinbox-item:hover{border-color: #f0b4be;} +body .skinbox-normal-wrap .switch-item{background: url("../img/pink-not-current.png?__sprite") no-repeat;} +body .skinbox-normal-wrap .switch-item-current{background: url("../img/pink-current.png?__sprite") no-repeat;} +body .skinbox-item-selected .ico-skinbox-selected{background-color: #f28597;} + +/****** 消息盒子 ******/ +body .wrap-message-content li{border-bottom-color:#ecdfe1;} +body .wrap-message-content{background-color: #FCF6F7;} +body .wrap-message-content li:hover{background-color: #FCE7EA} +body .message-target:hover span{color: #ff617b;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/css/index_dev.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/css/index_dev.css new file mode 100755 index 000000000..3d6b696cf --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/css/index_dev.css @@ -0,0 +1,247 @@ +.site-switch_container{ position: absolute; top: 28px; left: 140px; z-index: 99;} +.site-switch{ position: static;} +/*.userbar{ position: relative;}*/ + + + +.mod-joke .joke_refresh { + background: url(/static/web/common/img/i-news_item.png?m6a55ad5ce7bd83c9ee12482edb38d563=1) 0 -168px no-repeat; +} + +.userbar-btn i, +.custom_item .btn, +.hotsite-custom_list .add-btn, +.custom_item .sprite-del_normal, +.custom_item .sprite-modify_normal, +.site-switch a, +.weather-days_click p, +.userbar-weather_city-cur a, +.bar-addfav_icon, +.bar-addfav_btn, +.userbar-btn a{ background: url("../img/bg.png") 0 0 no-repeat;} + +/*.select_theme, +.select_theme_hover{ background: #EDF0EF url("../img/theme_bg.png") 0 0 no-repeat;}*/ + +.hotsite-custom_bar a, +.hotsite-custom_bar a:hover, +.hotsite-custom .bar_open a, +.hotsite-custom .bar_open a:hover, +.hotsite-custom_list .add-btn, +.news-item_txt, +.news-btn_type i, +/*.news-label_type,*/ +.charts-order, +.mod-joke .joke_refresh, +.scroll-arrow, +.top-arrow, +.bottom-arrow, +.hotsite-custom_list .add-btn-ico{ background: url("../img/i-news_item.png") no-repeat 0 0;} + +.news-item_txt{ background-position: 13px 10px;} +.news-btn_type i{ background-position: -12px -96px;} +/*.news-label_type{ background-color: #fff; background-position: 10px -40px;}*/ +.charts-order{ background-position: 0 -150px;} +.mod-joke .joke_refresh{ background-position:0 -168px;} +.scroll-arrow{ background-position: 0 0;} + +.news-btn_type:hover{ border-color: #FFB2BF;} +.mod-joke .joke_content:hover{ color: #FF617B;} +.bar-addfav_icon {background-position: 0 -1068px;} + +#indexLogo{ + float: left; width: 130px; height: 50px; + background: url(../img/logo_new.png); + _background: url(/static/web/tw/img/logo_new.png); +} +#indexLogoImg{display: none;} + +.custom_item .sprite-del_normal{ background-position: 0 -639px;} +.custom_item .sprite-modify_normal{ background-position: -1px -931px;} +.hotsite-custom_bar a{ background-position: -1px -234px;} +.hotsite-custom_bar a:hover{ background-position: -1px -254px;} +.hotsite-custom .bar_open a{ background-position: -1px -296px;} +.hotsite-custom .bar_open a:hover{ background-position: -1px -317px;} +.hotsite-custom_list .add-btn{ background-position: 0 -685px; background-repeat: repeat-x; border:1px solid; border-color:#ebebeb #ebebeb #d9dcde #ebebeb; color:#909191;} + +.bar-addfav_btn{ background-position: 0 -1008px; background-repeat: repeat-x; + border-color: #EAB8C1; +} + +.bar-addfav_btn:hover{ + background-position: 0 -1028px; border-color: #EC8294; +} + +.site-switch a{ background-position: right -432px;} +.hotsite-custom_list .add-btn-ico{ background-position: -12px -96px;} +.bar-addfav_title, .bar-addfav_text{ color: #EC8294;} +.select_theme_hover{ background-position: 0 -31px;} + +.charts-song:hover, .charts-singer:hover { color: #FE6F7B;} + +.sortsite dt .arrow_r{ border-left-color: #FFB2BF;} +.charts_more .arrow_r{ color: #FF617B;} +.ui-tip .arrow{border-top-color: #FFB2BF;} +.ui-tip{ border-color: #FFB2BF;} +.bar-addfav{ border-bottom: 1px solid #EC8294;} +.top-arrow { background-position: -15px -114px;} +.bottom-arrow{background-position: -15px -131px;} +.userbar-wrap { + background: #F98FA0; + border-bottom: 1px solid #FB91A2; + _border-bottom: 0 none; + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(255,148,166)),color-stop(1, rgb(235,129,147))); + background-image:-webkit-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-o-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff94a6,endColorstr=#ffeb8193,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff94a6,endColorstr=#ffeb8193,GradientType=0); +} + +.box-bot .t a:hover{ color: #FF617B;} +.site-switch, +.weather-days{ + background-image:-moz-linear-gradient(50% 0% -90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-webkit-gradient(linear,50% 0%,50% 100%,color-stop(0, rgb(255,148,166)),color-stop(1, rgb(235,129,147))); + background-image:-webkit-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-o-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:-ms-linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + background-image:linear-gradient(-90deg,rgb(255,148,166) 0%,rgb(235,129,147) 100%); + -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff94a6,endColorstr=#ffeb8193,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff94a6,endColorstr=#ffeb8193,GradientType=0); + + border: 1px solid #E76F83; +} + +.site-switch_hover, +.weather-days:hover{ + background: #E76F83; +} + +.site-switch_content { + border: 1px solid #fefefe; + background: #EEE5E6; +} + +.site-switch_content a{ background-image: none;} + +.site-switch_container{ border: 1px solid #eee;} +.site-switch_container a { + color: #333; +} +.site-switch_container a:hover { + background-color: #EFC6CD; +} + +.ui-button .ui-button-text, +.mod-btn_normal .ui-button-text{ color: #05ae76;} + +/*?*/ +.box-prompt{ background: #FDF0F2; + border: 1px solid #ceded9; + border-bottom: 1px solid #beccc7; +} + +.weather-more_wrap { + /*background: #0c815a; + border-top: 1px solid #0a6f4e; + border-bottom: 1px solid #0a6f4e;*/ +} +.weather-days { + border-bottom: 0 none; +} + +.weather-days_click { + border: 1px solid #F88D9F; + border-bottom: 0 none; +} +.weather-days_click p{ background-position: 50% -552px;} +.userbar-btn a { + background-position: 0 -84px; + background-repeat: repeat-x; + color: #FF617B; + border: 1px solid #DF6A7E; + border-bottom-color: #BE485C; +} + +.userbar-weather_city-cur a{ background-position: right -431px;} + +.weather-more_wrap{ background: #DF6A7E;} +.weather-more_show { height: auto; border-top: 1px solid #DF6A7E;} +.weather-more_line{border-bottom: 1px solid #FB91A2;} +.weather-more_odd{ background: #CC4C62;} +.box-search_tab a.cur { color:#FF617B;} +.hotsite_b{ border: 1px solid #D7DDDE;} + +.hotsite-custom{ border-color: #FFD9DF;} +.sortsite dt a, +.charts_menu a:hover, +.charts_menu .cur, +.charts_menu .cur:hover, +.charts-imgitem a:hover, +.toolbar-v .charts_menu a:hover, +.charts_more{ color: #FF617B;} + +.mod-btn_cancel .ui-button-text{ color: #e25856;} +.i-toolbar{ background: url(../img/i-news_item.png) no-repeat -16px -150px;} +.i-toolbar-0, +.i-toolbar-1, +.i-toolbar-2{ background-position: 0 -150px;} + +.toolbar-v dd em{ color: #FB568B;} + +.cur .i-hotsite, .hotsite-tabs_btn:hover .i-hotsite { + background: url(../img/i-news_item.png) no-repeat 0 -360px; +} +.cur .i-history, .hotsite-tabs_btn:hover .i-history { + background: url(../img/i-news_item.png) no-repeat 0 -376px; +} +.hotsite-tabs_btn:hover {color: #ff617b;} +.hotsite-tabs .cur {color: #ff617b;border-bottom: 2px solid #ff617b;} +.hist-block {background: #ff617b;} +.hotsite-hist_bg {background: url(../img/i-news_item.png) no-repeat 0 -390px; color: #ff617b;} +.hist-icon {background: url(../img/i-news_item.png) no-repeat 0 -462px;} + +.settings-btn { + border: 1px solid #fd92a4; + background: url(../img/bg.png) no-repeat 3px -1137px #fd92a4; +} +.settings-btn_open { + border: 1px solid #ecdfe1; + border-bottom: 0 none; + background: url(../img/bg.png) no-repeat 3px -1154px #fcf6f7; +} +.settings-dropdown { + border: 1px solid #ecdfe1; + background-color: #fcf6f7; +} +.select_theme { + border-top: 1px solid #ecdfe1; +} +.settings-site .cur { + color: #ff617b; +} +.settings-site a:hover { + background-color: #f7e3e6; +} + +.news-tab li.nav-item-current{color: #FF617B;} +.playlist .arrow_r{color:#FF617B;} +.playlist .arrow_r_disabled{color:#DEDEDE;} +div#current_indicator{border-bottom:3px solid #FF617B;} +.playlist-tab li.cur{color:#FF617B;} +ul.playlist-tab .hover{color:#FF617B;} +.playlist-body .cur .playlist-song, .playlist-body .cur_pause .playlist-song {color:#FF617B;} +.news-item a:hover .title, .news-item_dbline a:hover .desc {color:#FF617B;text-decoration: underline;} +.news-tab .ui-nav .arrow-prev, .news-tab .ui-nav .arrow-next{background-image: url(../img/i-news-icon-pink.png);} +.news-tab .ui-nav .arrow-prev{background-position: -22px -1px;background-repeat:no-repeat;} +.news-tab .ui-nav .arrow-next{background-position: -36px -1px;background-repeat:no-repeat;} +.news-tab .ui-nav .prev-hover span.arrow-prev{background-position: -4px -1px;} +.news-tab .ui-nav .next-hover span.arrow-next{background-position: -54px -1px;} +.playing{background: url(../img/icon_playing.gif) no-repeat scroll 0 0 transparent;} +.user_controller {background: url(../img/icon_player.png) no-repeat scroll 0 0 transparent;} +.player-controller i{background-image: url(../img/icon_player.png);} +.playlist-body .cur .playlist-order{background-image: url(../img/icon_player.png);} +.playlist-body .cur_pause .playlist-order{background-image: url(../img/icon_player.png);} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/bg.png new file mode 100755 index 000000000..32926be17 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/i-news-icon-pink.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/i-news-icon-pink.png new file mode 100755 index 000000000..ead87a286 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/i-news-icon-pink.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/i-news_item.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/i-news_item.png new file mode 100755 index 000000000..267a8f327 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/i-news_item.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/icon_player.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/icon_player.png new file mode 100755 index 000000000..43c8fdc9f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/icon_player.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/icon_playing.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/icon_playing.gif new file mode 100755 index 000000000..0c63f08ba Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/icon_playing.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/logo_new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/logo_new.png new file mode 100755 index 000000000..778270cd2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/logo_new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/theme_bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/theme_bg.png new file mode 100755 index 000000000..43e3ad6ca Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme/3/img/theme_bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme_bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme_bg.png new file mode 100755 index 000000000..ec1192605 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/theme/theme_bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/addfav-small.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/addfav-small.png new file mode 100755 index 000000000..b7f868e5b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/addfav-small.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/addfav.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/addfav.png new file mode 100755 index 000000000..0475ba20e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/addfav.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/down-small.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/down-small.png new file mode 100755 index 000000000..156731f4f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/down-small.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/down.png new file mode 100755 index 000000000..7d5fff021 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/setHome-small.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/setHome-small.png new file mode 100755 index 000000000..c5f654f67 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/setHome-small.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/setHome.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/setHome.png new file mode 100755 index 000000000..4bc1de01e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/img/setHome.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/ltr-s/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/ltr-s/ltr.css new file mode 100755 index 000000000..67a9a99c5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/ltr-s/ltr.css @@ -0,0 +1,5 @@ +.userbar-btn-hd .userbar_split { + float: left; + visibility: hidden; +} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/ltr-s/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/ltr-s/ltr.more.css new file mode 100755 index 000000000..caf1a5547 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/ltr-s/ltr.more.css @@ -0,0 +1,149 @@ +.userbar-btn-hd { + float: right; + position: relative; + max-width: 170px; +} +.userbar-btn-hd_item { + float: left; + position: relative; +} +.userbar-btn-hd_item .userbar-btn-hd_item-anchor { + display: block; + padding: 0 10px; + height: 50px; + line-height: 48px; + white-space: nowrap; + text-align: center; + overflow: hidden; + color: #ffffff; + /*color: rgba(255, 255, 255, 0.5);*/ + max-width: 100px; +} +.userbar-btn-hd_item i { + margin: 0 auto; + display: inline-block; + width: 20px; + height: 20px; + vertical-align: middle; +} +.userbar-btn-hd_item-tips { + position: absolute; + left: -50px; + top: 46px; + display: none; +} +.userbar-btn-hd_item-tips p { + color: #676767; + background-color: #F2F2F2; + border: 1px solid #C7C0C0; + height: 18px; + width: 140px; + white-space: nowrap; + overflow: hidden; + text-align: center; + line-height: 20px; + cursor: pointer; + border-radius: 3px; + font-size: 12px; +} +.userbar-btn-hd_item-tips #shortCutBot a { + display: block; + height: 18px; + width: 140px; + white-space: nowrap; + overflow: hidden; + color: #676767; + text-align: center; + line-height: 20px; + font-size: 12px; +} +.userbar-btn-hd_item-arrow, .userbar-btn-hd_item-arrow-bg { + position: absolute; + height: 0; + width: 0; + border: 6px dashed transparent; + pointer-events: none; +} +.userbar-btn-hd_item-arrow { + border-bottom-color: #C7C0C0; + border-bottom-style: solid; + top: -11px; + right: 46%; +} +.userbar-btn-hd_item-arrow-bg { + border-bottom-color: #F2F2F2; + border-bottom-style: solid; + margin: -6px 0 0 -7px; +} +.userbar-btn-hd-addfav { + background: url(../img/addfav.png?__sprite) no-repeat; +} +.userbar-btn-hd-down { + background: url(../img/down.png?__sprite) no-repeat; +} +.userbar-btn-hd-sethome { + background: url(../img/setHome.png?__sprite) no-repeat; +} + + +.header-fixed .userbar-btn-hd_item i { + width: 14px; + height: 14px; +} +.header-fixed .userbar-btn-hd_item .userbar-btn-hd_item-anchor { + height: 30px; + line-height: 28px; +} +.header-fixed .userbar-btn-hd_item-tips { + top: 30px; + left: -52px; +} +.header-fixed-up .userbar-btn-hd_item .userbar-btn-hd_item-anchor { + height: 40px; + line-height: 38px; +} +.header-fixed-up .userbar-btn-hd_item-tips { + top: 40px; +} +.header-fixed .userbar-btn-hd-addfav { + background: url(../img/addfav-small.png?__sprite) no-repeat; +} +.header-fixed .userbar-btn-hd-down { + background: url(../img/down-small.png?__sprite) no-repeat; +} +.header-fixed .userbar-btn-hd-sethome { + background: url(../img/setHome-small.png?__sprite) no-repeat; +} + +body .mod-ff-sethome0 { + z-index: 402; + right: -4px; + top: 46px; + padding-top: 8px; + width: 180px; +} +body .mod-ff-sethome0 .ui-bubble_in, body .mod-ff-sethome0 .ui-bubble_out { + left: auto; + right: 36px; +} +.mod-ff-sethome0 .ui-bubble_close { + position: absolute; + left: auto; + right: 0; + margin-right: 0; + margin-left: -10px; +} +.header-fixed .mod-ff-sethome0 { + right: -4px; + top: 28px; +} +.header-fixed .mod-ff-sethome0 .ui-bubble_in, .header-fixed .mod-ff-sethome0 .ui-bubble_out { + right: 32px; +} + +.header-fixed-up .userbar-btn-hd_item { + display: block !important; +} +.header-fixed-up .userbar-btn-hd .userbar_split { + display: inline !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/rtl-s/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/rtl-s/rtl.css new file mode 100755 index 000000000..7b62c0b19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/rtl-s/rtl.css @@ -0,0 +1,5 @@ +.userbar-btn-hd .userbar_split { + float: right; + visibility: hidden; +} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/rtl-s/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/rtl-s/rtl.more.css new file mode 100755 index 000000000..a2f73a909 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/rtl-s/rtl.more.css @@ -0,0 +1,144 @@ +.userbar-btn-hd { + float: left; + position: relative; + max-width: 170px; +} +.userbar-btn-hd_item { + float: right; + position: relative; +} +.userbar-btn-hd_item .userbar-btn-hd_item-anchor { + display: block; + padding: 0 10px; + height: 50px; + line-height: 48px; + white-space: nowrap; + text-align: center; + overflow: hidden; + color: #ffffff; + /*color: rgba(255, 255, 255, 0.5);*/ + max-width: 100px; +} +.userbar-btn-hd_item i { + margin: 0 auto; + display: inline-block; + width: 20px; + height: 20px; + vertical-align: middle; +} +.userbar-btn-hd_item-tips { + position: absolute; + right: -50px; + top: 46px; + display: none; +} +.userbar-btn-hd_item-tips p { + color: #676767; + background-color: #F2F2F2; + border: 1px solid #C7C0C0; + height: 18px; + width: 140px; + white-space: nowrap; + overflow: hidden; + text-align: center; + line-height: 20px; + cursor: pointer; + border-radius: 3px; + font-size: 12px; +} +.userbar-btn-hd_item-tips #shortCutBot a { + display: block; + height: 18px; + width: 140px; + white-space: nowrap; + overflow: hidden; + color: #676767; + text-align: center; + line-height: 20px; + font-size: 12px; +} +.userbar-btn-hd_item-arrow, .userbar-btn-hd_item-arrow-bg { + position: absolute; + height: 0; + width: 0; + border: 6px dashed transparent; + pointer-events: none; +} +.userbar-btn-hd_item-arrow { + border-bottom-color: #C7C0C0; + border-bottom-style: solid; + top: -11px; + left: 46%; +} +.userbar-btn-hd_item-arrow-bg { + border-bottom-color: #F2F2F2; + border-bottom-style: solid; + margin: -6px -7px 0 0; +} +.userbar-btn-hd-addfav { + background: url(../img/addfav.png?__sprite) no-repeat; +} +.userbar-btn-hd-down { + background: url(../img/down.png?__sprite) no-repeat; +} +.userbar-btn-hd-sethome { + background: url(../img/setHome.png?__sprite) no-repeat; +} + + +.header-fixed .userbar-btn-hd_item i { + width: 14px; + height: 14px; +} +.header-fixed .userbar-btn-hd_item .userbar-btn-hd_item-anchor { + height: 30px; + line-height: 28px; +} +.header-fixed .userbar-btn-hd_item-tips { + top: 30px; + right: -52px; +} +.header-fixed-up .userbar-btn-hd_item .userbar-btn-hd_item-anchor { + height: 40px; + line-height: 38px; +} +.header-fixed-up .userbar-btn-hd_item-tips { + top: 40px; +} +.header-fixed .userbar-btn-hd-addfav { + background: url(../img/addfav-small.png?__sprite) no-repeat; +} +.header-fixed .userbar-btn-hd-down { + background: url(../img/down-small.png?__sprite) no-repeat; +} +.header-fixed .userbar-btn-hd-sethome { + background: url(../img/setHome-small.png?__sprite) no-repeat; +} + +body .mod-ff-sethome0 { + z-index: 402; + left: -4px; + top: 46px; + padding-top: 8px; + width: 180px; +} +body .mod-ff-sethome0 .ui-bubble_in, body .mod-ff-sethome0 .ui-bubble_out { + left: 36px; +} +.mod-ff-sethome0 .ui-bubble_close { + position: absolute; +} +.header-fixed .mod-ff-sethome0 { + left: -4px; + top: 28px; +} +.header-fixed .mod-ff-sethome0 .ui-bubble_in, .header-fixed .mod-ff-sethome0 .ui-bubble_out { + left: 32px; +} + +.header-fixed-up .userbar-btn-hd_item { + display: block !important; +} +.header-fixed-up .userbar-btn-hd .userbar_split { + display: inline !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/userbar-btn-header-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/userbar-btn-header-async.js new file mode 100755 index 000000000..3eaeadc13 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/userbar-btn-header-async.js @@ -0,0 +1,159 @@ +/* +* User Bar Buttons +* html改为JS动态拼接 +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var helper = require("common:widget/ui/helper/helper.js"); +require("common:widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js"); +require("common:widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js"); + +var isFirefox = /firefox/.test(navigator.userAgent.toLowerCase()), + _conf = conf.userbarBtnHd, + _ffCon = conf.setHomeOnFf, + isShowFf = (isFirefox && _ffCon && (_ffCon.isHidden === "0") && (_conf.isSetHomeFf === "1")), + setFfHome = null, + isRended = false; + +// 火狐设首优化 +if (isShowFf) { + require.async("common:widget/ui/sethome-ff/sethome-ff-c.js", function(init) { + setFfHome = init; + _ffCon.num = 0; + }); +} + +_conf.browser.reverse(); + +var _browser = _conf.browser, + _addfav = _conf.addfav, + _download = _conf.download, + _sethome = _conf.sethome, + _browserData = _conf.browserData, + _itemTpl = '
                              #{content}

                              #{botContent}

                              |', + _itemMsg = { + addfav: { + 'display': (_browserData == 'addfav' ? ' style="display: none;"' : ''), + 'url': _addfav.url, + 'id': 'addFav', + 'retrn': ' onclick="return false;"', + 'content': _addfav.content || '', + 'botId': 'addFavBot', + 'botContent': _addfav.title + }, + download: { + 'display': (_browserData == 'download' ? ' style="display: none;"' : ''), + 'url': _download.url, + 'id': 'shortCut', + 'retrn': '', + 'content': _download.content || '', + 'botId': 'shortCutBot', + 'botContent': '' +_download.title +'' + }, + sethome: { + 'display': (_browserData == 'sethome' ? ' style="display: none;"' : ''), + 'url': _sethome.url, + 'id': 'setHome', + 'retrn': ' onclick="return false;"', + 'content': _sethome.content || '', + 'botId': 'setHomeBot', + 'botContent': _sethome.title + } + }, + _tplGroup = '', + curObj = null, + wrap = $("#userbarBtnHd"); + +for (var m = 0, n = _browser.length; m < n; m++) { + curObj = _browser[m]; + _tplGroup += helper.replaceTpl(_itemTpl, _itemMsg[curObj]); +} +wrap.html(_tplGroup); + +//userbar buttons +var userbarBtn = function () { + var bdy = $(document.body), + splt = wrap.find(".userbar_split"); + var tmpObj = wrap.find(".userbar-btn-hd_item").filter(function(index) { + return $(this).css("display") == "none"; + }); + + splt.last().remove(); + if(tmpObj.next(".userbar_split").length) { + tmpObj.next(".userbar_split").css("display", "none"); + } else { + tmpObj.prev(".userbar_split").css("display", "none"); + } + splt = wrap.find(".userbar_split"); + + wrap.on("click", ".userbar-btn-hd_item-anchor, .userbar-btn-hd_item-tips p", function(e) { + var curTarget = $(this), + curAttr = curTarget.attr("id").replace(/Bot/, ""); + + if (/addFav/i.test(curAttr)) { + curTarget.addfav(_addfav.error, window.location.href); + } else if (/setHome/i.test(curAttr)) { + if (isShowFf && setFfHome) { + if (isRended) { + + } else { + setFfHome.init(wrap, _ffCon); + isRended = true; + } + setFfHome.toggle({}); + e.stopPropagation(); + } else { + curTarget.sethome(); + } + } + if (curTarget.get(0).tagName === "A") { + UT.send({ + position: "sethp-btn", + sort: curAttr, + type: "click", + modId: "sethp-btn" + }); + } else { + UT.send({ + position: "sethp-btn", + ac: "b", + sort: curAttr, + type: "click", + modId: "sethp-btn" + }); + } + + }); + + $(".userbar-btn-hd_item", wrap).on("mouseenter", function() { + var obj = $(this); + obj.children(".userbar-btn-hd_item-tips").show(); + obj.children(".userbar-btn-hd_item-anchor").addClass('module-mask'); + if(bdy.hasClass("header-fixed-up")) { + obj.next(".userbar_split").css("visibility", "hidden"); + obj.prev(".userbar_split").css("visibility", "hidden"); + } else { + splt.css("visibility", "hidden"); + } + + }).on("mouseleave", function() { + var obj = $(this); + obj.children(".userbar-btn-hd_item-tips").hide(); + obj.children(".userbar-btn-hd_item-anchor").removeClass('module-mask'); + if(bdy.hasClass("header-fixed-up")) { + obj.next(".userbar_split").css("visibility", "visible"); + obj.prev(".userbar_split").css("visibility", "visible"); + } else { + splt.css("visibility", "visible"); + } + }); + + $(window).load(function() { + if (isShowFf && ($("#setHome", wrap).length > 0) && setFfHome && !isRended) { + setFfHome.init(wrap, _ffCon); + isRended = true; + } + }); +}; +module.exports = userbarBtn; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/userbar-btn-header.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/userbar-btn-header.tpl new file mode 100755 index 000000000..f49bba1aa --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-header/userbar-btn-header.tpl @@ -0,0 +1,54 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/userbar-btn-header/ltr-s/ltr.css?__inline'); +<%else%> +@import url('/widget/header/userbar-btn-header/rtl-s/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/userbar-btn-header/ltr-s/ltr.more.css"%> +<%else%> +<%require name="common:widget/header/userbar-btn-header/rtl-s/rtl.more.css"%> +<%/if%> + + <%if strpos($smarty.server["HTTP_USER_AGENT"], "MSIE")%> + <%assign var="browser" value=$body.userbarBtn.ie%> + <%assign var="browserData" value=$body.headerTest.userbarBtn.ie%> + <%elseif strpos($smarty.server["HTTP_USER_AGENT"], "Firefox")%> + <%assign var="browser" value=$body.userbarBtn.firefox%> + <%assign var="browserData" value=$body.headerTest.userbarBtn.firefox%> + <%else%> + <%assign var="browser" value=$body.userbarBtn.chrome%> + <%assign var="browserData" value=$body.headerTest.userbarBtn.chrome%> + <%/if%> +
                              +
                              + <%script%> + conf.userbarBtnHd = { + browser: <%json_encode($browser)%>, + browserData: '<%$browserData%>', + addfav: { + 'content': '<%$body.addFav.content%>', + 'title': '<%$body.addFav.title%>', + 'url': '<%$body.addFav.url%>', + 'error': '<%$body.addFav.error%>' + }, + download: { + 'content': '<%$body.download.content%>', + 'title': '<%$body.download.title%>', + 'url': '<%$body.download.url%>' + }, + sethome: { + 'content': '<%$body.setHome.content%>', + 'title': '<%$body.setHome.title%>', + 'url': '<%$body.setHome.url%>' + }, + isSetHomeFf: <%if $body.headerTest.userbarBtn.firefox === "sethome"%>'0'<%else%>'1'<%/if%> + }; + conf.setHomeOnFf ||(conf.setHomeOnFf = <%json_encode($body.setHomeOnFf)%>); + require.async(["common:widget/header/userbar-btn-header/userbar-btn-header-async.js"],function(userbarBtn){ + userbarBtn(); + }); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/addfav-1-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/addfav-1-hover.png new file mode 100755 index 000000000..85d993dd4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/addfav-1-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/addfav-1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/addfav-1.png new file mode 100755 index 000000000..117a2fc93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/addfav-1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/down-1-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/down-1-hover.png new file mode 100755 index 000000000..19d26bd9e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/down-1-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/down-1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/down-1.png new file mode 100755 index 000000000..a42e28d11 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/down-1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/setHome-1-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/setHome-1-hover.png new file mode 100755 index 000000000..279bf361f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/setHome-1-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/setHome-1.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/setHome-1.png new file mode 100755 index 000000000..e2f826ed4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/1/setHome-1.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/addfav-2-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/addfav-2-hover.png new file mode 100755 index 000000000..df9bef6be Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/addfav-2-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/addfav-2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/addfav-2.png new file mode 100755 index 000000000..396c944c8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/addfav-2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/down-2-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/down-2-hover.png new file mode 100755 index 000000000..c07c69111 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/down-2-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/down-2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/down-2.png new file mode 100755 index 000000000..c7775cf55 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/down-2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/setHome-2-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/setHome-2-hover.png new file mode 100755 index 000000000..90d342c86 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/setHome-2-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/setHome-2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/setHome-2.png new file mode 100755 index 000000000..30335fe55 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/2/setHome-2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/addfav-3-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/addfav-3-hover.png new file mode 100755 index 000000000..138671f50 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/addfav-3-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/addfav-3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/addfav-3.png new file mode 100755 index 000000000..8b47758e3 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/addfav-3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/down-3-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/down-3-hover.png new file mode 100755 index 000000000..a8cc3012c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/down-3-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/down-3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/down-3.png new file mode 100755 index 000000000..bff017a74 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/down-3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/setHome-3-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/setHome-3-hover.png new file mode 100755 index 000000000..560429c35 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/setHome-3-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/setHome-3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/setHome-3.png new file mode 100755 index 000000000..a73842a98 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/3/setHome-3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/addfav.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/addfav.png new file mode 100755 index 000000000..0475ba20e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/addfav.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/down.png new file mode 100755 index 000000000..7d5fff021 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/setHome.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/setHome.png new file mode 100755 index 000000000..4bc1de01e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/img/setHome.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/ltr-s/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/ltr-s/ltr.css new file mode 100755 index 000000000..6c87d82c2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/ltr-s/ltr.css @@ -0,0 +1,28 @@ +.userbar-btns{ visibility: hidden;display: none;} + +body .box-search_hsrch { + width: 582px; + margin-left: 168px; +} +body .box-search_tab { + margin-left: 170px; +} +body .box-search_form .radios label { + padding-left: 24px; +} +body .box-search { + margin-left: 22px; +} +body .sug-search, body .baidu_sug, body .baidu_video_sug { + width: 490px; +} +body .box-search .box-search_form .input input { + width: 480px; +} +body .box-search .box-search_form .input { + margin-left: 9px; +} +/* For 1020px layout */ +/* body.l-1020 .box-search{ + margin-left: 26px; +} */ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/ltr-s/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/ltr-s/ltr.more.css new file mode 100755 index 000000000..d100e47ad --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/ltr-s/ltr.more.css @@ -0,0 +1,127 @@ + +.userbar-btns { + height: 28px; + font-size: 12px; + color: #676767; + visibility: visible !important; + background-color: #F5F5F5; + border: 1px solid #D2D2D2; + width: 170px; + /*overflow: hidden;*/ +} +.userbar-btns a { + color: #676767; + float: left; + overflow: hidden; + width: 100%; + height: 100%; +} +.userbar-btns i { + display: block; + width: 20px; + height: 20px; + margin: 4px auto 0; +} +.userbar-btns .userbar-btns-content { + width: 140px; + height: 28px; + line-height: 28px; + float: right; + text-align: center; + white-space: nowrap; + overflow: hidden; + font-size: 13px; +} +.userbar-btns .userbar-btns-icon { + float: left; + width: 28px; + height: 28px; + text-align: center; + line-height: 28px; + border-right: 1px solid #D2D2D2; + background-color: #ECEDEC; +} +.userbar-btns .userbar-btns-icon:hover { + background-color: #F1F1F1; +} +.userbar-btns .userbar-btns-sethome { + background: url(../img/1/setHome-1.png?__sprite) no-repeat; +} +.userbar-btns .userbar-btns-addfav { + background: url(../img/1/addfav-1.png?__sprite) no-repeat; +} +.userbar-btns .userbar-btns-down { + background: url(../img/1/down-1.png?__sprite) no-repeat; +} +.userbar-btns-icon:hover .userbar-btns-sethome { + background: url(../img/1/setHome-1-hover.png?__sprite) no-repeat; +} +.userbar-btns-icon:hover .userbar-btns-addfav { + background: url(../img/1/addfav-1-hover.png?__sprite) no-repeat; +} +.userbar-btns-icon:hover .userbar-btns-down { + background: url(../img/1/down-1-hover.png?__sprite) no-repeat; +} +/* +.body-theme_2 .userbar-btns .userbar-btns-sethome { + background: url(../img/2/setHome-2.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns .userbar-btns-addfav { + background: url(../img/2/addfav-2.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns .userbar-btns-down { + background: url(../img/2/down-2.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns-icon:hover .userbar-btns-sethome { + background: url(../img/2/setHome-2-hover.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns-icon:hover .userbar-btns-addfav { + background: url(../img/2/addfav-2-hover.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns-icon:hover .userbar-btns-down { + background: url(../img/2/down-2-hover.png?__sprite) no-repeat; +} + +.body-theme_3 .userbar-btns .userbar-btns-sethome { + background: url(../img/3/setHome-3.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns .userbar-btns-addfav { + background: url(../img/3/addfav-3.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns .userbar-btns-down { + background: url(../img/3/down-3.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns-icon:hover .userbar-btns-sethome { + background: url(../img/3/setHome-3-hover.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns-icon:hover .userbar-btns-addfav { + background: url(../img/3/addfav-3-hover.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns-icon:hover .userbar-btns-down { + background: url(../img/3/down-3-hover.png?__sprite) no-repeat; +}*/ + +body .mod-ff-sethome1 { + z-index: 402; + right: -2px; + top: 30px; + padding-top: 8px; + width: 180px; +} +body .mod-ff-sethome1 .ui-bubble_in, body .mod-ff-sethome1 .ui-bubble_out { + left: auto; + right: 36px; +} +.mod-ff-sethome1 a { + float: none; + overflow: visible; + width: auto; + height: auto; +} +.mod-ff-sethome1 .ui-bubble_close { + position: absolute; + left: auto; + right: 0; + margin-right: 0; + margin-left: -10px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/rtl-s/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/rtl-s/rtl.css new file mode 100755 index 000000000..632f9acc8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/rtl-s/rtl.css @@ -0,0 +1,30 @@ +.userbar-btns{visibility: hidden;display: none;} + +body .box-search_hsrch { + width: 582px; + margin-right: 168px; +} +body .box-search_tab { + margin-right: 170px; +} +body .box-search_form .radios label { + padding-right: 24px; +} + +body .box-search { + margin-right: 22px; +} +body .sug-search, body .baidu_sug, body .baidu_video_sug { + width: 487px; + right: -1px; +} +body .baidu_sug, +body .baidu_video_sug { + right: 0; +} +body .box-search .box-search_form .input input { + width: 450px; +} +body .box-search .box-search_form .input { + margin-right: 9px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/rtl-s/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/rtl-s/rtl.more.css new file mode 100755 index 000000000..03ff3820a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/rtl-s/rtl.more.css @@ -0,0 +1,122 @@ + +.userbar-btns { + height: 28px; + font-size: 12px; + color: #676767; + visibility: visible !important; + background-color: #F5F5F5; + border: 1px solid #D2D2D2; + width: 170px; + /* overflow: hidden;*/ +} +.userbar-btns a { + color: #676767; + float: right; + overflow: hidden; + width: 100%; + height: 100%; +} +.userbar-btns i { + display: block; + width: 20px; + height: 20px; + margin: 4px auto 0; +} +.userbar-btns .userbar-btns-content { + width: 140px; + height: 28px; + line-height: 28px; + float: left; + text-align: center; + white-space: nowrap; + overflow: hidden; + font-size: 13px; +} +.userbar-btns .userbar-btns-icon { + float: right; + width: 28px; + height: 28px; + text-align: center; + line-height: 28px; + border-left: 1px solid #D2D2D2; + background-color: #ECEDEC; +} +.userbar-btns .userbar-btns-icon:hover { + background-color: #F1F1F1; +} +.userbar-btns .userbar-btns-sethome { + background: url(../img/1/setHome-1.png?__sprite) no-repeat; +} +.userbar-btns .userbar-btns-addfav { + background: url(../img/1/addfav-1.png?__sprite) no-repeat; +} +.userbar-btns .userbar-btns-down { + background: url(../img/1/down-1.png?__sprite) no-repeat; +} +.userbar-btns-icon:hover .userbar-btns-sethome { + background: url(../img/1/setHome-1-hover.png?__sprite) no-repeat; +} +.userbar-btns-icon:hover .userbar-btns-addfav { + background: url(../img/1/addfav-1-hover.png?__sprite) no-repeat; +} +.userbar-btns-icon:hover .userbar-btns-down { + background: url(../img/1/down-1-hover.png?__sprite) no-repeat; +} +/* +.body-theme_2 .userbar-btns .userbar-btns-sethome { + background: url(../img/2/setHome-2.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns .userbar-btns-addfav { + background: url(../img/2/addfav-2.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns .userbar-btns-down { + background: url(../img/2/down-2.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns-icon:hover .userbar-btns-sethome { + background: url(../img/2/setHome-2-hover.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns-icon:hover .userbar-btns-addfav { + background: url(../img/2/addfav-2-hover.png?__sprite) no-repeat; +} +.body-theme_2 .userbar-btns-icon:hover .userbar-btns-down { + background: url(../img/2/down-2-hover.png?__sprite) no-repeat; +} + +.body-theme_3 .userbar-btns .userbar-btns-sethome { + background: url(../img/3/setHome-3.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns .userbar-btns-addfav { + background: url(../img/3/addfav-3.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns .userbar-btns-down { + background: url(../img/3/down-3.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns-icon:hover .userbar-btns-sethome { + background: url(../img/3/setHome-3-hover.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns-icon:hover .userbar-btns-addfav { + background: url(../img/3/addfav-3-hover.png?__sprite) no-repeat; +} +.body-theme_3 .userbar-btns-icon:hover .userbar-btns-down { + background: url(../img/3/down-3-hover.png?__sprite) no-repeat; +}*/ + +body .mod-ff-sethome1 { + z-index: 402; + left: -2px; + top: 30px; + padding-top: 8px; + width: 180px; +} +body .mod-ff-sethome1 .ui-bubble_in, body .mod-ff-sethome1 .ui-bubble_out { + left: 36px; +} +.mod-ff-sethome1 .ui-bubble_close { + position: absolute; +} +.mod-ff-sethome1 a { + float: none; + overflow: visible; + width: auto; + height: auto; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/userbar-btn-test-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/userbar-btn-test-async.js new file mode 100755 index 000000000..357702582 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/userbar-btn-test-async.js @@ -0,0 +1,65 @@ +/* +* User Bar Buttons +* V2.1.0 +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"); +require("common:widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js"); +require("common:widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js"); + +var isFirefox = /firefox/.test(navigator.userAgent.toLowerCase()), + _FfCon = conf.setHomeOnFf, + isShowFf = (isFirefox && _FfCon && (_FfCon.isHidden === "0") && (conf.userbarBtn.isSetHomeFf === "1")), + setFfHome = null, + isRended = false; + +if (isShowFf) { + require.async("common:widget/ui/sethome-ff/sethome-ff-c.js", function(init) { + setFfHome = init; + _FfCon.num = 1; + }); +} + +//userbar buttons +var userbarBtn = function() { + var _conf = conf.userbarBtn, + wrap = $("#userbarBtn"), + curTarget, + curAttr; + + wrap.on("click", "a", function(e) { + curTarget = $(this); + curAttr = curTarget.attr("id"); + if (/addFav/i.test(curAttr)) { + curTarget.addfav(_conf.addFavText, window.location.href); + } else if (/setHome/i.test(curAttr)) { + if (isShowFf && setFfHome) { + if (isRended) { + + } else { + setFfHome.init(wrap, _FfCon); + isRended = true; + } + setFfHome.toggle({}); + e.stopPropagation(); + } else { + curTarget.sethome(); + } + } + + UT.send({ + position: "sethp-btn", + sort: curAttr.replace(/02/, ""), + type: "click", + modId: "sethp-btn" + }); + }); + + $(window).load(function() { + if (isShowFf && ($("#setHome02", wrap).length > 0) && setFfHome && !isRended) { + setFfHome.init(wrap, _FfCon); + isRended = true; + } + }); +}; +module.exports = userbarBtn; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/userbar-btn-test.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/userbar-btn-test.tpl new file mode 100755 index 000000000..1ea69762a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn-test/userbar-btn-test.tpl @@ -0,0 +1,59 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/userbar-btn-test/ltr-s/ltr.css?__inline'); +<%else%> +@import url('/widget/header/userbar-btn-test/rtl-s/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/header/userbar-btn-test/ltr-s/ltr.more.css"%> +<%else%> +<%require name="common:widget/header/userbar-btn-test/rtl-s/rtl.more.css"%> +<%/if%> + +<%if strpos($smarty.server["HTTP_USER_AGENT"], "MSIE")%> + <%assign var="browser" value=$body.headerTest.userbarBtn.ie%> +<%elseif strpos($smarty.server["HTTP_USER_AGENT"], "Firefox")%> + <%assign var="browser" value=$body.headerTest.userbarBtn.firefox%> +<%else%> + <%assign var="browser" value=$body.headerTest.userbarBtn.chrome%> +<%/if%> + +
                              + <%if $browser eq "addfav"%> + + + + + <%$body.addFav.title%> + + <%elseif $browser eq "download"%> + + + + + <%$body.download.title%> + + <%else%> + + + + + <%$body.setHome.title%> + + <%/if%> +
                              +<%script%> +conf.userbarBtn = { + <%if !empty($body.userbarBtn.maxSpanWidth)%>maxSpanWidth: '<%$body.userbarBtn.maxSpanWidth%>',<%/if%> + addFavText: '<%$body.addFav.error%>', + isSetHomeFf: <%if $body.headerTest.userbarBtn.firefox === "sethome"%>'1'<%else%>'0'<%/if%> +}; +conf.setHomeOnFf ||(conf.setHomeOnFf = <%json_encode($body.setHomeOnFf)%>); + +require.async(["common:widget/header/userbar-btn-test/userbar-btn-test-async.js"],function(init){ + init(); +}); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/bg-userbar.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/bg-userbar.png new file mode 100755 index 000000000..7f25ffbb4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/bg-userbar.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav-click.png new file mode 100755 index 000000000..3eac45ebb Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav-new.png new file mode 100755 index 000000000..ed612f2a0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav.png new file mode 100755 index 000000000..62e54753a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-addfav.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down-click.png new file mode 100755 index 000000000..6573344ba Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down-new.png new file mode 100755 index 000000000..d610ede3a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down.png new file mode 100755 index 000000000..fa37f379e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome-click.png new file mode 100755 index 000000000..d95ef43e7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome-new.png new file mode 100755 index 000000000..a43059eaa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome.png new file mode 100755 index 000000000..f7191306e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/img/i-sethome.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/ltr/ltr.css new file mode 100755 index 000000000..c084424ab --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/ltr/ltr.css @@ -0,0 +1,3 @@ +.userbar-btn{ visibility: hidden;} +.userbar-btn .userbar-btn-item { width: 9px;} +.userbar-btn i {width: 19px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/ltr/ltr.more.css new file mode 100755 index 000000000..bc41eba3b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/ltr/ltr.more.css @@ -0,0 +1,87 @@ +.userbar-btn { + float: right; + clear: both; + width: 220px; + font-size: 12px; + visibility: visible !important; + position: relative; + z-index: 2; +} +.userbar-btn .userbar-btn-item { + float: right; + margin-right: 1px; + background: #00ad73; + height: 18px; + line-height: 20px; + padding: 0 7px 0 2px; + color: #fff; + border: 1px solid #009e69; + text-decoration: none; + width: 9px; + overflow: hidden; + white-space: nowrap; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + transition: width .4s ease; + -webkit-transition: width .4s ease; + -moz-transition: width .4s ease; + cursor: pointer; +} +/*.userbar-btn a#setHome { + width: auto; +}*/ +body .userbar-btn .userbar-btn_click { + background-position: 0 -578px; +} +.userbar-btn i { + width: 19px; + height: 18px; + display: inline-block; + float: left; +} +.userbar-btn span { + display: inline-block; + line-height: 18px; + overflow: hidden; + *overflow: inherit; +} + +.userbar-btn .userbar-sethome { + background: url(../img/i-sethome-new.png?__sprite) no-repeat; +} +.userbar-btn .userbar-addfav { + background: url(../img/i-addfav-new.png?__sprite) no-repeat; +} +.userbar-btn .userbar-down { + background: url(../img/i-down-new.png?__sprite) no-repeat; +} +/*.userbar-btn .userbar-btn_click .userbar-sethome { + background: url(../img/i-sethome-click.png) no-repeat; +} +.userbar-btn .userbar-btn_click .userbar-addfav { + background: url(../img/i-addfav-click.png) no-repeat; +} +.userbar-btn .userbar-btn_click .userbar-down { + background: url(../img/i-down-click.png) no-repeat; +}*/ + +body .mod-ff-sethome2 { + z-index: 402; + right: 4px; + top: 24px; + padding-top: 8px; + width: 180px; +} +body .mod-ff-sethome2 .ui-bubble_in, body .mod-ff-sethome2 .ui-bubble_out { + left: auto; + right: 36px; +} +.mod-ff-sethome2 .ui-bubble_close { + position: absolute; + left: auto; + right: 0; + margin-right: 0; + margin-left: -10px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/rtl/rtl.css new file mode 100755 index 000000000..803071d55 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/rtl/rtl.css @@ -0,0 +1,3 @@ +.userbar-btn{visibility: hidden;} +.userbar-btn .userbar-btn-item { width: 9px;} +.userbar-btn i {width: 19px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/rtl/rtl.more.css new file mode 100755 index 000000000..76496506e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/rtl/rtl.more.css @@ -0,0 +1,89 @@ +.userbar-btn { + float: left; + clear: both; + width: 220px; + font-size: 12px; + visibility: visible !important; + position: relative; + z-index: 2; +} +.userbar-btn .userbar-btn-item { + float: left; + margin-right: 1px; + background: #00ad73; + height: 18px; + line-height: 20px; + padding: 0 2px 0 7px; + color: #fff; + border: 1px solid #009e69; + /*border-right: 1px solid #edf1f5\0;*/ + text-decoration: none; + width: 9px; + overflow: hidden; + white-space: nowrap; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + transition: width .4s ease; + -webkit-transition: width .4s ease; + -moz-transition: width .4s ease; + cursor: pointer; +} +/*.userbar-btn a#setHome { + width: auto; +}*/ +body .userbar-btn .userbar-btn_click { + background-position: 0 -578px; +} +.userbar-btn i { + width: 19px; + height: 18px; + display: inline-block; + +} +.userbar-btn span { + display: inline-block; + line-height: 18px; + vertical-align: top; + overflow: hidden; + *overflow: inherit; +} +.userbar-btn .userbar-sethome { + background-image:url(../img/i-sethome-new.png?__sprite); + background-repeat:no-repeat; + background-position: 5px 0; +} +.userbar-btn .userbar-addfav { + background-image:url(../img/i-addfav-new.png?__sprite); + background-repeat:no-repeat; + background-position: 5px 0; +} +.userbar-btn .userbar-down { + background-image:url(../img/i-down-new.png?__sprite); + background-repeat:no-repeat; + background-position: 5px 0; +} +/*.userbar-btn .userbar-btn_click .userbar-sethome { + background: url(../img/i-sethome-click.png) no-repeat; +} +.userbar-btn .userbar-btn_click .userbar-addfav { + background: url(../img/i-addfav-click.png) no-repeat; +} +.userbar-btn .userbar-btn_click .userbar-down { + background: url(../img/i-down-click.png) no-repeat; +}*/ + +body .mod-ff-sethome2 { + z-index: 402; + left: 4px; + top: 24px; + padding-top: 8px; + width: 180px; +} +body .mod-ff-sethome2 .ui-bubble_in, body .mod-ff-sethome2 .ui-bubble_out { + left: 36px; +} +.mod-ff-sethome2 .ui-bubble_close { + position: absolute; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/userbar-btn-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/userbar-btn-async.js new file mode 100755 index 000000000..9dcbcd6e7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/userbar-btn-async.js @@ -0,0 +1,105 @@ +/* +* User Bar Buttons +* V2.0.0 +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"); +require("common:widget/ui/jquery/widget/jquery.sethome/jquery.sethome.js"); +require("common:widget/ui/jquery/widget/jquery.addfav/jquery.addfav.js"); + +var isFirefox = /firefox/.test(navigator.userAgent.toLowerCase()), + _FfCon = conf.setHomeOnFf, + isShowFf = (isFirefox && _FfCon && (_FfCon.isHidden === "0")), + setFfHome = null, + isRended = false; + +if (isShowFf) { + require.async("common:widget/ui/sethome-ff/sethome-ff-c.js", function(init) { + setFfHome = init; + _FfCon.num = 2; + }); +} + +//userbar buttons +Gl.userbarBtn = function () { + var wrap = $("#userbarBtnOld"), + setHomeBtn = $("#setHome"), + addFavBtn = $("#addFav"), + buttons = wrap.children("a"), + _conf = conf.userbarBtn, + // cur = type === "index" ? $("#setHome") : $("#addFav"), + cur = buttons.eq(-1), + iconWidth = $("i", cur).width(), + + + // closeWidth = cur[0].clientWidth - $("span", cur)[0].offsetWidth - iconWidth, + closeWidth = buttons.eq(0).width(), + maxWidth = parseInt(conf.userbarBtn.maxSpanWidth) + iconWidth + 3,//normal width, add 3px to fix blank issue in IE6 + + matchTagName = function(el, tagName) { + el = el.parentNode.tagName === tagName ? el.parentNode : el; + return el.tagName === tagName ? el : null; + }, + + fold = function(el) { + if(!el || el.clientWidth - $("i", cur)[0].offsetWidth > closeWidth) return; + el = $(el); + cur.width(closeWidth); + //reset to normal width, add 3px to fix blank issue in IE6 + if(conf.userbarBtn.maxSpanWidth){ + el.width(maxWidth); + }else{ + el.width($("span", el)[0].offsetWidth + iconWidth + 3); + } + + cur = el; + }; + + buttons.on("mouseenter", function (e) { + fold(matchTagName(this, "A")); + }); + + buttons.on("mousedown", function () { + $(this).addClass("userbar-btn_click"); + }); + + buttons.on("mouseup", function () { + $(this).removeClass("userbar-btn_click"); + }); + + buttons.on("mouseout", function () { + $(this).removeClass("userbar-btn_click"); + }); + + setHomeBtn.on("click", function (e) { + if (isShowFf && setFfHome) { + if (isRended) { + + } else { + setFfHome.init(wrap, _FfCon); + isRended = true; + } + setFfHome.toggle({}); + e.stopPropagation(); + } else { + $(this).sethome(); + } + }); + + addFavBtn.on("click", function () { + $(this).addfav(_conf.addFavText, window.location.href) + }); + + $(window).load(function() { + if (isShowFf && setFfHome && !isRended) { + setFfHome.init(wrap, _FfCon); + isRended = true; + } + }); + + if(conf.userbarBtn.maxSpanWidth){ + cur.width(maxWidth); + } else { + cur.width("auto"); + } +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/userbar-btn.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/userbar-btn.tpl new file mode 100755 index 000000000..64ad99c4a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/userbar-btn/userbar-btn.tpl @@ -0,0 +1,61 @@ +<%style%> +<%if $head.dir=='ltr'%> +@import url('/widget/header/userbar-btn/ltr/ltr.css?__inline'); +<%else%> +@import url('/widget/header/userbar-btn/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="common:widget/header/userbar-btn/ltr/ltr.more.css"%> <%else%> <%require name="common:widget/header/userbar-btn/rtl/rtl.more.css"%> <%/if%> + + <%if strpos($smarty.server["HTTP_USER_AGENT"], "MSIE")%> + <%assign var="browser" value=$body.userbarBtn.ie%> + <%elseif strpos($smarty.server["HTTP_USER_AGENT"], "Firefox")%> + <%assign var="browser" value=$body.userbarBtn.firefox%> + <%else%> + <%assign var="browser" value=$body.userbarBtn.chrome%> + <%/if%> +
                              + <%foreach array_reverse($browser) as $value%> + <%if $value eq "addfav"%> + + + <%$body.addFav.title%> + + <%elseif $value eq "download"%> + + + <%$body.download.title%> + + <%else%> + + + <%$body.setHome.title%> + + <%/if%> + <%/foreach%> +
                              + <%script%> + conf.userbarBtn = { + <%if !empty($body.userbarBtn.maxSpanWidth)%>maxSpanWidth: '<%$body.userbarBtn.maxSpanWidth%>',<%/if%> + addFavText: '<%$body.addFav.error%>' + }; + conf.setHomeOnFf ||(conf.setHomeOnFf = <%json_encode($body.setHomeOnFf)%>); + + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.userbarbtn", function () { + require.async("common:widget/header/userbar-btn/userbar-btn-async.js", function () { + Gl.userbarBtn(); + }); + }); + + $(function () { + $(window).trigger("e_go.userbarbtn"); + }); + + $(".userbar-btn").one("mouseenter", function () { + $(window).trigger("e_go.userbarbtn"); + }); + }); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ae/ae.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ae/ae.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ae/ae.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ae/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ae/weather-city.json new file mode 100755 index 000000000..347e3dd1d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ae/weather-city.json @@ -0,0 +1,43 @@ +{ + "9-127164_1_AL": "Cairo", + "6-207321_1_AL": "Alexandria", + "12-127047_1_AL": "El-Giza", + "4-130201_1_AL": "Luxor", + "6-127335_1_AL": "Zagazig", + "5-127358_1_AL": "Aswan", + "15-126919_1_AL": "El Fayoum", + "126996": "Ismailia", + "7-127484_1_AL": "Port Said", + "5-127330_1_AL": "Suez", + "3-127049_1_AL": "Shibin el-Kom", + "3-126883_1_AL": "Hurghada", + "129332": "Mersa Matruh", + "4-297030_1_AL": "Riyadh", + "3-299429_1_AL": "Jeddah", + "3-299427_1_AL": "Mecca", + "5-296807_1_AL": "Medina", + "4-321626_1_AL": "Abu Dhabi", + "323091": "Dubai", + "8-1280745_1_AL": "Fujairah", + "2-245072_1_AL": "Rabat", + "4-6368_1_AL": "Tangier", + "2-243353_1_AL": "Casablanca", + "3-244231_1_AL": "Marrakech", + "1135733": "Tunis", + "320522": "Sfax", + "317198": "Bizerte", + "1888491": "Algiers", + "2115": "Annaba", + "3-227342_1_AL": "Beirut", + "3-230555_1_AL": "Tripoli", + "3-314446_1_AL": "Damascus", + "3-313468_1_AL": "Aleppo", + "1-313556_1_AL": "Hims", + "13-222056_1_AL": "Kuwait City", + "4-271669_1_AL": "Doha", + "6-29687_1_AL": "Al Manama", + "3-258638_1_AL": "Muscat", + "4-258843_1_AL": "Khassab", + "2-221790_1_AL": "Amman", + "14-221898_1_AL": "Al Aqabah" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ar/ar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ar/ar.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ar/ar.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ar/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ar/weather-city.json new file mode 100755 index 000000000..e11cbbe84 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ar/weather-city.json @@ -0,0 +1,43 @@ +{ + "9-127164_1_AL": "\u0627\u0644\u0642\u0627\u0647\u0631\u0629", + "6-207321_1_AL": "\u0627\u0644\u0627\u0633\u0643\u0646\u062f\u0631\u064a\u0629", + "12-127047_1_AL": "\u0627\u0644\u062c\u064a\u0632\u0629", + "4-130201_1_AL": "\u0627\u0644\u0623\u0642\u0635\u0631", + "6-127335_1_AL": "\u0627\u0644\u0632\u0642\u0627\u0632\u064a\u0642", + "5-127358_1_AL": "\u0623\u0633\u0648\u0627\u0646", + "15-126919_1_AL": "\u0627\u0644\u0641\u064a\u0648\u0645", + "126996": "\u0627\u0644\u0627\u0633\u0645\u0627\u0639\u064a\u0644\u064a\u0629", + "7-127484_1_AL": "\u0628\u0648\u0631 \u0633\u0639\u064a\u062f", + "5-127330_1_AL": "\u0627\u0644\u0633\u0648\u064a\u0633", + "3-127049_1_AL": "\u0634\u0628\u064a\u0646 \u0627\u0644\u0643\u0648\u0645", + "3-126883_1_AL": "\u0627\u0644\u063a\u0631\u062f\u0642\u0629", + "129332": "\u0645\u0631\u0633\u0649 \u0645\u0637\u0631\u0648\u062D", + "4-297030_1_AL": "\u0627\u0644\u0631\u064a\u0627\u0636", + "3-299429_1_AL": "\u062c\u062f\u0629", + "3-299427_1_AL": "\u0645\u0643\u0629 \u0627\u0644\u0645\u0643\u0631\u0645\u0629", + "5-296807_1_AL": "\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629", + "4-321626_1_AL": "\u0623\u0628\u0648 \u0638\u0628\u064a", + "323091": "\u062f\u0628\u0649", + "8-1280745_1_AL": "\u0627\u0644\u0641\u062c\u064a\u0631\u0629", + "2-245072_1_AL": "\u0627\u0644\u0631\u0628\u0627\u0637", + "4-6368_1_AL": "\u0637\u0646\u062c\u0629", + "2-243353_1_AL": "\u0627\u0644\u062f\u0627\u0631 \u0627\u0644\u0628\u064a\u0636\u0627\u0621", + "3-244231_1_AL": "\u0645\u0631\u0627\u0643\u0634", + "1135733": "\u062a\u0648\u0646\u0633", + "320522": "\u0635\u0641\u0627\u0642\u0633", + "317198": "\u0628\u0646\u0632\u0631\u062a", + "1888491": "\u0627\u0644\u062c\u0632\u0627\u0626\u0631", + "2115": "\u0639\u0646\u0627\u0628\u0629", + "3-227342_1_AL": "\u0628\u064a\u0631\u0648\u062a", + "3-230555_1_AL": "\u0637\u0631\u0627\u0628\u0644\u0633", + "3-314446_1_AL": "\u062f\u0645\u0634\u0642", + "3-313468_1_AL": "\u062d\u0644\u0628", + "3-313556_1_AL": "\u062d\u0645\u0635", + "13-222056_1_AL": "\u0627\u0644\u0643\u0648\u064a\u062a", + "4-271669_1_AL": "\u0627\u0644\u062f\u0648\u062d\u0629", + "6-29687_1_AL": "\u0627\u0644\u0645\u0646\u0627\u0645\u0629", + "3-258638_1_AL": "\u0645\u0633\u0642\u0637", + "4-258843_1_AL": "\u062e\u0635\u0628", + "2-221790_1_AL": "\u0639\u0645\u0627\u0646", + "14-221898_1_AL": "\u0627\u0644\u0639\u0642\u0628\u0629" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/br/br.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/br/br.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/br/br.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/br/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/br/weather-city.json new file mode 100755 index 000000000..58244fcee --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/br/weather-city.json @@ -0,0 +1,29 @@ +{ + "45881": "S\u00e3o Paulo - SP", + "45449": "Rio de Janeiro - RJ", + "36757": "Aracaju - SE", + "44857": "Bel\u00e9m - PA", + "44403": "Belo Horizonte - MG", + "35950": "Boa Vista - RR", + "43348": "Bras\u00edlia - DF", + "33738": "Campo Grande - MS", + "44281": "Cuiab\u00e1 - MT", + "44944": "Curitiba - PR", + "35952": "Florian\u00f3polis - SC", + "43346": "Fortaleza - CE", + "43599": "Goi\u00e2nia - GO", + "34631": "Jo\u00e3o Pessoa - PB", + "31913": "Macei\u00f3 - AL", + "64": "Macap\u00e1 - AP", + "42471": "Manaus - AM", + "35658": "Natal - RN", + "36879": "Palmas - TO", + "45561": "Porto Alegre - RS", + "35941": "Porto Velho - RO", + "45090": "Recife - PE", + "31909": "Rio Branco - AC", + "43080": "Salvador - BA", + "44127": "S\u00e3o Lu\u00eds - MA", + "45253": "Teresina - PI", + "32929": "Vit\u00f3ria - ES" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/en/en.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/en/en.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/en/en.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/en/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/en/weather-city.json new file mode 100755 index 000000000..81c341ef2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/en/weather-city.json @@ -0,0 +1 @@ +{"zmw:00000.1.58968":"\u81fa\u5317","zmw:00000.1.46751":"\u81fa\u4e2d\u5e02","zmw:00000.1.59358":"\u81fa\u5357","zmw:00000.1.46740":"\u9ad8\u96c4","zmw:00000.1.46745":"\u5ca1\u5c71","zmw:00000.2.46694":"\u57fa\u9686","zmw:00000.1.46756":"\u65b0\u7af9\u7e23","zmw:00000.1.46746":"\u5609\u7fa9","zmw:00000.1.58965":"\u6843\u5712\u7e23","zmw:00000.1.46750":"\u5c4f\u6771\u7e23","zmw:00000.1.59559":"\u6052\u6625\u93ae","zmw:00000.1.59162":"\u5b9c\u862d\u5e02","zmw:00000.1.46706":"\u8607\u6fb3\u93ae","zmw:00000.3.59362":"\u82b1\u84ee\u7e23","zmw:00000.1.59562":"\u81fa\u6771\u5e02","zmw:00000.1.46754":"\u5927\u6b66\u9109"} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/id/id.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/id/id.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/id/id.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/id/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/id/weather-city.json new file mode 100755 index 000000000..874da9f6d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/id/weather-city.json @@ -0,0 +1,24 @@ +{ + "208971": "Jakarta", + "205110": "Banda Aceh", + "210188": "Bandar Lampung", + "208977": "Bandung", + "209036": "Banjarmasin", + "1127709": "Batam", + "202574": "Bekasi", + "202507": "Bogor", + "202196": "Denpasar", + "202649": "Depok", + "211242": "Makassar", + "208996": "Malang", + "211298": "Medan", + "206120": "Padang", + "211288": "Palembang", + "205619": "Pekanbaru", + "203749": "Samarinda", + "208981": "Semarang", + "203449": "Surabaya", + "202242": "Tangerang", + "202512": "Tasikmalaya", + "211671": "Yogyakarta" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/del_ative.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/del_ative.png new file mode 100755 index 000000000..12bb63a4f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/del_ative.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/del_gray.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/del_gray.png new file mode 100755 index 000000000..efb7884bf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/del_gray.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/i-weather-hum.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/i-weather-hum.png new file mode 100755 index 000000000..70c549e17 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/i-weather-hum.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/i-weather-more-hum.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/i-weather-more-hum.png new file mode 100755 index 000000000..a745bb196 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/i-weather-more-hum.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/light.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/light.png new file mode 100755 index 000000000..f8e4516b9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/img/light.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/jp/jp.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/jp/jp.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/jp/jp.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/jp/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/jp/weather-city.json new file mode 100755 index 000000000..f46be2cca --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/jp/weather-city.json @@ -0,0 +1,146 @@ +{ + "4-223985_1_AL": "\u672d\u5e4c", + "8-217875_1_AL": "\u91e7\u8def", + "2-217787_1_AL": "\u7a1a\u5185", + "6-223986_1_AL": "\u65ed\u5ddd", + "5-217907_1_AL": "\u7559\u840c", + "4-217942_1_AL": "\u7db2\u8d70", + "10-217792_1_AL": "\u5317\u898b", + "5-218128_1_AL": "\u7d0b\u5225", + "4-217892_1_AL": "\u6839\u5ba4", + "5-217794_1_AL": "\u5e2f\u5e83", + "6-217784_1_AL": "\u5ca9\u898b\u6ca2", + "1-217876_1_AL": "\u5036\u77e5\u5b89", + "4-217793_1_AL": "\u5ba4\u862d", + "1-2334234_1_AL": "\u6d66\u6cb3", + "6-223987_1_AL": "\u51fd\u9928", + "217843": "\u6c5f\u5dee", + "4-224683_1_AL": "\u4ed9\u53f0", + "4-222341_1_AL": "\u9752\u68ee", + "6-216904_1_AL": "\u3080\u3064", + "8-216886_1_AL": "\u516b\u6238", + "4-224170_1_AL": "\u76db\u5ca1", + "4-218332_1_AL": "\u5bae\u53e4", + "4-218342_1_AL": "\u5927\u8239\u6e21", + "4-221897_1_AL": "\u79cb\u7530", + "5-216836_1_AL": "\u6a2a\u624b", + "4-221567_1_AL": "\u5c71\u5f62", + "4-221569_1_AL": "\u7c73\u6ca2", + "4-221570_1_AL": "\u9152\u7530", + "6-221591_1_AL": "\u65b0\u5e84", + "4-223551_1_AL": "\u798f\u5cf6", + "217436": "\u5c0f\u540d\u6d5c", + "224683": "\u4ed9\u53f0", + "218964": "\u77f3\u5dfb", + "217415": "\u82e5\u677e", + "218990": "\u767d\u77f3", + "2-226396_1_AL": "\u6771\u4eac", + "4-224374_1_AL": "\u6a2a\u6d5c", + "4-724_1_AL": "\u5c0f\u7530\u539f", + "221048": "\u5927\u5cf6", + "1510182": "\u516b\u4e08\u5cf6", + "1652504": "\u7236\u5cf6", + "4-220908_1_AL": "\u718a\u8c37", + "1-220889_1_AL": "\u79e9\u7236", + "4-223069_1_AL": "\u5343\u8449", + "6-309_1_AL": "\u929a\u5b50", + "6-216952_1_AL": "\u9928\u5c71", + "4-218223_1_AL": "\u6c34\u6238", + "4-226389_1_AL": "\u5b87\u90fd\u5bae", + "221137": "\u5927\u7530\u539f", + "1-223622_1_AL": "\u524d\u6a4b", + "1-221693_1_AL": "\u7532\u5e9c", + "4-224701_1_AL": "\u9577\u91ce", + "8-219098_1_AL": "\u677e\u672c", + "4-219097_1_AL": "\u98ef\u7530", + "2012157": "\u3055\u3044\u307e\u305f", + "218236": "\u571f\u6d66", + "1-2334040_1_AL": "\u6cb3\u53e3\u6e56", + "2423804": "\u307f\u306a\u304b\u307f", + "4-224807_1_AL": "\u65b0\u6f5f", + "4-224165_1_AL": "\u91d1\u6ca2", + "4-219302_1_AL": "\u9577\u5ca1", + "4-219303_1_AL": "\u9ad8\u7530", + "4-226415_1_AL": "\u5bcc\u5c71", + "221279": "\u4f0f\u6728", + "1-218305_1_AL": "\u8f2a\u5cf6", + "4-223540_1_AL": "\u798f\u4e95", + "5-217288_1_AL": "\u6566\u8cc0", + "2014153": "\u76f8\u5ddd", + "4-221855_1_AL": "\u540d\u53e4\u5c4b", + "1-221859_1_AL": "\u8c4a\u6a4b", + "1-223600_1_AL": "\u5c90\u961c", + "4-217488_1_AL": "\u9ad8\u5c71", + "1-226089_1_AL": "\u9759\u5ca1", + "1523": "\u7db2\u4ee3", + "221060": "\u4e09\u5cf6", + "5-226090_1_AL": "\u6d5c\u677e", + "218908": "\u6d25", + "2-944_1_AL": "\u5c3e\u9df2", + "10-225007_1_AL": "\u5927\u962a", + "4-224023_1_AL": "\u795e\u6238", + "218187": "\u8c4a\u5ca1", + "224436": "\u4eac\u90fd", + "4-218698_1_AL": "\u821e\u9db4", + "5-220939_1_AL": "\u5927\u6d25", + "1-220944_1_AL": "\u5f66\u6839", + "4-224769_1_AL": "\u5948\u826f", + "4-226509_1_AL": "\u548c\u6b4c\u5c71", + "219281": "\u98a8\u5c4b", + "1505444": "\u6f6e\u5cac", + "4-223955_1_AL": "\u5e83\u5cf6", + "4-221238_1_AL": "\u9ce5\u53d6", + "4-221241_1_AL": "\u7c73\u5b50", + "4-220975_1_AL": "\u677e\u6c5f", + "4-220976_1_AL": "\u6d5c\u7530", + "2333845": "\u897f\u90f7", + "4-224935_1_AL": "\u5ca1\u5c71", + "1-219446_1_AL": "\u6d25\u5c71", + "1-217744_1_AL": "\u5e84\u539f", + "1-226560_1_AL": "\u4e0b\u95a2", + "221623": "\u5c71\u53e3", + "4-221659_1_AL": "\u67f3\u4e95", + "4-221624_1_AL": "\u8429", + "1-224395_1_AL": "\u9ad8\u77e5", + "4-224352_1_AL": "\u9ad8\u677e", + "4-223539_1_AL": "\u677e\u5c71", + "217238": "\u65b0\u5c45\u6d5c", + "1-217236_1_AL": "\u5b87\u548c\u5cf6", + "4-226392_1_AL": "\u5fb3\u5cf6", + "218601": "\u5ba4\u6238", + "218617": "\u6e05\u6c34", + "1-221183_1_AL": "\u65e5\u548c\u4f50", + "4-223544_1_AL": "\u798f\u5ca1", + "1-224369_1_AL": "\u9e7f\u5150\u5cf6", + "223545": "\u516b\u5e61", + "4-217320_1_AL": "\u98ef\u585a", + "4-217333_1_AL": "\u4e45\u7559\u7c73", + "4-219768_1_AL": "\u4f50\u8cc0", + "1-219769_1_AL": "\u4f0a\u4e07\u91cc", + "4-224706_1_AL": "\u9577\u5d0e", + "1-219187_1_AL": "\u4f50\u4e16\u4fdd", + "2333734": "\u53b3\u539f", + "10-219200_1_AL": "\u798f\u6c5f", + "4-224428_1_AL": "\u718a\u672c", + "1-218666_1_AL": "\u725b\u6df1", + "1-218650_1_AL": "\u4eba\u5409", + "5-224930_1_AL": "\u5927\u5206", + "5-219398_1_AL": "\u4e2d\u6d25", + "4-219394_1_AL": "\u65e5\u7530", + "5-219395_1_AL": "\u4f50\u4f2f", + "4-224686_1_AL": "\u5bae\u5d0e", + "1-219035_1_AL": "\u5ef6\u5ca1", + "2-219034_1_AL": "\u90fd\u57ce", + "2333684": "\u540d\u702c", + "1-218434_1_AL": "\u9e7f\u5c4b", + "2-3492_1_POI_AL": "\u7a2e\u5b50\u5cf6", + "2333690": "\u9ad8\u5343\u7a42", + "218649": "\u963f\u8607\u4e59\u59eb", + "1-224944_1_AL": "\u90a3\u8987", + "1-2012155_1_AL": "\u4e45\u7c73\u5cf6", + "5-219499_1_AL": "\u540d\u8b77", + "1779977": "\u5357\u5927\u6771\u5cf6", + "2333670": "\u5bae\u53e4\u5cf6", + "219525": "\u77f3\u57a3\u5cf6", + "219564": "\u4e0e\u90a3\u56fd\u5cf6" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr-c.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr-c.css new file mode 100755 index 000000000..613035342 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr-c.css @@ -0,0 +1 @@ +.userbar-weather{ display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr.more.css new file mode 100755 index 000000000..93d213d0e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr.more.css @@ -0,0 +1,273 @@ +/* weather */ +/*@require common:widget/ui/prompt/prompt.css*/ + +#weatherView img{ width: 32px;} +.userbar-weather { + color: #fff; + font-size: 11px; + height: 45px; + padding-top: 5px; + margin-right: 20px; + white-space: nowrap; + position: relative; + *z-index: 9; + + + display: block !important; +} +.userbar-weather .fl{ + height: 50px; + overflow: hidden; + margin-left: 10px; + width:228px; +} + +.userbar-weather_console{ display: none;} +.userbar-weather ul { + margin-top: 5px; +} +.userbar-weather_console, .userbar-weather img, .userbar-weather .weather-info { + float: left; +} +.userbar-weather li { + display: block; + float: left; + margin-right: 45px; + _margin-right: 35px; +} +.userbar-weather li.weather_last { + margin-right: 0; +} +.userbar-weather img { + margin-right: 10px; +} +.userbar-weather span { + font-weight: bold; +} +.userbar-weather p { + margin: 2px 0; +} +.weather_last{ + visibility: hidden; +} +.text{ + visibility: hidden; +} +.dot_img{ + background:url(../img/i-weather-hum.png?__sprite) no-repeat; + width:9px; + height:16px; + display:inline-block; + margin-left: 20px; + margin-bottom:-5px; + left: 10px; + margin-right:5px; +} + +/*--------more---------*/ + + + + +/* weather */ +/*@require common:widget/ui/prompt/prompt.css*/ +.userbar-weather_console { + height: 38px; + margin-right: 20px; + _margin-right: 11px; + _width: 200px; + display: inline-block; +} +.userbar-weather_console a { + color: #fff; +} +.userbar-weather_city { + padding-right: 7px; + text-align: right; + position: relative; + line-height: 15px; + z-index: 11; +} +.userbar-weather_city-cur { + height: 15px; +} +.userbar-weather_city-cur a { + padding-right: 10px; + background: url(/widget/img/bg.png) right 6px no-repeat; +} +.userbar-weather_city-click a { + background-position: right -442px; +} +.city-select { + right:-8px; + top:16px; + z-index:11; + text-align:left; +} +.city-select .box-prompt-inner { + *width: 100%; + _width: auto; +} +.city-select p { + margin: 0; + font-size:12px; +} +.city-select label { + display: block; + margin-bottom: 5px; +} +.city-select select { + width: 160px; + margin-bottom: 7px; + border: 1px solid #d7d7d9; +} +.city-select .btn-bar { + width: 160px; + text-align:center; +} +.weather-days { + display: block; + height: 25px; + line-height: 25px; + padding: 0 7px; + margin-top: 5px; + border: 1px solid #009e69; + border-bottom: 0 none; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + position: relative; + _float: right; +} +.weather-days_click { + border: 1px solid #00ad73; + border-bottom: 0 none; +} +.weather-days p { + display: block; + line-height: 25px; + background: url(/widget/img/bg.png) 50% -12px no-repeat; + margin: 0; +} +.weather-days_click p { + background-position: 50% -35px; +} +.weather-days:hover { + background: #009e69; + -moz-border-top-left-radius: 2px; + -webkit-border-top-left-radius: 2px; + -o-border-top-left-radius: 2px; + border-top-left-radius: 2px; + -moz-border-top-right-radius: 2px; + -webkit-border-top-right-radius: 2px; + -o-border-top-right-radius: 2px; + border-top-right-radius: 2px; +} +.weather-more_show .weather-more { + display: block; +} +.weather-more li { + text-align: center; + font-size: 14px; + padding: 20px 0; + color: #fff; +} +.weather-more li a{ + display: block; + width: 100%; + height: 100%; +} +.weather-more li img { + padding: 10px 0; +} +.weather-more span { + padding: 0 5px; +} +.weather-more_odd { + background: #117a57; + -moz-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -o-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; +} +.weather-more_today p { + font-weight: bold; +} +.weather_last{ + width:40px +} +.humidity{ + left:5px; +} +.dot_img_head{ + background:url(../img/i-weather-more-hum.png?__sprite) no-repeat; + width:9px; + height:16px; + display:inline-block; + margin-left: 10px; + margin-bottom:-5px; + left: 10px; +} +.userbar-weather_tip { + position: absolute; + top: 49px; + right: -28px; + padding: 2px 32px 2px 12px; + width: 190px; + border: 1px solid #FFA97E; + color: #454545; + font-size: 12px; + background-color: #FFF8F4; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + z-index: 10; +} +.userbar-weather_tip .arrow, .userbar-weather_tip .arrow_bg { +position: absolute; +height: 0; +width: 0; +border: 8px dashed transparent; +} +.userbar-weather_tip .arrow { +border-bottom-color: #FFB793; +border-bottom-style: solid; +border-width: 9px; +top: -18px; +left: 19px; +} +.userbar-weather_tip .arrow_bg { +border-bottom-color: #fcfefd; +border-bottom-style: solid; +margin: -7px -8px 0 -8px; +_margin-top: -22px; +} +.userbar-weather_tip .tips-close { +display: block; +width: 12px; +height: 12px; +position: absolute; +top: 5px; +right: 5px; +background: url(../img/del_gray.png?__sprite) no-repeat; +cursor: pointer; +} +.userbar-weather_tip .tips-close_hover { +background: url(../img/del_ative.png?__sprite) no-repeat; +} +.userbar-weather_tip p { + text-indent: 16px; + white-space: normal; + line-height: 1.5; +} +.userbar-weather_tip .tips-light { + width: 12px; + height: 16px; + display: inline-block; + background: url(../img/light.png?__sprite) no-repeat; + position: absolute; + left: 12px; + top: 4px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr.tpl new file mode 100755 index 000000000..6fedfb84a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ltr/ltr.tpl @@ -0,0 +1,7 @@ +<%require name="common:widget/header/weather/ltr/ltr.more.css"%> +<%require name="common:widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css"%> +<%style%> + @import url('/widget/header/weather/ltr/ltr-c.css?__inline'); +<%/style%> +
                              +
                              diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ma/ma.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ma/ma.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ma/ma.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ma/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ma/weather-city.json new file mode 100755 index 000000000..b021da656 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/ma/weather-city.json @@ -0,0 +1,43 @@ +{ + "9-127164_1_AL": "\u0627\u0644\u0642\u0627\u0647\u0631\u0629", + "6-207321_1_AL": "\u0627\u0644\u0627\u0633\u0643\u0646\u062f\u0631\u064a\u0629", + "12-127047_1_AL": "\u0627\u0644\u062c\u064a\u0632\u0629", + "4-130201_1_AL": "\u0627\u0644\u0623\u0642\u0635\u0631", + "6-127335_1_AL": "\u0627\u0644\u0632\u0642\u0627\u0632\u064a\u0642", + "5-127358_1_AL": "\u0623\u0633\u0648\u0627\u0646", + "15-126919_1_AL": "\u0627\u0644\u0641\u064a\u0648\u0645", + "126996": "\u0627\u0644\u0627\u0633\u0645\u0627\u0639\u064a\u0644\u064a\u0629", + "7-127484_1_AL": "\u0628\u0648\u0631 \u0633\u0639\u064a\u062f", + "5-127330_1_AL": "\u0627\u0644\u0633\u0648\u064a\u0633", + "3-127049_1_AL": "\u0634\u0628\u064a\u0646 \u0627\u0644\u0643\u0648\u0645", + "3-126883_1_AL": "\u0627\u0644\u063a\u0631\u062f\u0642\u0629", + "129332": "\u0645\u0631\u0633\u064a \u0627\u0644\u0645\u0637\u0631\u0648\u062d", + "4-297030_1_AL": "\u0627\u0644\u0631\u064a\u0627\u0636", + "3-299429_1_AL": "\u062c\u062f\u0629", + "3-299427_1_AL": "\u0645\u0643\u0629 \u0627\u0644\u0645\u0643\u0631\u0645\u0629", + "5-296807_1_AL": "\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629", + "4-321626_1_AL": "\u0623\u0628\u0648 \u0638\u0628\u064a", + "323091": "\u062f\u0628\u0649", + "8-1280745_1_AL": "\u0627\u0644\u0641\u062c\u064a\u0631\u0629", + "2-245072_1_AL": "\u0627\u0644\u0631\u0628\u0627\u0637", + "4-6368_1_AL": "\u0637\u0646\u062c\u0629", + "2-243353_1_AL": "\u0627\u0644\u062f\u0627\u0631 \u0627\u0644\u0628\u064a\u0636\u0627\u0621", + "3-244231_1_AL": "\u0645\u0631\u0627\u0643\u0634", + "1135733": "\u062a\u0648\u0646\u0633", + "320522": "\u0635\u0641\u0627\u0642\u0633", + "317198": "\u0628\u0646\u0632\u0631\u062a", + "1888491": "\u0627\u0644\u062c\u0632\u0627\u0626\u0631", + "2115": "\u0639\u0646\u0627\u0628\u0629", + "3-227342_1_AL": "\u0628\u064a\u0631\u0648\u062a", + "3-230555_1_AL": "\u0637\u0631\u0627\u0628\u0644\u0633", + "3-314446_1_AL": "\u062f\u0645\u0634\u0642", + "3-313468_1_AL": "\u062d\u0644\u0628", + "3-313556_1_AL": "\u062d\u0645\u0635", + "13-222056_1_AL": "\u0627\u0644\u0643\u0648\u064a\u062a", + "4-271669_1_AL": "\u0627\u0644\u062f\u0648\u062d\u0629", + "6-29687_1_AL": "\u0627\u0644\u0645\u0646\u0627\u0645\u0629", + "3-258638_1_AL": "\u0645\u0633\u0642\u0637", + "4-258843_1_AL": "\u062e\u0635\u0628", + "2-221790_1_AL": "\u0639\u0645\u0627\u0646", + "14-221898_1_AL": "\u0627\u0644\u0639\u0642\u0628\u0629" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl-c.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl-c.css new file mode 100755 index 000000000..613035342 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl-c.css @@ -0,0 +1 @@ +.userbar-weather{ display: none;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl.more.css new file mode 100755 index 000000000..5a6cf86f7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl.more.css @@ -0,0 +1,320 @@ +/* weather */ +/*@require common:widget/ui/prompt/prompt.css*/ +#weatherView img{ width: 32px;} +.userbar-weather { + color: #fff; + font-size: 11px; + height: 45px; + padding-top: 5px; + width:240px; + *width: 260px; + _width: auto; + zoom: 1; + position: relative; + + display: block !important; +} +.userbar-weather_console{ display: none;} +.userbar-weather ul { + margin-top: 5px; + *width: 222px; +} +.userbar-weather img, .userbar-weather .weather-info { + float: right; +} +.userbar-weather li { + display: block; + float: right; + *width: 100px; + margin-left: 20px; + *margin-left: 10px; +} +.userbar-weather li.weather_last { + margin-left: 0; +} +.userbar-weather img { + margin-left: 26px; +} +.userbar-weather span { + font-weight: bold; +} +.userbar-weather p { + margin: 2px 0; + direction: rtl; +} +.weather_last{ + visibility: hidden; +} +.text{ + visibility: hidden; +} +.dot_img{ + background:url(../img/i-weather-hum.png?__sprite) no-repeat; + width:9px; + height:16px; + display:inline-block; + margin-bottom:-5px; + left: 10px; + position: relative; + + margin-right: 20px; + margin-left: -5px; +} + +/*----------more-------------*/ + +/* weather */ +/*@require common:widget/ui/prompt/prompt.css*/ + +.userbar-weather { + width:390px; + *width: 410px; +} +.userbar-weather_console { + height: 38px; + display: block; + margin-left: 20px; + *margin-left: 10px; + float: right; + *float: left; + _float: right; +} +.userbar-weather_console a { + color: #fff; +} +.weather-info{ + direction: ltr; + width:110px; + right: -12px; + position: relative; +} +.userbar-weather_city { + padding-right: 7px; + text-align: left; + position: relative; + line-height: 15px; + z-index: 11; +} +.userbar-weather_city-cur { + height: 15px; +} +.userbar-weather_city-cur a { + padding-left: 10px; + background: url(/widget/img/bg.png) -12px 6px no-repeat; + zoom: 1; +} +.userbar-weather_city-click a { + background-position: right -442px; +} + + +.city-select { + left:-8px; + top:16px; + z-index:11; + text-align:right; + _width: 180px; +} +.city-select .box-prompt-inner { + *width: 100%; + _width: auto; + *position: relative; +} +.city-select p { + margin: 0; + font-size:12px; + zoom: 1; +} +.city-select label { + display: block; + margin-bottom: 5px; +} +.city-select select { + width: 160px; + margin-bottom: 7px; + border: 1px solid #d7d7d9; +} +.city-select .btn-bar { + width: 160px; + text-align:center; + *position: relative; +} +.weather-days { + display: block; + height: 25px; + line-height: 25px; + padding: 0 7px; + margin-top: 5px; + border: 1px solid #009e69; + border-bottom: 0 none; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + position: relative; + _float: left; +} +.weather-days_click { + border: 1px solid #00ad73; + border-bottom: 0 none; +} +.weather-days p { + display: block; + line-height: 25px; + background: url(/widget/img/bg.png) 50% -12px no-repeat; + margin: 0; +} +.weather-days_click p { + background-position: 50% -35px; +} +.weather-days:hover { + background: #009e69; + -moz-border-top-left-radius: 2px; + -webkit-border-top-left-radius: 2px; + -o-border-top-left-radius: 2px; + border-top-left-radius: 2px; + -moz-border-top-right-radius: 2px; + -webkit-border-top-right-radius: 2px; + -o-border-top-right-radius: 2px; + border-top-right-radius: 2px; +} +.weather-more_show .weather-more { + display: block; +} +.weather-more li { + text-align: center; + font-size: 14px; + padding: 20px 0; + color: #fff; + direction: ltr; +} +.weather-more li a{ + display: block; + width: 100%; + height: 100%; +} +.weather-more li img { + padding: 10px 0; +} +.weather-more span { + padding: 0 5px; +} +.weather-more_odd { + background: #117a57; + -moz-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + -o-box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; + box-shadow: 0 0 4px rgba(0,0,0,0.1) inset; +} +.weather-more_today p { + font-weight: bold; +} +.weather_last{ + width:40px +} +.humidity{ + float:left; + margin-left: 40px; +} +.dot_img{ + margin-left: 10px; + margin-right: 0; +} +.dot_img_head{ + background:url(../img/i-weather-more-hum.png?__sprite) no-repeat; + width:9px; + height:16px; + display:inline-block; + margin-left: -10px; + margin-bottom:-5px; + left:5px; + position:relative; + *left: 10px; + *float: right; + *margin-right: 20px; +} +.temperature_p{ + float: right; +} +.temperature_hum{ + left: -33px; + position: relative; +} +.temperature_big{ + float:right; + margin-right:20px; +} +.userbar-weather{ + position: relative; + z-index: 99; +} +#weatherView .weather-info{ + *position: absolute; + *right: 240px; +} +.weather-more_today .dot_img_head{ + position:relative; +} +.userbar-weather_tip { + position: absolute; + top: 49px; + right: 224px; + padding: 2px 12px 2px 32px; + width: 190px; + border: 1px solid #FFA97E; + color: #454545; + font-size: 12px; + background-color: #FFF8F4; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + z-index: 10; +} +.userbar-weather_tip .arrow, .userbar-weather_tip .arrow_bg { +position: absolute; +height: 0; +width: 0; +border: 8px dashed transparent; +} +.userbar-weather_tip .arrow { +border-bottom-color: #FFB793; +border-bottom-style: solid; +border-width: 9px; +top: -18px; +right: 19px; +} +.userbar-weather_tip .arrow_bg { +border-bottom-color: #fcfefd; +border-bottom-style: solid; +margin: -7px -8px 0 -8px; +_margin-top: -22px; +} +.userbar-weather_tip .tips-close { +display: block; +width: 12px; +height: 12px; +position: absolute; +top: 5px; +left: 5px; +background: url(../img/del_gray.png?__sprite) no-repeat; +cursor: pointer; +} +.userbar-weather_tip .tips-close_hover { +background: url(../img/del_ative.png?__sprite) no-repeat; +} +.userbar-weather_tip p { + text-indent: 16px; + background-position: right top; + white-space: normal; + line-height: 1.5; +} +.userbar-weather_tip .tips-light { + width: 12px; + height: 16px; + display: inline-block; + background: url(../img/light.png?__sprite) no-repeat; + position: absolute; + right: 12px; + top: 4px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl.tpl new file mode 100755 index 000000000..61f168d24 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/rtl/rtl.tpl @@ -0,0 +1,7 @@ +<%require name="common:widget/header/weather/rtl/rtl.more.css"%> +<%require name="common:widget/ui/jquery/widget/jquery.ui.button/rtl/rtl.css"%> +<%style%> + @import url('/widget/header/weather/rtl/rtl-c.css?__inline'); +<%/style%> +
                              +
                              diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/sa/sa.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/sa/sa.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/sa/sa.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/sa/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/sa/weather-city.json new file mode 100755 index 000000000..e11cbbe84 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/sa/weather-city.json @@ -0,0 +1,43 @@ +{ + "9-127164_1_AL": "\u0627\u0644\u0642\u0627\u0647\u0631\u0629", + "6-207321_1_AL": "\u0627\u0644\u0627\u0633\u0643\u0646\u062f\u0631\u064a\u0629", + "12-127047_1_AL": "\u0627\u0644\u062c\u064a\u0632\u0629", + "4-130201_1_AL": "\u0627\u0644\u0623\u0642\u0635\u0631", + "6-127335_1_AL": "\u0627\u0644\u0632\u0642\u0627\u0632\u064a\u0642", + "5-127358_1_AL": "\u0623\u0633\u0648\u0627\u0646", + "15-126919_1_AL": "\u0627\u0644\u0641\u064a\u0648\u0645", + "126996": "\u0627\u0644\u0627\u0633\u0645\u0627\u0639\u064a\u0644\u064a\u0629", + "7-127484_1_AL": "\u0628\u0648\u0631 \u0633\u0639\u064a\u062f", + "5-127330_1_AL": "\u0627\u0644\u0633\u0648\u064a\u0633", + "3-127049_1_AL": "\u0634\u0628\u064a\u0646 \u0627\u0644\u0643\u0648\u0645", + "3-126883_1_AL": "\u0627\u0644\u063a\u0631\u062f\u0642\u0629", + "129332": "\u0645\u0631\u0633\u0649 \u0645\u0637\u0631\u0648\u062D", + "4-297030_1_AL": "\u0627\u0644\u0631\u064a\u0627\u0636", + "3-299429_1_AL": "\u062c\u062f\u0629", + "3-299427_1_AL": "\u0645\u0643\u0629 \u0627\u0644\u0645\u0643\u0631\u0645\u0629", + "5-296807_1_AL": "\u0627\u0644\u0645\u062f\u064a\u0646\u0629 \u0627\u0644\u0645\u0646\u0648\u0631\u0629", + "4-321626_1_AL": "\u0623\u0628\u0648 \u0638\u0628\u064a", + "323091": "\u062f\u0628\u0649", + "8-1280745_1_AL": "\u0627\u0644\u0641\u062c\u064a\u0631\u0629", + "2-245072_1_AL": "\u0627\u0644\u0631\u0628\u0627\u0637", + "4-6368_1_AL": "\u0637\u0646\u062c\u0629", + "2-243353_1_AL": "\u0627\u0644\u062f\u0627\u0631 \u0627\u0644\u0628\u064a\u0636\u0627\u0621", + "3-244231_1_AL": "\u0645\u0631\u0627\u0643\u0634", + "1135733": "\u062a\u0648\u0646\u0633", + "320522": "\u0635\u0641\u0627\u0642\u0633", + "317198": "\u0628\u0646\u0632\u0631\u062a", + "1888491": "\u0627\u0644\u062c\u0632\u0627\u0626\u0631", + "2115": "\u0639\u0646\u0627\u0628\u0629", + "3-227342_1_AL": "\u0628\u064a\u0631\u0648\u062a", + "3-230555_1_AL": "\u0637\u0631\u0627\u0628\u0644\u0633", + "3-314446_1_AL": "\u062f\u0645\u0634\u0642", + "3-313468_1_AL": "\u062d\u0644\u0628", + "3-313556_1_AL": "\u062d\u0645\u0635", + "13-222056_1_AL": "\u0627\u0644\u0643\u0648\u064a\u062a", + "4-271669_1_AL": "\u0627\u0644\u062f\u0648\u062d\u0629", + "6-29687_1_AL": "\u0627\u0644\u0645\u0646\u0627\u0645\u0629", + "3-258638_1_AL": "\u0645\u0633\u0642\u0637", + "4-258843_1_AL": "\u062e\u0635\u0628", + "2-221790_1_AL": "\u0639\u0645\u0627\u0646", + "14-221898_1_AL": "\u0627\u0644\u0639\u0642\u0628\u0629" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/th/th.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/th/th.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/th/th.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/th/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/th/weather-city.json new file mode 100755 index 000000000..c65a7a699 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/th/weather-city.json @@ -0,0 +1,46 @@ +{ + "4-318849_1_AL": "\u0e01\u0e23\u0e38\u0e07\u0e40\u0e17\u0e1e\u0e2f", + "4-318418_1_AL": "\u0e01\u0e33\u0e41\u0e1e\u0e07\u0e40\u0e1e\u0e0a\u0e23", + "1-319052_1_AL": "\u0e25\u0e1e\u0e1a\u0e38\u0e23\u0e35", + "4-319602_1_AL": "\u0e19\u0e04\u0e23\u0e1b\u0e10\u0e21", + "2-320033_1_AL": "\u0e1e\u0e34\u0e29\u0e13\u0e38\u0e42\u0e25\u0e01", + "4-320049_1_AL": "\u0e1e\u0e23\u0e30\u0e19\u0e04\u0e23\u0e28\u0e23\u0e35\u0e2d\u0e22\u0e38\u0e18\u0e22\u0e32", + "4-320620_1_AL": "\u0e2a\u0e21\u0e38\u0e17\u0e23\u0e1b\u0e23\u0e32\u0e01\u0e32\u0e23", + "4-320626_1_AL": "\u0e2a\u0e21\u0e38\u0e17\u0e23\u0e2a\u0e32\u0e04\u0e23", + "1-320984_1_AL": "\u0e2a\u0e38\u0e1e\u0e23\u0e23\u0e13\u0e1a\u0e38\u0e23\u0e35", + "4-320984_1_AL": "\u0e40\u0e0a\u0e35\u0e22\u0e07\u0e43\u0e2b\u0e21\u0e48", + "2-318882_1_AL": "\u0e25\u0e33\u0e1b\u0e32\u0e07", + "2-318901_1_AL": "\u0e25\u0e33\u0e1e\u0e39\u0e19", + "319106": "\u0e41\u0e21\u0e48\u0e2e\u0e48\u0e2d\u0e07\u0e2a\u0e2d\u0e19", + "3-319108_1_AL": "\u0e41\u0e21\u0e48\u0e2e\u0e48\u0e2d\u0e07\u0e2a\u0e2d\u0e19(\u0e41\u0e21\u0e48\u0e2a\u0e30\u0e40\u0e23\u0e35\u0e22\u0e07)", + "2-319733_1_AL": "\u0e19\u0e48\u0e32\u0e19", + "2-319956_1_AL": "\u0e1e\u0e30\u0e40\u0e22\u0e32", + "2-317465_1_AL": "\u0e0a\u0e31\u0e22\u0e20\u0e39\u0e21\u0e34", + "4-318585_1_AL": "\u0e02\u0e2d\u0e19\u0e41\u0e01\u0e48\u0e19", + "3-318607_1_AL": "\u0e02\u0e2d\u0e19\u0e41\u0e01\u0e48\u0e19(\u0e0a\u0e38\u0e21\u0e41\u0e1e)", + "2-319038_1_AL": "\u0e40\u0e25\u0e22", + "4-319122_1_AL": "\u0e21\u0e2b\u0e32\u0e2a\u0e32\u0e23\u0e04\u0e32\u0e21", + "2-319494_1_AL": "\u0e21\u0e38\u0e01\u0e14\u0e32\u0e2b\u0e32\u0e23", + "4-319629_1_AL": "\u0e19\u0e04\u0e23\u0e23\u0e32\u0e0a\u0e2a\u0e35\u0e21\u0e32", + "5-319817_1_AL": "\u0e2b\u0e19\u0e2d\u0e07\u0e04\u0e32\u0e22", + "4-320359_1_AL": "\u0e23\u0e49\u0e2d\u0e22\u0e40\u0e2d\u0e47\u0e14", + "4-321409_1_AL": "\u0e2d\u0e38\u0e1a\u0e25\u0e23\u0e32\u0e0a\u0e18\u0e32\u0e19\u0e35", + "7-321441_1_AL": "\u0e2d\u0e38\u0e14\u0e23\u0e18\u0e32\u0e19\u0e35", + "1-317584_1_AL": "\u0e1e\u0e31\u0e17\u0e22\u0e32", + "2-317490_1_AL": "\u0e08\u0e31\u0e19\u0e17\u0e1a\u0e38\u0e23\u0e35", + "1-317582_1_AL": "\u0e0a\u0e25\u0e1a\u0e38\u0e23\u0e35", + "1-320137_1_AL": "\u0e1b\u0e23\u0e32\u0e08\u0e35\u0e19\u0e1a\u0e38\u0e23\u0e35", + "2-320337_1_AL": "\u0e23\u0e30\u0e22\u0e2d\u0e07", + "4-319691_1_AL": "\u0e19\u0e04\u0e23\u0e28\u0e23\u0e35\u0e18\u0e23\u0e23\u0e21\u0e23\u0e32\u0e0a", + "2-319761_1_AL": "\u0e19\u0e23\u0e32\u0e18\u0e34\u0e27\u0e32\u0e2a", + "2-320075_1_AL": "\u0e20\u0e39\u0e40\u0e01\u0e47\u0e15", + "2-320938_1_AL": "\u0e2a\u0e07\u0e02\u0e25\u0e32", + "3-320939_1_AL": "\u0e2a\u0e07\u0e02\u0e25\u0e32(\u0e2b\u0e32\u0e14\u0e43\u0e2b\u0e0d\u0e48)", + "4-320998_1_AL": "\u0e2a\u0e38\u0e23\u0e32\u0e29\u0e0e\u0e23\u0e4c\u0e18\u0e32\u0e19\u0e35", + "4-5470_1_AL": "\u0e2a\u0e38\u0e23\u0e32\u0e29\u0e0e\u0e23\u0e4c\u0e18\u0e32\u0e19\u0e35(\u0e40\u0e01\u0e32\u0e30\u0e2a\u0e21\u0e38\u0e22)", + "3-320151_1_AL": "\u0e1b\u0e23\u0e30\u0e08\u0e27\u0e1a\u0e04\u0e35\u0e23\u0e35\u0e02\u0e31\u0e19\u0e18\u0e4c(\u0e2b\u0e31\u0e27\u0e2b\u0e34\u0e19)", + "2-318443_1_AL": "\u0e01\u0e32\u0e0d\u0e08\u0e19\u0e1a\u0e38\u0e23\u0e35", + "318455": "\u0e01\u0e32\u0e0d\u0e08\u0e19\u0e1a\u0e23\u0e35(\u0e17\u0e2d\u0e07\u0e1c\u0e32\u0e20\u0e39\u0e21\u0e34)", + "2-320001_1_AL": "\u0e40\u0e1e\u0e0a\u0e23\u0e1a\u0e38\u0e23\u0e35", + "4-320150_1_AL": "\u0e1b\u0e23\u0e30\u0e08\u0e27\u0e1a\u0e04\u0e35\u0e23\u0e35\u0e02\u0e31\u0e19\u0e18\u0e4c" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/tw/tw.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/tw/tw.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/tw/tw.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/tw/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/tw/weather-city.json new file mode 100755 index 000000000..1a38eb1c2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/tw/weather-city.json @@ -0,0 +1,18 @@ +{ + "1-315078_1_AL": "\u81fa\u5317", + "12-315040_1_AL": "\u81fa\u4e2d", + "3-314999_1_AL": "\u81fa\u5357", + "1-313812_1_AL": "\u9ad8\u96c4", + "1-313793_1_AL": "\u5ca1\u5c71", + "4-312605_1_AL": "\u57fa\u9686", + "7-313567_1_AL": "\u65b0\u7af9", + "6-312591_1_AL": "\u5609\u7fa9", + "3-315125_1_AL": "\u6843\u5712", + "3-314385_1_AL": "\u5c4f\u6771", + "3-314391_1_AL": "\u6052\u6625", + "4-316306_1_AL": "\u5b9c\u862d", + "2-316307_1_AL": "\u8607\u6fb3\u93ae", + "2-313570_1_AL": "\u82b1\u84ee", + "3-315079_1_AL": "\u81fa\u6771" + +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/vn/vn.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/vn/vn.tpl new file mode 100755 index 000000000..76a0d4d19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/vn/vn.tpl @@ -0,0 +1,18 @@ +<%script%> + require.async("common:widget/ui/jquery/jquery.js", function($) { + $(window).one("e_go.weather", function () { + require.async("common:widget/ui/weather/weather.js", function (Gl) { + Gl.weather.init(__uri('./weather-city.json')); + }); + }); + + $(function () { + $(window).trigger("e_go.weather"); + }); + + $("#weather").one("mouseenter", function () { + $(window).trigger("e_go.weather"); + }); + }); +<%/script%> +<%require name="common:widget/ui/weather/`$country`/`$country`.js" async="true" %> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/vn/weather-city.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/vn/weather-city.json new file mode 100755 index 000000000..990ab2f4c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/vn/weather-city.json @@ -0,0 +1,25 @@ +{ + "2-353412_1_AL": "H\u00e0 N\u1ed9i", + "3-353511_1_AL": "H\u1ea3i Ph\u00f2ng", + "1-352107_1_AL": "B\u1eafc C\u1ea1n", + "1-352511_1_AL": "Cao B\u1eb1ng", + "2-353983_1_AL": "H\u00f2a B\u00ecnh", + "1-354293_1_AL": "L\u1ea1ng S\u01a1n", + "1-354305_1_AL": "L\u00e0o Cai", + "1-355085_1_AL": "Nam \u0110\u1ecbnh", + "1-356182_1_AL": "Th\u00e1i Nguy\u00ean", + "1-356356_1_AL": "Vi\u1ec7t Tr\u00ec", + "2-356425_1_AL": "Y\u00ean B\u00e1i", + "2-352954_1_AL": "\u0110\u00e0 N\u1eb5ng", + "1-355711_1_AL": "H\u1ed9i An", + + "354222": "Nha Trang", + "1-356184_1_AL": "Thanh H\u00f3a", + "355417": "Vinh", + + "1-352499_1_AL": "C\u00e0 Mau", + "2-352508_1_AL": "C\u1ea7n Th\u01a1", + "3-354237_1_AL": "Ph\u00fa Qu\u1ed1c", + "3-352089_1_AL": "V\u0169ng T\u00e0u", + "1-356354_1_AL": "V\u0129nh Long" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/weather.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/weather.tpl new file mode 100755 index 000000000..42fb04639 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/header/weather/weather.tpl @@ -0,0 +1,45 @@ + +<%widget name="common:widget/header/weather/`$head.dir`/`$head.dir`.tpl"%> +<%script%> + //conf.weather + conf.weather = { + prefixUrl: "<%$body.weather.prefixUrl%>", + country: "<%$country%>", + defaultCity: "<%$body.weather.accuDefaultCity%>", + smallIconPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/weather/weather_icon_small", + bigIconPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/weather/weather_icon_big", + isHeaderTest: "<%$body.headerTest.widget%>", + testSmallIcon: "<%$body.headerTest.weather.smallIconPath%>", + testBigIcon: "<%$body.headerTest.weather.bigIconPath%>", + testDefaultIcon: "<%$body.headerTest.weather.defaultIcon%>", + testWidth: "<%$body.headerTest.weather.width%>", + testSwitch: "<%$body.headerTest.weather.remindSwitch%>", + dateFormat: "<%$body.weather.dateFormat%>", + connector: "<%$body.weather.connector%>", + humidity: "<%$body.weather.humidity%>", + remindSwitch: "<%$body.weather.remindSwitch%>", + userFrom: "<%$body.weather.userFrom%>", + testUserFrom:"<%$body.headerTest.weather.testUserFrom%>", + dataLength: 5, + dataRef: function(data) { + return data; + }, + tips: { + "click": '<%$body.weather.clickText%>', + "loading": '<%$body.weather.loadingText%>', + "loadError": '<%$body.weather.loadError%>', + "nojs": '<%$body.weather.noJS%>', + "nocookie": '<%$body.weather.noCookie%>' + }, + dataGroup: { + "noScript": '<%$body.weather.noScript%>', + "selectCity": '<%$body.weather.selectCity%>', + "area": '<%$body.weather.area%>', + "city": '<%$body.weather.city%>', + "okBtn": '<%$body.weather.okBtn%>', + "cancelBtn": '<%$body.weather.cancelBtn%>', + "moreDays": '<%$body.weather.moreDays%>' + } + }; +<%/script%> +<%widget name="common:widget/header/weather/`$sysInfo.country`/`$sysInfo.country`.tpl" country=$sysInfo.country%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/img/bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/img/bg.png new file mode 100755 index 000000000..c4b4d1b81 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/img/bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icon-n.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icon-n.png new file mode 100755 index 000000000..6a3801287 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icon-n.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icon_hover-n.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icon_hover-n.png new file mode 100755 index 000000000..521ab7acd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icon_hover-n.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icons.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icons.png new file mode 100755 index 000000000..51473b8c7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/icons.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia.png new file mode 100755 index 000000000..ce88edf20 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_down.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_down.png new file mode 100755 index 000000000..1996c2311 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_down.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_down2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_down2.png new file mode 100755 index 000000000..837219a4d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_down2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_hover.png new file mode 100755 index 000000000..0f0bb27d9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_hover2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_hover2.png new file mode 100755 index 000000000..837219a4d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_hover2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_normal.png new file mode 100755 index 000000000..837219a4d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/img/tia_normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard-async.js new file mode 100755 index 000000000..12638a3c6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard-async.js @@ -0,0 +1,41 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +//keyboard on search group +;;(function () { + var searchKeyboard = $("#searchKeyboard"); + + searchKeyboard.hover(function() { + !(searchKeyboard.attr("src") === __uri("img/tia_down2.png")) && searchKeyboard.attr("src", __uri("img/tia_hover2.png")); + }, function() { + !(searchKeyboard.attr("src") === __uri("img/tia_down2.png")) && searchKeyboard.attr("src", __uri("img/tia_normal.png")); + }); + + searchKeyboard.on("click", function () { + UT.send({ + type: "click", + ac: "b", + position: "keyboard", + modId: "search" + }); + $(this).toggleClass("keyboard-down"); + require.async("common:widget/keyboard/keyboard-main.js", function () { + var input = $("#searchGroupInput"), + kbda = $("#kbda"); + input.length > 0 && input.focus(); + if($("#addFavBar").css("display")=="block"){ + $("#kbd").css("top","167px"); + } + + //修复IE下小键盘点击光标乱跳 + kbda.length > 0 && document.all && $(document.body).on("mousedown", function(e) { + var el = e.target; + $.contains(kbda, el) && input.length > 0 && (input[0].onbeforedeactivate = function() { + window.event.returnValue = false; + input.onbeforedeactivate = null; + }); + }); + }); + }); + $(document).on("mousedown","#close",function(){ + searchKeyboard.removeClass("keyboard-down"); + }); +})(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard-main.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard-main.js new file mode 100755 index 000000000..bc1d0c0f0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard-main.js @@ -0,0 +1,2 @@ +(function(){function r(n){this.t={},this.tick=function(t,n,r){r=r!=e?r:(new Date).getTime(),this.t[t]=[r,n]},this.tick("start",t,n)}function s(){var e=this;e.Ma(),e.tc(),this.ee={0:function(t,n,r){return e.ke(t,n,r)},1:function(t,n,r){return e.le(t,n,r)},2:function(t,n,r){return e.me(t,n,r)},3:function(t,n,r){return e.ne(t,n,r)},4:function(t,n,r){return e.ie(t,n,r)},5:function(t,n,r){return e.je(t,n,r)},6:function(t,n,r){return e.yc(t,n,r)},7:function(t,n,r){return e.zc(t,n,r)}}}function o(e,t){var n=this;n.n=e,n.u=t}function u(e){var t=document.getElementsByTagName("head")[0];if(!t)return;var n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}function a(){var e=this;u(".goog-button{border-width:1px;border-style:solid;border-color:#bbb #999 #999 #bbb;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;font:normal normal normal 13px/13px Arial,sans-serif;color:#676767;text-align:middle;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,1);background:#eee;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f5f8f7));background:-moz-linear-gradient(top,#fff,#f5f8f7);filter:progid:DXImageTransform.Microsoft.Gradient(EndColorstr='#f5f8f7',StartColorstr='#ffffff',GradientType=0);cursor:pointer;margin:0;display:inline;display:-moz-inline-box;display:inline-block;*overflow:visible;padding:4px 8px 5px}a.goog-button,span.goog-button,div.goog-button{padding:4px 8px 5px}.goog-button:visited{color:#676767}.goog-button{*display:inline}.goog-button:focus,.goog-button:hover{border-color:#676767}.goog-button:active,.goog-button-active{color:#676767;background-color:#bbb;border-color:#999 #bbb #bbb #999;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f8f7),to(#fff));background-image:-moz-linear-gradient(top,#f5f8f7,#fff);filter:progid:DXImageTransform.Microsoft.Gradient(EndColorstr='#ffffff',StartColorstr='#f5f8f7',GradientType=0)}.goog-button[disabled],.goog-button[disabled]:active,.goog-button[disabled]:hover{color:#666;border-color:#ddd;background-color:#f3f3f3;background-image:none;text-shadow:none;cursor:auto}.goog-button{padding:5px 8px 4px\\9}.goog-button{*padding:4px 7px 2px}html>body input.goog-button,x:-moz-any-link,x:default,html>body button.goog-button,x:-moz-any-link,x:default{padding-top:3px;padding-bottom:2px}a.goog-button,x:-moz-any-link,x:default,span.goog-button,x:-moz-any-link,x:default,div.goog-button,x:-moz-any-link,x:default{padding:4px 8px 5px}.goog-button-fixed{padding-left:0!important;padding-right:0!important;width:100%}button.goog-button-icon-c{padding-top:1px;padding-bottom:1px}button.goog-button-icon-c{padding-top:3px\\9;padding-bottom:2px\\9}button.goog-button-icon-c{*padding-top:0;*padding-bottom:0}html>body button.goog-button-icon-c,x:-moz-any-link,x:default{padding-top:1px;padding-bottom:1px}.goog-button-icon{display:block;margin:0 auto;height:18px;width:18px}.outerbox{background-color:#ebfcf7;border-style:solid;border-color:#ceded9;border-width:1px;min-width:395px;z-index:20001}select.select-dialog{font-size:9px;height:17px;border:1px solid}table.select-dialog{border-spacing:0;padding:0}span.trigger{cursor:pointer}span.trigger-over{background-color:#99ccff;color:black}#kbd .goog-button{height:16px;*height:24px;border-style:solid;padding:3px 5px;border-color:#d3d3d3 #d3d3d3 #c3c3c3 #d3d3d3;}#kbd table{background:none;margin:0!important;border:0}#kbd td{padding:1px;background-color:transparent;border:0;color:#676767;vertical-align:middle;}#kbd form{margin:0}div.goog-button{border-style:none;padding:0}#BGK8,#BGK10,#BGK16,#BGK16.right,#BGK16.left,#BGK20,#close,#kbd-help,#kbd-cfg,#loop,#min,#max{background-repeat:no-repeat;background-image:url("+__uri("img/icons.png")+");}#BGK8,#BGK10,#BGK16,#BGK16.left,#BGK16.right,#BGK20{width:22px;height:17px;}#close,#kbd-help,#kbd-cfg,#loop,#min,#max{font-size:0;width:14px;height:14px}#BGK8{background-position:0 -29px}#BGK10{background-position:0 -44px}#BGK10.long{background-position:0 -44px}#BGK10.short{background-position:0 18px}#BGK16{background-position:0 -59px}#BGK16.right{background-position:0 -59px}#BGK16.left{background-position:0 -59px}#BGK16.shortleft{background-position:0 -60px}#BGK20{background-position:0 -77px}#K273{font-size:12px}#kbd_t{font:12px/12px normal normal Arial,sans-serif;width:100%}#kbd-logo{max-height:14px;border:0}.kbd-title-row{line-height:12px}#minmax{cursor:pointer;font-size:12px;display:inline-block;background-color:#ebfcf7;border:1px solid #6b90da}.kbd-button{cursor:pointer;width:14px!important;height:14px!important;border:none;display:inline-block}#kbd-cfg{background-position:0 -152px}#kbd-cfg:hover{background-position:0 -166px}#kbd-help{background-position:0 -96px}#kbd-help:hover{background-position:0 -110px}#close{background-position:0 0}#close.kbd-button-over{background-position:0 -14px}#min{background-position:0 -208px}#min.kbd-button-over{background-position:0 -222px}#max{background-position:0 -180px}#max.kbd-button-over{background-position:0 -194px}#loop{background-position:0 -124px}#loop.kbd-button-over{background-position:0 -138px}"),e.sb=0,e.tb=0,w.jc(!1),w.kc(!0),w.K(!1),w.ea(!1),w.ic(!1),w.ga(!1),w.lc(function(){e.ec(),e.fc(!1)}),e.d=new w.i([]),e.w(!0),e.oa(),A.a.ab=function(){e.oa()},e.Gd=A.a.q,A.a.q=function(){e.Gd(),e.oa()}}function f(e,t){for(var n=e.split(/\./),r=window,i=0;ie.xc?this.zc:this.yc},n.tc=function(){},n.ue=function(){var e=document.getElementById(this.Yd);e&&this.moveTo(this.Xd(e,this.height(),this.width()))},n.oa=function(){this.uc(this.yb)?this.Hc(this.Fc,this.Gc):this.ue()},n.Hc=function(e,t){var n=typeof e=="string"?document.getElementById(e):e;n&&(n=this.ee[t](n,this.height(),this.width()),this.moveTo(n),this.Ce(this.yb,e,t))},n.Ma=function(){var e=this.$d();this.ce(e),this.uc(e),this.yb=e,this.Wd=e.src,this.Vd=__uri("img/tia_down2.png"),e.onclick=q,this.ae=this.l(e);var n=document.getElementById("searchGroupInput");if(n)this.Yd=n.id,this.wc=this.l(n),this.Xd=this.Zd(this.wc,this.ae);else for(var e=document.getElementsByTagName("input"),r=0;r0?this.sb-this.tb:0,"tia.cnt":this.d.Qd(),"tia.l":this.d.Ka(),"tia.v":0}},n.Ve=function(){return{"tia.l":this.d.Ka(),"tia.v":0}},n.w=function(e){e?(this.S=new window.jstiming.Timer,this.S.name="show",this.S.tick("_sr"),this.d.zb(!0),this.S.tick("render","_sr"),this.sb=(new Date).getTime()):(this.ec(),this.d.zb(!1)),this.fc(e)},n.ec=function(){this.He(),this.tb=(new Date).getTime()},n.r=function(){return this.d.r()},n.Te=function(){this.tc();var e=this.d.r();this.w(!e),e||this.oa()},n.k=function(){this.w(!1)},n.ha=function(){this.w(!0)},n.moveTo=function(e){A.a.L(e.n,e.u)},n.height=function(){return A.a.height},n.width=function(){return A.a.width};var l={Bc:44032,Ac:4352,Cc:4449,ra:4519,Ec:21,Ua:28};l.Dc=l.Ec*l.Ua,l.Ab=["ᄀ","ᄁ","ᄀᄉ","ᄂ","ᄂᄌ","ᄂᄒ","ᄃ","ᄅ","ᄅᄀ","ᄅᄆ","ᄅᄇ","ᄅᄉ","ᄅᄐ","ᄅᄑ","ᄅᄒ","ᄆ","ᄇ","ᄇᄉ","ᄉ","ᄊ","ᄋ","ᄌ","ᄎ","ᄏ","ᄐ","ᄑ","ᄒ","ᄀᄅ"],l.Lc={"ᄄ":"ᄄ","ᄈ":"ᄈ","ᄍ":"ᄍ"};for(var c=0;c=3?e.charCodeAt(2)-l.ra:0;return String.fromCharCode((t*l.Ec+n)*l.Ua+e+l.Bc)},l.Ee=function(e){return e.replace(l.Ke,l.Me)},l.Va=function(e,t,n,r){return t+l.Lc[n]+r},l.Ge=function(e){return l.se(l.te(e)).replace(l.qe,l.Va).replace(l.oe,l.Va).replace(l.pe,l.Va).replace(l.re,l.Va)},l.Ye=function(e){return l.Ee(l.Ge(l.Fe(e.replace("",""))))};var h=!0,p=typeof unsafeWindow=="undefined"?window:unsafeWindow,d,v,m,b=document.getElementById?g:y,w={},x=0,T=0,N=0,C=0;p.yf&&(x=Event.Pe,T=Event.xf,N=Event.Pe,C=Event.zf);var k=x|T|N,L={en:"",fr:"",de:""},A={};A.userAgent=navigator.userAgent.toLowerCase(),A.Ga=A.userAgent.indexOf("msie")>0&&!window.opera,A.$=A.userAgent.indexOf("firefox")>=0;var O;if(O=A.$){var M=A.userAgent.match(/firefox\/(\d+)/);O=M&&M.length==2&&M[1]<=2}A.nd=O;var _;if(_=A.Ga){var D=A.userAgent.match(/msie (\d+)/);_=D&&D.length==2&&D[1]>=7}A.Cf=_,A.eb=A.userAgent.indexOf("applewebkit")>-1,A.Xb=A.userAgent.indexOf("windows")>-1,A.i=function(t,n,r){function i(e){var t=B!=e;return B=e,t&&P.xa(),t}function s(){for(var e=0;e')}function u(e){s(''),e&&o(e)}function a(e){o(e),s("
                              \n")}function f(t,n,r,i,o){o=o||"",t=t.charCodeAt(0),P.ja[t]=e,t="K"+t,s('');if(n){o=P.Ia+" "+o+" ",s("=0||u>127||u<33?"&#"+u+";":i)}n=o.join(""),t(n),s('"')}A.a.I&&s(' dir="rtl"'),s("/>")}else s(""),s(" "),s(""),s("");s("")}function l(e,t){for(var n=0;n":190,"?":191},V={de:{Y:90,Z:89,"Ü":192,"Û":109,"Ý":61,";":219,"=":221,"¿":220,"Ì":59,m:191},fr:{Q:65,A:81,Z:87,W:90,"Ý":219,"º":221,M:59,"À":222,"Þ":192,"¼":77,"¾":188,"¿":190,"ß":191,"Û":109}},$={189:109,187:61,107:61,186:59},J="endefr";P.sf=i,P.Xc=function(e){P.C=e,P.Aa(),A.a.aa()},P.qb=function(){return A.a.Qc&&A.a.c&&A.a.Gb()},P.Dd=function(){var e=P.b.O?z:U;P.pb="",H=['
                              '],u(),l(e[0]),f("\b","",48),u(36),P.b.O?(l(e[1]),P.qb()?f("\n","",36):a(36)):l(e[1],1.5),u(),f("","",48),l(e[2]),P.b.O?P.qb()?f("\n","",24,1,"short"):a(24):P.qb()?f("\n","",48,1,"long"):a(48),u(),P.b.O?f("","",36,1,"shortleft"):f("","",60,1,"left"),l(e[3]),f("","",60,1,"right"),A.a.Rc&&(u(),f("đ","Alt+Ctrl",72),f(" "," ",236),f("đ","Alt+Ctrl",72)),s("
                              "),P.pb=H.join("")},P.Wc=function(){return J.indexOf(P.C)+P.F.join("")},P.Nc=function(e){if(e){var t=e.charCodeAt(0)-48,e=e.substring(e.length-2);P.C=J.substring(t,t+2),P.p(e)}else P.p(R?R.z():"??")},P.mf=function(){return function(e){A.a.p(e.id)}},P.Za=function(e){R=e},P.p=function(e){var t;e&&(t=n[e]||n[e.toUpperCase()]||n[e.substring(0,2).toUpperCase()],P.wa=e),t?P.b&&P.b.z()==e||t.Bd()&&A.a.ba(t):(P.wa=R?R.z():"??",A.a.ba(R))},P.Aa=function(){var e=P.C=="en"?"":L[P.C];if(P.b)A.a.Fb(P.b.kb(),P.b.Ad(),e);else{var t="(loading...)";A.a.Fb(t,t,e)}},P.ba=function(e){if(P.b!=e){c(),P.b=e,P.Aa(),P.xa();for(var e=e.z(),t=0;tA.a.Sc&&P.F.shift()}},P.Oc=function(){P.Aa(),A.a.Eb(P.pb)},P.Ia="goog-button goog-button-fixed",A.userAgent.indexOf("linux");var Q=A.userAgent.indexOf("mac")>-1;P.lb=function(e){return P.b&&P.b.bc?P.b.lb(e):{Ya:e}};var G={back:1,Ya:""},Y={K8:function(){c();var e=G;P.Ja++,A.a.ya(e)},K10:function(){A.a.Uc(),c()},K16:function(){F=!F,y((B&1)!=1)},K20:function(){i(B^2),A.a.f()},K273:function(){b()}};P.Cd=function(e,t){var n=P.lb(e.value);P.Ja++,A.a.ya(n);if(typeof t!="boolean"||!t)y(!1),i(B&-13)},P.$a=function(){for(var e in P.ja){var t="K"+e;if(e.charCodeAt(0)<58){var n=document.getElementsByName(t);P.ja[e]=n;for(var r=0;rP.za*1.1||t.3?P.Ed(t):!1}},P.kf=function(){return P.b&&P.b.ac?P.b.ac[(B&2)==2?"l":""]:""},P.xa=function(){if(P.b){var e=P.b.zd(((B&1)==1?"s":"")+((B&12)==12?"c":"")+((B&2)==2?"l":"")),t=m(20);t&&g(t,(B&2)==2);if(t=v(16))g(t[0],(B&1)==1),g(t[1],(B&1)==1);if(t=v(273))g(t[0],(B&12)==12),g(t[1],(B&12)==12);if(e)for(var n in e)if(t=e[n],typeof t=="string"){var r=m(n.charCodeAt(0));r&&(r.value=t?t:" ")}}};var Z={" ":function(){A.a.Hb()},Q:function(){A.a.Db()}},et=S(function(e){if(!O())return!0;P.ob++;var t=E(e);return t==16&&y(!1),F=j=!1,t==17&&i(B&-5),t==18&&i(B&-9),t==224||B&16?(i(B&-17),!0):e.ctrlKey&&!e.altKey||e.R&k?(e.R&x&&b(!1),!0):(I=!1,t==20&&(i(B^2),A.a.f()),!1)});P.rf=et;var tt=S(function(e){var t=E(e);if(B&4&&!(B&8)&&t>20)return B!=4?t=!1:(t=String.fromCharCode(t),(t=Z[t])?(t(),t=!0):t=!1),e.returnValue=!t;e&&(e.keyCode==17||e.ctrlKey||e.R&T)&&i(B|4);if(!O())return e.returnValue=!0;P.mb++,j=!0;var n=e.target||e.srcElement;if(n)try{n.onfocus()}catch(r){}if(t==20)return e.returnValue=!0;if(t==224||B&16)return i(B|16),e.returnValue=!0;if(e.R&x)return b(!!(e.R&x)),e.returnValue=!0;(t==18||e&&(e.altKey||e.R&N))&&i(B|8);if(t==16)return e.returnValue=y(!0);t==13&&(t=10);if(Q&&A.$){q=t;if(q==107)q=0;else if(q==13||q==10)q=10;if(q==0)return e.returnValue=!1}return e.returnValue=M(e,t,n)});P.pf=tt;var nt=S(function(e){if(!O())return!0;if(A.$&&!e.of)return!0;P.nb++;if(Q&&A.$){var t=e.target||e.srcElement;if(t)try{t.onfocus()}catch(n){}if(q==0){var r=String.fromCharCode(E(e));if(r in X)return e.returnValue=M(e,X[r],t);A.a.ya(r)}}return B&16?!0:B==4?!0:j||!I?j=!1:O()&&q!=20&&(e=m(q))?(I?c():(e.onclick(!0),I=!1),!1):(c(),j=!1,!0)});P.qf=nt;var rt,it=S(function(e){return e=e.target||e.srcElement,e==A.a.c&&(rt=_(e)),!0}),st=S(function(e){return e=e.target||e.srcElement,e==A.a.c&&rt&&(e=_(e),(rt.start!=e.start||rt.cc!=e.cc)&&c()),!0});P.va=function(){d.onkeyup!=et&&(d.onkeyup=et),d.onkeydown!=tt&&(d.onkeydown=tt),d.onkeypress!=nt&&(d.onkeypress=nt),d.onmousedown!=it&&(d.onmousedown=it),d.onmouseup!=st&&(d.onmouseup=st)}},A.Ca=function(e,t,n){var r=document.createElement("div");return r.className="kbd-button kbd-button-out",r.id=t,r.appendChild(document.createTextNode(e)),n&&(r.onclick=n),r.onmouseover=function(){r.className="kbd-button kbd-button-over"},r.onmouseout=function(){r.className="kbd-button kbd-button-out"},r},A.gb=function(e,t){t.className="select-dialog",e.className="trigger",e.onmouseover=function(){e.className="trigger trigger-over"},e.onmouseout=function(){e.className="trigger"};var n=this,r=A.Ca("","close",function(){n.k(),A.a.f()}),i=document.createElement("table"),s=document.createElement("tbody");i.cellSpacing="0",i.cellPadding="0",i.appendChild(s),i.className="select-dialog";var o=e.parentNode.clientWidth||e.parentNode.width,u=r.clientWidth||r.width;o&&(i.style.width=Math.max(o-5,0),u)&&(t.style.width=Math.max(o-u-20,0)),o=document.createElement("tr"),s.appendChild(o),s=document.createElement("td"),o.appendChild(s),u=document.createElement("td"),o.appendChild(u),s.appendChild(t),u.appendChild(r),this.Pa=i;var a=t.onchange;t.onchange=function(){n.k(),a&&a()},e.onclick=function(){n.ha()},this.Pa.style.display="none",this.rc=e,e.parentNode.insertBefore(this.Pa,e)},A.gb.prototype.ha=function(){this.rc.style.display="none",this.Pa.style.display=""},A.gb.prototype.k=function(){this.Pa.style.display="none",this.rc.style.display=""},A.nc=function(e,t){return t==e?e:e.indexOf("=0?e:['',e,""].join("")},A.Mb=function(e){function t(e){if(e.indexOf(":")>0){var t=e.split(/:/),e=t[0].split(/,/),n=t[1];i.wb=t[t.length>2?2:1]}else e=e.split(/,/);i.id=e[0],u=e.length>1?e[1]:i.id,a=A.nc(i.wb,n)}function n(e){var t=i.O?"À1234567890m=QWERTYUIOPÛÝÜASDFGHJKL;ÞâZXCVBNM¼¾¿":"À1234567890m=QWERTYUIOPÛÝÜASDFGHJKL;ÞZXCVBNM¼¾¿",n;for(n in e){var r=e[n],s=n.split(/,/);s.join(",")!=n&&s.push("");var o={};if(r){for(var u in r)if(u!=""){var a=r[u];if(typeof a=="string")if(u.length==1)o[u.charAt(0)]=a;else for(var l=0;l0&&t.push("  "),t.push(A.Id(r,"s2"+n,"_kbdS2('"+n+"');")))}return t.join("")}},i.Ad=function(){return i.Pd||i.kb()},i.z=function(){return u},i.Ma=function(e){e.is102Keyboard&&(i.O=!0),e.mappings&&(n(e.mappings),e.capslock&&(i.ac=e.capslock),e.view2char&&(c=e.view2char),i.pc(),i.Ma=i.Bd=P(!0),i.bc=!0,i.Mc=function(){return e.direction=="rtl"})},i.zd=function(e){return f[e]},i.lb=function(e){return c[e]&&(e=c[e]),l?i.Nd(e):e},i.pc=function(){i.e=[{j:"",o:-1,H:"",X:0,h:""}]},i.Nd=function(e){for(var t=0;t-1&&(r=r.slice(0,n.o)+i.U+r.slice(n.o)),n=i.Od(r,n.H);if(n.back>-1)break}if(t==i.e.length){for(t=0;te.X?n.back=e.h.length+n.back-e.X:(t=e.j.length-e.X,r=e.j.length-n.back,n.V=e.j.slice(t,r)+n.V,n.back=e.h.length);for(t=0;te.h.length?(e.X+=n.back-e.h.length,e.h=n.V):(r=e.h.length-n.back,e.h=e.h.slice(0,r),e.h+=n.V);return t=n.vb.indexOf(i.U),e=n.vb.replace(i.U,""),i.oc({j:e,o:t,H:"",X:0,h:""}),{back:n.back,Ya:n.V}},i.oc=function(e){i.e.push(e),i.Ld(),i.Md()},i.Ld=function(){for(var e=0;e-1?1:0,o=o.length-a-t.length,n=n.replace(r,u),r=n.slice(s.index),n=n.replace(i.U,"")+i.U,n={back:o,V:r,vb:n}}else n={back:-1,V:t,vb:n};return n},i.yd=function(){i.pc()},t(e.id),e.mappings&&i.Ma(e)};var H={en:"QWERTY",fr:"AZERTY",de:"QWERTZ"};A.Id=function(e,t,n){return['",e,""].join("")};var B="vMmh";A.Qe=function(){function e(){var e=d.createElement("div"),t=e.style;return t.visibility="hidden",e.innerHTML='
                              ',e.setAttribute("id","kbd"),e.className="outerbox",m.appendChild(e),e}function n(){function e(){if(i==0){if(w.od()){var e=A.Ea();if(!e)return!1}A.Ga?f.ld(d.getElementsByTagName("iframe")):A.nd||(f.jb(window,"_kbdWF"),f.ud())}return i=(i+1)%10,r||(f.vd(),f.wd(),y.Nc(),r=!0),y.Ib()}function t(){p.setTimeout(t,e()?130:1300)}d=p.document,v=d.documentElement,m=d.body;var n=b("kbd");n&&E(n,d);var r=!1,i=0;t(),e()}function r(){var e=b("kbd_t");return e&&(f.Yb(e),b("kbd_ta").onclick=function(e){if(!u()){if(A.N){var t=A.N();t&&(t.bb=!1,t.r()&&a("v"))}else a("v");e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},o()),e}function i(){var e=r();e&&(f.jd||M>1)&&(e.innerHTML=f.gd(),e=b("kbd_oem"),A.Xb&&e&&A.a.fb)&&(e.innerHTML=H[y.C])}function s(){var e=b("kbd_minmax");if(!(e.childNodes.length>0)){var t;t=A.a.K?A.Ca("",f.g=="v"?"max":"min",function(){f.Hb()}):A.Ca("","close",function(){f.k()}),e.appendChild(t)}}function o(){if(A.Xb&&A.a.fb){var e=b("kbd_oem");e.title="Click to setup the physical keyboard layout.";if(e.parentNode.childNodes.length==1){var t=document.createElement("select");if(A.eb){var n=document.createElement("optgroup");n.label="Native Layout";for(var r in H)n.appendChild(new Option(H[r],r));t.appendChild(n)}else for(r in H)t.options.add(new Option(H[r],r));t.selectedIndex=0,t.onchange=function(){y.Xc(t.value),f.f()},A.eb&&(t.onfocus=function(){A.a.ib=!0},t.onblur=function(){A.a.ib=!1}),new A.gb(e,t)}}}function u(){return"vM".indexOf(f.g)>=0}function a(e){f.db(e),f.aa()}var f=this,l,c,g,y,x={},T=1,N=1,C=1;f.ia=!1,f.ib=!1,f.ad=function(){return f.ib},f.n=-1;var k=f.u=-1,L=-1;f.scrollX=0,f.scrollY=0,f.Ob=!0,f.hf="left",f.s=0,f.D=0,f.Kb="h",f.g="h",f.$c="h",f.Ha={};var O=[],M=0;f.Sc=1,f.gf="black",f.linkColor="blue",f.bgColor="#ebfcf7",f.bf="#ebfcf7",f.Qb="",f.Pb="",f.scale=1,f.sd=A.Ga?"absolute":"fixed",f.jd=!0,f.Vb=!1,f.hb=t,f.Rb="",f.Rc=!0,f.Qc=!0,f.pd=!1,f.ga=!1,f.fb=!0,f.K=!0,f.ea=!1,f.Jb=function(e){for(var t in e){var n=t.charAt(0)=="_"?t.substring(1):t;e.hasOwnProperty(t)&&typeof f[n]!="undefined"&&(f[n]=e[t])}},f.ef=function(e){f.hb=e},f.Zb=[function(){function t(){A.rd(),n&&n()}l=e(),f.hb&&f.hb(l),y||(y=f.d=new A.i(x,f.Ha,g)),f.d.Cb=f.scale,c=l.style,c.position=f.sd,A.rd=function(){f.Tb()?f.ab():f.q()};var n=p.onresize;t!=n&&(p.onresize=t),y.Oc(),f.ba(g,!0),f.aa=function(){var e=d,t=y.Wc()+"-",n;n=Math.floor(2e3*f.s)*4804+Math.floor(1200*f.D)*4+B.indexOf(f.g);var r=[];if(n<=0)n="0";else{for(;n>0;){var i=n%62;r.push(String.fromCharCode(i+(i<10?48:i<36?55:61))),n=Math.floor(n/62)}n=r.reverse().join("")}e.cookie="KBD="+(t+n)+";expires=July 19, 2051"};if(c.position=="absolute"){A.onscroll=function(){f.scrollX=v&&v.scrollLeft,f.scrollX||(f.scrollX=m.scrollLeft),f.scrollY=v&&v.scrollTop,f.scrollY||(f.scrollY=m.scrollTop),f.L(f.n,f.u)};var r=p.onscroll,i=function(){p.onscroll=function(){A.onscroll(),r&&r()}};r!=p.onscroll&&(p.onscroll=i)}}],f.vd=function(){for(var e=0;et){t=n;break e}}else t=-1;e.width=t,T=f.fd()-f.width,N=f.I?0:T,C=f.ed()-f.height,k=Math.floor(T*(f.I?f.s:1-f.s)+.5),L=Math.floor(C*(1-f.D)+.5)},f.aa=function(){},f.jb=function(e,t){if(e){var n=e.onfocus;n?n.toString().indexOf(t)<0&&(e.onfocus=function(){p[t](e),n()}):e.onfocus=function(){p[t](e)}}},f.ud=function(){var e=window.onblur;e?e.toString().indexOf("_kbdWB")<0&&(window.onblur=function(){p._kbdWB(),e()}):window.onblur=function(){p._kbdWB()}},f.Ea=function(e){for(var t=!1,n=0;nt?r.substring(0,i-t):"";e.value=o+n+r.substring(s,r.length),t=i+n.length-t,e.blur(),e.focus(),e.setSelectionRange(t,t),A.$&&window.cd&&(t=document.createEvent("KeyEvents"),t.Wb("keypress",!0,!0,window,!1,!1,!1,!1,0,32),e.dispatchEvent(t),t=document.createEvent("KeyEvents"),t.Wb("keypress",!0,!0,window,!1,!1,!1,!1,8,0),e.dispatchEvent(t))}else e.value=r.length'+(f.Rb||t)+"",i()},f.gd=function(){return f.xd},f.$a=function(){y.$a()},f.Lb=function(e){if(O.length==2||e&&O.length>1){var e=b("kbd-loop"),t=A.Ca("","loop",function(){f.Db()});f.df=t,e.appendChild(t)}},f.dd=function(e){var t="";A.a.ea&&(t='');var n="";return A.a.Da&&(n=''),['
                              ',t,'',n,'
                              ',e,"
                              "].join("")},f.Eb=function(e){f.jf=""+Math.floor(12*f.scale)+"px";var t=b("kbd_0");t&&(t.innerHTML=f.dd(e),s(),f.Lb(!0),i(),f.$a())},f.Sb=function(){f.v();var e=f.s,t=f.D;f.s=Math.min(1,(f.I?f.n:T-f.n)/T),f.D=Math.min(1,1-f.u/C),e!=f.s&&t!=f.D&&f.aa()},f.L=function(e,t){f.n=Math.min(T,Math.max(0,e)),f.u=Math.min(C,Math.max(0,t)),c.right=""+Math.floor(T-f.n-f.scrollX)-5+"px",c.bottom=""+Math.floor(C-f.u-f.scrollY)+"px"},f.q=function(){f.v();for(var e=3;e-->0&&(k!=f.n||L!=f.u);)f.L(k,L),f.v()},f.Vc=function(){f.g!="h"&&f.q()},f.Tb=function(){f.v();var e=Math.abs(N-f.n)+Math.abs(C-f.u);return e<90},f.ab=function(){f.s=f.D=0,f.v(),f.L(N,C),f.q(),f.Sb()},f.Hb=function(){if(u())f.k();else if(f.g=="M")if(A.N){var e=A.N();e&&(e.bb=!0,e.r()&&a("m"))}else a("m");else f.ha()},f.Ba="v",f.Bb=u,f.cb=function(){f.ia=!1},f.va=function(){!f.ia&&u()&&(y.va(),f.ia=!0 +)},f.Tc=function(){return f.ia},f.ff=function(){},f.db=function(e){if(y){if("hm".indexOf(e||f.g)>=0){if(f.g=e,f.cb(),f.f(),f.g=="h"){c.visibility="hidden";return}}else y.xa();e=="M"&&!f.Ob&&(e="v"),f.g=e,y.Aa();var t=b("kbd_mka");t&&(t.style.display=e=="v"?"block":"none",f.q(),f.va(),y.za=1,y.Ib(!0),f.f(),c.visibility="visible")}},f.wd=function(){f.db(f.Kb)},f.J=function(){a(f.K?"m":"h")},f.k=function(){f.J(),b("kbd_ta").onclick=t,f.Ba=u(),A.a.Fa&&A.a.Fa()},f.bd=function(){if(A.N){var e=A.N();e&&e.bb?a("m"):a("v")}else a("v")},f.ha=function(){a("v"),f.Ba=u(),A.a.Fa&&A.a.Fa()}},A.a=new A.Qe,p._kbdHide=function(){A.a.J()},A.Ea=function(){var e=A.a.Ea(d.getElementsByTagName("textarea")),t=A.a.Ea(d.getElementsByTagName("input"));return e||t},A.a.Td=function(t){var n=A.a.Nb("-",new A.Mb(t));n.kb=n.Fd({}),A.a.Za(n),A.a.Jb({Ob:!1,$c:"h",Qb:t.Qb||"▲",Pb:t.Pb||"▼",Rb:e})},p._kbdS2=function(e){A.a.p(e)},A.a.Af=!0,A.a.sa=!1,A.a.$b="move",A.a.Yb=function(e){var t=this;e.onmousedown=function(e){return t.Be=d.onmousemove,d.onmousemove=function(e){return t.ze(e||p.event)},t.Ae(e||p.event),!1},e.onmouseup=function(){t.Ic(),d.onmousemove=t.Be},e.onblur=function(){t.Ic()}},A.a.Bf=function(e){var t=this;t.D=Math.floor(e%1201)/1200,t.s=Math.floor(e/1201)/2e3,t.q(),t.Tb()&&t.ab()},A.a.Ic=function(){var e=this;e.sa&&(e.Sb(),e.va(),e.sa=!1)},A.a.Ae=function(e){var t=this;t.ve=e.clientX-t.left(),t.we=e.clientY-t.top(),t.sa=!0},A.a.ze=function(e){var t=this;return t.sa&&t.L(e.clientX-t.ve-t.scrollX,e.clientY-t.we-t.scrollY),!t.sa},w.De=!1,w.na=!0,w.Oa=!0,w.sc=!0,w.jc=function(e){w.na=e},w.Df=function(e){w.sc=e},w.Ff=function(e){w.Oa=e},w.od=function(){return w.Oa},w.kc=function(e){A.a.Vb=e},w.ub=function(e){if(e in w.Xa||w.Wa[e])return e==e.toUpperCase()&&(e=w.Xa[e]),e;throw e+" is not a supported layout."},w.xb=t,w.Ef=function(e){w.xb=e},w.Ze=function(t){A.a.q=function(){A.a.v();var n=t(A.a.height,A.a.width);typeof n.x!=e&&typeof n.y!=e&&(A.a.L(n.x,n.y),A.a.v())}},w.We=function(e){return e=w.ub(e),w.Wa[e]},w.Rd=function(e){typeof e=="string"&&(e=document.getElementById(e));if(e&&e.id){if(!w.Oa)return e.id;if(w.qc(e))return e.id}return t},w.qc=function(e){var t=e.nodeName.toLowerCase();return t=="textarea"||t=="input"&&e.type.toLowerCase()=="text"},w.la=[],w.qa={},w.La=[],w.xe=function(){return A.a.c},w.gc=function(e){var t=w.qa[e];t?typeof t=="object"&&w.loadme(t):(w.qa[e]="loading",e=w.De+e+".js",t=document.createElement("script"),t.src=e,document.body.appendChild(t))},w.Na=function(e,t){for(var n=0;n0&&A.a.Yc("-"),typeof e[0]=="object")for(var r=e,e=[],i=0;i0)for(i in e)s=w.ub(e[i]),w.gc(s);if(!n||n.length==0)if(w.P=this,!A.a.c)A.a.c=document.activeElement;this.Hd(n),w.La.push(this);for(i=0;i0&&this.rb(e[0])},w.i.prototype.Hd=function(e){for(var t in e){var n=w.Rd(e[t]);if(n&&(this.ma.push(n),w.la[n]&&w.la[n].Na(n),w.la[n]=this,!A.a.c)){var r=document.activeElement;if(r)if(w.Oa){if(w.qc(r)&&r.id!=n)continue}else if(r.id!=n)continue;A.a.c=document.getElementById(n)}}},w.ka="",w.loadme=function(e){var t=e.id;w.qa[t]=e,A.a.Td(e),w.sc&&A.a.Jb({Kb:"v"}),w.ka||A.a.Zc();for(var n in w.La)w.La[n].Ud(t);A.a.Lb(),w.xb&&w.xb(t),w.ka=t},n=w.i.prototype,n.fe=function(){if(w.P)return!0;var e=w.xe();if(e)for(var t=0;t=0;t--)if(this.pa[t]==e){this.b=e,this.fe()&&this.vc(e),this.pa=this.pa.slice(t+1);break}},n.Na=function(e){w.Na(this.ma,e),this.ma.length==0&&w.Na(w.La,this)},n.Ka=function(){return w.P?A.a.b||w.ka:this.b||A.a.b||w.ka},n.rb=function(e){e=w.ub(e),e in w.qa&&typeof w.qa[e]=="object"?(this.b=e,this.vc(e)):(this.pa.push(e),w.gc(e))},n.Qd=function(){return this.hc},n.r=function(){return A.a.Bb()},n.Xe=function(){return!!A.a.d},n.zb=function(e){A.a.Ba=e,this.w(e)},n.w=function(e){e?(this.hc++,A.a.bd()):A.a.J()},w.ea=function(e){A.a.ea=e},w.ga=function(e){A.a.ga=e},w.Da=function(e){A.a.Da=e},w.lc=function(e){A.a.Fa=e},w.$e=function(e){A.a.Ub=e},w.ic=function(e){A.a.fb=e},w.K=function(e){A.a.K=e},w.hangulTransform=function(e){return l.Ye(e)},p._kbdSI=function(e){if(e&&e!=A.a.c&&A.a.d&&e.className!=A.a.d.Ia){var n=w.P||w.la[e.id];n?(A.a.c=e,n.rb(n.Ka()),n.w(A.a.Ba)):(A.a.c=t,w.na?A.a.J():(A.a.cb(),A.a.f()))}},p._kbdIF=function(){w.na&&(A.a.c=t,A.a.J())},p._kbdWB=function(){w.na&&(!A.eb||!A.a.ad())&&(A.a.c=t,A.a.J())},p._kbdWF=function(){w.na&&document.activeElement&&document.activeElement.onfocus&&document.activeElement.onfocus()},A.N=function(){var e;return A.a.c&&A.a.c.id&&(e=w.la[A.a.c.id]),e?e:w.P},f("google.elements.keyboard.Keyboard",w.i),f("google.elements.keyboard.Keyboard.prototype.getLayout",w.i.prototype.Ka),f("google.elements.keyboard.Keyboard.prototype.setLayout",w.i.prototype.rb),f("google.elements.keyboard.Keyboard.prototype.isVisible",w.i.prototype.r),f("google.elements.keyboard.Keyboard.prototype.isReady",w.i.prototype.Xe),f("google.elements.keyboard.Keyboard.prototype.setVisible",w.i.prototype.zb),f("google.elements.keyboard.setVisibilityChangeCallback",w.lc),f("google.elements.keyboard.setLayoutChangeCallback",w.$e),f("google.elements.keyboard.getLayoutName",w.We),f("google.elements.keyboard.setAutoHide",w.jc),f("google.elements.keyboard.setSendShiftKeyUpEventUponInput",w.kc),f("google.elements.keyboard.enableGoogleLogo",w.ea),f("google.elements.keyboard.helpLink",w.ga),f("google.elements.keyboard.cfgLink",w.Da),f("google.elements.keyboard.enableKeyCodeScheme",w.ic),f("google.elements.keyboard.enableMinMaxMode",w.K),f("google.elements.keyboard.hangulTransform",w.hangulTransform),f("google.elements.keyboard.loadme",w.loadme),f("google.elements.keyboard.setHomePositionCallback",w.Ze),f("google.elements.keyboard.LayoutName",w.Wa),f("google.elements.keyboard.LayoutCode",w.Xa),w.Xa={ALBANIAN:"sq",ARABIC:"ar",ARMENIAN_EASTERN:"hy_east",ARMENIAN_WESTERN:"hy_west",BASQUE:"eu",BELARUSIAN:"be",BENGALI_INSCRIPT:"bn_inscript",BENGALI_PHONETIC:"bn_phone",BOSNIAN:"bs",BRAZILIAN_PORTUGUESE:"pt_br",BULGARIAN:"bg",BULGARIAN_PHONETIC:"bg_phone",CATALAN:"ca",CHEROKEE:"chr",CROATIAN:"hr",CZECH:"cs",CZECH_QWERTZ:"cs_qwertz",DANISH:"da",DARI:"prs",DUTCH:"nl",DEVANAGARI_PHONETIC:"deva_phone",ENGLISH:"en",ESTONIAN:"et",ETHIOPIC:"ethi",FINNISH:"fi",FRENCH:"fr",GALICIAN:"gl",GEORGIAN_QWERTY:"ka_qwerty",GEORGIAN_TYPEWRITER:"ka_typewriter",GERMAN:"de",GREEK:"el",GUJARATI_INSCRIPT:"gu_inscript",GUJARATI_PHONETIC:"gu_phone",GURMUKHI_INSCRIPT:"guru_inscript",GURMUKHI_PHONETIC:"guru_phone",HEBREW:"he",HINDI:"hi",HUNGARIAN_101:"hu_101",ICELANDIC:"is",ITALIAN:"it",KANNADA_INSCRIPT:"kn_inscript",KANNADA_PHONETIC:"kn_phone",KAZAKH:"kk",KHMER:"km",KOREAN:"ko",KYRGYZ:"ky_cyrl",LAO:"lo",LATVIAN:"lv",LITHUANIAN:"lt",MACEDONIAN:"mk",MALAYALAM_INSCRIPT:"ml_inscript",MALAYALAM_PHONETIC:"ml_phone",MALTESE:"mt",MAORI:"mi",MONGOLIAN_CYRILLIC:"mn_cyrl",MONTENEGRIN:"srp",NORWEGIAN:"no",ORIYA_INSCRIPT:"or_inscript",ORIYA_PHONETIC:"or_phone",PAN_AFRICA_LATIN:"latn_002",PASHTO:"ps",PERSIAN:"fa",POLISH:"pl",PORTUGUESE:"pt_pt",ROMANI:"rom",ROMANIAN:"ro",ROMANIAN_SR13392_PRIMARY:"ro_sr13392_primary",ROMANIAN_SR13392_SECONDARY:"ro_sr13392_secondary",RUSSIAN:"ru",SANSKRIT_PHONETIC:"sa_phone",SERBIAN_CYRILLIC:"sr_cyrl",SERBIAN_LATIN:"sr_latn",SINHALA:"si",SLOVAK:"sk",SLOVAK_QWERTY:"sk_qwerty",SLOVENIAN:"sl",SOUTHERN_UZBEK:"uzs",SPANISH:"es_es",SWEDISH:"sv",SWISS_GERMAN:"de_ch",TAMIL_99:"ta_tamil99",TAMIL_INSCRIPT:"ta_inscript",TAMIL_PHONETIC:"ta_phone",TATAR:"tt",TELUGU_INSCRIPT:"te_inscript",TELUGU_PHONETIC:"te_phone",THAI:"th",TURKISH_F:"tr_f",TURKISH_Q:"tr_q",UIGHUR:"ug",UKRAINIAN_101:"uk_101",URDU:"ur",UZBEK_LATIN:"uz_latn",UZBEK_CYRILLIC_PHONETIC:"uz_cyrl_phone",UZBEK_CYRILLIC_TYPEWRITTER:"uz_cyrl_type",VIETNAMESE_TCVN:"vi_tcvn",VIETNAMESE_TELEX:"vi_telex",VIETNAMESE_VIQR:"vi_viqr"},w.Wa={ar:"العربية",be:"беларуская",bg:"български език",bg_phone:"български език(фонетика)",bn_inscript:"বাংলা(INSCRIPT)",bn_phone:"বাংলা(ফোনেটিক)",bs:"bosanski",ca:"català",chr:"ᏣᎳᎩ",cs:"čeština",cs_qwertz:"čeština QWERTZ",da:"dansk",de:"Deutsch",de_ch:"Deutschsprachige Schweiz",deva_phone:"देवनागरी(फोनेटिक)",el:"ελληνικά",en:"English",es_es:"español",et:"eesti keel",ethi:"ግዕዝ",eu:"Euskara",fa:"فارسی",fi:"suomi",fr:"français",gl:"Galego",gu_inscript:"ગુજરાતી(INSCRIPT)",gu_phone:"ગુજરાતી(ફોનેતિક)",guru_inscript:"ਗੁਰਮੁਖੀ(INSCRIPT)",guru_phone:"ਗੁਰਮੁਖੀ(ਫੋਨੇਟਿਕ)",he:"עִבְרִית",hi:"हिंदी",hr:"hrvatski",hu_101:"magyar nyelv(101)",hy_east:"Արևելահայերեն",hy_west:"Արեւմտահայերէն",is:"íslenska",it:"italiano",ka_qwerty:"ქართული (ქწერტყ)",ka_typewriter:"ქართული (საბეჭდი მანქანა)",kk:"Қазақ",km:"អក្សរខ្មែរ NiDA",ko:"한국어",kn_inscript:"ಕನ್ನಡ(INSCRIPT)",kn_phone:"ಕನ್ನಡ(ಫೊನೆಟಿಕ್)",ky_cyrl:"Кыргыз",latn_002:"Africa Latin",lo:"ພາສາລາວ",lt:"lietuvių kalba",lv:"latviešu valoda",mi:"Māori",mk:"македонски",ml_inscript:"മലയാളം(INSCRIPT)",ml_phone:"മലയാളം(ഫൊണറ്റിക്)",mn_cyrl:"Монгол",mt:"Malti",nl:"Nederlands",no:"norsk",or_inscript:"ଓଡ଼ିଆ(INSCRIPT)",or_phone:"ଓଡ଼ିଆ(ଫୋନେଟିକ)",pl:"polski",prs:"فارسی دری",ps:"پښتو",pt_br:"português brasileiro",ro:"română",ro_sr13392_primary:"română SR13392 Primary",ro_sr13392_secondary:"română SR13392 Secondary",pt_pt:"português europeu",rom:"rromani ćhib",ru:"Pyccĸий",sa_phone:"संस्कृतम्(फोनेटिक)",si:"ශුද්ධ සිංහල SLS1134",sk:"slovenský jazyk",sk_qwerty:"slovenščina QWERTY",sl:"slovenščina",sq:"shqip",srp:"Crnogorski jezik",sr_cyrl:"Српски",sr_latn:"Srpski",sv:"svenska",ta_tamil99:"தமிழ்(TAMIL99)",ta_inscript:"தமிழ்(INSCRIPT)",ta_phone:"தமிழ்(போனெடிக்)",te_inscript:"తెలుగు(INSCRIPT)",te_phone:"తెలుగు(ఫోనెటిక్)",th:"ภาษาไทย",tr_f:"Türkçe - F",tr_q:"Türkçe - Q",tt:"Татар",ug:"ئۇيغۇرچە",uk_101:"украї́нська мо́ва(101)",ur:"اردو",uz_latn:"O‘zbek",uz_cyrl_phone:"Ўзбек(фонетичні)",uz_cyrl_type:"Ўзбек(Російська)",uzs:"Southern Uzbek",vi_tcvn:"Tiếng Việt TCVN 6064",vi_telex:"Tiếng Việt Telex",vi_viqr:"Tiếng Việt VIQR"},f("google.elements.keyboard.LayoutName",w.Wa),f("google.elements.keyboard.LayoutCode",w.Xa);var j={id:"ar",title:"لوحة مفاتيح اللغة العربية",direction:"rtl",mappings:{"scl,sc,sl,s":{"À1234567890m=":"ّ!@#$%^&*)(_+",QWER:"ًٌَُ",T:"لإ","YUIOPÛÝÜ":"إ‘÷×؛<>|",ASDF:"ٍِ][",G:"لأ","HJKL;Þ":'أـ،"',ZXCV:"~ْ}{",B:"لآ","NM¼¾¿":"آ’,.؟"},"cl,l,c,":{"À1234567890m=":"ذ١٢٣٤٥٦٧٨٩٠-=","QWERTYUIOPÛÝÜ":"ضصثقفغعهخحجد\\","ASDFGHJKL;Þ":"شسيبلاتنمكط",ZXCV:"ئءؤر",B:"لا","NM¼¾¿":"ىةوزظ"}}};google.elements.keyboard.loadme(j);if(window.jstiming){window.jstiming.Jc={},window.jstiming.Ie=1;var F=function(t,n,r){var i=t.t[n],s=t.t.start;if(i&&(s||r))return i=t.t[n][0],s=r!=e?r:s[0],i-s},I=function(e,t,n){};window.jstiming.report=function(e,t,n){}}var U=new a;R(),f("google.tia.positionTia",function(e,t){U.Hc(e,t)}),f("google.tia.isVisible",function(){U.r()}),f("google.tia.show",function(){U.ha()}),f("google.tia.hide",function(){U.k()})})(); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard.tpl new file mode 100755 index 000000000..c1779488e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/keyboard.tpl @@ -0,0 +1,19 @@ +<%require name="common:widget/keyboard/`$head.dir`/`$head.dir`.css"%> + +<%script%> +require.async("common:widget/ui/jquery/jquery.js", function($) { + var $keyBoard = $("#searchKeyboard"); + $keyBoard.attr("src", $keyBoard.attr("data-src")); + $keyBoard.one("e_go.keyboard", function() { + require.async("common:widget/keyboard/keyboard-async.js"); + }); + + $(function() { + $keyBoard.trigger("e_go.keyboard"); + }); + + $keyBoard.one("mouseenter", function() { + $(this).trigger("e_go.keyboard"); + }); +}); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/ltr/ltr.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/rtl/rtl.css new file mode 100755 index 000000000..f70423bb6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/keyboard/rtl/rtl.css @@ -0,0 +1,56 @@ +.box-search_keyboard { + cursor: pointer; + border-radius: 2px; + background-color: #e1e1e3; + width: 23px; + height: 23px; + margin: 1px; + margin-bottom: 0; +} +.box-search_keyboard:hover { + background-color: #dcdcde; +} +.keyboard-down{ + background-color: #52ac79 !important; +} +#kbd{ + position:absolute !important; + top:130px; + z-index: 100; +} +.outerbox{ + max-height:152px; +} +#kbd input.goog-button,#kbd button.goog-button{height:16px;} + + /* 新版首页 keyboard */ +.flow-on #kbd,body #kbd td{ + background-color: #f5f6f7; +} +.flow-on #kbd{ + border-color: #e6e6e6; + padding-top: 5px; +} +.flow-on #kbd #close{ + background: url(../img/icon-n.png) no-repeat; + margin-left: 7px; + width: 5px !important; + height: 7px !important; + padding: 2px 1px; +} +.flow-on #kbd #close:hover{ + background: url(../img/icon_hover-n.png) no-repeat; +} + +.flow-on .box-search_keyboard{ + margin-top: 3px; + background-color: #919191; + visibility: visible; +} + +.flow-on .box-search_keyboard:hover{ + background-color: #919191; +} +.flow-on .keyboard-down{ + background-color: #1c81e5 !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb-click.png new file mode 100755 index 000000000..b314d87dd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb-hover.png new file mode 100755 index 000000000..4e4a6a368 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb.png new file mode 100755 index 000000000..ecacef42b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/i-popup-fb.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login-click.png new file mode 100755 index 000000000..72bcb23db Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login-hover.png new file mode 100755 index 000000000..14f5695e2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login.png new file mode 100755 index 000000000..645d16439 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/img/popup-login.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/login-popup.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/login-popup.tpl new file mode 100755 index 000000000..fd9347511 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/login-popup.tpl @@ -0,0 +1,28 @@ +<%if $head.dir=='ltr'%> + <%require name="common:widget/login-popup/ltr/ltr.css"%> +<%else%> + <%require name="common:widget/login-popup/rtl/rtl.css"%> +<%/if%> + +<%script%> +require.async(["common:widget/ui/jquery/jquery.js", "common:widget/ui/popup/popup.js"], function($, Popup){ + <%if !empty($body.loginPopup.selector)%> + $(document).on("click", "<%$body.loginPopup.selector%>", function(){ + if(window.loginCtroller.verify != 1){ + var options = { + title: "<%$body.loginPopup.title%>", + content: '', + key: "loginPop", + dir: "<%$head.dir%>" + }; + Gl.loginPopup = new Popup(options); + Gl.loginPopup.init(); + } + }).on("click", "#popupFBBtn", function(){ + if(window.loginCtroller.verify != 1){ + window.loginCtroller && window.loginCtroller.fire(); + } + }); + <%/if%> +}); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/ltr/ltr.css new file mode 100755 index 000000000..79c532b75 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/ltr/ltr.css @@ -0,0 +1,71 @@ +.login-popup-content { + width: 260px; + margin: 0px auto; +} +.login-popup-content .popup-login-btn{ + display: block; + width: 230px; + margin: 25px auto 0px; + background: url(../img/popup-login.png?__sprite) repeat-x; + border-top: 1px solid #6b90dc; + border-right: 1px solid #476bba; + border-bottom: 1px solid #1d3e91; + border-left: 1px solid #476bba; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + cursor: pointer; + box-shadow: 0px 1px 3px #555; + height: 35px; +} +.login-popup-content .i-popup-fb { + display: inline-block; + float: left; + width: 29px; + height: 35px; + border-right: 1px solid #5476b9; + background: url(../img/i-popup-fb.png?__sprite) no-repeat; +} +.login-popup-content .popup-login-text { + display: inline-block; + float: left; + height: 35px; + line-height: 35px; + border-left: 1px solid #6086cf; + padding: 0 20px; + font-size: 14px; + color: #fff; +} +.login-popup-content .popup-login-desc{ + margin-top: 20px; + color: #999999; +} +.login-popup-content .popup-login-btn:hover { + background: url(../img/popup-login-hover.png?__sprite) repeat-x; + border-top: 1px solid #f67a35; + border-right: 1px solid #df551e; + border-bottom: 1px solid #c72f07; + border-left: 1px solid #ee671c; +} +.login-popup-content .popup-login-btn:hover .i-popup-fb { + border-right: 1px solid #cf6d24; + background: url(../img/i-popup-fb-hover.png?__sprite) no-repeat; +} +.login-popup-content .popup-login-btn:hover .popup-login-text { + border-left: 1px solid #d68a57; +} +.login-popup-content .popup-login-btn:active { + background: url(../img/popup-login-click.png?__sprite) repeat-x; + border-top: 1px solid #f67a35; + border-right: 1px solid #df551e; + border-bottom: 1px solid #c72f07; + border-left: 1px solid #ee671c; +} +.login-popup-content .popup-login-btn:active .i-popup-fb { + border-right: 1px solid #cf762c; + background: url(../img/i-popup-fb-click.png?__sprite) no-repeat; +} +.login-popup-content .popup-login-btn:active .popup-login-text { + border-left: 1px solid #d6915d; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/rtl/rtl.css new file mode 100755 index 000000000..2724315b6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/login-popup/rtl/rtl.css @@ -0,0 +1,75 @@ +.login-popup-content { + width: 260px; + margin: 0px auto; +} +.login-popup-content .popup-login-btn{ + display: block; + width: 230px; + margin: 25px auto 0px; + background: url(../img/popup-login.png?__sprite) repeat-x; + border-top: 1px solid #6b90dc; + border-left: 1px solid #476bba; + border-bottom: 1px solid #1d3e91; + border-right: 1px solid #476bba; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + cursor: pointer; + box-shadow: 0px 1px 3px #555; + height: 35px; +} +.login-popup-content .i-popup-fb { + display: inline-block; + float: right; + width: 29px; + height: 35px; + border-left: 1px solid #5476b9; + background: url(../img/i-popup-fb.png?__sprite) no-repeat; +} +.login-popup-content .popup-login-text { + display: inline-block; + float: right; + height: 35px; + line-height: 35px; + border-right: 1px solid #6086cf; + padding: 0 20px; + font-size: 14px; + color: #fff; +} +.login-popup-content .popup-login-desc{ + margin-top: 20px; + color: #999999; +} +.login-popup-content .popup-login-btn:hover { + background: url(../img/popup-login-hover.png?__sprite) repeat-x; + border-top: 1px solid #f67a35; + border-left: 1px solid #df551e; + border-bottom: 1px solid #c72f07; + border-right: 1px solid #ee671c; +} +.login-popup-content .popup-login-btn:hover .i-popup-fb { + border-left: 1px solid #cf6d24; + background: url(../img/i-popup-fb-hover.png?__sprite) no-repeat; +} +.login-popup-content .popup-login-btn:hover .popup-login-text { + border-right: 1px solid #d68a57; +} +.login-popup-content .popup-login-btn:active { + background: url(../img/popup-login-click.png?__sprite) repeat-x; + border-top: 1px solid #f67a35; + border-left: 1px solid #df551e; + border-bottom: 1px solid #c72f07; + border-right: 1px solid #ee671c; +} +.login-popup-content .popup-login-btn:active .i-popup-fb { + border-left: 1px solid #cf762c; + background: url(../img/i-popup-fb-click.png?__sprite) no-repeat; +} +.login-popup-content .popup-login-btn:active .popup-login-text { + border-right: 1px solid #d6915d; +} + +/*popup modify*/ +.popup-title-wrap .popup-title{float: right;margin-right: 18px;} +.popup-title-wrap i.i-popup-close{float: left;margin-left: 10px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ar/ar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ar/ar.tpl new file mode 100755 index 000000000..ad50cfd02 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ar/ar.tpl @@ -0,0 +1,251 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps-cookie/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if !empty($engine.tn[0].param)%><%foreach $engine.tn as $tn%><%if $tn.param == $root.urlparam.tn%><%$engine.hide = 'true'%><%/if%><%/foreach%><%/if%> + <%if empty($engine.hide)%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "eg", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google": { + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: false + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + detail = detail ? ' - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/bg.png new file mode 100755 index 000000000..4e04de967 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/br/br.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/br/br.tpl new file mode 100755 index 000000000..548cc59aa --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/br/br.tpl @@ -0,0 +1,215 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps-cookie/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if !empty($engine.tn[0].param)%><%foreach $engine.tn as $tn%><%if $tn.param == $root.urlparam.tn%><%$engine.hide = 'true'%><%/if%><%/foreach%><%/if%> + <%if empty($engine.hide)%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "br", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google_br": { + autoCompleteData: false, + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "pt-BR", + "sugexp": "lemsnc", + "xhr": "f" + }, + templ: false + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.br.search.yahoo.net/gossip-br-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "google.sbox.p0 && google.sbox.p0", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "pt", + "gl": "br", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "kboing": { + url: null + }, + "google_dict": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "postbar": { + url: null + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-click.png new file mode 100755 index 000000000..7828b5d56 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-hover.png new file mode 100755 index 000000000..d11e540ed Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side-click.png new file mode 100755 index 000000000..b66706676 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side-hover.png new file mode 100755 index 000000000..693ac8896 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side.png new file mode 100755 index 000000000..d2b3c4f93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn-side.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn.png new file mode 100755 index 000000000..e0d576570 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/bg-search-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search-click.png new file mode 100755 index 000000000..31d004952 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search-hover.png new file mode 100755 index 000000000..a01e36716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search.png new file mode 100755 index 000000000..d8d67bc2c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.css new file mode 100755 index 000000000..3de7db983 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.css @@ -0,0 +1,398 @@ +/*============box_search=============*/ +.box-search { + margin: 20px auto 0; + width: 777px; +} +.box-search_inner { + height:68px; +} +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + margin-left: 161px; + position: relative; + z-index: 8; + clear: both; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:left; + padding: 4px 12px 3px; + margin-left: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + background: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +/*.box-search_more { + line-height:normal; + position: absolute; + float:right; + cursor:pointer; + z-index:8; + top: -8px; + right: -8px; + border: 1px solid #edf0ef; + border-bottom: 0 none; +} +.box-search_more dt { + margin-top: 6px; +} +.box-search_more a:hover { + background: transparent; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more dt a { + margin: 0; + padding: 4px 17px 3px 9px; + color: #4c4c4c; + text-align: right; + display: block; + float: none; + line-height: 14px; + background:url(../bg.png) right -337px no-repeat transparent !important; +} +.box-search_more dt a:focus { + outline: none; +} +.box-search_more_hover { + background-color: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_more_show { + border:1px solid #e3e4e6; + background: #fff; +} +.box-search_more_show dt { + margin-top: 0px; + padding-top: 6px; +} +.box-search_more_show dt a { + background-position:right -351px !important; +} +.box-search_more_show .box-search_more_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more_show dd { + line-height: 31px; +} +.box-search_more_show dd a { + padding:0 15px 0 9px; + display:block; + float:none; + color: #666; + text-align: right; + margin:0; +} +.box-search_more_hide { + display: none; +}*/ +.box-search_tab a:focus { + outline:none; +} /*clear FF's focusborder*/ +.box-search_tab a.cur { + color:#00b075; /*font-weight:bold;*/ + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + display: block; + float: left; + height: 6px; + line-height: 6px; + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-left: -1px; +} +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 5px 0 0; + float: left; + z-index: 6; +} +.box-search_logo { + position: absolute; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search_logo a { + padding-right: 18px; + display: block; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt , .box-search_logo dd { + padding: 10px 8px 10px 7px; + /*cursor: pointer;*/ +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) right -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: right -390px; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +} + +/*box-search_form*/ +.box-search_form { + padding:3px 0px 5px 113px; +} +.box-search_form .input { + border: 1px solid #d9d9d9; + border-top: 1px solid #bfbfbf; + margin-right: 13px; + position: relative; + z-index:5; +} +.box-search_form .input input { + border:none; + background:#fff; + width:518px; + float:left; + overflow:hidden; + height:20px; + font-size: 14px; + line-height:20px\9; + padding:4px 0 3px 10px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + left: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} +.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +} +.btn-search { + white-space:nowrap; + line-height:29px; + overflow: hidden; + _float: left; + *margin:0;/*fix non-IE'problem because of vertical-align*/ +} +.btn-search_l, .btn-search_r { + width:3px; + height:29px; + background:url(../img/bg-search-btn-side.png?__sprite) no-repeat; + vertical-align:inherit; + float: left; +} +.btn-search_r { + background:url(../img/bg-search-btn-side.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_c { + background:url(../img/bg-search-btn.png?__sprite) repeat-x; + vertical-align:top; + border:none; + color:#fff; + height:29px; + text-align:center; + width:66px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; +} +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 29px; +} +.btn-search_hover .btn-search_l { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; +} +.btn-search_hover .btn-search_r { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_hover .btn-search_c { + background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x; +} +.btn-search_hover .btn-search_ico { + background: url(../img/i-search-hover.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_l { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_r { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_click .btn-search_c { + background:url(../img/bg-search-btn-click.png?__sprite) repeat-x; +} +.btn-search_click .btn-search_ico { + background: url(../img/i-search-click.png?__sprite) no-repeat; +} +.box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ +} +.box-search_form .radios label { + display:block; + padding-left:15px; + text-indent:-15px; + float:left; + margin-right:18px; + color:#666; + font-size: 13px; +} +.box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-right:5px; + vertical-align:bottom; + position:relative; + top:-1px; + overflow:hidden; +} + +/*set hot search words & search button*/ +.box-search_hsrch { + width: 617px; + margin-left: 160px; + overflow: hidden; + padding-top: 2px; + color: #919191; + white-space: nowrap; + _margin-top:-14px; +} +.hsrch_title { + font-weight: bold; + margin-right: 8px; + /*padding-left: 10px;*/ + color: #919191; +} +.hsrch_word span { + display: inline-block; + margin-right: 16px; +} +.hsrch_word a{ + color: #919191; +} +.hsrch_word a:hover { + color: #00B075; + text-decoration: underline; +} + +/*size setting*/ +.box-search-m .box-search_logo img { + width:107px; + height:40px; +} +.box-search-m .box-search_logo_wrap { + width: 142px; + height: 62px; + margin-top: -14px; +} +.box-search-m .box-search_logo dt a { + background-position: right -62px; +} +.box-search-m .box-search_logos_show dt a { + background-position: right -87px; +} +.box-search-m .box-search_tab { + margin-left: 148px; +} +.box-search-m .box-search_hsrch { + margin-left: 148px; +} +.box-search-s .box-search_logo img { + width:85px; + height:32px; +} +.box-search-s .box-search_logo_wrap { + width: 120px; + height: 54px; + margin-top: -9px; +} +.box-search-s .box-search_logo dt a { + background-position: right -67px; +} +.box-search-s .box-search_logos_show dt a { + background-position: right -93px; +} +.box-search-s .box-search_tab { + margin-left: 126px; +} +.box-search-s .box-search_hsrch { + margin-left: 126px; +} + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo{border-width:0px;} +.skin-type-dark .box-search_tab a{color: #ffffff;} +body.skin-type-dark .box-search_tab a.cur{color: #ffffff;} +.skin-type-dark .box-search_tab a:hover{background: #595959;background: rgba(0,0,0,0.6);} +.skin-type-dark #searchGroupRadios label{color: #ffffff;} +.skin-type-dark .box-search_logo_disabled dt.box-search_logo_hover, .skin-type-dark .box-search_logo_disabled dt a{background: 0;} +.box-search_logo_disabled, .box-search_logos_show{border: 0;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.more.css new file mode 100755 index 000000000..726cceec8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.more.css @@ -0,0 +1,22 @@ + +/*sug has url*/ +.sug-url { + height:45px; + border-bottom:1px solid #e1e1e1; +} +.sug-url a { + display: block; + text-decoration: none; + color: #0000EE; +} +.sug-url .sug-hl { + height: 25px; + text-decoration: underline; + font-weight:bold; + font-size:14px; +} +.sug-url .sug-frm { + line-height: 16px; + font-size: 12px; + color: green; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.tpl new file mode 100755 index 000000000..b9832c01b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/ltr/ltr.tpl @@ -0,0 +1,77 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($value.hide)%> + <%if $value@first%> + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              <%$value.title%>
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%if !empty($smarty.cookies['searchEngine']) && $smarty.cookies['searchEngine'] < $sBoxTag[0].engine|@count%> + <%$engineNum = $smarty.cookies['searchEngine']%> + <%else%> + <%$engineNum = 0%> + <%/if%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($value.hide)%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if !empty($value.tn[0].param)%><%foreach $value.tn as $tn%><%if $tn.param == $root.urlparam.tn%><%$value.hide = 'true'%><%/if%><%/foreach%><%/if%><%if $value@index != $engineNum%><%$value.hide = 'true'%><%/if%><%if empty($value.hide)%> +
                              + + + + + + +
                              + <%break%><%/if%><%/foreach%> +
                              + <%$logoIndex = 0%> + <%foreach $sBoxTag[0].engine as $value%> + <%if !empty($value.tn[0].param)%><%foreach $value.tn as $tn%><%if $tn.param == $root.urlparam.tn%><%$value.hide = 'true'%><%/if%><%/foreach%><%/if%><%if empty($value.hide)%> + + <%$logoIndex = $logoIndex + 1%> + <%/if%><%/foreach%> +
                              +
                              +
                              +
                              +
                              + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.css new file mode 100755 index 000000000..07d961883 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.css @@ -0,0 +1,448 @@ +/*.box-search_form .input div{ float: left;}*/ /*为啥加?会导致ps sug出现问题*/ + +/*============box_search=============*/ +.box-search { + margin: 20px auto 0; + width: 780px; +} +.box-search_inner { + height:68px; +} +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + margin-right: 161px; + position: relative; + z-index: 8; + clear: both; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:right; + padding: 4px 12px 3px; + margin-right: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + background: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +/*.box-search_more { + line-height:normal; + position: absolute; + float:right; + cursor:pointer; + z-index:8; + top: -8px; + left: -7px; + border: 1px solid #edf0ef; + border-bottom: 0 none; +} +.box-search_more dt { + position: relative; + margin-top: 6px; +} +.box-search_more a:hover { + background: transparent; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more dt a { + margin: 0; + padding: 4px 9px 3px 17px; + color: #4c4c4c; + text-align: right; + display: block; + float: none; + line-height: 14px; + width: 30px; + overflow: hidden; +} +.box-search_more dt a:focus { + outline: none; +} +.box-search_more_hover { + background-color: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_more .arrow, .box-search_more .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 3px dashed transparent; +} +.box-search_more .arrow { + border-top-color: #4ac29a; + border-top-style: solid; + top: 10px; + right: 42px; +} +.box-search_more .arrow_bg { + border-top-color: #edf0ef; + border-top-style: solid; + margin: -5px -3px 0 0; + _display: none; +} +.box-search_more_hover .arrow_bg { + border-top-color: #dcdcde; +} +.box-search_more_show .arrow { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #4ac29a; + border-bottom-style: solid; + top: 12px; +} +.box-search_more_show .arrow_bg { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #fff; + border-bottom-style: solid; + margin-top: -1px; +} +.box-search_more_show .box-search_more_hover .arrow_bg { + border-bottom-color: #f5f7f7; +} +.box-search_more_show { + border:1px solid #e3e4e6; + background: #fff; + left: auto; + right: 472px; +} +.box-search_more_show dt { + margin-top: 0px; + padding-top: 6px; +} +.box-search_more_show dt a { + background-position:left -351px !important; +} +.box-search_more_show .box-search_more_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more_show dd { + line-height: 31px; +} +.box-search_more_show dd a { + padding:0 9px 0 15px; + display:block; + float:none; + color: #666; + text-align: right; + margin:0; + overflow: hidden; +} +.box-search_more_hide { + display: none; +}*/ +.box-search_tab a:focus { + outline:none; +} /*clear FF's focusborder*/ +.box-search_tab a.cur { + color:#00b075; /*font-weight:bold;*/ + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + display: block; + float: right; + height: 6px; + line-height: 6px; + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-right: -1px; +} +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 0 0 5px; + float: right; + z-index: 6; +} +.box-search_logo { + position: absolute; + right: 0; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search_logo a { + padding-left: 18px; + display: block; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt , .box-search_logo dd { + padding: 10px 7px 10px 8px; + /*cursor: pointer;*/ +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) -10px -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: -10px -390px; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +} + +/*box-search_form*/ +.box-search_form { + padding:3px 113px 5px 0px; +} +.box-search_form .input { + background-color: #fff; + border: 1px solid #d9d9d9; + border-top: 1px solid #bfbfbf; + margin-left: 13px; + position: relative; + z-index:5; +} +.box-search_form .input input { + border:none; + background:#fff; + width:491px; + float:right; + overflow:hidden; + height:20px; + font-size: 14px; + line-height:20px\9; + padding:4px 9px 3px 0px; + *width: 488px; + *float: none; + /*fix ie10 bug*/ + margin-right: 1px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + right: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} +.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +} +.btn-search { + white-space:nowrap; + line-height:29px; + overflow: hidden; + _float: left; + *margin:0;/*fix non-IE'problem because of vertical-align*/ +} +.btn-search_l, .btn-search_r { + width:3px; + height:29px; + background:url(../img/bg-search-btn-side.png?__sprite) no-repeat; + vertical-align:inherit; + float: left; +} +.btn-search_r { + background:url(../img/bg-search-btn-side.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_c { + background:url(../img/bg-search-btn.png?__sprite) repeat-x; + vertical-align:top; + border:none; + color:#fff; + height:29px; + text-align:center; + width:66px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; +} +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 29px; +} +.btn-search_hover .btn-search_l { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; +} +.btn-search_hover .btn-search_r { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_hover .btn-search_c { + background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x; +} +.btn-search_hover .btn-search_ico { + background: url(../img/i-search-hover.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_l { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_r { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_click .btn-search_c { + background:url(../img/bg-search-btn-click.png?__sprite) repeat-x; +} +.btn-search_click .btn-search_ico { + background: url(../img/i-search-click.png?__sprite) no-repeat; +} +.box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ +} +.box-search_form .radios label { + display:block; + padding-right:15px; + text-indent:-15px; + float:right; + margin-left:18px; + color:#666; + font-size: 13px; +} +.box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-left:5px; + vertical-align:bottom; + position:relative; + top:-1px; + overflow:hidden; +} +/*set hot search words & search button*/ +.box-search_hsrch { + width: 620px; + margin-right: 160px; + overflow: hidden; + padding-top: 2px; + color: #919191; + white-space: nowrap; + _margin-top:-14px; +} +.hsrch_title { + font-weight: bold; + margin-left: 8px; + /*padding-right: 10px;*/ + color: #919191; +} +.hsrch_word span { + display: inline-block; + margin-left: 15px; +} +.hsrch_word a{ + color: #919191; + text-align: right; +} +.hsrch_word a:hover { + color: #00B075; + text-decoration: underline; +} +/*size setting*/ +.box-search-m .box-search_logo img { + width:107px; + height:40px; +} +.box-search-m .box-search_logo_wrap { + width: 142px; + height: 62px; + margin-top: -14px; +} +.box-search-m .box-search_logo dt a { + background-position: -10px -62px; +} +.box-search-m .box-search_logos_show dt a { + background-position: -10px -87px; +} +.box-search-m .box-search_tab { + margin-right: 148px; +} +.box-search-m .box-search_hsrch { + margin-right: 148px; +} +.box-search-s .box-search_logo img { + width:85px; + height:32px; +} +.box-search-s .box-search_logo_wrap { + width: 120px; + height: 54px; + margin-top: -9px; +} +.box-search-s .box-search_logo dt a { + background-position: -10px -67px; +} +.box-search-s .box-search_logos_show dt a { + background-position: -10px -93px; +} +.box-search-s .box-search_tab { + margin-right: 126px; +} +.box-search-s .box-search_hsrch { + margin-right: 126px; +} + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo{border-width:0px;} +.skin-type-dark .box-search_tab a{color: #ffffff;} +body.skin-type-dark .box-search_tab a.cur{color: #ffffff;} +.skin-type-dark .box-search_tab a:hover{background: #595959;background: rgba(0,0,0,0.6);} +.skin-type-dark #searchGroupRadios label{color: #ffffff;} +.skin-type-dark .box-search_logo_disabled dt.box-search_logo_hover, .skin-type-dark .box-search_logo_disabled dt a{background: 0;} +.box-search_logo_disabled, .box-search_logos_show{border: 0;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.more.css new file mode 100755 index 000000000..3f240b972 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.more.css @@ -0,0 +1,69 @@ +/*------------------------suggest------------------------*/ +/*提示层外框*/ +.sug-search { + position:absolute; + top: 28px; + *top: 30px; + left: -1px; + border:1px solid #e3e4e6; + border-top: 0 none; + background:#fff; + width:528px; + color:#454545; + z-index:999; + white-space:nowrap; + overflow:hidden; +} +/*ie6 shim*/ +.sug-shim { + position:absolute; + top:-1px; + left:-1px; + z-index:-1; + filter:alpha(opacity="0"); + width:430px; + height:250px; +} +/*列表外框*/ +.sug-search ol { + font:bold 12px/23px Tahoma,arial,helvetica,clean,sans-serif; + cursor:default; +} +/*列表项*/ +.sug-search li { + padding: 3px 10px; + cursor: pointer; +} +.sug-search li b { + font: inherit; + display: inline; +} +/*选中样式*/ +.sug-search .sug-select { + background: #f5f7f7; +} +/*头部*/ +.sug-search .top { + font-weight:normal; + color:#999; + height:21px; + line-height:21px; + background:#eee; + padding:0 2px; +} +/*底部*/ +.sug-search .bot { + position:relative; + height:19px; + line-height:19px; + font-weight:normal; + border-top:1px solid #666; +} +/*高亮查询词*/ +.sug-search .sug-query { + font-weight:normal; +} +.sug-search font { + font-weight:normal !important; + color:#333 !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.tpl new file mode 100755 index 000000000..a7abd2e07 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/rtl/rtl.tpl @@ -0,0 +1,83 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($value.hide)%> + <%if $value@first%> + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              + <%$value.title%> +
                              +
                              +
                              +
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%if !empty($smarty.cookies['searchEngine']) && $smarty.cookies['searchEngine'] < $sBoxTag[0].engine|@count%> + <%$engineNum = $smarty.cookies['searchEngine']%> + <%else%> + <%$engineNum = 0%> + <%/if%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($value.hide)%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if !empty($value.tn[0].param)%><%foreach $value.tn as $tn%><%if $tn.param == $root.urlparam.tn%><%$value.hide = 'true'%><%/if%><%/foreach%><%/if%><%if $value@index != $engineNum%><%$value.hide = 'true'%><%/if%><%if empty($value.hide)%> +
                              + + + + <%widget name="common:widget/keyboard/keyboard.tpl"%> + + + +
                              + <%break%><%/if%><%/foreach%> +
                              + <%$logoIndex = 0%> + <%foreach $sBoxTag[0].engine as $value%> + <%if !empty($value.tn[0].param)%><%foreach $value.tn as $tn%><%if $tn.param == $root.urlparam.tn%><%$value.hide = 'true'%><%/if%><%/foreach%><%/if%><%if empty($value.hide)%> + + <%$logoIndex = $logoIndex + 1%> + <%/if%><%/foreach%> +
                              +
                              +
                              +
                              +
                              + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/search-box-4ps-cookie-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/search-box-4ps-cookie-async.js new file mode 100755 index 000000000..b52b7f154 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/search-box-4ps-cookie-async.js @@ -0,0 +1,590 @@ +/* +* Search box group +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + helper = require("common:widget/ui/helper/helper.js"); +require("common:widget/ui/suggest/suggest.js"); + +Gl.searchGroup = function(o) { + var _conf = conf.searchGroup, + type = o.type || "index", + logoPath = _conf.conf[type].logoPath, + + logo = $("#" + (o.logoId || "searchGroupLogo")), + logoGroup = $("#" + (o.logoGroupId || "searchGroupLogos")), + tabs = $("#" + (o.tabsId || "searchGroupTabs")), + form = $("#" + (o.formId || "searchGroupForm")), + input = $("#" + (o.inputId || "searchGroupInput")), + label = $("#" + (o.labelId || "searchGroupLabel")), + radios = $("#" + (o.radiosId || "searchGroupRadios")), + btn = $("#" + (o.btnId || "searchGroupBtn")), + // more = $("#" + (o.moreId || "searchGroupMore")), + moreTab = $("#" + (o.moreTabId || "searchGroupMoreTab")), + params = $("#" + (o.paramsId || "searchGroupParams")), + radioName = o.radioName || "searchGroupRadio", + btnWrap = btn.parent(), + inputWrap = input.parent(), + defaultN = _conf.conf[type].curN || 0, + curTab = $("a:eq(" + defaultN + ")", tabs), + tabsChildren = $("a", tabs), + //render data when init sug + defaultData = _conf.sug[_conf.list[curTab.attr("data-t")].engine[defaultN].id], + //record which form was selected in tabs + storeForm = {}, + engineCookie = $.cookie("searchEngine"), + + //reset the form about action and params + resetForm = function(data, n) { + var ret = []; + var theLogoPath = $(document.body).hasClass("skin-type-dark")?(_conf.conf[type].logoPath+"dark/"):_conf.conf[type].logoPath; + form.attr("action", data[n].action); + input.attr("name", data[n].q); + logo.attr("src", theLogoPath + data[n].logo + ".png"); + logo.attr("alt", data[n].name); + logo.parent().attr("title", data[n].name); + logo.parent().attr("data-n", n); + logo.attr("data-id", data[n].id); + + $("dd", logoGroup).remove(); + logoGroup.append(function () { + ret = []; + $.each(data, function(key, val) { + ret.push('
                              ' + val.name + '
                              '); + }); + return ret.join(""); + }); + // fix: show errors when click radios on IE + setTimeout(function() { + radios.html(function() { + ret = []; + $.each(data,function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + $("#searchGroupRadio_" + n).attr("checked", "checked"); + }, 0); + + params.html(function() { + ret = []; + $.each(data[n].params, function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + + if (data.length <= 1) { + logoGroup.addClass("box-search_logo_disabled"); + } else { + logoGroup.removeClass("box-search_logo_disabled"); + } + /*logoGroup.children().on("mouseenter", function() { + $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $(this).removeClass("box-search_logo_hover"); + });*/ + }, + + resetSug = function(data, n) { + + data = _conf.sug[data[n].id]; + $.each(data, function(key, val) { + sug.o[key] = val; + }); + //fix more prams + !data.templ && (sug.o.templ = false); + !data.callbackFn && (sug.o.callbackFn = false); + !data.callbackDataKey && (sug.o.callbackDataKey = false); + !data.callbackName && (sug.o.callbackName = false); + !data.callbackDataNum && (sug.o.callbackDataNum = false); + !data.customUrl && (sug.o.customUrl = false); + + !data.customUrl && (sug.o.customUrl = false); + !data.charset && (sug.o.charset = undefined); + sug.reset(true); + }, + + // toggle for baidu sug + resetBaiduSug = function (data, n) { + + if (!baidu_sug) { + return; + } + + data = data ? data[n].baiduSug : false; + if (data) { + baidu_sug.setMode(data.mod); + baidu_sug.toggle(true); + } else { + baidu_sug.toggle(false); + } + }, + + switchTab = function(tab) { + tab = $(tab); + curTab.removeClass("cur"); + tab.addClass("cur"); + curTab = tab; + + var t = tab.attr("data-t"), + + list = _conf.list, + engines = list[t].engine, + engLen = engines.length; + + //if the last element is null, remove it + if($.isEmptyObject(engines[engLen-1])){ + engines.length = engLen - 1; + }; + //record current form(add the current type to storeForm as a key) + storeForm[t] || (storeForm[t] = 0); + + //reset form + resetForm(engines, storeForm[t]); + + //reset suggest + resetSug(engines, storeForm[t]); + + // reset baidu sug + resetBaiduSug(engines, storeForm[t]); + + //reset hot word + label.text(list[t].hotWords); + /* + setTimeout(function() { + input.select(); + }, 16); + */ + //keep the cursor in end + /*setTimeout(function() { + setCursorPos(input[0], input.val().length); + }, 16); */ + }, + + showMore = function() { + var more = $("dd", moreTab), + list = _conf.more, + ret = []; + if ($("dd", moreTab).length === 0) { + $.each(list, function() { + ret.push('
                              ' + this.name + '
                              '); + }); + moreTab.append(ret.join("")); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + } + if(moreTab.hasClass("box-search_more_show")) { + moreTab.removeClass("box-search_more_show"); + more.each(function () { + $(this).addClass("box-search_more_hide"); + }); + } + else { + moreTab.addClass("box-search_more_show"); + more.each(function () { + $(this).removeClass("box-search_more_hide"); + }); + } + }, + + showLogo = function () { + var n = logo.parent().attr("data-n"), + logoList = $("dd", logoGroup); + if (logoGroup.hasClass("box-search_logos_show")) { + logoGroup.removeClass("box-search_logos_show"); + logoList.each(function () { + $(this).addClass("box-search_logo_hide"); + }); + } + else { + logoGroup.addClass("box-search_logos_show"); + logoList.each(function (key) { + key != n && $(this).removeClass("box-search_logo_hide"); + }); + } + }, + + //disable selection for input elements + disableSelection = function(el) { + if (typeof el.onselectstart != "undefined") { //IE + el.onselectstart = function() { + return false; + } + } else if (typeof el.style.MozUserSelect != "undefined") { //FF + el.style.MozUserSelect = "none"; + } else { //Opera + el.onmousedown = function() { + return false; + } + } + }, + + setCursorPos = function(obj, pos) { + if (obj.setSelectionRange) { + obj.focus(); + obj.setSelectionRange(pos, pos); + } else if (obj.createTextRange) { + var range = obj.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + }, + + //sug instantiation + sug = Gl.suggest(input[0], { + classNameWrap: "sug-search", + classNameQuery: "sug-query", + classNameSelect: "sug-select", + //classNameClose: "sug-close", + delay: _conf.conf[type].delay, + n: _conf.conf[type].n, + autoFocus: false, + requestQuery: defaultData.requestQuery, + requestParas: defaultData.requestParas, + url: defaultData.url, + callbackFn: defaultData.callbackFn, + callbackDataKey: defaultData.callbackDataKey, + onCheckForm: function(form) { + + if( !(/hao123/.test(logo.attr("data-id"))) ) return; + + if( !$(form).find("input[name='haobd']").get(0) ) { + $(form).append(""); + } + }, + onSearchDirect: function(li, q, prefix) { + var img = new Image(), + enco = encodeURIComponent, + collect = [], + _type = curTab.attr("data-t"), + url = "http://search.hao123.co.th/r/cl/i18n.gif?fm=se&st=3&rsv_sugtype=cr&lang=th-TH", + href = $( $(li).find("a").get(0) ).attr("href"), + title = $( $(li).find("a .sug-hl").get(0) ).text(), + + conf = { + url: href, + q: q, + title: title, + prefixsug: prefix, + haobd: $.cookie("BAIDUID"), + t: +new Date + }; + + + img.src = url + "&" + $.param(conf); // PS的统计 + + // 我们的统计 + if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId:"search" + }); + } + }, + onMouseSelect: function() { + input.select(); + var _type = curTab.attr("data-t"); + if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "sug", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "sug", + modId:"search" + }); + } + }, + templ: defaultData.templ + }); + + //clear the input's value after refresh + input.val(""); + + //some browsers may keep form's status after refresh + $("[name = radioName]:first").attr("checked", true); + + //record the default form'n + storeForm[curTab.attr("data-t")] = 0; + + // reset Baidu sug + resetBaiduSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + // Switch to the engine which recorded in cookie + if (engineCookie && !isNaN(engineCookie) && engineCookie != storeForm[curTab.attr("data-t")] && engineCookie < _conf.list[curTab.attr("data-t")].engine.length) { + $("#searchGroupRadio_" + engineCookie).attr("checked","checked"); + storeForm[curTab.attr("data-t")] = engineCookie; + resetForm(_conf.list[curTab.attr("data-t")].engine, engineCookie); + //reset suggest + resetSug(_conf.list[curTab.attr("data-t")].engine, engineCookie); + //reset baidu sug + resetBaiduSug(_conf.list[curTab.attr("data-t")].engine, engineCookie); + } + + //select text in input after submit + form.on("submit", function() { + // input.select(); + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action, + _url = _conf.list[t].engine[storeForm[t]].url, + isBlank = false; + var radioEl = $("input", radios); + for(var i = 0; i < radioEl.length; i++) { + if(radioEl.eq(i).attr("checked")) { + var checkedRadio = radioEl.eq(i); + } + } + /*if(t == "shopping" && checkedRadio.attr("id") == "searchGroupRadio_0") { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + }*/ + + // set input's value to the hot word if it was blank + if($.trim(input.val()) === "") { + if($.trim(label.text()) === ""){ + var action = _action && _url ? _url : _action; + form.attr("action", action); + } else { + input.val(label.text()); + input.css("color", "#fff"); + isBlank = true; + } + } else { + if(/hao123/.test(logo.attr("data-id"))) { + if(!form.find("input[name='haobd']").get(0)) { + form.append(""); + } + } + form.attr("action", _action); + } + + // set charset to big5 while the engine is ruten + if(t == "shopping" && /ruten.png/.test(logo.attr("src"))) { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + } + if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "input", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "input", + modId:"search" + }); + } + //reset input after search + if(isBlank) { + setTimeout(function() { + input.val(""); + input.removeAttr("style"); + }, 16); + } else { + input.select(); + } + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + input.select(); + }, 16); + } + //no action while engine is hao123 and input val is blank + /*if(/hao123.png/.test(logo.attr("src")) && input.val() === "") { + return false; + }*/ + }); + + //disableSelection + disableSelection(tabs[0]); + disableSelection(radios[0]); + + btn.on("mousedown", function() { + btnWrap.addClass("btn-search_click"); + }); + btn.on("mouseup", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseout", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseenter", function() { + btnWrap.addClass("btn-search_hover"); + }); + btn.on("mouseleave", function() { + btnWrap.removeClass("btn-search_hover"); + }); + input.on("focus", function() { + inputWrap.addClass("box-search_focus"); + label.hide(); + }); + input.on("blur", function() { + inputWrap.removeClass("box-search_focus"); + $.trim(input.val()) === "" && label.show(); + }); + /*logoGroup.children().on("mouseenter", function() { + $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $(this).removeClass("box-search_logo_hover"); + }); */ + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + + tabs.on("mousedown", function(e) { + var el = e.target; + el.tagName === "SPAN" && (el = el.parentNode); + //el.tagName !== "DT" && !hasClass(el, "cur") && !hasClass(el, "more") && switchTab(el); + el.getAttribute("data-t") && switchTab(el); + form.acceptCharset = document.charset = "utf-8"; + }); + + moreTab.on("mousedown", function(e) { + var el = e.target; + if(el.parentNode.tagName === "DD") { + setTimeout(showMore, 200); + }else { + showMore(); + } + }); + + $(document).on("mousedown", function(e) { + var el = e.target; + // logoGroup.hasClass("box-search_logos_show") && el !== logoGroup[0] && !jQuery.contains(logoGroup[0], el) && showLogo(); + moreTab.hasClass("box-search_more_show") && el !== moreTab[0] && !jQuery.contains(moreTab[0], el) && showMore(); + // more.css("display") === "block" && el !== moreTab[0] && !jQuery.contains(moreTab[0], el) && !jQuery.contains(more[0], el) && showMore(); + }); + + /*logoGroup.on("click", function(e) { + var el = e.target, + t = curTab.attr("data-t"), + n = storeForm[t], + _n; + if (el.tagName === "IMG") { + _n = ~~$(el).parent().attr("data-n"); + } else if (el.tagName === "A") { + _n = ~~$(el).attr("data-n"); + } else { + _n = ~~$(el).children().attr("data-n"); + } + //input.select(); + //keep the cursor in end + form[0].acceptCharset = document.charset = "utf-8"; + //setTimeout(function() { + // setCursorPos(input[0], input.val().length); + //}, 16); + + + + if(_n !== n) { + storeForm[t] = _n; + resetForm(_conf.list[t].engine, _n); + + //reset suggest + resetSug(_conf.list[t].engine, _n); + } + showLogo(); + });*/ + // bind radio + $("input", radios).live("click", function (e) { + var t = curTab.attr("data-t"), + n = storeForm[t], + _n = $(this).val(); + //input.select(); + //keep the cursor in end + $(this).attr("checked", "checked"); + + setTimeout(function() { + // setCursorPos(input[0], input.val().length); + }, 16); + + //el.tagName === "LABEL" && (el = el.getElementsByTagName("input")[0]); + if(_n !== n) { + if (t === "web") { + $.cookie("searchEngine", _n, {expires: 2000}); + } + storeForm[t] = _n; + + resetForm(_conf.list[t].engine, _n); + + //reset suggest + resetSug(_conf.list[t].engine, _n); + + //reset baidu sug + resetBaiduSug(_conf.list[t].engine, _n); + } + UT.send({ + type: "click", + ac: "b", + position: "sRadio", + engine: _conf.list[t].engine[_n].id.toLowerCase(), + sort: _conf.conf.sort, + modId:"search" + }); + }); + + //focus the input when init + + //to let lv2 page NOT to auto focus SEARCH INPUT! by NE + if(o.autoFocus == null){ + o.autoFocus = true; //default TRUE! + } + if(o.autoFocus) { + input.focus(); + } +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/search-box-4ps-cookie.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/search-box-4ps-cookie.tpl new file mode 100755 index 000000000..4e0e04f6a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/search-box-4ps-cookie.tpl @@ -0,0 +1,39 @@ + +<%assign var="sBoxTag" value=$body.searchBox.sBoxTag%> +<%assign var="hSearchWords" value=$body.searchBox.hotSearchWords%> +<%assign var="sBtnWords" value=$body.searchBox.searchBtnWords%> +<%widget name="common:widget/search-box-4ps-cookie/`$head.dir`/`$head.dir`.tpl"%> +<%* 搜索框 --- 首屏模块 inline css*%> +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/search-box-4ps-cookie/ltr/ltr.css?__inline'); + <%else%> + @import url('/widget/search-box-4ps-cookie/rtl/rtl.css?__inline'); + <%/if%> +<%/style%> +<%if isset($sysInfo.country)%> +<%widget name="common:widget/search-box-4ps-cookie/`$sysInfo.country`/`$sysInfo.country`.tpl"%> +<%/if%> +<%script%> + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/search-box-4ps-cookie/search-box-4ps-cookie-async.js"], function ($) { + var autoFocusSearch = true; + <%if $body.extAppMod%> + autoFocusSearch = false; //if app show DO NOT autoFocus + <%/if%> + <%if !empty($body.searchBox.sugUrl)%> + $.ajax({ + url: "<%$body.searchBox.sugUrl%>", + dataType: "script", + cache: true, + success: function () { + baidu_sug.setMode('baidu'); + baidu_sug.toggle(false); + Gl.searchGroup({type: conf.pageType, autoFocus: autoFocusSearch}); + } + }); + <%else%> + baidu_sug = false; + Gl.searchGroup({type: conf.pageType, autoFocus: autoFocusSearch}); + <%/if%> + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/th/th.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/th/th.tpl new file mode 100755 index 000000000..c88211c00 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-cookie/th/th.tpl @@ -0,0 +1,292 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps-cookie/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if !empty($engine.tn[0].param)%><%foreach $engine.tn as $tn%><%if $tn.param == $root.urlparam.tn%><%$engine.hide = 'true'%><%/if%><%/foreach%><%/if%> + <%if empty($engine.hide)%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "thai", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google_th": { + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "th", + "authuser": "0" + }, + templ: false + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "th", + "client": "img", + "ds": "i", + "cp": "4" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "google.sbox.p0 && google.sbox.p0", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "th", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "th", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "mthai": { + url: null + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "filestube": { + requestQuery: "q", + url: "http://149.13.65.144:8087", + callbackFn: "filestube123", + callbackDataKey: "r", + charset: "utf-8", + requestParas: { + "callback": "filestube123", + "t": +new Date + }, + customUrl: function(para) { + return this.o.url + "/" + encodeURIComponent(this.q) + "?" + para.substr(1); + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.th/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "th", + "gl": "th", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_map": { + requestQuery: "key", + url: "http://search2.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "ds": "poi,poi2,poi3,s_pg", + "json": "1", + "num": "20", + "anyorder": "1", + "count": "19" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_dict": { + requestQuery: "key", + url: "http://search.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "json": "1", + "ds": "head", + "num": "20", + "count": "7" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://th.wikipedia.org/w/api.php", + callbackFn: "wikipedia.th", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.th" + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/ltr/ltr.css new file mode 100755 index 000000000..3672b5404 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/ltr/ltr.css @@ -0,0 +1,17 @@ +/* for PS */ +body .sg_tri input, +body .sg_v_tri input { + width: 509px !important; +} +.sg_btn, +.sg_v_btn { + position: absolute; +} +/*fix label*/ +body .box-search_form .radios label { + padding-left: 22px; +} +.w960 .sg_tri input, +.w960 .sg_v_tri input { + width: 430px !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/rtl/rtl.css new file mode 100755 index 000000000..b047e0475 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/rtl/rtl.css @@ -0,0 +1,18 @@ +/* for PS */ +body .sg_tri input, +body .sg_v_tri input { + width: 482px !important; +} +.sg_btn, +.sg_v_btn { + position: absolute; +} + +/*fix label*/ +body .box-search_form .radios label { + padding-right: 22px; +} +.w960 .sg_tri input, +.w960 .sg_v_tri input { + width: 403px !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/search-box-4ps-noradio.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/search-box-4ps-noradio.tpl new file mode 100755 index 000000000..cbdecde83 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps-noradio/search-box-4ps-noradio.tpl @@ -0,0 +1,11 @@ + +<%if $head.dir=='ltr'%> + <%style%> + @import url('/widget/search-box-4ps-noradio/ltr/ltr.css?__inline'); + <%/style%> +<%else%> + <%style%> + @import url('/widget/search-box-4ps-noradio/rtl/rtl.css?__inline'); + <%/style%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ar/ar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ar/ar.tpl new file mode 100755 index 000000000..2e2b5a379 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ar/ar.tpl @@ -0,0 +1,343 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.eg/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "eg", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "ar-EG", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.eg/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_eg", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://10.247.1.38:8333/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_eg" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://ar.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/bg.png new file mode 100755 index 000000000..4e04de967 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/br/br.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/br/br.tpl new file mode 100755 index 000000000..27a6a51d9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/br/br.tpl @@ -0,0 +1,349 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.br/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "br", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_br": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "pt-BR", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.br.search.yahoo.net/gossip-br-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.br/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_br", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "pt", + "gl": "br", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "kboing": { + url: null + }, + "google_dict": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.com.br/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_brazil" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "postbar": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://br.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "americanas": { + requestQuery: "q", + url: "http://busca.americanas.com.br/autocomplete/search.php", + callbackFn: "window.americanas", + callbackDataKey: "sugestoes", + requestParas: { + "prod" : "image_brazil", + "type": "1", + "numsugestoes": "12", + "numprods": "0", + "callback":"window.americanas" + }, + templ: function(data, q) { + var _data = data["sugestoes"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].consulta.replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "walmart": { + url: null + }, + "netshoes": { + url: null + }, + "buscape": { + url: null + }, + "zoom": { + requestQuery: "q", + url: "http://s.zst.com.br/static/autocomplete-index-r/.js", + callbackFn: "zoomAutoCompleteBlackBoard.notify", + callbackDataKey: "completions", + customUrl: function(para) { + var str = this.q.split("").join("/") + ".js?_=" + +new Date; + return this.o.url.replace(".js", str); + }, + templ: function(data) { + var _data = data["completions"] || [], + ret = [], + i = 0, + q = data["key"], + tmp = "", + len = _data.length; + var isStr = function(value){ + return typeof value === 'string'; + }; + for(; i' + tmp.replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-click.png new file mode 100755 index 000000000..7828b5d56 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-hover.png new file mode 100755 index 000000000..d11e540ed Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side-click.png new file mode 100755 index 000000000..b66706676 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side-hover.png new file mode 100755 index 000000000..693ac8896 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side.png new file mode 100755 index 000000000..d2b3c4f93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn-side.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn.png new file mode 100755 index 000000000..e0d576570 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/bg-search-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search-click.png new file mode 100755 index 000000000..31d004952 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search-hover.png new file mode 100755 index 000000000..a01e36716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search.png new file mode 100755 index 000000000..b3a7a12cd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr.more.css new file mode 100755 index 000000000..726cceec8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr.more.css @@ -0,0 +1,22 @@ + +/*sug has url*/ +.sug-url { + height:45px; + border-bottom:1px solid #e1e1e1; +} +.sug-url a { + display: block; + text-decoration: none; + color: #0000EE; +} +.sug-url .sug-hl { + height: 25px; + text-decoration: underline; + font-weight:bold; + font-size:14px; +} +.sug-url .sug-frm { + line-height: 16px; + font-size: 12px; + color: green; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr.tpl new file mode 100755 index 000000000..419c3e429 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr.tpl @@ -0,0 +1,76 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($body.searchboxTab[$value.catagory])%> + <%if $value@first%> + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              <%$value.title%>
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($body.searchboxEngine[$value.id])%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> +
                              + + + + + + +
                              + <%break%><%/if%><%/foreach%> +
                              + <%$logoIndex = 0%> + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> + + <%$logoIndex = $logoIndex + 1%> + <%/if%><%/foreach%> +
                              +
                              +
                              +
                              +
                              +<%script%> + conf.emptyQuerySug = <%json_encode($body.emptyQuerySug)%>; +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr_inline.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr_inline.css new file mode 100755 index 000000000..835b2429e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/ltr/ltr_inline.css @@ -0,0 +1,455 @@ +/*============box_search=============*/ +.box-search_keyboard { + padding: 1px; +} +.box-search { + margin: 20px auto 0; + width: 777px; +} +.box-search_inner { + height:68px; +} +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + margin-left: 161px; + position: relative; + z-index: 8; + clear: both; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:left; + padding: 4px 12px 3px; + margin-left: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + background: #dcdcde; + border-radius: 2px; +} +/*.box-search_more { + line-height:normal; + position: absolute; + float:right; + cursor:pointer; + z-index:8; + top: -8px; + right: -8px; + border: 1px solid #edf0ef; + border-bottom: 0 none; +} +.box-search_more dt { + margin-top: 6px; +} +.box-search_more a:hover { + background: transparent; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more dt a { + margin: 0; + padding: 4px 17px 3px 9px; + color: #4c4c4c; + text-align: right; + display: block; + float: none; + line-height: 14px; + background:url(../bg.png) right -337px no-repeat transparent !important; +} +.box-search_more dt a:focus { + outline: none; +} +.box-search_more_hover { + background-color: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_more_show { + border:1px solid #e3e4e6; + background: #fff; +} +.box-search_more_show dt { + margin-top: 0px; + padding-top: 6px; +} +.box-search_more_show dt a { + background-position:right -351px !important; +} +.box-search_more_show .box-search_more_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more_show dd { + line-height: 31px; +} +.box-search_more_show dd a { + padding:0 15px 0 9px; + display:block; + float:none; + color: #666; + text-align: right; + margin:0; +} +.box-search_more_hide { + display: none; +}*/ +.box-search_tab a:focus { + outline:none; +} /*clear FF's focusborder*/ +.box-search_tab a.cur { + color:#00b075; /*font-weight:bold;*/ + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + display: block; + float: left; + height: 6px; + line-height: 6px; + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-left: -1px; +} +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 5px 0 0; + float: left; + z-index: 6; +} +.box-search_logo { + position: absolute; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search_logo a { + padding-right: 18px; + display: block; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt , .box-search_logo dd { + padding: 10px 8px 10px 7px; + /*cursor: pointer;*/ +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) right -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: right -390px; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +} + +/*box-search_form*/ +.box-search_form { + padding:3px 0px 5px 113px; +} +.box-search_form .input { + border: 1px solid #d9d9d9; + border-top: 1px solid #bfbfbf; + margin-right: 13px; + position: relative; + z-index:5; +} +.box-search_form .input input { + border:none; + background:#fff; + width:518px; + float:left; + overflow:hidden; + height:20px; + font-size: 14px; + line-height:20px\9; + padding:4px 0 3px 10px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + left: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} +.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +} +.btn-search { + white-space:nowrap; + line-height:27px; + overflow: hidden; + _float: left; + *margin:0;/*fix non-IE'problem because of vertical-align*/ + + + /*--css3--*/ + width: 70px; + border-radius: 2px; + border: 1px solid #3079ED; + background-color: #4787ED; + background-image: linear-gradient(-180deg, #4D8FFD 0%, #4787ED 100%); +} + +.btn-search_l, .btn-search_r { + display: none !important; +} +/*button*/ +.btn-search_c { + /*background:url(../img/bg-search-btn.png?__sprite) repeat-x;*/ + vertical-align:top; + border:none; + color:#fff; + height:27px; + text-align:center; + width:70px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; + background: none; +} + +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: transparent url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} + +.btn-search_hover{ + border-color: #2F5BB7; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4C8FFD 0%, #357AE8 100%); +} + +.btn-search_click{ + border-color: #2B79E6; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4A8DFB 0%, #357AE8 100%); + box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); +} + +/*.btn-search_hover .btn-search_l { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; +} +.btn-search_hover .btn-search_r { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_hover .btn-search_c { + background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x; +} +.btn-search_hover .btn-search_ico { + background: url(../img/i-search-hover.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_l { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_r { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_click .btn-search_c { + background:url(../img/bg-search-btn-click.png?__sprite) repeat-x; +} +.btn-search_click .btn-search_ico { + background: url(../img/i-search-click.png?__sprite) no-repeat; +}*/ + + + + +.box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ +} +.box-search_form .radios label { + display:block; + padding-left:15px; + text-indent:-15px; + float:left; + margin-right:18px; + color:#666; + font-size: 13px; + white-space: nowrap; +} +.box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-right:5px; + vertical-align:bottom; + position:relative; + top:-1px; + overflow:hidden; +} + +/*set hot search words & search button*/ +.box-search_hsrch { + width: 617px; + margin-left: 160px; + overflow: hidden; + padding-top: 2px; + color: #919191; + white-space: nowrap; + _margin-top:-14px; +} +.hsrch_title { + font-weight: bold; + margin-right: 8px; + /*padding-left: 10px;*/ + color: #919191; +} +.hsrch_word span { + display: inline-block; + margin-right: 16px; +} +.hsrch_word a{ + color: #919191; +} +.hsrch_word a:hover { + color: #00B075; + text-decoration: underline; +} + + +/*size setting*/ +.box-search-m .box-search_logo img { + width:107px; + height:40px; +} +.box-search-m .box-search_logo_wrap { + width: 142px; + height: 62px; + margin-top: -14px; +} +.box-search-m .box-search_logo dt a { + background-position: right -62px; +} +.box-search-m .box-search_logos_show dt a { + background-position: right -87px; +} +.box-search-m .box-search_tab { + margin-left: 148px; +} +.box-search-m .box-search_hsrch { + margin-left: 148px; +} +.box-search-s .box-search_logo img { + width:85px; + height:32px; +} +.box-search-s .box-search_logo_wrap { + width: 120px; + height: 54px; + margin-top: -9px; +} +.box-search-s .box-search_logo dt a { + background-position: right -67px; +} +.box-search-s .box-search_logos_show dt a { + background-position: right -93px; +} +.box-search-s .box-search_tab { + margin-left: 126px; +} +.box-search-s .box-search_hsrch { + margin-left: 126px; +} + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo{border-width:0px;} +.skin-type-dark .box-search_tab a{color: #ffffff;} +body.skin-type-dark .box-search_tab a.cur{color: #ffffff;} +.skin-type-dark .box-search_tab a:hover{background: #595959;background: rgba(0,0,0,0.6);} +.skin-type-dark #searchGroupRadios label{color: #ffffff;} +.skin-type-dark .box-search_logo_disabled dt.box-search_logo_hover, .skin-type-dark .box-search_logo_disabled dt a{background: 0;} +.box-search_logo_disabled, .box-search_logos_show{border: 0;} + + +/*fi chrome radio white background box bug*/ +/*chrome 22-28*/ +@media \\0 screen { + body .box-search_form .radios label span { + display: inline-block; + text-indent: 0; + border-radius: 100px; + margin-right: 5px; + width: 14px; + height: 14px; + overflow: hidden; + vertical-align: -3px; + } + body .box-search_form .radios input { + margin-right: 0; + vertical-align: top; + position: static; + } +} +/*chrome 29+*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + body .box-search_form .radios label span { + display: inline-block; + text-indent: 0; + border-radius: 100px; + margin-right: 5px; + width: 14px; + height: 14px; + overflow: hidden; + vertical-align: -3px; + } + body .box-search_form .radios input { + margin-right: 0; + vertical-align: top; + position: static; + } +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl.more.css new file mode 100755 index 000000000..3f240b972 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl.more.css @@ -0,0 +1,69 @@ +/*------------------------suggest------------------------*/ +/*提示层外框*/ +.sug-search { + position:absolute; + top: 28px; + *top: 30px; + left: -1px; + border:1px solid #e3e4e6; + border-top: 0 none; + background:#fff; + width:528px; + color:#454545; + z-index:999; + white-space:nowrap; + overflow:hidden; +} +/*ie6 shim*/ +.sug-shim { + position:absolute; + top:-1px; + left:-1px; + z-index:-1; + filter:alpha(opacity="0"); + width:430px; + height:250px; +} +/*列表外框*/ +.sug-search ol { + font:bold 12px/23px Tahoma,arial,helvetica,clean,sans-serif; + cursor:default; +} +/*列表项*/ +.sug-search li { + padding: 3px 10px; + cursor: pointer; +} +.sug-search li b { + font: inherit; + display: inline; +} +/*选中样式*/ +.sug-search .sug-select { + background: #f5f7f7; +} +/*头部*/ +.sug-search .top { + font-weight:normal; + color:#999; + height:21px; + line-height:21px; + background:#eee; + padding:0 2px; +} +/*底部*/ +.sug-search .bot { + position:relative; + height:19px; + line-height:19px; + font-weight:normal; + border-top:1px solid #666; +} +/*高亮查询词*/ +.sug-search .sug-query { + font-weight:normal; +} +.sug-search font { + font-weight:normal !important; + color:#333 !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl.tpl new file mode 100755 index 000000000..32c9f23e6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl.tpl @@ -0,0 +1,82 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($body.searchboxTab[$value.catagory])%> + <%if $value@first%> + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              + <%$value.title%> +
                              +
                              +
                              +
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($body.searchboxEngine[$value.id])%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> +
                              + + + + <%widget name="common:widget/keyboard/keyboard.tpl"%> + + + +
                              + <%break%><%/if%><%/foreach%> +
                              + <%$logoIndex = 0%> + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> + + <%$logoIndex = $logoIndex + 1%> + <%/if%><%/foreach%> +
                              +
                              +
                              +
                              +
                              +<%script%> + conf.emptyQuerySug = <%json_encode($body.emptyQuerySug)%>; +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl_inline.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl_inline.css new file mode 100755 index 000000000..bcfd2bf45 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/rtl/rtl_inline.css @@ -0,0 +1,497 @@ +/*.box-search_form .input div{ float: left;}*/ /*为啥加?会导致ps sug出现问题*/ +.box-search_keyboard { + padding: 1px; +} +/*============box_search=============*/ +.box-search { + margin: 20px auto 0; + width: 780px; +} +.box-search_inner { + height:68px; +} +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + margin-right: 161px; + position: relative; + z-index: 8; + clear: both; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:right; + padding: 4px 12px 3px; + margin-right: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + background: #dcdcde; + border-radius: 2px; +} +/*.box-search_more { + line-height:normal; + position: absolute; + float:right; + cursor:pointer; + z-index:8; + top: -8px; + left: -7px; + border: 1px solid #edf0ef; + border-bottom: 0 none; +} +.box-search_more dt { + position: relative; + margin-top: 6px; +} +.box-search_more a:hover { + background: transparent; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more dt a { + margin: 0; + padding: 4px 9px 3px 17px; + color: #4c4c4c; + text-align: right; + display: block; + float: none; + line-height: 14px; + width: 30px; + overflow: hidden; +} +.box-search_more dt a:focus { + outline: none; +} +.box-search_more_hover { + background-color: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_more .arrow, .box-search_more .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 3px dashed transparent; +} +.box-search_more .arrow { + border-top-color: #4ac29a; + border-top-style: solid; + top: 10px; + right: 42px; +} +.box-search_more .arrow_bg { + border-top-color: #edf0ef; + border-top-style: solid; + margin: -5px -3px 0 0; + _display: none; +} +.box-search_more_hover .arrow_bg { + border-top-color: #dcdcde; +} +.box-search_more_show .arrow { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #4ac29a; + border-bottom-style: solid; + top: 12px; +} +.box-search_more_show .arrow_bg { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #fff; + border-bottom-style: solid; + margin-top: -1px; +} +.box-search_more_show .box-search_more_hover .arrow_bg { + border-bottom-color: #f5f7f7; +} +.box-search_more_show { + border:1px solid #e3e4e6; + background: #fff; + left: auto; + right: 472px; +} +.box-search_more_show dt { + margin-top: 0px; + padding-top: 6px; +} +.box-search_more_show dt a { + background-position:left -351px !important; +} +.box-search_more_show .box-search_more_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more_show dd { + line-height: 31px; +} +.box-search_more_show dd a { + padding:0 9px 0 15px; + display:block; + float:none; + color: #666; + text-align: right; + margin:0; + overflow: hidden; +} +.box-search_more_hide { + display: none; +}*/ +.box-search_tab a:focus { + outline:none; +} /*clear FF's focusborder*/ +.box-search_tab a.cur { + color:#00b075; /*font-weight:bold;*/ + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + display: block; + float: right; + height: 6px; + line-height: 6px; + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-right: -1px; +} +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 0 0 5px; + float: right; + z-index: 6; +} +.box-search_logo { + position: absolute; + right: 0; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search_logo a { + padding-left: 18px; + display: block; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt , .box-search_logo dd { + padding: 10px 7px 10px 8px; + /*cursor: pointer;*/ +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) -10px -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: -10px -390px; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +} + +/*box-search_form*/ +.box-search_form { + padding:3px 113px 5px 0px; +} +.box-search_form .input { + background-color: #fff; + border: 1px solid #d9d9d9; + border-top: 1px solid #bfbfbf; + margin-left: 13px; + position: relative; + z-index:5; +} +.box-search_form .input input { + border:none; + background:#fff; + width:491px; + float:right; + overflow:hidden; + height:20px; + font-size: 14px; + line-height:20px\9; + padding:4px 9px 3px 0px; + *width: 488px; + *float: none; + /*fix ie10 bug*/ + margin-right: 1px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + right: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} +.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +} +.btn-search { + white-space:nowrap; + line-height:27px; + overflow: hidden; + _float: left; + *margin:0;/*fix non-IE'problem because of vertical-align*/ + + + /*--css3--*/ + width: 70px; + border-radius: 2px; + border: 1px solid #3079ED; + background-color: #4787ED; + background-image: linear-gradient(-180deg, #4D8FFD 0%, #4787ED 100%); +} +.btn-search_l, .btn-search_r { + display: none !important; +} + +.btn-search_c { + /*background:url(../img/bg-search-btn.png?__sprite) repeat-x;*/ + vertical-align:top; + border:none; + color:#fff; + height:27px; + text-align:center; + width:70px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; + background: none; +} +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} + +.btn-search_hover{ + border-color: #2F5BB7; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4C8FFD 0%, #357AE8 100%); +} + +.btn-search_click{ + border-color: #2B79E6; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4A8DFB 0%, #357AE8 100%); + box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); +} +/* +.btn-search_hover .btn-search_l { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; +} +.btn-search_hover .btn-search_r { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_hover .btn-search_c { + background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x; +} +.btn-search_hover .btn-search_ico { + background: url(../img/i-search-hover.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_l { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_r { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_click .btn-search_c { + background:url(../img/bg-search-btn-click.png?__sprite) repeat-x; +} +.btn-search_click .btn-search_ico { + background: url(../img/i-search-click.png?__sprite) no-repeat; +}*/ +.box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ +} +.box-search_form .radios label { + display:block; + padding-right:15px; + text-indent:-15px; + float:right; + margin-left:18px; + color:#666; + font-size: 13px; + white-space: nowrap; +} +.box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-left:5px; + vertical-align:bottom; + position:relative; + top:-1px; + overflow:hidden; +} + +/*set hot search words & search button*/ +.box-search_hsrch { + width: 620px; + margin-right: 160px; + overflow: hidden; + padding-top: 2px; + color: #919191; + white-space: nowrap; + _margin-top:-14px; +} +.hsrch_title { + font-weight: bold; + margin-left: 8px; + /*padding-right: 10px;*/ + color: #919191; +} +.hsrch_word span { + display: inline-block; + margin-left: 15px; +} +.hsrch_word a{ + color: #919191; + text-align: right; +} +.hsrch_word a:hover { + color: #00B075; + text-decoration: underline; +} +/*size setting*/ +.box-search-m .box-search_logo img { + width:107px; + height:40px; +} +.box-search-m .box-search_logo_wrap { + width: 142px; + height: 62px; + margin-top: -14px; +} +.box-search-m .box-search_logo dt a { + background-position: -10px -62px; +} +.box-search-m .box-search_logos_show dt a { + background-position: -10px -87px; +} +.box-search-m .box-search_tab { + margin-right: 148px; +} +.box-search-m .box-search_hsrch { + margin-right: 148px; +} +.box-search-s .box-search_logo img { + width:85px; + height:32px; +} +.box-search-s .box-search_logo_wrap { + width: 120px; + height: 54px; + margin-top: -9px; +} +.box-search-s .box-search_logo dt a { + background-position: -10px -67px; +} +.box-search-s .box-search_logos_show dt a { + background-position: -10px -93px; +} +.box-search-s .box-search_tab { + margin-right: 126px; +} +.box-search-s .box-search_hsrch { + margin-right: 126px; +} + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo{border-width:0px;} +.skin-type-dark .box-search_tab a{color: #ffffff;} +body.skin-type-dark .box-search_tab a.cur{color: #ffffff;} +.skin-type-dark .box-search_tab a:hover{background: #595959;background: rgba(0,0,0,0.6);} +.skin-type-dark #searchGroupRadios label{color: #ffffff;} +.skin-type-dark .box-search_logo_disabled dt.box-search_logo_hover, .skin-type-dark .box-search_logo_disabled dt a{background: 0;} +.box-search_logo_disabled, .box-search_logos_show{border: 0;} + +/*fi chrome radio white background box bug*/ +/*chrome 22-28*/ +@media \\0 screen { + body .box-search_form .radios label span { + display: inline-block; + text-indent: 0; + border-radius: 100px; + margin-left: 5px; + width: 14px; + height: 14px; + overflow: hidden; + vertical-align: -3px; + } + body .box-search_form .radios input { + margin-left: 0; + vertical-align: top; + position: static; + } +} +/*chrome 29+*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + body .box-search_form .radios label span { + display: inline-block; + text-indent: 0; + border-radius: 100px; + margin-left: 5px; + width: 14px; + height: 14px; + overflow: hidden; + vertical-align: -3px; + } + body .box-search_form .radios input { + margin-left: 0; + vertical-align: top; + position: static; + } +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/search-box-4ps-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/search-box-4ps-async.js new file mode 100755 index 000000000..01af0356c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/search-box-4ps-async.js @@ -0,0 +1,962 @@ +/* +* Search box group +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + helper = require("common:widget/ui/helper/helper.js"); +require("common:widget/ui/suggest/suggest.js"); + +Gl.searchGroup = function(o) { + var _conf = conf.searchGroup, + type = o.type || "index", + logoPath = _conf.conf[type].logoPath, + + emptySug = conf.emptyQuerySug, + eptNew = emptySug && emptySug.newTip, + eptTpl = '
                            • #{n}#{q}#{newTle}
                            • ', + eptTipStu = false, // record empty sug tips open and close status + $sugTip, // empty sug tips + $sugNum, // empty sug number + + logo = $("#" + (o.logoId || "searchGroupLogo")), + logoGroup = $("#" + (o.logoGroupId || "searchGroupLogos")), + tabs = $("#" + (o.tabsId || "searchGroupTabs")), + form = $("#" + (o.formId || "searchGroupForm")), + input = $("#" + (o.inputId || "searchGroupInput")), + label = $("#" + (o.labelId || "searchGroupLabel")), + radios = $("#" + (o.radiosId || "searchGroupRadios")), + btn = $("#" + (o.btnId || "searchGroupBtn")), + // more = $("#" + (o.moreId || "searchGroupMore")), + moreTab = $("#" + (o.moreTabId || "searchGroupMoreTab")), + params = $("#" + (o.paramsId || "searchGroupParams")), + radioName = o.radioName || "searchGroupRadio", + btnWrap = btn.parent(), + inputWrap = input.parent(), + defaultN = _conf.conf[type].curN || 0, + curTab = $("a:eq(" + defaultN + ")", tabs), + tabsChildren = $("a", tabs), + //render data when init sug + defaultData = _conf.sug[_conf.list[curTab.attr("data-t")].engine[defaultN].id], + //record which form was selected in tabs + storeForm = {}, + logoHash = { + 'yahoo': 'yahoo', + 'google': 'google', + 'baidu': 'baidu', + 'defau': 'defau' + }, + $bd = $(document.body), + getCurLogo = function(attr) { + var tmpObj = null; + attr = attr.toLowerCase(); + for(var i in logoHash) { + if(attr.search(i) > -1) { + tmpObj = logoHash[i]; + break; + } + } + if(tmpObj === 'yahoo' && conf.country === 'jp') { + tmpObj = 'yahoo_jp'; + } + return (tmpObj || 'defau'); + }, + //smallLogoPath = "/resource/fe/headerTest/search/#{logo}.png", + + //reset the form about action and params + resetForm = function(data, n) { + var ret = []; + var theLogoPath = $bd.hasClass("skin-type-dark")?(_conf.conf[type].logoPath+"dark/"):_conf.conf[type].logoPath; + var isFixed = $bd.hasClass("header-fixed-up"); + var logoGroupDt = $("dt", logoGroup).clone(); + + // Fixed bug in IE8 + logoGroup.html(''); + logoGroup.append(logoGroupDt); + // rebinding logo element + logo = $("#" + (o.logoId || "searchGroupLogo"), logoGroupDt); + + form.attr("action", data[n].action); + input.attr("name", data[n].q); + if(isFixed) { + logo.attr("src", "/resource/fe/headerTest/search/" + getCurLogo(data[n].logo) + ".png"); + } else { + logo.attr("src", theLogoPath + data[n].logo + ".png"); + } + logo.attr("alt", data[n].name); + logo.parent().attr("title", data[n].name); + logo.parent().attr("data-n", n); + logo.attr("data-id", data[n].id); + + $("dd", logoGroup).remove(); + logoGroup.append(function () { + ret = []; + $.each(data, function(key, val) { + if(isFixed) { + ret.push('
                              ' + val.name + ''+ val.name + '
                              '); + } else { + ret.push('
                              ' + val.name + '
                              '); + } + }); + return ret.join(""); + }); + // fix: show errors when click radios on IE + setTimeout(function() { + radios.html(function() { + ret = []; + $.each(data,function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + $("#searchGroupRadio_" + n).attr("checked", "checked"); + }, 0); + + params.html(function() { + ret = []; + $.each(data[n].params, function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + + if (data.length <= 1) { + logoGroup.addClass("box-search_logo_disabled"); + } else { + logoGroup.removeClass("box-search_logo_disabled"); + } + logoGroup.children().on("mouseenter", function() { + $bd.hasClass("header-fixed-up") && $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $bd.hasClass("header-fixed-up") && $(this).removeClass("box-search_logo_hover"); + }); + + if(emptySug) { + resetEmptySugTip(); + } + }, + + resetSug = function(data, n) { + + data = _conf.sug[data[n].id]; + $.each(data, function(key, val) { + sug.o[key] = val; + }); + //fix more prams + !data.templ && (sug.o.templ = false); + !data.callbackFn && (sug.o.callbackFn = false); + !data.callbackDataKey && (sug.o.callbackDataKey = false); + !data.callbackName && (sug.o.callbackName = false); + !data.callbackDataNum && (sug.o.callbackDataNum = false); + !data.customUrl && (sug.o.customUrl = false); + + !data.customUrl && (sug.o.customUrl = false); + !data.charset && (sug.o.charset = undefined); + sug.reset(true); + }, + + // toggle for baidu sug + resetBaiduSug = function (data, n) { + + if (!baidu_sug) { + return; + } + + data = data ? data[n].baiduSug : false; + + if (data) { + baidu_sug.setMode(data.mod); + baidu_sug.toggle(true); + } else { + baidu_sug.toggle(false); + } + }, + + // toggle for PS video sug + resetBaiduVideoSug = function(data, n) { + if(!window["baidu_video_sug"]) { + return; + } + + data = data ? data[n].otherSug : false; + + if (data) { + baidu_video_sug.setMode(data.mod); + baidu_video_sug.toggle(true); + } else { + baidu_video_sug.toggle(false); + } + }, + + switchTab = function(tab, sugStay) { + tab = $(tab); + curTab.removeClass("cur"); + tab.addClass("cur"); + curTab = tab; + + var t = tab.attr("data-t"), + + list = _conf.list, + engines = list[t].engine, + engLen = engines.length; + //ps sug gut add tab changed name + tabCategoryName = t; + //if the last element is null, remove it + if($.isEmptyObject(engines[engLen-1])){ + engines.length = engLen - 1; + }; + //record current form(add the current type to storeForm as a key) + storeForm[t] || (storeForm[t] = 0); + + //reset form + resetForm(engines, storeForm[t]); + + //reset suggest + !sugStay && resetSug(engines, storeForm[t]); + + // reset PS video sug + !sugStay && resetBaiduVideoSug(engines, storeForm[t]); + + // reset baidu sug + !sugStay && resetBaiduSug(engines, storeForm[t]); + + //reset hot word + label.text(list[t].hotWords); + /* + setTimeout(function() { + input.select(); + }, 16); + */ + //keep the cursor in end + /*setTimeout(function() { + setCursorPos(input[0], input.val().length); + }, 16); */ + }, + + emptySugShow = function(config, engineId) { + var _tpl = '
                                '; + $.each(config.data, function(inx, val) { + inx = inx + 1; + _tpl += helper.replaceTpl(eptTpl, { + "q":val.value, + "cls":"hl_"+ inx, + "n": inx, + "newTle": (val.isNew ? eptNew : "") + }) + }); + _tpl += "
                              "; + form.find(".sug-search").html(_tpl).show(); + changeEptTipStatus(true); + + if(!$.store("search_" + engineId)) { + $.store("search_" + engineId, config.version, {expires: 5}); + $sugNum.hide(); + } + //form.addClass("ept-sug_show"); + }, + /** + * + * @used when form reset + * @purpose reset tip condition + * @return + */ + resetEmptySugTip = function() { + var curEngine = logo.attr("data-id"), + newNum = 0, + data = emptySug[curEngine], + storeVal = $.store("search_" + curEngine); + if(data) { + $sugTip.show(); + $.each(data.data, function(i, val) { + if(val.isNew) { + newNum++; + } + }); + if(!storeVal || (newNum && (storeVal !== data.version))) { + $sugNum.html(newNum).show(); + } else { + $sugNum.hide(); + } + } else { + $sugTip.hide(); + $sugNum.hide(); + } + }, + /** + * @description switch tip btn open and close status + * @param {boolean} status true is open, false|undefined is close + * @return + */ + changeEptTipStatus = function(status) { + if(status) { + $sugTip.addClass('sug-tip_open'); + } else { + $sugTip.removeClass('sug-tip_open'); + } + eptTipStu = status; + }, + + showMore = function() { + var more = $("dd", moreTab), + list = _conf.more, + ret = []; + if ($("dd", moreTab).length === 0) { + $.each(list, function() { + ret.push('
                              ' + this.name + '
                              '); + }); + moreTab.append(ret.join("")); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + } + if(moreTab.hasClass("box-search_more_show")) { + moreTab.removeClass("box-search_more_show"); + more.each(function () { + $(this).addClass("box-search_more_hide"); + }); + } + else { + moreTab.addClass("box-search_more_show"); + more.each(function () { + $(this).removeClass("box-search_more_hide"); + }); + } + }, + + showLogo = function () { + var n = logo.parent().attr("data-n"), + logoList = $("dd", logoGroup); + var isFix = $bd.hasClass("header-fixed-up"), + logLen = logoList.length; + if (logoGroup.hasClass("box-search_logos_show")) { + logoGroup.removeClass("box-search_logos_show"); + logoList.each(function () { + $(this).addClass("box-search_logo_hide").removeClass("box-search_logo_first box-search_logo_last"); + }); + } + else { + logoGroup.addClass("box-search_logos_show"); + logoList.each(function (key) { + var $that = $(this); + key != n && $that.removeClass("box-search_logo_hide"); + if (isFix && (logLen > 1) && (key != n)) { + if(n == 0) { + if(key === 1) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-1) { + $that.addClass("box-search_logo_last"); + } + } else if(n == logLen-1) { + if(key === 0) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-2) { + $that.addClass("box-search_logo_last"); + } + } else { + if(key === 0) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-1) { + $that.addClass("box-search_logo_last"); + } + } + } + }); + } + }, + + //disable selection for input elements + disableSelection = function(el) { + if (typeof el.onselectstart != "undefined") { //IE + el.onselectstart = function() { + return false; + } + } else if (typeof el.style.MozUserSelect != "undefined") { //FF + el.style.MozUserSelect = "none"; + } else { //Opera + el.onmousedown = function() { + return false; + } + } + }, + + setCursorPos = function(obj, pos) { + if (obj.setSelectionRange) { + obj.focus(); + obj.setSelectionRange(pos, pos); + } else if (obj.createTextRange) { + var range = obj.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + }, + + //sug instantiation + sug = Gl.suggest(input[0], { + classNameWrap: "sug-search", + classNameQuery: "sug-query", + classNameSelect: "sug-select", + //classNameClose: "sug-close", + delay: _conf.conf[type].delay, + n: _conf.conf[type].n, + autoFocus: false, + requestQuery: defaultData.requestQuery, + requestParas: defaultData.requestParas, + url: defaultData.url, + callbackFn: defaultData.callbackFn, + callbackDataKey: defaultData.callbackDataKey, + onQueryChange: function(val) { + var da = emptySug && emptySug[logo.attr("data-id")]; + if (da) { + if (!val) { + emptySugShow(da, logo.attr("data-id")); + } else { + changeEptTipStatus(); + } + } + }, + onKeyEsc: function() { + var da = emptySug && emptySug[logo.attr("data-id")]; + if (da) { + changeEptTipStatus(); + } + }, + onCheckForm: function(form) { + + if( !(/^hao123$/.test(logo.attr("data-id"))) ) return; + + if( !$(form).find("input[name='haobd']").get(0) ) { + $(form).append(""); + } + }, + onSearchDirect: function(li, q, prefix) { + var img = new Image(), + enco = encodeURIComponent, + collect = [], + _type = curTab.attr("data-t"), + url = "http://search.hao123.co.th/r/cl/i18n.gif?fm=se&st=3&rsv_sugtype=cr&lang=th-TH", + href = $( $(li).find("a").get(0) ).attr("href"), + title = $( $(li).find("a .sug-hl").get(0) ).text(), + + conf = { + url: href, + q: q, + title: title, + prefixsug: prefix, + haobd: $.cookie("BAIDUID"), + t: +new Date + }; + + + img.src = url + "&" + $.param(conf); // PS的统计 + + var utObj = { + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId: "search", + tab: _type + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + // 我们的统计 + /*if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId:"search" + }); + }*/ + }, + onMouseSelect: function(li) { + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action; + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + }, 16); + } + input.select(); + + var _type = curTab.attr("data-t"); + var utObj = { + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "sug", + modId: "search", + tab: _type + }; + if ($(li).hasClass("ept-sug-li")) { + utObj["element"] = "ept-sug"; + } + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + /*if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "sug", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "sug", + modId:"search" + }); + }*/ + }, + templ: defaultData.templ + }); + + if(emptySug) { + var cssStyl; + if(conf.dir === "rtl") { + cssStyl = '.box-search .sug-tip{cursor:pointer;position:absolute;left:27px;}' + + '.header-fixed-up .box-search .sug-tip{left:55px;}' + + '.box-search .sug-tip i{position:absolute;left:10px;top:10px;' + + 'width:0;height:0;border-top:6px solid #999;border-right:6px' + + ' solid transparent;border-left:6px solid transparent;font-size:' + + '0;line-height:0;}.box-search .sug-tip .sug-tip-new{width:18px;' + + 'height:18px;line-height:18px;position:absolute;text-align:' + + 'center;left:7px;top:-9px;font-size:12px;border-radius:10px;' + + 'background:#f66f2e;color:#fff;}.box-search .sug-tip_open i{border' + + '-bottom:6px solid #999;border-top:6px solid transparent;top:4px;}' + + '.box-search .ept-sug-li .num{display:block;float:right;width:16px;' + + 'height:16px;line-height:16px;color:#fff;font-size:12px;' + + 'background-color:#b2b2b2;text-align:center;' + + 'margin:7px 0 0 10px;}.box-search .ept-sug-li .new{padding-right:5px;' + + 'font-size:12px;color:#f00;}.box-search .sug-search .hl_1 .num' + + '{background-color:#ff4e17;}.box-search .sug-search .hl_2 .num' + + '{background-color:#ff7013;}.box-search .sug-search .hl_3 .num' + + '{background-color:#ff9b18;}.box-search .ept-sug-li{white-' + + 'space:nowrap;overflow:hidden;height:30px;font-size:13px;' + + 'line-height:30px;font-weight:normal;padding:0 8px;}' + + '#searchGroupInput::-ms-clear{display:none}'; + } else { + cssStyl = '.box-search .sug-tip{cursor:pointer;position:absolute;right:0;}' + + '.header-fixed-up .box-search .sug-tip{right:28px;}' + + '.box-search .sug-tip i{position:absolute;right:10px;top:10px;' + + 'width:0;height:0;border-top:6px solid #999;border-right:6px' + + ' solid transparent;border-left:6px solid transparent;font-size:' + + '0;line-height:0;}.box-search .sug-tip .sug-tip-new{width:18px;' + + 'height:18px;line-height:18px;position:absolute;text-align:' + + 'center;right:7px;top:-9px;font-size:12px;border-radius:10px;' + + 'background:#f66f2e;color:#fff;}.box-search .sug-tip_open i{border' + + '-bottom:6px solid #999;border-top:6px solid transparent;top:4px;}' + + '.box-search .ept-sug-li .num{display:block;float:left;width:16px;' + + 'height:16px;line-height:16px;color:#fff;font-size:12px;' + + 'background-color:#b2b2b2;text-align:center;' + + 'margin:7px 10px 0 0;}.box-search .ept-sug-li .new{padding-left:5px;' + + 'font-size:12px;color:#f00;}.box-search .sug-search .hl_1 .num' + + '{background-color:#ff4e17;}.box-search .sug-search .hl_2 .num' + + '{background-color:#ff7013;}.box-search .sug-search .hl_3 .num' + + '{background-color:#ff9b18;}.box-search .ept-sug-li{white-' + + 'space:nowrap;overflow:hidden;height:30px;font-size:13px;' + + 'line-height:30px;font-weight:normal;padding:0 8px;}' + + '#searchGroupInput::-ms-clear{display:none}'; + } + input.after(''); + $sugTip = form.find(".sug-tip"); + $sugNum = $sugTip.find(".sug-tip-new"); + + require.loadCss({ + content: cssStyl + }); + + resetEmptySugTip(); // fix when first engine has empty sug + + $sugTip.on("click", function() { + var curEngine = logo.attr("data-id"); + + if(eptTipStu) { + form.find(".sug-search").hide(); + changeEptTipStatus(); + } else { + emptySugShow(emptySug[curEngine], curEngine); + } + input.focus(); + }); + + input.on("click", function() { + var curId = logo.attr("data-id"); + if(!$.trim($(this).val()) && emptySug[curId]) { + emptySugShow(emptySug[curId], curId); + } + }); + input.on("blur", function() { + if(emptySug[logo.attr("data-id")]) { + $sugTip.removeClass('sug-tip_open'); + form.find(".sug-search").hide(); + } + }); + $(document).on("mousedown", function(e) { + var $curObj = $(e.target), + aimTarget = $curObj.closest(input).length || $curObj.closest($sugTip).length || $curObj.closest(btnWrap).length || 0; + if(!aimTarget) { + eptTipStu = false; + } + }); + } + + //ps sug gut add tab + window.tabCategoryName = curTab.attr("data-t"); + //clear the input's value after refresh + input.val(""); + + //some browsers may keep form's status after refresh + $("[name = radioName]:first").attr("checked", true); + + //record the default form'n + storeForm[curTab.attr("data-t")] = 0; + + //select text in input after submit + form.on("submit", function() { + // input.select(); + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action, + _url = _conf.list[t].engine[storeForm[t]].url, + isBlank = false; + var radioEl = $("input", radios); + for(var i = 0; i < radioEl.length; i++) { + if(radioEl.eq(i).attr("checked")) { + var checkedRadio = radioEl.eq(i); + } + } + /*if(t == "shopping" && checkedRadio.attr("id") == "searchGroupRadio_0") { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + }*/ + + // set input's value to the hot word if it was blank + if($.trim(input.val()) === "") { + if($.trim(label.text()) === ""){ + var action = _action && _url ? _url : _action; + form.attr("action", action); + } else { + input.val(label.text()); + input.css("color", "#fff"); + isBlank = true; + } + } else { + if(/^hao123$/.test(logo.attr("data-id"))) { + if(!form.find("input[name='haobd']").get(0)) { + form.append(""); + } + } + form.attr("action", _action); + } + + // set charset to big5 while the engine is ruten + if(t == "shopping" && /ruten.png/.test(logo.attr("src"))) { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + } + var utObj = { + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "input", + modId:"search", + tab: t + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + /*if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "input", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "input", + modId:"search" + }); + } */ + //reset input after search + if(isBlank) { + setTimeout(function() { + input.val(""); + input.removeAttr("style"); + }, 16); + } else { + input.select(); + } + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + input.select(); + }, 16); + } + //no action while engine is hao123 and input val is blank + /*if(/hao123.png/.test(logo.attr("src")) && input.val() === "") { + return false; + }*/ + }); + + //disableSelection + disableSelection(tabs[0]); + disableSelection(radios[0]); + + resetBaiduVideoSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + resetBaiduSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + btn.on("mousedown", function() { + btnWrap.addClass("btn-search_click"); + }); + btn.on("mouseup", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseout", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseenter", function() { + btnWrap.addClass("btn-search_hover"); + }); + btn.on("mouseleave", function() { + btnWrap.removeClass("btn-search_hover"); + }); + input.on("focus", function() { + inputWrap.addClass("box-search_focus"); + label.hide(); + }); + input.on("blur", function() { + inputWrap.removeClass("box-search_focus"); + $.trim(input.val()) === "" && label.show(); + }); + logoGroup.children().on("mouseenter", function() { + $bd.hasClass("header-fixed-up") && $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $bd.hasClass("header-fixed-up") && $(this).removeClass("box-search_logo_hover"); + }); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + + tabs.on("mousedown", function(e) { + var el = e.target, + tabTo; + el.tagName === "SPAN" && (el = el.parentNode); + //el.tagName !== "DT" && !hasClass(el, "cur") && !hasClass(el, "more") && switchTab(el); + tabTo = el.getAttribute("data-t"); + if(tabTo) { + switchTab(el); + UT.send({ + type: "click", + position: "switchTab", + modId: "search", + sort: tabTo + }); + } + form.acceptCharset = document.charset = "utf-8"; + }); + + conf.pageType !=="lv2" && window["PDC"] && PDC.mark("c_sxvi"); + + moreTab.on("mousedown", function(e) { + var el = e.target; + if(el.parentNode.tagName === "DD") { + setTimeout(showMore, 200); + }else { + showMore(); + } + }); + + $(document).on("mousedown", function(e) { + var el = e.target; + $bd.hasClass("header-fixed-up") && logoGroup.hasClass("box-search_logos_show") && el !== logoGroup[0] && !$.contains(logoGroup[0], el) && showLogo(); + moreTab.hasClass("box-search_more_show") && el !== moreTab[0] && !$.contains(moreTab[0], el) && showMore(); + // more.css("display") === "block" && el !== moreTab[0] && !$.contains(moreTab[0], el) && !$.contains(more[0], el) && showMore(); + }); + + logoGroup.on("click", function(e) { + var el = e.target, + $el = $(el), + $ta = el.tagName, + t = curTab.attr("data-t"), + n = storeForm[t], + _n; + if(!$bd.hasClass("header-fixed-up")) return; + if ($ta === "IMG"||$ta === "SPAN") { + _n = ~~$el.parent().attr("data-n"); + } else if ($ta === "A"||$ta === "DT") { + _n = ~~$el.attr("data-n"); + }else { + _n = ~~$el.children().attr("data-n"); + } + //input.select(); + //keep the cursor in end + form[0].acceptCharset = document.charset = "utf-8"; + //setTimeout(function() { + // setCursorPos(input[0], input.val().length); + //}, 16); + + + + if(_n !== n) { + storeForm[t] = _n; + resetForm(_conf.list[t].engine, _n); + + //reset suggest + resetSug(_conf.list[t].engine, _n); + + //reset PS video sug + resetBaiduVideoSug(_conf.list[t].engine, _n); + + resetBaiduSug(_conf.list[t].engine, _n); + } + showLogo(); + }); + // bind radio + $("input", radios).live("click", function (e) { + var t = curTab.attr("data-t"), + n = storeForm[t], + _n = $(this).val(); + //input.select(); + //keep the cursor in end + $(this).attr("checked", "checked"); + + setTimeout(function() { + // setCursorPos(input[0], input.val().length); + }, 16); + + //el.tagName === "LABEL" && (el = el.getElementsByTagName("input")[0]); + if(_n !== n) { + storeForm[t] = _n; + + resetForm(_conf.list[t].engine, _n); + + //reset suggest + resetSug(_conf.list[t].engine, _n); + + //reset PS video sug + resetBaiduVideoSug(_conf.list[t].engine, _n); + + //reset baidu sug + resetBaiduSug(_conf.list[t].engine, _n); + } + var utObj = { + type: "click", + ac: "b", + position: "sRadio", + engine: _conf.list[t].engine[_n].id.toLowerCase(), + modId:"search" + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + /*UT.send({ + type: "click", + ac: "b", + position: "sRadio", + engine: _conf.list[t].engine[_n].id.toLowerCase(), + sort: _conf.conf.sort, + modId:"search" + });*/ + }); + + //focus the input when init + + //to let lv2 page NOT to auto focus SEARCH INPUT! by NE + if(o.autoFocus == null){ + o.autoFocus = true; //default TRUE! + } + if(o.autoFocus) { + input.focus(); + } + + /*for header when fixed & width = 40px*/ // TODO + var $window = $(window), + recordTab = null, // 吸顶时刻如果tab不是web的话记录当前tab + restoreTo = function() { // 吸顶变正常时恢复之前的tab + if(recordTab) { + switchTab(recordTab); + } else { + switchTab($("a[data-t='web']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }, + transTo = function() { // 正常变吸顶时切到web的tab + if (curTab.attr("data-t") != "web") { + recordTab = curTab; + switchTab($("a[data-t='web']", tabs)); + } else { + recordTab = null; + switchTab($("a[data-t='web']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }; + + $window.on("headerFixed.transTo", function() { + transTo(); + }); + $window.on("headerFixed.restore", function() { + restoreTo(); + }); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/search-box-4ps.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/search-box-4ps.tpl new file mode 100755 index 000000000..133ad9fd5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/search-box-4ps.tpl @@ -0,0 +1,100 @@ +<%* 搜索引擎根据TN号显隐*%> +<%foreach $body.searchBox.sBoxTag as $value%> + <%foreach $value.engine as $engine%> + <%if !empty($engine.tn[0].param)%> + <%foreach $engine.tn as $tn%> + <%if $tn.param == $root.urlparam.tn%> + <%$body.searchboxEngine[$engine.id] = 'true'%> + <%/if%> + <%/foreach%> + <%/if%> + <%/foreach%> +<%/foreach%> + +<%assign var="sBoxTag" value=$body.searchBox.sBoxTag%> +<%assign var="hSearchWords" value=$body.searchBox.hotSearchWords%> +<%assign var="sBtnWords" value=$body.searchBox.searchBtnWords%> +<%* 搜索框 --- 首屏模块 inline css*%> +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/search-box-4ps/ltr/ltr_inline.css?__inline'); + <%else%> + @import url('/widget/search-box-4ps/rtl/rtl_inline.css?__inline'); + <%/if%> +<%/style%> + +<%widget name="common:widget/search-box-4ps/`$head.dir`/`$head.dir`.tpl"%> +<%if isset($sysInfo.country)%> +<%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$sysInfo.country`.tpl"%> +<%/if%> +<%script%> + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/search-box-4ps/search-box-4ps-async.js"], function ($) { + var autoFocusSearch = true; + <%if $body.extAppMod%> + autoFocusSearch = false; //if app show DO NOT autoFocus + <%/if%> + <%if !empty($body.searchBox.sugUrl)%> + var head = document.getElementsByTagName("head")[0]; + var requestScript = function(url, onsuccess, onerror, timeout) { + + var script = document.createElement('script'); + if (onerror) { + var tid = setTimeout(function() { + script.onload = script.onreadystatechange = script.onerror = null; + timeout(); + }, 5000); + + script.onerror = function() { + clearTimeout(tid); + onerror(); + }; + + script.onload = script.onreadystatechange = function() { + if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) { + script.onload = script.onreadystatechange = null; + script = undefined; + clearTimeout(tid); + onsuccess(); + } + } + } + script.type = 'text/javascript'; + script.src = url; + head.appendChild(script); + }; + + requestScript("<%$body.searchBox.sugUrl%>", function() { + baidu_sug.setMode('baidu'); + baidu_sug.toggle(false); + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "success"}); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "error"}); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "timeout"}); + }); + <%else%> + baidu_sug = false; + Gl.searchGroup({type: conf.pageType, autoFocus: autoFocusSearch}); + <%/if%> + + <%if !empty($body.searchBox.sugMoreUrl)%> + setTimeout(function() { + window["require"] && require.async("<%$body.searchBox.sugMoreUrl%>"); + }, 1e3); + <%/if%> + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/th/th.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/th/th.tpl new file mode 100755 index 000000000..574fecd9e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/th/th.tpl @@ -0,0 +1,405 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://www.baidu.co.th/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "thai", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_th": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "th-TH", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "th", + "client": "img", + "ds": "i", + "cp": "4" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.co.th/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod": "image_thai" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://www.baidu.co.th/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_thai", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "th", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "th", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "mthai": { + url: null + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + }, + templ: function(data) { + var _data = data["suggestions"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filestube": { + requestQuery: "q", + url: "http://149.13.65.144:8087", + callbackFn: "filestube123", + callbackDataKey: "r", + charset: "utf-8", + requestParas: { + "callback": "filestube123", + "t": +new Date + }, + customUrl: function(para) { + return this.o.url + "/" + encodeURIComponent(this.q) + "?" + para.substr(1); + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.th/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "th", + "gl": "th", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_map": { + requestQuery: "key", + url: "http://search2.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "ds": "poi,poi2,poi3,s_pg", + "json": "1", + "num": "20", + "anyorder": "1", + "count": "19" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_dict": { + requestQuery: "key", + url: "http://search.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "json": "1", + "ds": "head", + "num": "20", + "count": "7" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://th.wikipedia.org/w/api.php", + callbackFn: "wikipedia.th", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.th" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filmes": { + requestQuery: "wds", + url: "http://th.hao123.com/video/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: {}, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/tw/tw.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/tw/tw.tpl new file mode 100755 index 000000000..cb6796f0f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-4ps/tw/tw.tpl @@ -0,0 +1,335 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_web": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "zh-TW" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "baidu": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://suggestion.baidu.com/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "cb": "window.bdsug.sug" + } + }, + "google_news": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "zh-TW", + "gs_nf": "1", + "ds": "n" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_news": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-ura", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "droprotated": "1", + "pubid": "184" + } + }, + "baidu_news": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "news" + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "zh-TW", + "gl": "tw", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "zh-TW", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "video" + } + }, + "yahoo_images": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "183" + } + }, + "google_images": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "zh-TW", + "client": "img", + "gs_nf": "1", + "ds": "i" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_images": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "image" + } + }, + "facebook": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://zh.wikipedia.org/w/api.php", + callbackFn: "wikipedia.zh", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.zh" + } + }, + "baidu_baike": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "baike" + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-pub_sayt", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "560" + } + }, + "baidu_dict": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://dictsug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.tw/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "zh-TW", + "gl": "tw", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_map": { + url: null + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/4ps/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/4ps/ltr/ltr.css new file mode 100755 index 000000000..b265cc30d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/4ps/ltr/ltr.css @@ -0,0 +1,17 @@ +/* for PS */ +body .sg_tri input, +body .sg_v_tri input { + width: 509px !important; +} +.sg_btn, +.sg_v_btn { + position: absolute; +} +/*fix label*/ +body .box-search_form .radios label { + padding-left: 22px; +} +.w960 .sg_tri input, +.w960 .sg_v_tri input { + width: 430px !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/4ps/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/4ps/rtl/rtl.css new file mode 100755 index 000000000..b047e0475 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/4ps/rtl/rtl.css @@ -0,0 +1,18 @@ +/* for PS */ +body .sg_tri input, +body .sg_v_tri input { + width: 482px !important; +} +.sg_btn, +.sg_v_btn { + position: absolute; +} + +/*fix label*/ +body .box-search_form .radios label { + padding-right: 22px; +} +.w960 .sg_tri input, +.w960 .sg_v_tri input { + width: 403px !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/ltr/ltr.css new file mode 100755 index 000000000..a0ab9343c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/ltr/ltr.css @@ -0,0 +1,20 @@ +.w960 .box-search .box-search_wrap .box-search_form .input input { + width: 460px; +} +.w960 .l-wrap .box-search { + width: 750px; + margin-left: 22px; +} +/* sug */ +.w960 .box-search .sug-search, +.w960 .box-search .baidu_sug, +.w960 .box-search .baidu_video_sug { + width: 469px; +} +/* hotSearchWords */ +.w960 .box-search_hsrch { + width: 562px; +} +.w1120 .box-search_hsrch { + width: 640px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/rtl/rtl.css new file mode 100755 index 000000000..970a6adcc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/rtl/rtl.css @@ -0,0 +1,20 @@ +.w960 .box-search .box-search_wrap .box-search_form .input input { + width: 433px; +} +.w960 .l-wrap .box-search { + width: 740px; + margin-right: 22px; +} +/* sug */ +.w960 .box-search .sug-search, +.w960 .box-search .baidu_sug, +.w960 .box-search .baidu_video_sug { + width: 469px; +} +/* hotSearchWords */ +.w960 .box-search_hsrch { + width: 562px; +} +.w1120 .box-search_hsrch { + width: 640px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/rtl/rtl.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/flow/rtl/rtl.flow.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/ltr/ltr.css new file mode 100755 index 000000000..9cc75261f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/ltr/ltr.css @@ -0,0 +1,115 @@ +.l-wrap .box-search_hsrch { + margin-left: 166px; +} +.l-wrap .hsrch_word a:hover{ + color: #1c81e5; +} +body .l-wrap .box-search { + width: 834px; + margin-left: 103px; + margin-top: 15px; +} +.box-search .box-search_inner { + height: 68px; +} +.box-search .box-search_logo_wrap { + margin-right: 0; +} +.box-search .box-search_wrap .box-search_form .input { + border-right-width: 0; + margin-right: 0; + margin-left: 6px; +} +body .box-search .box-search_tab { + margin-left: 168px; +} +.box-search .box-search_wrap .box-search_form .input input { + height: 26px; + width: 539px; +} +body .btn-search_c { + height: 35px; +} +body .btn-search_c, +body .btn-search { + line-height: 35px; + width: 90px; +} +body .btn-search { + border-width: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + background-color: #2085E9; + background-image: linear-gradient(#258BEF, #248AEE, #2287EC, #2085e9, #1e83e7, #1C81E5); +} +.box-search .box-search_logo dt, +.box-search .box-search_logo dd { + padding: 10px 12px 10px 14px; +} +/*.box-search .box-search_logos_show dt, +.box-search .box-search_logos_show dd { + padding: 10px 11px 10px 13px; +} +.box-search .box-search_logos_show dt { + padding-top: 9px; +}*/ +.box-search .box-search_logo_disabled dt, +.box-search .box-search_logo_disabled dd { + padding: 10px 12px 10px 14px !important; +} +.box-search .box-search_logo a { + padding-right: 15px; +} +.box-search .box-search_logo_wrap { + width: 161px; + height: 65px; + margin-top: -13px; +} +/*.box-search .box-search_form .box-search_focus { + border-color: #4CA6FF; +}*/ + +/* search tab */ +.box-search .box-search_tab a:hover, +.box-search .box-search_tab a.cur { + color: #1C81E5; +} + +/* .box-search .box-search_tab a:hover + s { + visibility: hidden; +} +*/ +.box-search .box-search_logos_show { + border: 1px solid #E5E6E7; +} +.box-search .box-search_logo_disabled { + border: 0 !important; +} +.box-search .box-search_tab a:hover, +.box-search dt.box-search_logo_hover, +.box-search .box-search_logos_show .box-search_logo_hover, +body .sug-search .sug-select { + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, 0.05); +} +.box-search .box-search_logo_disabled .box-search_logo_hover { + background-color: transparent !important; +} + +/* sug */ +body .box-search .sug-search, +body .box-search .baidu_sug, +body .box-search .baidu_video_sug { + top: 34px; + width: 548px; +} +body .box-search .baidu_sug, +body .box-search .baidu_video_sug { + top: 0; + margin-top: 34px; + border-top: 0; +} +body .box-search .sug-search, +body .box-search_logo { + overflow: visible; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/ltr/ltr.more.css new file mode 100755 index 000000000..553839de7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/ltr/ltr.more.css @@ -0,0 +1,42 @@ +/*from inline css*/ +.box-search .box-search_logos_show dt, +.box-search .box-search_logos_show dd { + padding: 10px 11px 10px 13px; +} +.box-search .box-search_logos_show dt { + padding-top: 9px; +} +.box-search .box-search_form .box-search_focus { + border-color: #4CA6FF; +} + + + +body .btn-search_hover { + background-color: #1E7DDC; + background-image: linear-gradient(#258bef, #2488eb, #2182e3, #1e7cda, #1b77d2, #1973cd); +} +body .btn-search_click { + background-color: #2080df; + background-image: linear-gradient(#1872cc, #1a75d0, #1d7bd8, #2081e1, #2386e9, #258aee); + box-shadow: none; +} + +/* dark skin */ +.skin-type-dark .box-search .box-search_tab a:hover, +.skin-type-dark .box-search dt.box-search_logo_hover, +.skin-type-dark .box-search .box-search_logos_show .box-search_logo_hover { + background-color: #0D0D0D; + background-color: rgba(0, 0, 0, 0.3); +} +.skin-type-dark .box-search .box-search_tab a:hover, +.skin-type-dark .box-search .box-search_tab a.cur { + color: #ffffff; +} +.skin-type-dark .box-search .box-search_logos_show { + border: 1px solid #0D0D0D; + border-color: rgba(0, 0, 0, 0.3); +} +.skin-type-dark .box-search_logo_disabled .box-search_logo_hover { + background-color: transparent !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/rtl/rtl.css new file mode 100755 index 000000000..aeab3ba76 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/rtl/rtl.css @@ -0,0 +1,120 @@ +.l-wrap .box-search_hsrch { + margin-right: 171px; +} +.l-wrap .hsrch_word a:hover{ + color: #1c81e5; +} +body .l-wrap .box-search { + width: 834px; + margin-right: 98px; + margin-top: 15px; +} + +/* .box-search .box-search_inner { + height: 58px; +} +*/ +body .box-search_logo_wrap { + margin-top: -14px; +} +.box-search .box-search_wrap .box-search_form .input { + border-left-width: 0; + margin-left: 0; + margin-right: 6px; +} +body .box-search .box-search_tab { + margin-right: 168px; +} +.box-search .box-search_wrap .box-search_form .input input { + height: 26px; + width: 512px; +} +body .btn-search_c { + height: 35px; +} +body .btn-search_c, +body .btn-search { + line-height: 35px; + width: 90px; +} +body .btn-search { + border-width: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + background-color: #2085E9; + background-image: linear-gradient(#258BEF, #248AEE, #2287EC, #2085e9, #1e83e7, #1C81E5); +} +.box-search .box-search_logo dt, +.box-search .box-search_logo dd { + padding: 10px 14px 10px 12px; +} +/*.box-search .box-search_logos_show dt, +.box-search .box-search_logos_show dd { + padding: 10px 13px 10px 11px; +} +.box-search .box-search_logos_show dt { + padding-top: 9px; +}*/ +.box-search .box-search_logo_disabled dt, +.box-search .box-search_logo_disabled dd { + padding: 10px 14px 10px 12px !important; +} +.box-search .box-search_logo a { + padding-left: 15px; +} +.box-search .box-search_logo_wrap { + width: 161px; + height: 65px; + margin-top: -13px; +} +/*.box-search .box-search_form .box-search_focus { + border-color: #4CA6FF; +}*/ + +/* search tab */ +.box-search .box-search_tab a:hover, +.box-search .box-search_tab a.cur { + color: #1C81E5; +} + +/* .box-search .box-search_tab a:hover + s { + visibility: hidden; +} +*/ +.box-search .box-search_logos_show { + border: 1px solid #E5E6E7; +} +.box-search .box-search_logo_disabled { + border: 0 !important; +} +.box-search .box-search_tab a:hover, +.box-search dt.box-search_logo_hover, +.box-search .box-search_logos_show .box-search_logo_hover, +body .sug-search .sug-select { + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, 0.05); +} +.box-search .box-search_logo_disabled .box-search_logo_hover { + background-color: transparent !important; +} + +/* sug */ +body .box-search .sug-search, +body .box-search .baidu_sug, +body .box-search .baidu_video_sug { + top: 34px; + width: 548px; +} +body .box-search .baidu_sug, +body .box-search .baidu_video_sug { + top: 0; + margin-top: 34px; + border-top: 0; +} +body .box-search .sug-search, +body .box-search_logo { + overflow: visible; +} +body .box-search .sug-search { + left: 0; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/rtl/rtl.more.css new file mode 100755 index 000000000..78bedeccd --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/rtl/rtl.more.css @@ -0,0 +1,42 @@ +/*from inline css*/ +.box-search .box-search_logos_show dt, +.box-search .box-search_logos_show dd { + padding: 10px 13px 10px 11px; +} +.box-search .box-search_logos_show dt { + padding-top: 9px; +} +.box-search .box-search_form .box-search_focus { + border-color: #4CA6FF; +} + + + +body .btn-search_hover { + background-color: #1E7DDC; + background-image: linear-gradient(#258bef, #2488eb, #2182e3, #1e7cda, #1b77d2, #1973cd); +} +body .btn-search_click { + background-color: #2080df; + background-image: linear-gradient(#1872cc, #1a75d0, #1d7bd8, #2081e1, #2386e9, #258aee); + box-shadow: none; +} + +/* dark skin */ +.skin-type-dark .box-search .box-search_tab a:hover, +.skin-type-dark .box-search dt.box-search_logo_hover, +.skin-type-dark .box-search .box-search_logos_show .box-search_logo_hover { + background-color: #0D0D0D; + background-color: rgba(0, 0, 0, 0.3); +} +.skin-type-dark .box-search .box-search_tab a:hover, +.skin-type-dark .box-search .box-search_tab a.cur { + color: #ffffff; +} +.skin-type-dark .box-search .box-search_logos_show { + border: 1px solid #0D0D0D; + border-color: rgba(0, 0, 0, 0.3); +} +.skin-type-dark .box-search_logo_disabled .box-search_logo_hover { + background-color: transparent !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/search-box-flat.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/search-box-flat.tpl new file mode 100755 index 000000000..2c8a36276 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-flat/search-box-flat.tpl @@ -0,0 +1,42 @@ + +<%if $head.dir=='ltr'%> + <%style%> + @import url('/widget/search-box-flat/ltr/ltr.css?__inline'); + <%/style%> + <%require name="common:widget/search-box-flat/ltr/ltr.more.css"%> + + <%if !empty($head.flowLayout) %> + <%style%> + @import url('/widget/search-box-flat/flow/ltr/ltr.css?__inline'); + <%/style%> + <%require name="common:widget/search-box-flat/flow/ltr/ltr.flow.css"%> + <%/if%> + + <%if $body.searchBox.widget == "search-box-4ps" %> + <%style%> + @import url('/widget/search-box-flat/4ps/ltr/ltr.css?__inline'); + <%/style%> + <%/if%> +<%else%> + <%style%> + @import url('/widget/search-box-flat/rtl/rtl.css?__inline'); + <%/style%> + <%require name="common:widget/search-box-flat/rtl/rtl.more.css"%> + + <%if !empty($head.flowLayout) %> + <%style%> + @import url('/widget/search-box-flat/flow/rtl/rtl.css?__inline'); + <%/style%> + <%require name="common:widget/search-box-flat/flow/rtl/rtl.flow.css"%> + <%/if%> + + <%if $body.searchBox.widget == "search-box-4ps" %> + <%style%> + @import url('/widget/search-box-flat/4ps/rtl/rtl.css?__inline'); + <%/style%> + <%/if%> +<%/if%> +<%*阿泰葡不使用4ps模版但使用ps搜索时的样式*%> +<%if $body.searchBox.widget != "search-box-4ps" && !empty($body.searchBox.sugUrl)%> + <%widget name="common:widget/search-box-4ps-noradio/search-box-4ps-noradio.tpl"%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ar/ar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ar/ar.tpl new file mode 100755 index 000000000..fe7486ac1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ar/ar.tpl @@ -0,0 +1,313 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "eg", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google": { + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: false + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + requestQuery: "wd", + url: null, + callbackFn: "ps_video", + callbackDataKey: "s", + requestParas: { + "prod" : "video_eg", + "sid": "", + "cb":"ps_video", + }, + templ: false + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://10.247.1.38:8333/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_eg" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://ar.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/bg.png new file mode 100755 index 000000000..4e04de967 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/br/br.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/br/br.tpl new file mode 100755 index 000000000..c05874121 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/br/br.tpl @@ -0,0 +1,321 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "br", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google_br": { + autoCompleteData: false, + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "pt-BR", + "sugexp": "lemsnc", + "xhr": "f" + }, + templ: false + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.br.search.yahoo.net/gossip-br-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "ps_video": { + requestQuery: "wd", + url: null, + callbackFn: "ps_video", + callbackDataKey: "s", + requestParas: { + "prod" : "video_br", + "sid": "", + "cb":"ps_video", + }, + templ: false + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "pt", + "gl": "br", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "kboing": { + url: null + }, + "google_dict": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.com.br/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_brazil" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "postbar": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://br.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "americanas": { + requestQuery: "q", + url: "http://busca.americanas.com.br/autocomplete/search.php", + callbackFn: "window.americanas", + callbackDataKey: "sugestoes", + requestParas: { + "prod" : "image_brazil", + "type": "1", + "numsugestoes": "12", + "numprods": "0", + "callback":"window.americanas" + }, + templ: function(data, q) { + var _data = data["sugestoes"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].consulta.replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "walmart": { + url: null + }, + "netshoes": { + url: null + }, + "buscape": { + url: null + }, + "zoom": { + requestQuery: "q", + url: "http://s.zst.com.br/static/autocomplete-index-r/.js", + callbackFn: "zoomAutoCompleteBlackBoard.notify", + callbackDataKey: "completions", + customUrl: function(para) { + var str = this.q.split("").join("/") + ".js?_=" + +new Date; + return this.o.url.replace(".js", str); + }, + templ: function(data) { + var _data = data["completions"] || [], + ret = [], + i = 0, + q = data["key"], + tmp = "", + len = _data.length; + var isStr = function(value){ + return typeof value === 'string'; + }; + for(; i' + tmp.replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-click.png new file mode 100755 index 000000000..7828b5d56 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-hover.png new file mode 100755 index 000000000..d11e540ed Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side-click.png new file mode 100755 index 000000000..b66706676 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side-hover.png new file mode 100755 index 000000000..693ac8896 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side.png new file mode 100755 index 000000000..d2b3c4f93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn-side.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn.png new file mode 100755 index 000000000..e0d576570 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/bg-search-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search-click.png new file mode 100755 index 000000000..31d004952 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search-hover.png new file mode 100755 index 000000000..a01e36716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search.png new file mode 100755 index 000000000..b3a7a12cd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr.more.css new file mode 100755 index 000000000..726cceec8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr.more.css @@ -0,0 +1,22 @@ + +/*sug has url*/ +.sug-url { + height:45px; + border-bottom:1px solid #e1e1e1; +} +.sug-url a { + display: block; + text-decoration: none; + color: #0000EE; +} +.sug-url .sug-hl { + height: 25px; + text-decoration: underline; + font-weight:bold; + font-size:14px; +} +.sug-url .sug-frm { + line-height: 16px; + font-size: 12px; + color: green; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr.tpl new file mode 100755 index 000000000..1b0529e31 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr.tpl @@ -0,0 +1,80 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($body.searchboxTab[$value.catagory])%> + <%if $value@first%> + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              <%$value.title%>
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($body.searchboxEngine[$value.id])%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> +
                              + + + + + + +
                              + <%break%><%/if%><%/foreach%> +
                              + <%$logoIndex = 0%> + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> + + <%$logoIndex = $logoIndex + 1%> + <%/if%><%/foreach%> +
                              +
                              +
                              +
                              +
                              + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr_inline.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr_inline.css new file mode 100755 index 000000000..ab6a96d20 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/ltr/ltr_inline.css @@ -0,0 +1,469 @@ +/*============box_search=============*/ +/*box-search_logo*/ +/*.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 5px 0 0; + float: left; + z-index: 6; +} +.box-search_logo { + position: absolute; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search_logo a { + padding-right: 18px; + display: block; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt , .box-search_logo dd { + padding: 10px 8px 10px 7px; +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) right -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: right -390px; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +}*/ + +/*box-search_form*/ +.box-search .box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ + padding: 6px 0 0 10px; +} +.box-search .box-search_form .radios label { + display:block; + padding-left:15px; + text-indent:-15px; + float:left; + margin-right:18px; + color:#666; + font-size: 13px; + white-space: nowrap; +} +.box-search .box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-right:5px; + vertical-align:bottom; + position:relative; + top:-3px; + left: 1px; + overflow:hidden; +} + +/*fi chrome radio white background box bug*/ +/*chrome 22-28*/ +@media \\0 screen { + body .box-search_form .radios label span { + display: inline-block; + text-indent: 0; + border-radius: 100px; + margin-right: 5px; + width: 14px; + height: 14px; + overflow: hidden; + vertical-align: -3px; + } + body .box-search_form .radios input { + margin-right: 0; + vertical-align: top; + position: static; + } +} +/*chrome 29+*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + body .box-search_form .radios label span { + display: inline-block; + text-indent: 0; + border-radius: 100px; + margin-right: 5px; + width: 14px; + height: 14px; + overflow: hidden; + vertical-align: -3px; + } + body .box-search_form .radios input { + margin-right: 0; + vertical-align: top; + position: static; + } +} + +/*============box_search=============*/ +.box-search { + margin: 0; + padding-left: 20px; + width: 700px; +} +.box-search .box-search_keyboard { + padding: 1px; +} + +/*box-search_tab*/ +.box-search .box-search_tab { + white-space: nowrap; + position: relative; + z-index: 8; + clear: both; + margin: 0; +} +.box-search .box-search_tab a { + /*font-size: 12px;*/ + float:left; + padding: 4px 12px 3px; + margin-left: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search .box-search_tab a:hover { + text-decoration: none; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + color: #1C81E5; + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, 0.05); +} +.box-search .box-search_tab a:focus { + outline:none; +} /*clear FF's focusborder*/ +.box-search .box-search_tab a.cur { + color: #1C81E5; + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search .box-search_sep { + display: block; + float: left; + height: 6px; + line-height: 6px; + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-left: -1px; +} +/*box-search_wrap*/ +.box-search .box-search_inner { + height:68px; +} +/*box-search_form*/ +.box-search .box-search_form { + padding:3px 0px 5px 0px; +} +.box-search .box-search_form .input { + position: relative; + z-index:101; + border: 3px solid #2186eb; + border-right-width: 0; + margin: 0 0 0 6px; +} + +/*box-search_logo*/ +.box-search .box-search_logo_wrap { + position: relative; + width: 122px; + height: 40px; + float: left; + z-index: 6; + margin: 0; + border-right: 1px solid #e6e6e6; +} +.box-search .box-search_logo { + position: absolute; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search .box-search_logo dt , .box-search_logo dd { + padding: 4px 10px 4px 8px; + cursor: pointer; +} +.box-search .box-search_logo dt { + border: none; + border-bottom: 1px solid #2186eb; + border-right: 1px solid #e6e6e6; +} +.box-search .box-search_logo dd { + border: 1px solid #e3e4e6; + border-top: 0; +} +.box-search .box-search_logo a { + padding-right: 21px; + display: block; +} +.box-search .box-search_logo a:focus { + outline: none; +} +.box-search .box-search_logo dt a { + background: url(../img/more_trigger.png?__sprite) no-repeat right center; +} +.box-search dt.box-search_logo_hover { + background-color: #e3e4e6; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} + +.box-search .box-search_logos_show { + background-color: #fff; + border:none; +} +.box-search .box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search .box-search_logos_show dt a { + background: url(../img/more_trigger-hover.png?__sprite) no-repeat right center; +} +.box-search .box-search_logos_show dd{ + width: 103px; +} +.box-search .box-search_logo_hide { + display: none; +} +.box-search .box-search_logo img { + width: 83px; + height: 32px; +} +.box-search .box-search_logo_disabled { + background: none; + border: none; +} +.box-search .box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +} +.box-search .box-search_logo_disabled .box-search_logo_hover { + background-color: transparent!important; +} +.box-search .box-search_form .input input { + border:none; + background:#fff; + width:542px!important; + float:left; + overflow:hidden; + height:32px; + font-size: 14px; + line-height:32px\9; + padding:4px 0 4px 10px; + margin-right: 30px; +} +.box-search .box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search .box-search_form .input label { + position: absolute; + left: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} + +/*btn-search*/ +.box-search .btn-search { + white-space:nowrap; + line-height:46px; + overflow: hidden; + _float: left; + *margin:0;/*fix non-IE'problem because of vertical-align*/ + /*background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x;*/ + /*--css3--*/ + width: 90px; + border-radius: 2px; + height: 46px; + border-width: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + background-color: #2085E9; + background-image: -webkit-linear-gradient(#258BEF, #248AEE, #2287EC, #2085e9, #1e83e7, #1C81E5); + background-image: -moz-linear-gradient(#258BEF, #248AEE, #2287EC, #2085e9, #1e83e7, #1C81E5); + background-image: -o-linear-gradient(#258BEF, #248AEE, #2287EC, #2085e9, #1e83e7, #1C81E5); + background-image: linear-gradient(#258BEF, #248AEE, #2287EC, #2085e9, #1e83e7, #1C81E5); +} +.box-search .btn-search_l, .btn-search_r { + display: none !important; +} +.box-search .btn-search_c { + /*background:url(../img/bg-search-btn.png?__sprite) repeat-x;*/ + vertical-align:top; + border:none; + color:#fff; + height:27px; + text-align:center; + width:70px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; + background: none; + height: 46px; + line-height: 46px; + width: 90px; +} +.box-search .btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} +.box-search .btn-search_hover { + background-color: #1E7DDC; + background-image: -webkit-linear-gradient(#258bef, #2488eb, #2182e3, #1e7cda, #1b77d2, #1973cd); + background-image: -moz-linear-gradient(#258bef, #2488eb, #2182e3, #1e7cda, #1b77d2, #1973cd); + background-image: -o-linear-gradient(#258bef, #2488eb, #2182e3, #1e7cda, #1b77d2, #1973cd); + background-image: linear-gradient(#258bef, #2488eb, #2182e3, #1e7cda, #1b77d2, #1973cd); +} +.box-search .btn-search_click { + background-color: #2080df; + background-image: -webkit-linear-gradient(#1872cc, #1a75d0, #1d7bd8, #2081e1, #2386e9, #258aee); + background-image: -moz-linear-gradient(#1872cc, #1a75d0, #1d7bd8, #2081e1, #2386e9, #258aee); + background-image: -o-linear-gradient(#1872cc, #1a75d0, #1d7bd8, #2081e1, #2386e9, #258aee); + background-image: linear-gradient(#1872cc, #1a75d0, #1d7bd8, #2081e1, #2386e9, #258aee); + -moz-box-shadow: none; + -webkit-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; +} + +/*sug*/ +.box-search .baidu_sug{ + top: 14px!important; + width: 673px!important; + left: -2px!important; + border-top-width: 0!important; +} +.box-search .sug-search{ + top: 41px!important; + width: 673px!important; + left: -3px!important; + position: absolute; +} +.box-search .sg_tri .sg_btn i{ + top: 16px!important; +} +.box-search .sg_tri .sg_up i { + top: 10px!important; +} +.box-search .baidu_video_sug{ + margin: 0!important; + top: 41px!important; + left: -3px!important; + border-top-width: 0!important; + width: 673px!important; +} +.box-search .sg_v_tri .sg_v_btn.sg_v_up i{ + top: 10px!important; +} +.box-search .sg_v_tri .sg_v_btn i{ + top: 16px!important; +} + +/*flow 960*/ +.w960 .box-search .box-search_wrap .box-search_form .input input { + width: 462px!important; +} +.w960 .l-wrap .box-search { + width: 620px; +} +.w960 .box-search .sug-search, +.w960 .box-search .baidu_sug, +.w960 .baidu_video_sug { + width: 593px!important; +} + +/*sug has url*/ +.box-search .sug-url { + height:45px; + border-bottom:1px solid #e1e1e1; +} +.box-search .sug-url a { + display: block; + text-decoration: none; + color: #0000EE; +} +.box-search .sug-url .sug-hl { + height: 25px; + text-decoration: underline; + font-weight:bold; + font-size:14px; +} +.box-search .sug-url .sug-frm { + line-height: 16px; + font-size: 12px; + color: green; +} + + + +.box-search dt.box-search_logo_hover, +.box-search .box-search_logos_show .box-search_logo_hover, +body .sug-search .sug-select { + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, 0.05); +} +body .box-search .sug-search, +body .box-search_logo { + overflow: visible; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo_wrap{ + display: none!important; +} +.box-search .search-box_placeholder{ + line-height: 30px!important; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl.more.css new file mode 100755 index 000000000..3f240b972 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl.more.css @@ -0,0 +1,69 @@ +/*------------------------suggest------------------------*/ +/*提示层外框*/ +.sug-search { + position:absolute; + top: 28px; + *top: 30px; + left: -1px; + border:1px solid #e3e4e6; + border-top: 0 none; + background:#fff; + width:528px; + color:#454545; + z-index:999; + white-space:nowrap; + overflow:hidden; +} +/*ie6 shim*/ +.sug-shim { + position:absolute; + top:-1px; + left:-1px; + z-index:-1; + filter:alpha(opacity="0"); + width:430px; + height:250px; +} +/*列表外框*/ +.sug-search ol { + font:bold 12px/23px Tahoma,arial,helvetica,clean,sans-serif; + cursor:default; +} +/*列表项*/ +.sug-search li { + padding: 3px 10px; + cursor: pointer; +} +.sug-search li b { + font: inherit; + display: inline; +} +/*选中样式*/ +.sug-search .sug-select { + background: #f5f7f7; +} +/*头部*/ +.sug-search .top { + font-weight:normal; + color:#999; + height:21px; + line-height:21px; + background:#eee; + padding:0 2px; +} +/*底部*/ +.sug-search .bot { + position:relative; + height:19px; + line-height:19px; + font-weight:normal; + border-top:1px solid #666; +} +/*高亮查询词*/ +.sug-search .sug-query { + font-weight:normal; +} +.sug-search font { + font-weight:normal !important; + color:#333 !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl.tpl new file mode 100755 index 000000000..2352189e8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl.tpl @@ -0,0 +1,80 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($body.searchboxTab[$value.catagory])%> + <%if $value@first%> + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              + <%$value.title%> +
                              +
                              +
                              +
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($body.searchboxEngine[$value.id])%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> +
                              + + + + <%widget name="common:widget/keyboard/keyboard.tpl"%> + + + +
                              + <%break%><%/if%><%/foreach%> +
                              + <%$logoIndex = 0%> + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> + + <%$logoIndex = $logoIndex + 1%> + <%/if%><%/foreach%> +
                              +
                              +
                              +
                              +
                              + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl_inline.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl_inline.css new file mode 100755 index 000000000..581552bad --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/rtl/rtl_inline.css @@ -0,0 +1,520 @@ +/*.box-search_form .input div{ float: left;}*/ /*为啥加?会导致ps sug出现问题*/ +.box-search_keyboard { + padding: 1px; +} +/*============box_search=============*/ +.box-search { + margin: 20px auto 0; + width: 780px; +} +.box-search_inner { + height:68px; +} +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + margin-right: 161px; + position: relative; + z-index: 8; + clear: both; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:right; + padding: 4px 12px 3px; + margin-right: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + background: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +/*.box-search_more { + line-height:normal; + position: absolute; + float:right; + cursor:pointer; + z-index:8; + top: -8px; + left: -7px; + border: 1px solid #edf0ef; + border-bottom: 0 none; +} +.box-search_more dt { + position: relative; + margin-top: 6px; +} +.box-search_more a:hover { + background: transparent; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more dt a { + margin: 0; + padding: 4px 9px 3px 17px; + color: #4c4c4c; + text-align: right; + display: block; + float: none; + line-height: 14px; + width: 30px; + overflow: hidden; +} +.box-search_more dt a:focus { + outline: none; +} +.box-search_more_hover { + background-color: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_more .arrow, .box-search_more .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 3px dashed transparent; +} +.box-search_more .arrow { + border-top-color: #4ac29a; + border-top-style: solid; + top: 10px; + right: 42px; +} +.box-search_more .arrow_bg { + border-top-color: #edf0ef; + border-top-style: solid; + margin: -5px -3px 0 0; + _display: none; +} +.box-search_more_hover .arrow_bg { + border-top-color: #dcdcde; +} +.box-search_more_show .arrow { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #4ac29a; + border-bottom-style: solid; + top: 12px; +} +.box-search_more_show .arrow_bg { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #fff; + border-bottom-style: solid; + margin-top: -1px; +} +.box-search_more_show .box-search_more_hover .arrow_bg { + border-bottom-color: #f5f7f7; +} +.box-search_more_show { + border:1px solid #e3e4e6; + background: #fff; + left: auto; + right: 472px; +} +.box-search_more_show dt { + margin-top: 0px; + padding-top: 6px; +} +.box-search_more_show dt a { + background-position:left -351px !important; +} +.box-search_more_show .box-search_more_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more_show dd { + line-height: 31px; +} +.box-search_more_show dd a { + padding:0 9px 0 15px; + display:block; + float:none; + color: #666; + text-align: right; + margin:0; + overflow: hidden; +} +.box-search_more_hide { + display: none; +}*/ +.box-search_tab a:focus { + outline:none; +} /*clear FF's focusborder*/ +.box-search_tab a.cur { + color:#00b075; /*font-weight:bold;*/ + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + display: block; + float: right; + height: 6px; + line-height: 6px; + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-right: -1px; +} +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 0 0 5px; + float: right; + z-index: 6; +} +.box-search_logo { + position: absolute; + right: 0; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search_logo a { + padding-left: 18px; + display: block; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt , .box-search_logo dd { + padding: 10px 7px 10px 8px; + /*cursor: pointer;*/ +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) -10px -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: -10px -390px; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +} + +/*box-search_form*/ +.box-search_form { + padding:3px 113px 5px 0px; +} +.box-search_form .input { + background-color: #fff; + border: 1px solid #d9d9d9; + border-top: 1px solid #bfbfbf; + margin-left: 13px; + position: relative; + z-index:5; +} +.box-search_form .input input { + border:none; + background:#fff; + width:491px; + float:right; + overflow:hidden; + height:20px; + font-size: 14px; + line-height:20px\9; + padding:4px 9px 3px 0px; + *width: 488px; + *float: none; + /*fix ie10 bug*/ + margin-right: 1px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + right: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} +.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +} +.btn-search { + white-space:nowrap; + line-height:27px; + overflow: hidden; + _float: left; + *margin:0;/*fix non-IE'problem because of vertical-align*/ + + + /*--css3--*/ + width: 70px; + border-radius: 2px; + border: 1px solid #3079ED; + background-color: #4787ED; + background-image: -o-linear-gradient(-90deg, #4D8FFD 0%, #4787ED 100%); + background-image: -moz-linear-gradient(-90deg, #4D8FFD 0%, #4787ED 100%); + background-image: -webkit-linear-gradient(-90deg, #4D8FFD 0%, #4787ED 100%); + background-image: -ms-linear-gradient(-90deg, #4D8FFD 0%, #4787ED 100%); + background-image: linear-gradient(-180deg, #4D8FFD 0%, #4787ED 100%); +} +.btn-search_l, .btn-search_r { + display: none !important; +} + +.btn-search_c { + /*background:url(../img/bg-search-btn.png?__sprite) repeat-x;*/ + vertical-align:top; + border:none; + color:#fff; + height:27px; + text-align:center; + width:70px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; + background: none; +} +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} + +.btn-search_hover{ + border-color: #2F5BB7; + background-color: #357AE8; + background-image: -o-linear-gradient(-90deg, #4C8FFD 0%, #357AE8 100%); + background-image: -moz-linear-gradient(-90deg, #4C8FFD 0%, #357AE8 100%); + background-image: -webkit-linear-gradient(-90deg, #4C8FFD 0%, #357AE8 100%); + background-image: -ms-linear-gradient(-90deg, #4C8FFD 0%, #357AE8 100%); + background-image: linear-gradient(-180deg, #4C8FFD 0%, #357AE8 100%); +} + +.btn-search_click{ + border-color: #2B79E6; + background-color: #357AE8; + background-image: -o-linear-gradient(-90deg, #4A8DFB 0%, #357AE8 100%); + background-image: -moz-linear-gradient(-90deg, #4A8DFB 0%, #357AE8 100%); + background-image: -webkit-linear-gradient(-90deg, #4A8DFB 0%, #357AE8 100%); + background-image: -ms-linear-gradient(-90deg, #4A8DFB 0%, #357AE8 100%); + background-image: linear-gradient(-180deg, #4A8DFB 0%, #357AE8 100%); + -moz-box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); + -webkit-box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); + box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); +} +/* +.btn-search_hover .btn-search_l { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; +} +.btn-search_hover .btn-search_r { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_hover .btn-search_c { + background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x; +} +.btn-search_hover .btn-search_ico { + background: url(../img/i-search-hover.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_l { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_r { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_click .btn-search_c { + background:url(../img/bg-search-btn-click.png?__sprite) repeat-x; +} +.btn-search_click .btn-search_ico { + background: url(../img/i-search-click.png?__sprite) no-repeat; +}*/ +.box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ +} +.box-search_form .radios label { + display:block; + padding-right:15px; + text-indent:-15px; + float:right; + margin-left:18px; + color:#666; + font-size: 13px; + white-space: nowrap; +} +.box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-left:5px; + vertical-align:bottom; + position:relative; + top:-1px; + overflow:hidden; +} + +/*set hot search words & search button*/ +.box-search_hsrch { + width: 620px; + margin-right: 160px; + overflow: hidden; + padding-top: 2px; + color: #919191; + white-space: nowrap; + _margin-top:-14px; +} +.hsrch_title { + font-weight: bold; + margin-left: 8px; + /*padding-right: 10px;*/ + color: #919191; +} +.hsrch_word span { + display: inline-block; + margin-left: 15px; +} +.hsrch_word a{ + color: #919191; + text-align: right; +} +.hsrch_word a:hover { + color: #00B075; + text-decoration: underline; +} +/*size setting*/ +.box-search-m .box-search_logo img { + width:107px; + height:40px; +} +.box-search-m .box-search_logo_wrap { + width: 142px; + height: 62px; + margin-top: -14px; +} +.box-search-m .box-search_logo dt a { + background-position: -10px -62px; +} +.box-search-m .box-search_logos_show dt a { + background-position: -10px -87px; +} +.box-search-m .box-search_tab { + margin-right: 148px; +} +.box-search-m .box-search_hsrch { + margin-right: 148px; +} +.box-search-s .box-search_logo img { + width:85px; + height:32px; +} +.box-search-s .box-search_logo_wrap { + width: 120px; + height: 54px; + margin-top: -9px; +} +.box-search-s .box-search_logo dt a { + background-position: -10px -67px; +} +.box-search-s .box-search_logos_show dt a { + background-position: -10px -93px; +} +.box-search-s .box-search_tab { + margin-right: 126px; +} +.box-search-s .box-search_hsrch { + margin-right: 126px; +} + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo{border-width:0px;} +.skin-type-dark .box-search_tab a{color: #ffffff;} +body.skin-type-dark .box-search_tab a.cur{color: #ffffff;} +.skin-type-dark .box-search_tab a:hover{background: #595959;background: rgba(0,0,0,0.6);} +.skin-type-dark #searchGroupRadios label{color: #ffffff;} +.skin-type-dark .box-search_logo_disabled dt.box-search_logo_hover, .skin-type-dark .box-search_logo_disabled dt a{background: 0;} +.box-search_logo_disabled, .box-search_logos_show{border: 0;} + +/*fi chrome radio white background box bug*/ +/*chrome 22-28*/ +@media \\0 screen { + body .box-search_form .radios label span { + display: inline-block; + text-indent: 0; + border-radius: 100px; + margin-left: 5px; + width: 14px; + height: 14px; + overflow: hidden; + vertical-align: -3px; + } + body .box-search_form .radios input { + margin-left: 0; + vertical-align: top; + position: static; + } +} +/*chrome 29+*/ +@media screen and (-webkit-min-device-pixel-ratio:0) { + body .box-search_form .radios label span { + display: inline-block; + text-indent: 0; + border-radius: 100px; + margin-left: 5px; + width: 14px; + height: 14px; + overflow: hidden; + vertical-align: -3px; + } + body .box-search_form .radios input { + margin-left: 0; + vertical-align: top; + position: static; + } +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/search-box-head-radio-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/search-box-head-radio-async.js new file mode 100755 index 000000000..a79307279 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/search-box-head-radio-async.js @@ -0,0 +1,764 @@ +/* +* Search box group +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + helper = require("common:widget/ui/helper/helper.js"); +require("common:widget/ui/suggest/suggest.js"); + +Gl.searchGroup = function(o) { + var _conf = conf.searchGroup, + type = o.type || "index", + logoPath = _conf.conf[type].logoPath, + + logo = $("#" + (o.logoId || "searchGroupLogo")), + logoGroup = $("#" + (o.logoGroupId || "searchGroupLogos")), + tabs = $("#" + (o.tabsId || "searchGroupTabs")), + form = $("#" + (o.formId || "searchGroupForm")), + input = $("#" + (o.inputId || "searchGroupInput")), + label = $("#" + (o.labelId || "searchGroupLabel")), + radios = $("#" + (o.radiosId || "searchGroupRadios")), + btn = $("#" + (o.btnId || "searchGroupBtn")), + // more = $("#" + (o.moreId || "searchGroupMore")), + moreTab = $("#" + (o.moreTabId || "searchGroupMoreTab")), + params = $("#" + (o.paramsId || "searchGroupParams")), + radioName = o.radioName || "searchGroupRadio", + btnWrap = btn.parent(), + inputWrap = input.parent(), + defaultN = _conf.conf[type].curN || 0, + curTab = $("a:eq(" + defaultN + ")", tabs), + tabsChildren = $("a", tabs), + //render data when init sug + defaultData = _conf.sug[_conf.list[curTab.attr("data-t")].engine[defaultN].id], + //record which form was selected in tabs + storeForm = {}, + logoHash = { + 'yahoo': 'yahoo', + 'google': 'google', + 'baidu': 'baidu', + 'defau': 'defau' + }, + $bd = $(document.body), + getCurLogo = function(attr) { + var tmpObj = null; + attr = attr.toLowerCase(); + for(var i in logoHash) { + if(attr.search(i) > -1) { + tmpObj = logoHash[i]; + break; + } + } + if(tmpObj === 'yahoo' && conf.country === 'jp') { + tmpObj = 'yahoo_jp'; + } + return (tmpObj || 'defau'); + }, + //smallLogoPath = "/resource/fe/headerTest/search/#{logo}.png", + + //reset the form about action and params + resetForm = function(data, n) { + var ret = []; + var theLogoPath = $bd.hasClass("skin-type-dark")?(_conf.conf[type].logoPath+"dark/"):_conf.conf[type].logoPath; + var isFixed = $bd.hasClass("header-fixed-up"); + var logoGroupDt = $("dt", logoGroup).clone(); + + // Fixed bug in IE8 + logoGroup.html(''); + logoGroup.append(logoGroupDt); + // rebinding logo element + logo = $("#" + (o.logoId || "searchGroupLogo"), logoGroupDt); + + form.attr("action", data[n].action); + input.attr("name", data[n].q); + if(isFixed) { + logo.attr("src", "/resource/fe/headerTest/search/" + getCurLogo(data[n].logo) + ".png"); + } else { + logo.attr("src", theLogoPath + data[n].logo + ".png"); + } + logo.attr("alt", data[n].name); + logo.parent().attr("title", data[n].name); + logo.parent().attr("data-n", n); + logo.attr("data-id", data[n].id); + + $("dd", logoGroup).remove(); + logoGroup.append(function () { + ret = []; + $.each(data, function(key, val) { + if(isFixed) { + ret.push('
                              ' + val.name + ''+ val.name + '
                              '); + } else { + ret.push('
                              ' + val.name + '
                              '); + } + }); + return ret.join(""); + }); + // fix: show errors when click radios on IE + setTimeout(function() { + radios.html(function() { + ret = []; + $.each(data,function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + $("#searchGroupRadio_" + n).attr("checked", "checked"); + }, 0); + + params.html(function() { + ret = []; + $.each(data[n].params, function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + + if (data.length <= 1) { + logoGroup.addClass("box-search_logo_disabled"); + } else { + logoGroup.removeClass("box-search_logo_disabled"); + } + logoGroup.children().on("mouseenter", function() { + $bd.hasClass("header-fixed-up") && $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $bd.hasClass("header-fixed-up") && $(this).removeClass("box-search_logo_hover"); + }); + }, + + resetSug = function(data, n) { + + data = _conf.sug[data[n].id]; + $.each(data, function(key, val) { + sug.o[key] = val; + }); + //fix more prams + !data.templ && (sug.o.templ = false); + !data.callbackFn && (sug.o.callbackFn = false); + !data.callbackDataKey && (sug.o.callbackDataKey = false); + !data.callbackName && (sug.o.callbackName = false); + !data.callbackDataNum && (sug.o.callbackDataNum = false); + !data.customUrl && (sug.o.customUrl = false); + + !data.customUrl && (sug.o.customUrl = false); + !data.charset && (sug.o.charset = undefined); + sug.reset(true); + }, + + // toggle for baidu sug + resetBaiduSug = function (data, n) { + + if (!baidu_sug) { + return; + } + + data = data ? data[n].baiduSug : false; + + if (data) { + baidu_sug.setMode(data.mod); + baidu_sug.toggle(true); + } else { + baidu_sug.toggle(false); + } + }, + + // toggle for PS video sug + resetBaiduVideoSug = function(data, n) { + if(!window["baidu_video_sug"]) { + return; + } + + data = data ? data[n].otherSug : false; + + if (data) { + baidu_video_sug.setMode(data.mod); + baidu_video_sug.toggle(true); + } else { + baidu_video_sug.toggle(false); + } + }, + + switchTab = function(tab, sugStay) { + tab = $(tab); + curTab.removeClass("cur"); + tab.addClass("cur"); + curTab = tab; + + var t = tab.attr("data-t"), + + list = _conf.list, + engines = list[t].engine, + engLen = engines.length; + //ps sug gut add tab changed name + tabCategoryName = t; + //if the last element is null, remove it + if($.isEmptyObject(engines[engLen-1])){ + engines.length = engLen - 1; + }; + //record current form(add the current type to storeForm as a key) + storeForm[t] || (storeForm[t] = 0); + + //reset form + resetForm(engines, storeForm[t]); + + //reset suggest + !sugStay && resetSug(engines, storeForm[t]); + + // reset PS video sug + !sugStay && resetBaiduVideoSug(engines, storeForm[t]); + + // reset baidu sug + !sugStay && resetBaiduSug(engines, storeForm[t]); + + //reset hot word + label.text(list[t].hotWords); + /* + setTimeout(function() { + input.select(); + }, 16); + */ + //keep the cursor in end + /*setTimeout(function() { + setCursorPos(input[0], input.val().length); + }, 16); */ + }, + + showMore = function() { + var more = $("dd", moreTab), + list = _conf.more, + ret = []; + if ($("dd", moreTab).length === 0) { + $.each(list, function() { + ret.push('
                              ' + this.name + '
                              '); + }); + moreTab.append(ret.join("")); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + } + if(moreTab.hasClass("box-search_more_show")) { + moreTab.removeClass("box-search_more_show"); + more.each(function () { + $(this).addClass("box-search_more_hide"); + }); + } + else { + moreTab.addClass("box-search_more_show"); + more.each(function () { + $(this).removeClass("box-search_more_hide"); + }); + } + }, + + showLogo = function () { + var n = logo.parent().attr("data-n"), + logoList = $("dd", logoGroup); + var isFix = $bd.hasClass("header-fixed-up"), + logLen = logoList.length; + if (logoGroup.hasClass("box-search_logos_show")) { + logoGroup.removeClass("box-search_logos_show"); + logoList.each(function () { + $(this).addClass("box-search_logo_hide").removeClass("box-search_logo_first box-search_logo_last"); + }); + } + else { + logoGroup.addClass("box-search_logos_show"); + logoList.each(function (key) { + var $that = $(this); + key != n && $that.removeClass("box-search_logo_hide"); + if (isFix && (logLen > 1) && (key != n)) { + if(n == 0) { + if(key === 1) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-1) { + $that.addClass("box-search_logo_last"); + } + } else if(n == logLen-1) { + if(key === 0) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-2) { + $that.addClass("box-search_logo_last"); + } + } else { + if(key === 0) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-1) { + $that.addClass("box-search_logo_last"); + } + } + } + }); + } + }, + + //disable selection for input elements + disableSelection = function(el) { + if (typeof el.onselectstart != "undefined") { //IE + el.onselectstart = function() { + return false; + } + } else if (typeof el.style.MozUserSelect != "undefined") { //FF + el.style.MozUserSelect = "none"; + } else { //Opera + el.onmousedown = function() { + return false; + } + } + }, + + setCursorPos = function(obj, pos) { + if (obj.setSelectionRange) { + obj.focus(); + obj.setSelectionRange(pos, pos); + } else if (obj.createTextRange) { + var range = obj.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + }, + //sug instantiation + sug = Gl.suggest(input[0], { + classNameWrap: "sug-search", + classNameQuery: "sug-query", + classNameSelect: "sug-select", + //classNameClose: "sug-close", + delay: _conf.conf[type].delay, + n: _conf.conf[type].n, + autoFocus: false, + requestQuery: defaultData.requestQuery, + requestParas: defaultData.requestParas, + url: defaultData.url, + callbackFn: defaultData.callbackFn, + callbackDataKey: defaultData.callbackDataKey, + onCheckForm: function(form) { + + if( !(/^hao123$/.test(logo.attr("data-id"))) ) return; + + if( !$(form).find("input[name='haobd']").get(0) ) { + $(form).append(""); + } + }, + onSearchDirect: function(li, q, prefix) { + var img = new Image(), + enco = encodeURIComponent, + collect = [], + _type = curTab.attr("data-t"), + url = "http://search.hao123.co.th/r/cl/i18n.gif?fm=se&st=3&rsv_sugtype=cr&lang=th-TH", + href = $( $(li).find("a").get(0) ).attr("href"), + title = $( $(li).find("a .sug-hl").get(0) ).text(), + + conf = { + url: href, + q: q, + title: title, + prefixsug: prefix, + haobd: $.cookie("BAIDUID"), + t: +new Date + }; + + + img.src = url + "&" + $.param(conf); // PS的统计 + + var utObj = { + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId: "search", + tab: _type + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + // 我们的统计 + /*if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId:"search" + }); + }*/ + }, + onMouseSelect: function() { + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action; + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + }, 16); + } + input.select(); + var _type = curTab.attr("data-t"); + var utObj = { + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "sug", + modId:"search", + tab: _type + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + /*if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "sug", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "sug", + modId:"search" + }); + }*/ + }, + templ: defaultData.templ + }); + + //ps sug gut add tab + window.tabCategoryName = curTab.attr("data-t"); + //clear the input's value after refresh + input.val(""); + + //some browsers may keep form's status after refresh + $("[name = radioName]:first").attr("checked", true); + + //record the default form'n + storeForm[curTab.attr("data-t")] = 0; + //select text in input after submit + form.on("submit", function() { + // input.select(); + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action, + _url = _conf.list[t].engine[storeForm[t]].url, + isBlank = false; + var radioEl = $("input", radios); + for(var i = 0; i < radioEl.length; i++) { + if(radioEl.eq(i).attr("checked")) { + var checkedRadio = radioEl.eq(i); + } + } + /*if(t == "shopping" && checkedRadio.attr("id") == "searchGroupRadio_0") { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + }*/ + + // set input's value to the hot word if it was blank + if($.trim(input.val()) === "") { + if($.trim(label.text()) === ""){ + var action = _action && _url ? _url : _action; + form.attr("action", action); + } else { + input.val(label.text()); + input.css("color", "#fff"); + isBlank = true; + } + } else { + if(/^hao123$/.test(logo.attr("data-id"))) { + if(!form.find("input[name='haobd']").get(0)) { + form.append(""); + } + } + form.attr("action", _action); + } + + // set charset to big5 while the engine is ruten + if(t == "shopping" && /ruten.png/.test(logo.attr("src"))) { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + } + var utObj = { + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "input", + modId:"search", + tab: t + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + /*if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "input", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + element: "input", + modId:"search" + }); + } */ + //reset input after search + if(isBlank) { + setTimeout(function() { + input.val(""); + input.removeAttr("style"); + }, 16); + } else { + input.select(); + } + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + input.select(); + }, 16); + } + //no action while engine is hao123 and input val is blank + /*if(/hao123.png/.test(logo.attr("src")) && input.val() === "") { + return false; + }*/ + }); + + //disableSelection + disableSelection(tabs[0]); + disableSelection(radios[0]); + + resetBaiduVideoSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + resetBaiduSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + btn.on("mousedown", function() { + btnWrap.addClass("btn-search_click"); + }); + btn.on("mouseup", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseout", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseenter", function() { + btnWrap.addClass("btn-search_hover"); + }); + btn.on("mouseleave", function() { + btnWrap.removeClass("btn-search_hover"); + }); + input.on("focus", function() { + inputWrap.addClass("box-search_focus"); + label.hide(); + }); + input.on("blur", function() { + inputWrap.removeClass("box-search_focus"); + $.trim(input.val()) === "" && label.show(); + }); + logoGroup.children().on("mouseenter", function() { + $bd.hasClass("header-fixed-up") && $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $bd.hasClass("header-fixed-up") && $(this).removeClass("box-search_logo_hover"); + }); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + + tabs.on("mousedown", function(e) { + var el = e.target; + el.tagName === "SPAN" && (el = el.parentNode); + //el.tagName !== "DT" && !hasClass(el, "cur") && !hasClass(el, "more") && switchTab(el); + el.getAttribute("data-t") && switchTab(el); + form.acceptCharset = document.charset = "utf-8"; + }); + + conf.pageType !=="lv2" && window["PDC"] && PDC.mark("c_sxvi"); + + moreTab.on("mousedown", function(e) { + var el = e.target; + if(el.parentNode.tagName === "DD") { + setTimeout(showMore, 200); + }else { + showMore(); + } + }); + + $(document).on("mousedown", function(e) { + var el = e.target; + $bd.hasClass("header-fixed-up") && logoGroup.hasClass("box-search_logos_show") && el !== logoGroup[0] && !jQuery.contains(logoGroup[0], el) && showLogo(); + moreTab.hasClass("box-search_more_show") && el !== moreTab[0] && !jQuery.contains(moreTab[0], el) && showMore(); + // more.css("display") === "block" && el !== moreTab[0] && !jQuery.contains(moreTab[0], el) && !jQuery.contains(more[0], el) && showMore(); + }); + + logoGroup.on("click", function(e) { + var el = e.target, + $el = $(el), + $ta = el.tagName, + t = curTab.attr("data-t"), + n = storeForm[t], + _n; + if(!$bd.hasClass("header-fixed-up")) return; + if ($ta === "IMG"||$ta === "SPAN") { + _n = ~~$el.parent().attr("data-n"); + } else if ($ta === "A"||$ta === "DT") { + _n = ~~$el.attr("data-n"); + }else { + _n = ~~$el.children().attr("data-n"); + } + //input.select(); + //keep the cursor in end + form[0].acceptCharset = document.charset = "utf-8"; + //setTimeout(function() { + // setCursorPos(input[0], input.val().length); + //}, 16); + + + + if(_n !== n) { + storeForm[t] = _n; + resetForm(_conf.list[t].engine, _n); + //reset suggest + resetSug(_conf.list[t].engine, _n); + + //reset PS video sug + resetBaiduVideoSug(_conf.list[t].engine, _n); + + resetBaiduSug(_conf.list[t].engine, _n); + } + showLogo(); + }); + // bind radio + $("input", radios).live("click", function (e) { + var t = curTab.attr("data-t"), + n = storeForm[t], + _n = $(this).val(); + //input.select(); + //keep the cursor in end + $(this).attr("checked", "checked"); + + setTimeout(function() { + // setCursorPos(input[0], input.val().length); + }, 16); + + //el.tagName === "LABEL" && (el = el.getElementsByTagName("input")[0]); + if(_n !== n) { + storeForm[t] = _n; + + resetForm(_conf.list[t].engine, _n); + //reset suggest + resetSug(_conf.list[t].engine, _n); + + //reset PS video sug + resetBaiduVideoSug(_conf.list[t].engine, _n); + + //reset baidu sug + resetBaiduSug(_conf.list[t].engine, _n); + } + var utObj = { + type: "click", + ac: "b", + position: "sRadio", + engine: _conf.list[t].engine[_n].id.toLowerCase(), + modId:"search" + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + /*UT.send({ + type: "click", + ac: "b", + position: "sRadio", + engine: _conf.list[t].engine[_n].id.toLowerCase(), + sort: _conf.conf.sort, + modId:"search" + });*/ + }); + + //focus the input when init + + //to let lv2 page NOT to auto focus SEARCH INPUT! by NE + if(o.autoFocus == null){ + o.autoFocus = true; //default TRUE! + } + if(o.autoFocus) { + input.focus(); + } + + /*for header when fixed & width = 40px*/ // TODO + var $window = $(window), + recordTab = null, // 吸顶时刻如果tab不是web的话记录当前tab + restoreTo = function() { // 吸顶变正常时恢复之前的tab + if(recordTab) { + switchTab(recordTab); + } else { + switchTab($("a[data-t='web']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }, + transTo = function() { // 正常变吸顶时切到web的tab + if (curTab.attr("data-t") != "web") { + recordTab = curTab; + switchTab($("a[data-t='web']", tabs)); + } else { + recordTab = null; + switchTab($("a[data-t='web']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }; + + $window.on("headerFixed.transTo", function() { + transTo(); + }); + $window.on("headerFixed.restore", function() { + restoreTo(); + }); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/search-box-head-radio.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/search-box-head-radio.tpl new file mode 100755 index 000000000..951df7778 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/search-box-head-radio.tpl @@ -0,0 +1,100 @@ +<%* 搜索引擎根据TN号显隐*%> +<%foreach $body.searchBox.sBoxTag as $value%> + <%foreach $value.engine as $engine%> + <%if !empty($engine.tn[0].param)%> + <%foreach $engine.tn as $tn%> + <%if $tn.param == $root.urlparam.tn%> + <%$body.searchboxEngine[$engine.id] = 'true'%> + <%/if%> + <%/foreach%> + <%/if%> + <%/foreach%> +<%/foreach%> + +<%assign var="sBoxTag" value=$body.searchBox.sBoxTag%> +<%assign var="hSearchWords" value=$body.searchBox.hotSearchWords%> +<%assign var="sBtnWords" value=$body.searchBox.searchBtnWords%> +<%* 搜索框 --- 首屏模块 inline css*%> +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/search-box-head-radio/ltr/ltr_inline.css?__inline'); + <%else%> + @import url('/widget/search-box-head-radio/rtl/rtl_inline.css?__inline'); + <%/if%> +<%/style%> + +<%widget name="common:widget/search-box-head-radio/`$head.dir`/`$head.dir`.tpl"%> +<%if isset($sysInfo.country)%> +<%widget name="common:widget/search-box-head-radio/`$sysInfo.country`/`$sysInfo.country`.tpl"%> +<%/if%> +<%script%> + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/search-box-head-radio/search-box-head-radio-async.js"], function ($) { + var autoFocusSearch = true; + <%if $body.extAppMod%> + autoFocusSearch = false; //if app show DO NOT autoFocus + <%/if%> + <%if !empty($body.searchBox.sugUrl)%> + var head = document.getElementsByTagName("head")[0]; + var requestScript = function(url, onsuccess, onerror, timeout) { + + var script = document.createElement('script'); + if (onerror) { + var tid = setTimeout(function() { + script.onload = script.onreadystatechange = script.onerror = null; + timeout(); + }, 5000); + + script.onerror = function() { + clearTimeout(tid); + onerror(); + }; + + script.onload = script.onreadystatechange = function() { + if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) { + script.onload = script.onreadystatechange = null; + script = undefined; + clearTimeout(tid); + onsuccess(); + } + } + } + script.type = 'text/javascript'; + script.src = url; + head.appendChild(script); + }; + + requestScript("<%$body.searchBox.sugUrl%>", function() { + baidu_sug.setMode('baidu'); + baidu_sug.toggle(false); + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "success"}); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "error"}); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "timeout"}); + }); + <%else%> + baidu_sug = false; + Gl.searchGroup({type: conf.pageType, autoFocus: autoFocusSearch}); + <%/if%> + + <%if !empty($body.searchBox.sugMoreUrl)%> + setTimeout(function() { + window["require"] && require.async("<%$body.searchBox.sugMoreUrl%>"); + }, 1e3); + <%/if%> + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/th/th.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/th/th.tpl new file mode 100755 index 000000000..7b8b96d85 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/th/th.tpl @@ -0,0 +1,375 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "thai", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google_th": { + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "th", + "authuser": "0" + }, + templ: false + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "th", + "client": "img", + "ds": "i", + "cp": "4" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.co.th/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod": "image_thai" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + requestQuery: "wd", + url: null, + callbackFn: "ps_video", + callbackDataKey: "s", + requestParas: { + "prod" : "video_thai", + "sid": "", + "cb":"ps_video", + }, + templ: false + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "th", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "th", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "mthai": { + url: null + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + }, + templ: function(data) { + var _data = data["suggestions"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filestube": { + requestQuery: "q", + url: "http://149.13.65.144:8087", + callbackFn: "filestube123", + callbackDataKey: "r", + charset: "utf-8", + requestParas: { + "callback": "filestube123", + "t": +new Date + }, + customUrl: function(para) { + return this.o.url + "/" + encodeURIComponent(this.q) + "?" + para.substr(1); + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.th/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "th", + "gl": "th", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_map": { + requestQuery: "key", + url: "http://search2.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "ds": "poi,poi2,poi3,s_pg", + "json": "1", + "num": "20", + "anyorder": "1", + "count": "19" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_dict": { + requestQuery: "key", + url: "http://search.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "json": "1", + "ds": "head", + "num": "20", + "count": "7" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://th.wikipedia.org/w/api.php", + callbackFn: "wikipedia.th", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.th" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filmes": { + requestQuery: "wds", + url: "http://th.hao123.com/video/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: {}, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/tw/tw.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/tw/tw.tpl new file mode 100755 index 000000000..cb6796f0f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head-radio/tw/tw.tpl @@ -0,0 +1,335 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box-4ps/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_web": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "zh-TW" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "baidu": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://suggestion.baidu.com/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "cb": "window.bdsug.sug" + } + }, + "google_news": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "zh-TW", + "gs_nf": "1", + "ds": "n" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_news": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-ura", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "droprotated": "1", + "pubid": "184" + } + }, + "baidu_news": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "news" + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "zh-TW", + "gl": "tw", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "zh-TW", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "video" + } + }, + "yahoo_images": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "183" + } + }, + "google_images": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "zh-TW", + "client": "img", + "gs_nf": "1", + "ds": "i" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_images": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "image" + } + }, + "facebook": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://zh.wikipedia.org/w/api.php", + callbackFn: "wikipedia.zh", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.zh" + } + }, + "baidu_baike": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "baike" + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-pub_sayt", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "560" + } + }, + "baidu_dict": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://dictsug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.tw/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "zh-TW", + "gl": "tw", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_map": { + url: null + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ae/ae.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ae/ae.tpl new file mode 100755 index 000000000..9a172407e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ae/ae.tpl @@ -0,0 +1,244 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ae/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ae/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.ae/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.ae/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.ae/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + detail = detail ? ' - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ar/ar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ar/ar.tpl new file mode 100755 index 000000000..517336887 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ar/ar.tpl @@ -0,0 +1,312 @@ +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "eg", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google": { + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: false + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + requestQuery: "wd", + url: null, + callbackFn: "ps_video", + callbackDataKey: "s", + requestParas: { + "prod" : "video_eg", + "sid": "", + "cb":"ps_video", + }, + templ: false + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://10.247.1.38:8333/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_eg" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://ar.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/br/br.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/br/br.tpl new file mode 100755 index 000000000..3707fb3e0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/br/br.tpl @@ -0,0 +1,319 @@ +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "br", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google_br": { + autoCompleteData: false, + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "pt-BR", + "sugexp": "lemsnc", + "xhr": "f" + }, + templ: false + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.br.search.yahoo.net/gossip-br-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "ps_video": { + requestQuery: "wd", + url: null, + callbackFn: "ps_video", + callbackDataKey: "s", + requestParas: { + "prod" : "video_br", + "sid": "", + "cb":"ps_video", + }, + templ: false + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "pt", + "gl": "br", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "kboing": { + url: null + }, + "google_dict": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.com.br/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_brazil" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "postbar": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://br.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "americanas": { + requestQuery: "q", + url: "http://busca.americanas.com.br/autocomplete/search.php", + callbackFn: "window.americanas", + callbackDataKey: "sugestoes", + requestParas: { + "prod" : "image_brazil", + "type": "1", + "numsugestoes": "12", + "numprods": "0", + "callback":"window.americanas" + }, + templ: function(data, q) { + var _data = data["sugestoes"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].consulta.replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "walmart": { + url: null + }, + "netshoes": { + url: null + }, + "buscape": { + url: null + }, + "zoom": { + requestQuery: "q", + url: "http://s.zst.com.br/static/autocomplete-index-r/.js", + callbackFn: "zoomAutoCompleteBlackBoard.notify", + callbackDataKey: "completions", + customUrl: function(para) { + var str = this.q.split("").join("/") + ".js?_=" + +new Date; + return this.o.url.replace(".js", str); + }, + templ: function(data) { + var _data = data["completions"] || [], + ret = [], + i = 0, + q = data["key"], + tmp = "", + len = _data.length; + var isStr = function(value){ + return typeof value === 'string'; + }; + for(; i' + tmp.replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/br/minilogo/minilogo.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/br/minilogo/minilogo.tpl new file mode 100755 index 000000000..bdfe503c2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/br/minilogo/minilogo.tpl @@ -0,0 +1,316 @@ + +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "/resource/fe/br/minilogo/search_logo/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "/resource/fe/br/minilogo/search_logo/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + + "web": { + "hotWords": "<%$body.searchBox.sBoxTag[0].hotWords%>", + "engine": [{ + name: "Google Brasil", + logo: "google_br", + url: "http://www.google.com.br/", + action: "http://www.google.com.br/search", + params: { + "hl": "pt-BR" + }, + q: "q", + + sug: { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/s", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "pt-BR", + "sugexp": "lemsnc", + "xhr": "f" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + }, { + name: "Yahoo", + logo: "yahoo_web", + url: "http://br.yahoo.com/", + action: "http://br.search.yahoo.com/search", + params: { + }, + q: "p", + sug: { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.br.search.yahoo.net/gossip-br-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + } + } + ] + }, + + "downloads": { + "hotWords": "<%$body.searchBox.sBoxTag[1].hotWords%>", + "engine": [{ + name: "4shared", + logo: "4shared", + url: "http://www.4shared.com/", + action: "http://search.4shared.com/q/1/#{q}", + params: { + }, + q: "q", + sug: { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + } + }] + }, + + "video": { + "hotWords": "<%$body.searchBox.sBoxTag[2].hotWords%>", + "engine": [{ + name: "YouTube", + logo: "youtube", + url: "http://www.youtube.com/?gl=BR&hl=pt", + action: "http://www.youtube.com/results", + params: { + }, + q: "search_query", + sug: { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "google.sbox.p0 && google.sbox.p0", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "pt", + "gl": "br", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + },{ + name: "Google Vídeos", + logo: "google_video", + url: "http://www.google.com.br/videohp?hl=pt-BR", + action: "http://www.google.com.br/search?", + params: { + "tbm": "vid", + "hl": "pt-BR" + }, + q: "q", + sug: { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + }] + }, + "music": { + "hotWords": "<%$body.searchBox.sBoxTag[3].hotWords%>", + "engine": [{ + name: "kboing", + logo: "kboing", + url: "http://www.kboing.com.br/", + action: "http://www.kboing.com.br/searchmusic.php?", + params: { + "tb": "musica" + }, + q: "q", + sug: { + url: null + } + + }] + }, + "translator": { + "hotWords": "<%$body.searchBox.sBoxTag[4].hotWords%>", + "engine": [{ + name: "Google Tradutor", + logo: "google_dict", + url: "http://translate.google.com.br/?hl=pt-BR&tab=nT", + action: "http://translate.google.com.br/", + params: { + hl: "pt-BR" + }, + q: "q", + sug: { + url: null + } + }] + }, + + "map": { + "hotWords": "<%$body.searchBox.sBoxTag[5].hotWords%>", + "engine": [{ + name: "Google Mapas", + logo: "google_map", + url: "http://maps.google.com.br/maps?hl=pt-BR&tab=Tl", + action: "http://maps.google.com.br/maps", + params: { + "hl": "pt-BR" + }, + q: "q", + sug: { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + }] + }, + + "images": { + "hotWords": "<%$body.searchBox.sBoxTag[6].hotWords%>", + "engine": [{ + name: "Google Imagens", + logo: "google_images", + url: "http://www.google.com.br/imghp?hl=pt-BR&tab=wi", + action: "http://www.google.com.br/search?", + params: { + "tbm": "isch", + "hl": "pt-BR" + }, + q: "q", + sug: { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + }] + }, + + "post": { + "hotWords": "<%$body.searchBox.sBoxTag[7].hotWords%>", + "engine": [{ + name: "Postbar", + logo: "postbar", + url: "http://br.tieba.com", + action: "http://br.tieba.com/frs/index?", + params: { + }, + q: "kw", + sug: { + url: null + } + }] + } + } +} +<%/strip%> +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/en/en.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/en/en.tpl new file mode 100755 index 000000000..b09cfcea8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/en/en.tpl @@ -0,0 +1,178 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/en/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/en/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google_web": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "en" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "en", + "client": "img", + "gs_nf": "1", + "ds": "i" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "en", + "gl": "", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "en", + "gl": "US", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "en", + "gs_nf": "1", + "ds": "n" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +<%strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/id/id.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/id/id.tpl new file mode 100755 index 000000000..26f6ddbeb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/id/id.tpl @@ -0,0 +1,193 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/id/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/id/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.co.id/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "id" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.id/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "id" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.id/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "id", + "gl": "id", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "id", + "client": "youtube", + "gl": "id", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc446.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "google_dict": { + url: null + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.id.search.yahoo.com/gossip-id-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://id.wikipedia.org/w/api.php", + callbackFn: "wikipedia.id", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.id", + "format":"json" + } + }, + "google_news": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-click.png new file mode 100755 index 000000000..7828b5d56 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-hover.png new file mode 100755 index 000000000..d11e540ed Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side-click.png new file mode 100755 index 000000000..b66706676 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side-hover.png new file mode 100755 index 000000000..693ac8896 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side.png new file mode 100755 index 000000000..d2b3c4f93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn-side.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn.png new file mode 100755 index 000000000..e0d576570 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/bg-search-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-close-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-close-hover.png new file mode 100755 index 000000000..c6f540558 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-close-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-close.png new file mode 100755 index 000000000..159ed3112 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-custom-hide.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-custom-hide.png new file mode 100755 index 000000000..608993755 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-custom-hide.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-custom-show.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-custom-show.png new file mode 100755 index 000000000..b21b98c98 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-custom-show.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search-click.png new file mode 100755 index 000000000..31d004952 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search-hover.png new file mode 100755 index 000000000..a01e36716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search.png new file mode 100755 index 000000000..b3a7a12cd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/more_trigger-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/more_trigger-hover.png new file mode 100755 index 000000000..cd547fd4b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/more_trigger-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/more_trigger.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/more_trigger.png new file mode 100755 index 000000000..46f160b21 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/img/more_trigger.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/jp/jp.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/jp/jp.tpl new file mode 100755 index 000000000..bd7645ecd --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/jp/jp.tpl @@ -0,0 +1,355 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + tn: { + timeStamp: "<%$sysInfo.baiduidCt%>", + serverTime: "<%$sysInfo.serverTime%>", + isInList:<%if !empty($root.urlparam.tn) && !empty($head.confTn) && in_array($root.urlparam.tn,explode("|", $head.confTn))%>1<%else%>0<%/if%>, + timeInterval: 1209600 + } + + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_jp": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_jp": { + requestQuery: "p", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "fxjson", + "src": "srch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "n": 11, + "callback": "yahooSuggest" + } + }, + "baidu_jp": { + requestQuery: "wd", + url: "http://sug.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooImgSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "isrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooImgSuggest" + } + }, + "baidu_images": { + requestQuery: "wd", + url: "http://image.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "youtube": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "ja", + "client": "youtube", + "gl": "jp", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooVideoSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "vsrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooVideoSuggest" + } + }, + "baidu_video": { + requestQuery: "wd", + url: "http://video.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.jp/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "ja", + "gl": "jp", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "ds": "n", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooDictSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "dic_all", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "crumb": "QKHAOjMgzamLb0jiQkkwyVvZN_UvDCDclNTtYF_zmIZt96JRlxPpz5OweLONIHfY82xzaoagN2EPsJ.006TjkYwNEmA-", + "resulsts": 10, + "callback": "yahooDictSuggest" + } + }, + "yahoo_chiebukuro": { + url: null + }, + "yahoo_auctions": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "auc", + "appid": "Hy5EaxCxg66QNDm0cEojk3JOZS470WbaRqWtIpaQ4Tc7s8v6IK8AO45lFd3bwAwJzlZc", + "resulsts": 10, + "callback": "yahooSuggest" + } + }, + "amazon_shopping": { + requestQuery: "q", + url: "http://completion.amazon.co.jp/search/complete", + callbackFn: "amazonShoppingCallback", + callbackDataKey: 1, + requestParas: { + "method": "completion", + "search-alias" : "aps", + "mkt": 6, + "callback": "amazonShoppingCallback" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "rakuten_shopping": { + requestQuery: "q", + url: "http://api.suggest.search.rakuten.co.jp/suggest", + callbackFn: "rakutenShoppingCallback", + callbackDataKey: "result", + requestParas: { + "cl": "dir", + "rid": "1252328571", + "sid": "1", + "oe": "euc-jp", + "cb": "rakutenShoppingCallback" + }, + templ: function(data) { + var _data = data["result"] || [], + q = _data["input"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_shopping": { + requestQuery: "p", + url: "http://suggest.shop.yahooapis.jp/Shopping/Suggest/V1/suggester", + callbackFn: "getJsonData", + callbackDataNum: 1, + requestParas: { + "callback":"getJsonData", + "output": "json", + "start": "1", + "result": "10", + ".src": "shp", + "brand": "0", + "da": "0", + "prod": "0", + "appid": "dj0zaiZpPWIyYVBwSXI3bmdqYSZzPWNvbnN1bWVyc2VjcmV0Jng9YWU-" + }, + templ: function(data) { + var _data = data[1][0].keyword || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +}; +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/jp/with-google/with-google.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/jp/with-google/with-google.tpl new file mode 100755 index 000000000..5479a9f75 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/jp/with-google/with-google.tpl @@ -0,0 +1,276 @@ + +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + tn: { + timeStamp: "<%$sysInfo.baiduidCt%>", + serverTime: "<%$sysInfo.serverTime%>", + isInList:<%if !empty($root.urlparam.tn) && !empty($head.confTn) && in_array($root.urlparam.tn,explode("|", $head.confTn))%>1<%else%>0<%/if%>, + timeInterval: 1209600 + } + + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_jp": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_jp": { + requestQuery: "p", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "fxjson", + "src": "srch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "n": 11, + "callback": "yahooSuggest" + } + }, + "baidu_jp": { + requestQuery: "wd", + url: "http://sug.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooImgSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "isrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooImgSuggest" + } + }, + "baidu_images": { + requestQuery: "wd", + url: "http://image.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "youtube": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "ja", + "client": "youtube", + "gl": "jp", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooVideoSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "vsrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooVideoSuggest" + } + }, + "baidu_video": { + requestQuery: "wd", + url: "http://video.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.jp/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "ja", + "gl": "jp", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "ds": "n", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooDictSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "dic_all", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "crumb": "QKHAOjMgzamLb0jiQkkwyVvZN_UvDCDclNTtYF_zmIZt96JRlxPpz5OweLONIHfY82xzaoagN2EPsJ.006TjkYwNEmA-", + "resulsts": 10, + "callback": "yahooDictSuggest" + } + }, + "yahoo_chiebukuro": { + url: null + }, + "yahoo_auctions": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "auc", + "appid": "Hy5EaxCxg66QNDm0cEojk3JOZS470WbaRqWtIpaQ4Tc7s8v6IK8AO45lFd3bwAwJzlZc", + "resulsts": 10, + "callback": "yahooSuggest" + } + } + } +} +<%strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ltr/ltr.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ltr/ltr.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ltr/ltr.tpl new file mode 100755 index 000000000..994cf73df --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ltr/ltr.tpl @@ -0,0 +1,106 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($body.searchboxTab[$value.catagory])%> + <%if $value@first%> + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              <%$value.title%>
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> +
                              + + +
                              + <%$sBoxCount = 0%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($body.searchboxEngine[$value.id])%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              + + +
                              + + +
                              + <%break%><%/if%><%/foreach%> +
                              +
                              + <%if !empty($hSearchWords.title)%> + <%if !empty($hSearchWords.showPersonalHotSearchWords)%> + + <%/if%> + <%$hSearchWords.title%>: + + <%if empty($hSearchWords.showPersonalHotSearchWords)%> + <%foreach $hSearchWords.words as $val%> + <%if !empty($val.url)%> + <%$val.name%> + <%else%> + <%$val.name%> + <%/if%> + <%/foreach%> + <%/if%> + + <%/if%> +
                              +
                              +
                              +
                              +<%script%> + conf.hSearchWords = <%json_encode($hSearchWords)%>; +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ltr/ltr_inline.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ltr/ltr_inline.css new file mode 100755 index 000000000..c9fb9be04 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ltr/ltr_inline.css @@ -0,0 +1,303 @@ +/*============box_search=============*/ +.box-search { + margin: 0; + padding-left: 20px; + width: 700px; +} +.box-search_keyboard { + padding: 1px; +} + +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + position: relative; + z-index: 8; + clear: both; + margin: 0; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:left; + padding: 4px 12px 3px; + margin-left: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + border-radius: 2px; + color: #1C81E5; + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, 0.05); +} +.box-search_tab a:focus { + outline:none; +} /*clear FF's focusborder*/ +.box-search_tab a.cur { + color: #1C81E5; + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + display: block; + float: left; + height: 6px; + line-height: 6px; + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-left: -1px; +} +/*box-search_wrap*/ +.box-search .box-search_inner { + height:68px; +} +/*box-search_form*/ +.box-search_form { + padding:3px 0px 5px 0px; +} +.box-search_form .input { + position: relative; + z-index:101; + border: 3px solid #2186eb; + border-right-width: 0; + margin: 0 0 0 6px; +} + +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 122px; + height: 40px; + float: left; + z-index: 6; + margin: 0; + border-right: 1px solid #e6e6e6; +} +.box-search_logo { + position: absolute; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search_logo dt , .box-search_logo dd { + padding: 4px 10px 4px 8px; + cursor: pointer; +} +.box-search_logo dt { + border: none; + border-bottom: 1px solid #2186eb; + border-right: 1px solid #e6e6e6; +} +.box-search_logo dd { + border: 1px solid #e3e4e6; + border-top: 0; +} +.box-search_logo a { + padding-right: 21px; + display: block; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt a { + background: url(../img/more_trigger.png?__sprite) no-repeat right center; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + border-radius: 2px; +} + +.box-search_logos_show { + background-color: #fff; + border:none; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + border-radius: 0px; +} +.box-search_logos_show dt a { + background: url(../img/more_trigger-hover.png?__sprite) no-repeat right center; +} +.box-search_logos_show dd{ + width: 103px; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width: 83px; + height: 32px; +} +.box-search_logo_disabled { + background: none; + border: none; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +} +.box-search .box-search_logo_disabled .box-search_logo_hover { + background-color: transparent!important; +} +.box-search_form .input input { + border:none; + background:#fff; + width:419px!important; + float:left; + overflow:hidden; + height:32px; + font-size: 14px; + line-height:32px\9; + padding:4px 0 4px 10px; + margin-right: 30px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + left: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} + +/*btn-search*/ +.btn-search { + white-space:nowrap; + line-height:46px; + overflow: hidden; + _float: left; + *margin:0;/*fix non-IE'problem because of vertical-align*/ + /*background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x;*/ + /*--css3--*/ + width: 90px; + border-radius: 2px; + height: 46px; + border-width: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + background-color: #2085E9; + background-image: linear-gradient(#258BEF, #248AEE, #2287EC, #2085e9, #1e83e7, #1C81E5); +} +.btn-search_l, .btn-search_r { + display: none !important; +} +.btn-search_c { + /*background:url(../img/bg-search-btn.png?__sprite) repeat-x;*/ + vertical-align:top; + border:none; + color:#fff; + height:27px; + text-align:center; + width:70px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; + background: none; + height: 46px; + line-height: 46px; + width: 90px; +} +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} +.btn-search_hover { + background-color: #1E7DDC; + background-image: linear-gradient(#258bef, #2488eb, #2182e3, #1e7cda, #1b77d2, #1973cd); +} +.btn-search_click { + background-color: #2080df; + background-image: linear-gradient(#1872cc, #1a75d0, #1d7bd8, #2081e1, #2386e9, #258aee); + box-shadow: none; +} + +/*sug*/ +.baidu_sug, +.baidu_video_sug{ + top: 14px!important; + width: 548px!important; + left: 123px!important; + border-top-width: 0!important; +} +.sug-search{ + top: 41px!important; + width: 548px!important; + left: 122px!important; + position: absolute; +} +.sg_tri .sg_btn i, +.sg_v_tri .sg_v_btn i{ + top: 16px!important; +} +.sg_tri .sg_up i, +.sg_v_tri .sg_v_up i { + top: 10px!important; +} + + +/*flow 960*/ +.w960 .box-search .box-search_wrap .box-search_form .input input { + width: 340px!important; +} +.w960 .l-wrap .box-search { + width: 620px; +} +.w960 .box-search .sug-search, +.w960 .box-search .baidu_sug, +.w960 .box-search .baidu_video_sug { + width: 469px!important; +} + + + +/*sug has url*/ +.sug-url { + height:45px; + border-bottom:1px solid #e1e1e1; +} +.sug-url a { + display: block; + text-decoration: none; + color: #0000EE; +} +.sug-url .sug-hl { + height: 25px; + text-decoration: underline; + font-weight:bold; + font-size:14px; +} +.sug-url .sug-frm { + line-height: 16px; + font-size: 12px; + color: green; +} + + + +.box-search dt.box-search_logo_hover, +.box-search .box-search_logos_show .box-search_logo_hover, +body .sug-search .sug-select { + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, 0.05); +} +body .box-search .sug-search, +body .box-search_logo { + overflow: visible; +} +.box-search_logo_hide { + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ma/ma.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ma/ma.tpl new file mode 100755 index 000000000..b83de0df3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/ma/ma.tpl @@ -0,0 +1,246 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ma/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ma/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + detail = detail ? ' - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl.more.css new file mode 100755 index 000000000..6a8805d0b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl.more.css @@ -0,0 +1,76 @@ +/*------------------------suggest------------------------*/ +/*提示层外框*/ +.sug-search { + position:absolute; + top: 28px; + *top: 30px; + left: -1px; + border:1px solid #e3e4e6; + border-top: 0 none; + background:#fff; + width:528px; + color:#454545; + z-index:999; + white-space:nowrap; + overflow:hidden; +} +/*ie6 shim*/ +.sug-shim { + position:absolute; + top:-1px; + left:-1px; + z-index:-1; + filter:alpha(opacity="0"); + width:430px; + height:250px; +} +/*列表外框*/ +.sug-search ol { + font:bold 12px/23px Tahoma,arial,helvetica,clean,sans-serif; + cursor:default; +} +/*列表项*/ +.sug-search li { + padding: 3px 10px; + cursor: pointer; +} +.sug-search li b { + font: inherit; + display: inline; +} +/*选中样式*/ +.sug-search .sug-select { + background: #f5f7f7; +} +/*头部*/ +.sug-search .top { + font-weight:normal; + color:#999; + height:21px; + line-height:21px; + background:#eee; + padding:0 2px; +} +/*底部*/ +.sug-search .bot { + position:relative; + height:19px; + line-height:19px; + font-weight:normal; + border-top:1px solid #666; +} +/*高亮查询词*/ +.sug-search .sug-query { + font-weight:normal; +} +.sug-search font { + font-weight:normal !important; + color:#333 !important; +} + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo{border-width:0px; border-color: #5a5a5a;} +.skin-type-dark dt.box-search_logo_hover{background-color: #737373;} +.skin-type-dark .box-search_logos_show{background-color: #8c8c8c;} +.skin-type-dark .box-search_logos_show .box-search_logo_hover{background-color: #737373;} +.skin-type-dark .box-search_tab a{color: #ffffff;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl.tpl new file mode 100755 index 000000000..8b5c95e03 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl.tpl @@ -0,0 +1,104 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($body.searchboxTab[$value.catagory])%> + <%if $value@first%> + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              + <%$value.title%> +
                              +
                              +
                              +
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($body.searchboxEngine[$value.id])%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> +
                              + + + + <%widget name="common:widget/keyboard/keyboard.tpl"%> + + + +
                              + <%break%><%/if%><%/foreach%> +
                              +
                              + + <%if !empty($hSearchWords.title)%> + <%$hSearchWords.title%>: + + <%foreach $hSearchWords.words as $val%> + <%if !empty($val.url)%> + <%$val.name%> + <%else%> + <%$val.name%> + <%/if%> + <%/foreach%> + + <%/if%> +
                              +
                              +
                              +
                              + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl_inline.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl_inline.css new file mode 100755 index 000000000..61b57cc85 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/rtl/rtl_inline.css @@ -0,0 +1,467 @@ +/*.box-search_form .input div{ float: left;}*/ /*为啥加?会导致ps sug出现问题*/ +.box-search_keyboard { + padding: 1px; +} +/*============box_search=============*/ +.box-search { + margin: 20px auto 0; + width: 780px; +} +.box-search_inner { + height:68px; +} +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + margin-right: 161px; + position: relative; + z-index: 8; + clear: both; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:right; + padding: 4px 12px 3px; + margin-right: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + background: #dcdcde; + border-radius: 2px; +} +/*.box-search_more { + line-height:normal; + position: absolute; + float:right; + cursor:pointer; + z-index:8; + top: -8px; + left: -7px; + border: 1px solid #edf0ef; + border-bottom: 0 none; +} +.box-search_more dt { + position: relative; + margin-top: 6px; +} +.box-search_more a:hover { + background: transparent; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more dt a { + margin: 0; + padding: 4px 9px 3px 17px; + color: #4c4c4c; + text-align: right; + display: block; + float: none; + line-height: 14px; + width: 30px; + overflow: hidden; +} +.box-search_more dt a:focus { + outline: none; +} +.box-search_more_hover { + background-color: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_more .arrow, .box-search_more .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 3px dashed transparent; +} +.box-search_more .arrow { + border-top-color: #4ac29a; + border-top-style: solid; + top: 10px; + right: 42px; +} +.box-search_more .arrow_bg { + border-top-color: #edf0ef; + border-top-style: solid; + margin: -5px -3px 0 0; + _display: none; +} +.box-search_more_hover .arrow_bg { + border-top-color: #dcdcde; +} +.box-search_more_show .arrow { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #4ac29a; + border-bottom-style: solid; + top: 12px; +} +.box-search_more_show .arrow_bg { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #fff; + border-bottom-style: solid; + margin-top: -1px; +} +.box-search_more_show .box-search_more_hover .arrow_bg { + border-bottom-color: #f5f7f7; +} +.box-search_more_show { + border:1px solid #e3e4e6; + background: #fff; + left: auto; + right: 472px; +} +.box-search_more_show dt { + margin-top: 0px; + padding-top: 6px; +} +.box-search_more_show dt a { + background-position:left -351px !important; +} +.box-search_more_show .box-search_more_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more_show dd { + line-height: 31px; +} +.box-search_more_show dd a { + padding:0 9px 0 15px; + display:block; + float:none; + color: #666; + text-align: right; + margin:0; + overflow: hidden; +} +.box-search_more_hide { + display: none; +}*/ +.box-search_tab a:focus { + outline:none; +} /*clear FF's focusborder*/ +.box-search_tab a.cur { + color:#00b075; /*font-weight:bold;*/ + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + display: block; + float: right; + height: 6px; + line-height: 6px; + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-right: -1px; +} +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 0 0 5px; + float: right; + z-index: 6; +} +.box-search_logo { + position: absolute; + right: 0; + overflow:hidden; + vertical-align:bottom; + text-align:center; +} +.box-search_logo a { + padding-left: 18px; + display: block; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt , .box-search_logo dd { + padding: 10px 7px 10px 8px; + cursor: pointer; +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) -10px -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: -10px -87px; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none; + cursor: default; +} + +/*box-search_form*/ +.box-search_form { + padding:3px 113px 5px 0px; +} +.box-search_form .input { + background-color: #fff; + border: 1px solid #d9d9d9; + border-top: 1px solid #bfbfbf; + margin-left: 13px; + position: relative; + z-index:5; + /*for IE9*/ + padding-right: 1px\9\0; +} +.box-search_form .input input { + border:none; + background:#fff; + width:491px; + float:right; + overflow:hidden; + height:20px; + font-size: 14px; + line-height:20px\9; + padding:4px 9px 3px 0px; + *width: 488px; + *float: none; + /*fix ie10 bug*/ + margin-right: 1px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + right: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} +.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +} +.btn-search { + white-space:nowrap; + line-height:27px; + overflow: hidden; + _float: left; + *margin:0;/*fix non-IE'problem because of vertical-align*/ + /*background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x;*/ + + + /*--css3--*/ + width: 70px; + border-radius: 2px; + border: 1px solid #3079ED; + background-color: #4787ED; + background-image: linear-gradient(-180deg, #4D8FFD 0%, #4787ED 100%); +} +.btn-search_l, .btn-search_r { + display: none !important; +} +.btn-search_c { + /*background:url(../img/bg-search-btn.png?__sprite) repeat-x;*/ + vertical-align:top; + border:none; + color:#fff; + height:27px; + text-align:center; + width:70px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; + background: none; +} +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} +.btn-search_hover{ + border-color: #2F5BB7; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4C8FFD 0%, #357AE8 100%); +} + +.btn-search_click{ + border-color: #2B79E6; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4A8DFB 0%, #357AE8 100%); + box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); +} +/* +.btn-search_hover .btn-search_l { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; +} +.btn-search_hover .btn-search_r { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_hover .btn-search_c { + background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x; +} +.btn-search_hover .btn-search_ico { + background: url(../img/i-search-hover.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_l { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_r { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_click .btn-search_c { + background:url(../img/bg-search-btn-click.png?__sprite) repeat-x; +} +.btn-search_click .btn-search_ico { + background: url(../img/i-search-click.png?__sprite) no-repeat; +}*/ +.box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ +} +.box-search_form .radios label { + display:block; + padding-right:15px; + text-indent:-15px; + float:right; + margin-left:18px; + color:#666; + font-size: 13px; + white-space: nowrap; +} +.box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-left:5px; + vertical-align:bottom; + position:relative; + top:-1px; + overflow:hidden; +} + +/*set hot search words & search button*/ +.box-search_hsrch { + width: 620px; + margin-right: 160px; + overflow: hidden; + padding-top: 2px; + color: #919191; + white-space: nowrap; + _margin-top:-14px; +} +.hsrch_title { + font-weight: bold; + margin-left: 8px; + /*padding-right: 10px;*/ + color: #919191; +} +.hsrch_word span { + display: inline-block; + margin-left: 15px; +} +.hsrch_word a{ + color: #919191; + text-align: right; +} +.hsrch_word a:hover { + color: #00B075; + text-decoration: underline; +} +/*size setting*/ +.box-search-m .box-search_logo img { + width:107px; + height:40px; +} +.box-search-m .box-search_logo_wrap { + width: 142px; + height: 62px; + margin-top: -14px; +} +.box-search-m .box-search_logo dt a { + background-position: -10px -62px; +} +.box-search-m .box-search_logos_show dt a { + background-position: -10px -87px; +} +.box-search-m .box-search_tab { + margin-right: 148px; +} +.box-search-m .box-search_hsrch { + margin-right: 148px; +} +.box-search-s .box-search_logo img { + width:85px; + height:32px; +} +.box-search-s .box-search_logo_wrap { + width: 120px; + height: 54px; + margin-top: -9px; +} +.box-search-s .box-search_logo dt a { + background-position: -10px -67px; +} +.box-search-s .box-search_logos_show dt a { + background-position: -10px -93px; +} +.box-search-s .box-search_tab { + margin-right: 126px; +} +.box-search-s .box-search_hsrch { + margin-right: 126px; +} + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo{border-width: 0px;} +.skin-type-dark dt.box-search_logo_hover{background: #737373;background: rgba(0,0,0,0.6);} +.skin-type-dark .box-search_logos_show{background: #8c8c8c;background: rgba(0,0,0,0.6);} +.skin-type-dark .box-search_logo_disabled{background: transparent;background: rgba(0,0,0,0);} +.skin-type-dark .box-search_logos_show .box-search_logo_hover{background: #737373;background: rgba(0,0,0,0.6);} +.skin-type-dark .box-search_tab a{color: #ffffff;} +body.skin-type-dark .box-search_tab a.cur{color: #ffffff;} +.skin-type-dark .box-search_tab a:hover{background-color: #595959;background: rgba(0,0,0,0.6);} +.skin-type-dark .hsrch_title{color: #bbbbbb;} +.skin-type-dark .hsrch_word a{color: #bbbbbb;} +.skin-type-dark .box-search_sep{border-left-color: #bbbbbb;} +.skin-type-dark span.hsrch_word a:hover{color: #eeeeee;} +.skin-type-dark .box-search_logo_disabled dt.box-search_logo_hover, .skin-type-dark .box-search_logo_disabled dt a{background: 0;} +.box-search_logo_disabled, .box-search_logos_show{border: 0;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/sa/sa.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/sa/sa.tpl new file mode 100755 index 000000000..3a3922a66 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/sa/sa.tpl @@ -0,0 +1,274 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/sa/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/sa/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.com.sa/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.sa/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.sa/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://sa.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/search-box-head-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/search-box-head-async.js new file mode 100755 index 000000000..5019f50ae --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/search-box-head-async.js @@ -0,0 +1,1003 @@ +/* +* Search box group +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + helper = require("common:widget/ui/helper/helper.js"), + hex_md5 = require('common:widget/ui/md5/md5.js'), + bubble = require('common:widget/ui/bubble/src/bubble.js'); +require("common:widget/ui/suggest/suggest.js"); +require('common:widget/ui/jquery/jquery.cookie.js'); + + +Gl.searchGroup = function(o) { + + var _conf = conf.searchGroup, + type = o.type || "index", + logoPath = _conf.conf[type].logoPath, + + logo = $("#" + (o.logoId || "searchGroupLogo")), + logoGroup = $("#" + (o.logoGroupId || "searchGroupLogos")), + tabs = $("#" + (o.tabsId || "searchGroupTabs")), + form = $("#" + (o.formId || "searchGroupForm")), + input = $("#" + (o.inputId || "searchGroupInput")), + label = $("#" + (o.labelId || "searchGroupLabel")), + // radios = $("#" + (o.radiosId || "searchGroupRadios")), + btn = $("#" + (o.btnId || "searchGroupBtn")), + // more = $("#" + (o.moreId || "searchGroupMore")), + moreTab = $("#" + (o.moreTabId || "searchGroupMoreTab")), + params = $("#" + (o.paramsId || "searchGroupParams")), + // radioName = o.radioName || "searchGroupRadio", + + hSeWords = $("#hotSearchWords"), + webEngine = $("#searchGroupWebEngine"), + + btnWrap = btn.parent(), + inputWrap = input.parent(), + defaultN = _conf.conf[type].curN || 0, + curTab = $("a:eq(" + defaultN + ")", tabs), + tabsChildren = $("a", tabs), + //render data when init sug + defaultData = _conf.sug[_conf.list[curTab.attr("data-t")].engine[defaultN].id], + //record which form was selected in tabs + storeForm = {}, + onceTime = true, + logoHash = { + 'yahoo': 'yahoo', + 'google': 'google', + 'baidu': 'baidu', + 'defau': 'defau' + }, + $bd = $(document.body), + //自定义推荐的热搜词 + hSeWordsWithUrlTpl = '#{name}', + hSeWordsWithOutUrlTpl = '#{name}', + deleteHswordTimer = null, + + getCurLogo = function(attr) { + var tmpObj = null; + attr = attr.toLowerCase(); + for(var i in logoHash) { + if(attr.search(i) > -1) { + tmpObj = logoHash[i]; + break; + } + } + if(tmpObj === 'yahoo' && conf.country === 'jp') { + tmpObj = 'yahoo_jp'; + } + return (tmpObj || 'defau'); + }, + //smallLogoPath = "/resource/fe/headerTest/search/#{logo}.png", + + //reset the form about action and params + resetForm = function(data, n) { + var ret = []; + var theLogoPath = $bd.hasClass("skin-type-dark")?(_conf.conf[type].logoPath+"dark/"):_conf.conf[type].logoPath; + var logoGroupDt = $("dt", logoGroup).clone(); + var isFixed = $bd.hasClass("header-fixed-up"); + // Fixed bug in IE8 + logoGroup.html(''); + logoGroup.append(logoGroupDt); + // rebinding logo element + logo = $("#" + (o.logoId || "searchGroupLogo"), logoGroupDt); + + form.attr("action", data[n].action); + input.attr("name", data[n].q); + if(isFixed) { + logo.attr("src", "/resource/fe/headerTest/search/" + getCurLogo(data[n].logo) + ".png"); + } else { + logo.attr("src", theLogoPath + data[n].logo + ".png"); + } + logo.attr("alt", data[n].name); + logo.parent().attr("title", data[n].name); + logo.parent().attr("data-n", n); + logo.attr("data-id", data[n].id); + + // $("dd", logoGroup).remove(); + + logoGroup.append(function () { + ret = []; + $.each(data, function(key, val) { + if(isFixed) { + ret.push('
                              ' + val.name + ''+ val.name + '
                              '); + } else { + ret.push('
                              ' + val.name + '
                              '); + } + }); + return ret.join(""); + }); + // fix: show errors when click radios on IE + /*setTimeout(function() { + radios.html(function() { + ret = []; + $.each(data,function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + }, 0);*/ + + params.html(function() { + ret = []; + $.each(data[n].params, function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + + if (data.length <= 1) { + logoGroup.addClass("box-search_logo_disabled"); + } else { + logoGroup.removeClass("box-search_logo_disabled"); + } + logoGroup.children().on("mouseenter", function() { + $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $(this).removeClass("box-search_logo_hover"); + }); + }, + + resetSug = function(data, n) { + data = _conf.sug[data[n].id]; + $.each(data, function(key, val) { + sug.o[key] = val; + }); + //fix more prams + !data.templ && (sug.o.templ = false); + !data.callbackFn && (sug.o.callbackFn = false); + !data.callbackDataKey && (sug.o.callbackDataKey = false); + !data.callbackName && (sug.o.callbackName = false); + !data.callbackDataNum && (sug.o.callbackDataNum = false); + !data.customUrl && (sug.o.customUrl = false); + + !data.customUrl && (sug.o.customUrl = false); + !data.charset && (sug.o.charset = undefined); + sug.reset(true); + }, + + // toggle for baidu sug + resetBaiduSug = function (data, n) { + + if (!baidu_sug) { + return; + } + + data = data ? data[n].baiduSug : false; + + if (data) { + baidu_sug.setMode(data.mod); + baidu_sug.toggle(true); + } else { + baidu_sug.toggle(false); + } + }, + + // toggle for PS video sug + resetBaiduVideoSug = function(data, n) { + if(!window["baidu_video_sug"]) { + return; + } + + data = data ? data[n].otherSug : false; + + if (data) { + baidu_video_sug.setMode(data.mod); + baidu_video_sug.toggle(true); + } else { + baidu_video_sug.toggle(false); + } + }, + + switchTab = function(tab, sugStay) { + tab = $(tab); + curTab.removeClass("cur"); + tab.addClass("cur"); + curTab = tab; + + var t = tab.attr("data-t"), + + list = _conf.list, + engines = list[t].engine, + engLen = engines.length; + //ps sug gut add tab changed name + tabCategoryName = t; + //if the last element is null, remove it + if($.isEmptyObject(engines[engLen-1])){ + engines.length = engLen - 1; + }; + //record current form(add the current type to storeForm as a key) + storeForm[t] || (storeForm[t] = 0); + + //reset form + resetForm(engines, storeForm[t]); + + //reset suggest + !sugStay && resetSug(engines, storeForm[t]); + + // reset PS video sug + !sugStay && resetBaiduVideoSug(engines, storeForm[t]); + + // reset baidu sug + !sugStay && resetBaiduSug(engines, storeForm[t]); + + /* + //reset hot word + label.text(list[t].hotWords) + */ + + /* + setTimeout(function() { + input.select(); + }, 16); + */ + //keep the cursor in end + /*setTimeout(function() { + setCursorPos(input[0], input.val().length); + }, 16); */ + }, + + showMore = function() { + var more = $("dd", moreTab), + list = _conf.more, + ret = []; + if ($("dd", moreTab).length === 0) { + $.each(list, function() { + ret.push('
                              ' + this.name + '
                              '); + }); + moreTab.append(ret.join("")); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + } + if(moreTab.hasClass("box-search_more_show")) { + moreTab.removeClass("box-search_more_show"); + more.each(function () { + $(this).addClass("box-search_more_hide"); + }); + } + else { + moreTab.addClass("box-search_more_show"); + more.each(function () { + $(this).removeClass("box-search_more_hide"); + }); + } + }, + + showLogo = function () { + var n = logo.parent().attr("data-n"), + logoList = $("dd", logoGroup); + var isFix = $bd.hasClass("header-fixed-up"), + logLen = logoList.length; + if (logoGroup.hasClass("box-search_logos_show")) { + logoGroup.removeClass("box-search_logos_show"); + logoList.each(function () { + $(this).addClass("box-search_logo_hide").removeClass("box-search_logo_first box-search_logo_last"); + }); + } + else { + logoGroup.addClass("box-search_logos_show"); + logoList.each(function (key) { + var $that = $(this); + + if (onceTime) { + var $imgEle = $that.find("img").first(); + if ($imgEle.attr("data-src")) { + $imgEle.attr("src", $imgEle.attr("data-src")); + $imgEle.removeAttr("data-src"); + } + } + + key != n && $that.removeClass("box-search_logo_hide"); + if (isFix && (logLen > 1) && (key != n)) { + if(n == 0) { + if(key === 1) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-1) { + $that.addClass("box-search_logo_last"); + } + } else if(n == logLen-1) { + if(key === 0) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-2) { + $that.addClass("box-search_logo_last"); + } + } else { + if(key === 0) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-1) { + $that.addClass("box-search_logo_last"); + } + } + } + }); + onceTime = false; + } + }, + + //disable selection for input elements + disableSelection = function(el) { + if (typeof el.onselectstart != "undefined") { //IE + el.onselectstart = function() { + return false; + } + } else if (typeof el.style.MozUserSelect != "undefined") { //FF + el.style.MozUserSelect = "none"; + } else { //Opera + el.onmousedown = function() { + return false; + } + } + }, + + setCursorPos = function(obj, pos) { + if (obj.setSelectionRange) { + obj.focus(); + obj.setSelectionRange(pos, pos); + } else if (obj.createTextRange) { + var range = obj.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + }, + + //sug instantiation + sug = Gl.suggest(input[0], { + classNameWrap: "sug-search", + classNameQuery: "sug-query", + classNameSelect: "sug-select", + //classNameClose: "sug-close", + delay: _conf.conf[type].delay, + n: _conf.conf[type].n, + autoFocus: false, + requestQuery: defaultData.requestQuery, + requestParas: defaultData.requestParas, + url: defaultData.url, + callbackFn: defaultData.callbackFn, + callbackDataKey: defaultData.callbackDataKey, + onCheckForm: function(form) { + + if( !(/^hao123$/.test(logo.attr("data-id"))) ) return; + + if( !$(form).find("input[name='haobd']").get(0) ) { + $(form).append(""); + } + }, + onSearchDirect: function(li, q, prefix) { + var img = new Image(), + enco = encodeURIComponent, + collect = [], + _type = curTab.attr("data-t"), + url = "http://search.hao123.co.th/r/cl/i18n.gif?fm=se&st=3&rsv_sugtype=cr&lang=th-TH", + href = $( $(li).find("a").get(0) ).attr("href"), + title = $( $(li).find("a .sug-hl").get(0) ).text(), + + conf = { + url: href, + q: q, + title: title, + prefixsug: prefix, + haobd: $.cookie("BAIDUID"), + t: +new Date + }; + + + img.src = url + "&" + $.param(conf); // PS的统计 + + var utObj = { + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId: "search", + tab: _type + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + // 我们的统计 + /*if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId:"search" + }); + }*/ + }, + onMouseSelect: function() { + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action; + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + }, 16); + } + input.select(); + var _type = curTab.attr("data-t"); + var utObj = { + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + modId: "search", + tab: t + }, + val = encodeURIComponent(input.val()); + /*if (_conf.conf.sort) { + utObj.sort = _conf.conf.sort; + } else { + if (conf.country === "tw" && $(document.body).hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + }*/ + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + //if (conf.country != "jp") { + utObj.value = val; + //} + UT.send(utObj); + }, + templ: defaultData.templ + }); + //ps sug gut add tab + window.tabCategoryName = curTab.attr("data-t"); + //clear the input's value after refresh + input.val(""); + //some browsers may keep form's status after refresh + // $("[name = radioName]:first").attr("checked", true); + + //record the default form'n + storeForm[curTab.attr("data-t")] = 0; + + //select text in input after submit + form.on("submit", function() { + // input.select(); + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action, + _url = _conf.list[t].engine[storeForm[t]].url, + isBlank = false; + /*var radioEl = $("input", radios); + for(var i = 0; i < radioEl.length; i++) { + if(radioEl.eq(i).attr("checked")) { + var checkedRadio = radioEl.eq(i); + } + } + if(t == "shopping" && checkedRadio.attr("id") == "searchGroupRadio_0") { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + }*/ + + /* cancel hot word + // set input's value to the hot word if it was blank + if($.trim(input.val()) === "") { + if($.trim(label.text()) === ""){ + var action = _action && _url ? _url : _action; + form.attr("action", action); + } else { + input.val(label.text()); + input.css("color", "#fff"); + isBlank = true; + } + } else {*/ + if(/^hao123$/.test(logo.attr("data-id"))) { + if(!form.find("input[name='haobd']").get(0)) { + form.append(""); + } + } + form.attr("action", _action); + //} + + // set charset to big5 while the engine is ruten + if(t == "shopping" && /ruten.png/.test(logo.attr("src"))) { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + } + var utObj = { + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + modId: "search", + tab: t + }, + val = encodeURIComponent(input.val()); + /*if (_conf.conf.sort) { + utObj.sort = _conf.conf.sort; + } else { + if(conf.country === "tw" && $(document.body).hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + }*/ + if($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + //if(conf.country != "jp") { + utObj.value = val; + //} + UT.send(utObj); + //reset input after search + if(isBlank) { + setTimeout(function() { + input.val(""); + input.removeAttr("style"); + }, 16); + } else { + input.select(); + } + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + input.select(); + }, 16); + } + //no action while engine is hao123 and input val is blank + /*if(/^hao123$/.test(logo.attr("data-id")) && input.val() === "") { + return false; + }*/ + }), + //把个人热搜词排在CMS配置的热搜词之前 + renderPersonalHotSearchWords = function( result ){ + + var dom = "", + len = 5; + + result = result || []; + result = result.concat(conf.hSearchWords.words); + len = Math.min( result.length,len ); + for (var i = 0; i < len; i++) { + var data = result[i], + currentTpl = data.url ? hSeWordsWithUrlTpl : hSeWordsWithOutUrlTpl, + frc = data.name ? "true" : ""; + + dom = dom + helper.replaceTpl( currentTpl,{"url" : data.url || "","name" : data.word || data.name,"frc" : frc}); + }; + + $(".hsrch_word").html(dom); + }, + //获取个人热搜词 + getPersonalHotSearchWords = function(){ + var result = "", + params = "?app=recomquery&act=contents&vk=0&num=5&country=" + conf.country; + + + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType : "jsonp", + jsonp : "jsonp", + jsonpCallback : "ghao123_" + hex_md5(params,16), + success : function ( result ) { + renderPersonalHotSearchWords( result.content.data ); + }, + error : function(){ + renderPersonalHotSearchWords(); + } + }); + + }, + //把用户删除的热搜词加入黑名单 + deletePersonalHotSearchWords = function( word ){ + var params = "?app=recomquery&act=delete&vk=0&num=5&content=" + encodeURIComponent(word) + "&country=" + conf.country, + result = ""; + + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType : "jsonp", + jsonp : "jsonp", + jsonpCallback : "ghao123_" + hex_md5(params,16), + success : function( result ){ + renderPersonalHotSearchWords( result.content.data ); + UT.send({ + modId : "hot-word", + position : "delete", + type : "click", + ac : "b", + value : encodeURIComponent(word) + }); + }, + error : function(){ + renderPersonalHotSearchWords(); + } + }); + }, + handlePersonalSwitch = function () { + + var cookie = $.cookie.get("pHotWord"), + icon = hSeWords.find(".i-personal"), + title = conf.hSearchWords; + + if(cookie !== null) { + $.store("pHotWord", cookie, {expires: 2000}); + $.cookie.set("pHotWord", null); + } + cookie = $.store("pHotWord"); + + if(!cookie || cookie == "1"){ + icon.addClass("on-personal"); + getPersonalHotSearchWords(); + icon.attr("title",title.showTip); + } else { + icon.addClass("off-personal"); + renderPersonalHotSearchWords(); + icon.attr("title",title.hideTip); + } + }, + offRecordPersonal = function () { + var params = "?app=recomquery&act=close&vk=0&country=" + conf.country; + + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType : "jsonp", + jsonp : "jsonp", + jsonpCallback : "ghao123_" + hex_md5(params,16), + success : function( result ){} + }); + }, + onRecordPersonal = function () { + var params = "?app=recomquery&act=open&vk=0&country=" + conf.country; + + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType : "jsonp", + jsonp : "jsonp", + jsonpCallback : "ghao123_" + hex_md5(params,16), + success : function( result ){ + } + }); + UT.send({ + modId : "hot-word", + position : "empty", + type : "click", + ac : "b" + }); + }; + //get personal hot words + conf.hSearchWords && conf.hSearchWords.showPersonalHotSearchWords && handlePersonalSwitch(); + + //disableSelection + disableSelection(tabs[0]); + // disableSelection(radios[0]); + + resetBaiduVideoSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + resetBaiduSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + //focus the input when init + + //to let lv2 page NOT to auto focus SEARCH INPUT! by NE + if(o.autoFocus == null){ + o.autoFocus = true; //default TRUE! + } + if(o.autoFocus) { + input.focus(); + } + + btn.on("mousedown", function() { + btnWrap.addClass("btn-search_click"); + }); + btn.on("mouseup", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseout", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseenter", function() { + btnWrap.addClass("btn-search_hover"); + }); + btn.on("mouseleave", function() { + btnWrap.removeClass("btn-search_hover"); + }); + input.on("focus", function() { + inputWrap.addClass("box-search_focus"); + label.hide(); + }); + input.on("blur", function() { + inputWrap.removeClass("box-search_focus"); + // $.trim(input.val()) === "" && label.show(); + }); + logoGroup.children().on("mouseenter", function() { + $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $(this).removeClass("box-search_logo_hover"); + }); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + + tabs.on("mousedown", function(e) { + var el = e.target; + el.tagName === "SPAN" && (el = el.parentNode); + //el.tagName !== "DT" && !hasClass(el, "cur") && !hasClass(el, "more") && switchTab(el); + el.getAttribute("data-t") && switchTab(el); + form.acceptCharset = document.charset = "utf-8"; + + // e.stopPropagation(); + + // focus the input when tab element exchanges + setTimeout(function() { + input.focus(); + // clearTimeout(t); + }, 5); + }); + conf.pageType !=="lv2" && window["PDC"] && PDC.mark("c_sxvi"); + moreTab.on("mousedown", function(e) { + var el = e.target; + if(el.parentNode.tagName === "DD") { + setTimeout(showMore, 200); + }else { + showMore(); + } + }); + + $(document).on("mousedown", function(e) { + var el = e.target; + logoGroup.hasClass("box-search_logos_show") && el !== logoGroup[0] && !jQuery.contains(logoGroup[0], el) && showLogo(); + moreTab.hasClass("box-search_more_show") && el !== moreTab[0] && !jQuery.contains(moreTab[0], el) && showMore(); + // more.css("display") === "block" && el !== moreTab[0] && !jQuery.contains(moreTab[0], el) && !jQuery.contains(more[0], el) && showMore(); + }); + + logoGroup.on("click", function(e) { + var el = e.target, + $el = $(el), + $ta = el.tagName, + t = curTab.attr("data-t"), + n = storeForm[t], + _n, + engines = _conf.list[t].engine, + engLen = engines.length; + + //remove the last null ,IE8 bug + if($.isEmptyObject(engines[engLen-1])){ + engines.length = engLen - 1; + }; + if ($ta === "IMG"||$ta === "SPAN") { + _n = ~~$el.parent().attr("data-n"); + } else if ($ta === "A") { + _n = ~~$el.attr("data-n"); + } else { + _n = ~~$el.children().attr("data-n"); + } + + if(curTab.attr("data-t") == "web") { + webEngine.attr("data-num", _n); + } + //input.select(); + //keep the cursor in end + form[0].acceptCharset = document.charset = "utf-8"; + /*setTimeout(function() { + setCursorPos(input[0], input.val().length); + }, 16);*/ + + if(_n !== n) { + storeForm[t] = _n; + resetForm(engines, _n); + + //reset suggest + resetSug(engines, _n); + + //reset PS video sug + resetBaiduVideoSug(engines, _n); + + //reset baidu sug + resetBaiduSug(engines, _n); + } + showLogo(); + + }); + // realize hot search words module + hSeWords.on("click", function(e) { + var tar = e.target, + href = $(tar).attr("href"), + data_n = webEngine.attr("data-num"), + engine = _conf.list["web"].engine[data_n], // default Google search engine + urlPath = engine.action, // url string except query string. some search engine end with '?' + query = engine.q, // query variable + param = jQuery.param(engine.params), // like a=b&b=2 + hadlParam = param ? ("&"+param) : "", // like &a=b&b=2 or "" + url = ""; + + if(tar.nodeName.toLowerCase() === "a" && href === "#") { + // handled url + url = urlPath + (urlPath.charAt(urlPath.length-1) == "?" ? "" : "?") + query + "=" + encodeURIComponent($(tar).text()) + hadlParam; + window.open(url); + } + + }); + + // hot search word send search action UT + (function() { + if(_conf.list["web"].engine[0].id === "hao123") { + hSeWords.on("mousedown", function(e) { + var tar = e.target; + if(tar.tagName.toUpperCase() == 'A') { + UT.send({ + type: "click", + position: "search", + engine: "hao123", + modId: "hot-word", + tab: "web", + value: helper.getQuery(tar.href).wd || "" + }); + e.stopPropagation(); // avoid links auto UT + } + }); + } + })(); + if( conf.hSearchWords && conf.hSearchWords.showPersonalHotSearchWords ){ + hSeWords.on("click",".i-close",function(){ + var el = $(this).parent(); + + el.fadeOut(); + deletePersonalHotSearchWords( el.find("a").text() ); + }). + on("mouseover",".i-close",function(){ + deleteHswordTimer && clearTimeout(deleteHswordTimer); + $(this).show(); + }). + on("mouseleave",".i-close",function(){ + $(".i-close").hide(); + deleteHswordTimer && clearTimeout(deleteHswordTimer); + }). + on("mouseover",".hsword-span",function(){ + var $this = $(this); + + $(".i-close").hide(); + deleteHswordTimer && clearTimeout(deleteHswordTimer); + !$this.attr("frc").length && $(this).find(".i-close").show(); + }). + on("mouseleave",".hsword-span",function(){ + var $this = $(this); + + deleteHswordTimer = setTimeout(function(){ + $(".i-close").hide(); + },200); + + }). + on("click",".on-personal",function(){ + var content = ''+conf.hSearchWords.deleteTip+'' + +''+conf.hSearchWords.confirm+'' + +''+conf.hSearchWords.cancle+'', + option = { + 'wrapOpt': { + 'modId': 'hot-word', + 'content': content + }, + 'pos': { + 'left': -20, + 'top': 30 + } + }, + tip = null, + bubble = $(".ui-bubble-hot-word"), + cookie = $.store("pHotWord"); + + if( bubble.length ){ + bubble.show(); + } else { + tip = hSeWords.bubble(option), + tip.show(); + } + UT.send({ + modId: "hot-word", + position: "switch", + sort: "off", + ac: "b" + }); + + }). + on("click",".off-personal",function(){ + $(this).removeClass("off-personal").addClass('on-personal').attr("title",conf.hSearchWords.showTip); + $.store("pHotWord","1",{expires: 2000}); + UT.send({ + modId: "hot-word", + position: "switch", + sort: "on", + ac: "b" + }); + onRecordPersonal(); + }); + $(document).on("click",".ui-bubble-hot-word .btn-confirm",function(){ + $(".ui-bubble-hot-word").hide(); + hSeWords.find(".i-personal").removeClass("on-personal").addClass("off-personal").attr("title",conf.hSearchWords.hideTip); + $.store("pHotWord","0",{expires: 2000}); + renderPersonalHotSearchWords(); + UT.send({ + modId: "hot-word", + position: "switch", + sort: "confirm", + ac: "b" + }); + offRecordPersonal(); + }).on("click",".ui-bubble-hot-word .btn-cancle,.ui-bubble-hot-word .ui-bubble_close",function(){ + $(".ui-bubble-hot-word").hide(); + UT.send({ + modId: "hot-word", + position: "switch", + sort: "cancle", + ac: "b" + }); + }); + } + + + if (_conf.conf.tn) { + var timInter = _conf.conf.tn.timeInterval, + timeStamp = _conf.conf.tn.timeStamp, + isInList = _conf.conf.tn.isInList, + separTime = parseInt(_conf.conf.tn.serverTime) - parseInt(timeStamp), + searGroup = $(".box-search").parent(); + if (isInList > 0 && separTime < timInter) { + searGroup.next().css("margin-top", "10px"); + searGroup.hide(); + } + } + + /*for header when fixed & width = 40px*/ // TODO + var $window = $(window), + recordTab = null, // 吸顶时刻如果tab不是web的话记录当前tab + restoreTo = function() { // 吸顶变正常时恢复之前的tab + if(recordTab) { + switchTab(recordTab); + } else { + switchTab($("a[data-t='web']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }, + transTo = function() { // 正常变吸顶时切到web的tab + if (curTab.attr("data-t") != "web") { + recordTab = curTab; + switchTab($("a[data-t='web']", tabs)); + } else { + recordTab = null; + switchTab($("a[data-t='web']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }; + + $window.on("headerFixed.transTo", function() { + transTo(); + }); + $window.on("headerFixed.restore", function() { + restoreTo(); + }); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/search-box-head.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/search-box-head.tpl new file mode 100755 index 000000000..023d766e1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/search-box-head.tpl @@ -0,0 +1,97 @@ +<%* 搜索引擎根据TN号显隐*%> +<%foreach $body.searchBox.sBoxTag as $value%> + <%foreach $value.engine as $engine%> + <%if !empty($engine.tn[0].param)%> + <%foreach $engine.tn as $tn%> + <%if $tn.param == $root.urlparam.tn%> + <%$body.searchboxEngine[$engine.id] = 'true'%> + <%/if%> + <%/foreach%> + <%/if%> + <%/foreach%> +<%/foreach%> + +<%assign var="sBoxTag" value=$body.searchBox.sBoxTag%> +<%assign var="hSearchWords" value=$body.searchBox.hotSearchWords%> +<%assign var="sBtnWords" value=$body.searchBox.searchBtnWords%> +<%* 搜索框 --- 首屏模块 inline css*%> +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/search-box-head/ltr/ltr_inline.css?__inline'); + <%else%> + @import url('/widget/search-box-head/rtl/rtl_inline.css?__inline'); + <%/if%> +<%/style%> +<%widget name="common:widget/search-box-head/`$head.dir`/`$head.dir`.tpl"%> +<%widget name="common:widget/search-box-head/`$sysInfo.country`/`$sysInfo.country`.tpl"%> +<%script%> + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/search-box-head/search-box-head-async.js"], function ($) { + var autoFocusSearch = true; + <%if $body.extAppMod%> + autoFocusSearch = false; //if app show DO NOT autoFocus + <%/if%> + <%if !empty($body.searchBox.sugUrl)%> + var head = document.getElementsByTagName("head")[0]; + var requestScript = function(url, onsuccess, onerror, timeout) { + + var script = document.createElement('script'); + if (onerror) { + var tid = setTimeout(function() { + script.onload = script.onreadystatechange = script.onerror = null; + timeout(); + }, 5000); + + script.onerror = function() { + clearTimeout(tid); + onerror(); + }; + + script.onload = script.onreadystatechange = function() { + if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) { + script.onload = script.onreadystatechange = null; + script = undefined; + clearTimeout(tid); + onsuccess(); + } + } + } + script.type = 'text/javascript'; + script.src = url; + head.appendChild(script); + }; + + requestScript("<%$body.searchBox.sugUrl%>", function() { + baidu_sug.setMode('baidu'); + baidu_sug.toggle(false); + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "success"}); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "error"}); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "timeout"}); + }); + <%else%> + baidu_sug = false; + Gl.searchGroup({type: conf.pageType, autoFocus: autoFocusSearch}); + <%/if%> + + <%if !empty($body.searchBox.sugMoreUrl)%> + setTimeout(function() { + window["require"] && require.async("<%$body.searchBox.sugMoreUrl%>"); + }, 1e3); + <%/if%> + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/th/th.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/th/th.tpl new file mode 100755 index 000000000..1f7b05187 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/th/th.tpl @@ -0,0 +1,374 @@ +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: null, + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "thai", + "cb": "window.bdsug.sug", + "haobd": jQuery.cookie("BAIDUID") + }, + templ: false + }, + "google_th": { + requestQuery: "q", + url: null, + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "th", + "authuser": "0" + }, + templ: false + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "th", + "client": "img", + "ds": "i", + "cp": "4" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.co.th/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod": "image_thai" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + requestQuery: "wd", + url: null, + callbackFn: "ps_video", + callbackDataKey: "s", + requestParas: { + "prod" : "video_thai", + "sid": "", + "cb":"ps_video", + }, + templ: false + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "th", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "th", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "mthai": { + url: null + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + }, + templ: function(data) { + var _data = data["suggestions"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filestube": { + requestQuery: "q", + url: "http://149.13.65.144:8087", + callbackFn: "filestube123", + callbackDataKey: "r", + charset: "utf-8", + requestParas: { + "callback": "filestube123", + "t": +new Date + }, + customUrl: function(para) { + return this.o.url + "/" + encodeURIComponent(this.q) + "?" + para.substr(1); + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.th/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "th", + "gl": "th", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_map": { + requestQuery: "key", + url: "http://search2.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "ds": "poi,poi2,poi3,s_pg", + "json": "1", + "num": "20", + "anyorder": "1", + "count": "19" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_dict": { + requestQuery: "key", + url: "http://search.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "json": "1", + "ds": "head", + "num": "20", + "count": "7" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://th.wikipedia.org/w/api.php", + callbackFn: "wikipedia.th", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.th" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filmes": { + requestQuery: "wds", + url: "http://th.hao123.com/video/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: {}, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/tw/tw.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/tw/tw.tpl new file mode 100755 index 000000000..20f996a16 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/tw/tw.tpl @@ -0,0 +1,333 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_web": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "zh-TW" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "baidu": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://suggestion.baidu.com/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "cb": "window.bdsug.sug" + } + }, + "google_news": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "zh-TW", + "gs_nf": "1", + "ds": "n" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_news": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-ura", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "droprotated": "1", + "pubid": "184" + } + }, + "baidu_news": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "news" + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "zh-TW", + "gl": "tw", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "zh-TW", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "video" + } + }, + "yahoo_images": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "183" + } + }, + "google_images": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "zh-TW", + "client": "img", + "gs_nf": "1", + "ds": "i" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_images": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "image" + } + }, + "facebook": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://zh.wikipedia.org/w/api.php", + callbackFn: "wikipedia.zh", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.zh" + } + }, + "baidu_baike": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "baike" + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-pub_sayt", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "560" + } + }, + "baidu_dict": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://dictsug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.tw/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "zh-TW", + "gl": "tw", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_map": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/vn/vn.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/vn/vn.tpl new file mode 100755 index 000000000..86ca07340 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-head/vn/vn.tpl @@ -0,0 +1,212 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/vn/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/vn/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google_vn": { + requestQuery: "q", + url: "http://clients1.google.com.vn/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + client: "hp", + hl: "vi", + cp:"1", + gs_id: "c" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.vn/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + client:"img", + ds:"i", + hl:"vi", + gs_is:"1", + cp:"1", + gs_id:"k" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "vi", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.google.ac.hr", + callbackDataNum: 1, + requestParas: { + hl:"vi", + gl:"ZZ", + ds:"yt", + client:"suggest", + hjson:"t", + jsonp:"window.google.ac.hr", + cp:"1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + url: null + }, + "google_dict": { + url: null + }, + "mp3.zing": { + url: null + }, + "nhaccuatui": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com/maps/suggest", + callbackFn: "_xdc_._2gqj8p7jf", + callbackDataNum: 3, + requestParas: { + clid:"1", + cp:"2", + hl:"th", + gl:"", + json:"a", + ll:"21.739091,106.704712", + num:"5", + numps:"5", + spn:"1.347031,4.938354", + src:"1", + v:"2", + callback:"_xdc_._2gqj8p7jf", + auth:"d95a99a2:MA69F0jNrYbAN5QJuDKDqwnr1rU" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length; + + var detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "diadiem": { + url: null + }, + "google_answers": { + url: null + }, + "yahoo_answers": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ae/ae.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ae/ae.tpl new file mode 100755 index 000000000..4524b8ce2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ae/ae.tpl @@ -0,0 +1,242 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ae/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ae/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.ae/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.ae/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.ae/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + detail = detail ? ' - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + } + } +} +<%/strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ar/ar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ar/ar.tpl new file mode 100755 index 000000000..32509a030 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ar/ar.tpl @@ -0,0 +1,451 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.eg/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "eg", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "ar-EG", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.eg/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_eg", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://10.247.1.38:8333/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_eg" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://ar.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_web": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "serp", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • '); + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • '); + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_videos": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_maps": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/br/br.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/br/br.tpl new file mode 100755 index 000000000..816379c50 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/br/br.tpl @@ -0,0 +1,459 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.br/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "br", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_br": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "pt-BR", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.br.search.yahoo.net/gossip-br-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.br/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_br", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "pt", + "gl": "br", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "kboing": { + url: null + }, + "empregos": { + url: null + }, + "google_dict": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.com.br/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_brazil" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "postbar": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://br.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "americanas": { + requestQuery: "q", + url: "http://busca.americanas.com.br/autocomplete/search.php", + callbackFn: "window.americanas", + callbackDataKey: "sugestoes", + requestParas: { + "prod" : "image_brazil", + "type": "1", + "numsugestoes": "12", + "numprods": "0", + "callback":"window.americanas" + }, + templ: function(data, q) { + var _data = data["sugestoes"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].consulta.replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "walmart": { + url: null + }, + "netshoes": { + url: null + }, + "buscape": { + url: null + }, + "zoom": { + requestQuery: "q", + url: "http://s.zst.com.br/static/autocomplete-index-r/.js", + callbackFn: "zoomAutoCompleteBlackBoard.notify", + callbackDataKey: "completions", + customUrl: function(para) { + var str = this.q.split("").join("/") + ".js?_=" + +new Date; + return this.o.url.replace(".js", str); + }, + templ: function(data) { + var _data = data["completions"] || [], + ret = [], + i = 0, + q = data["key"], + tmp = "", + len = _data.length; + var isStr = function(value){ + return typeof value === 'string'; + }; + for(; i' + tmp.replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_web": { + autoCompleteData: false, + requestQuery: "q", + _url: null, + url: "http://ss-hao.search.ask.com/ss", + callbackFn: "suggestCallBack", + callbackDataNum: 1, + requestParas: { + "limit": "10", + "li":"ff", + "hl":"pt", + "fn":"suggestCallBack" + }, + templ: function(data,q) { + var _data = data[1] || [], + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_images": { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i", "").replace("", ""); + ret.push('
                            • ' + _q.replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_videos": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i", "").replace("", ""); + ret.push('
                            • ' + _q.replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_maps": { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/en/en.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/en/en.tpl new file mode 100755 index 000000000..0de360bb9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/en/en.tpl @@ -0,0 +1,176 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/en/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/en/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google_web": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "en" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "en", + "client": "img", + "gs_nf": "1", + "ds": "i" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "en", + "gl": "", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "en", + "gl": "US", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "en", + "gs_nf": "1", + "ds": "n" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +<%strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/id/id.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/id/id.tpl new file mode 100755 index 000000000..adca107f5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/id/id.tpl @@ -0,0 +1,296 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/id/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/id/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.co.id/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "id" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.id/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "id" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.id/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "id", + "gl": "id", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "id", + "client": "youtube", + "gl": "id", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc446.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "google_dict": { + url: null + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.id.search.yahoo.com/gossip-id-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://id.wikipedia.org/w/api.php", + callbackFn: "wikipedia.id", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.id", + "format":"json" + } + }, + "google_news": { + url: null + }, + "ask_web": { + requestQuery: "q", + url: "http://clients1.google.co.id/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "id" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_images": { + requestQuery: "q", + url: "http://clients1.google.co.id/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "id" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_videos": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "id", + "client": "youtube", + "gl": "id", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_maps": { + requestQuery: "q", + url: "http://maps.google.co.id/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "id", + "gl": "id", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +<%/strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-click.png new file mode 100755 index 000000000..7828b5d56 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-hover.png new file mode 100755 index 000000000..d11e540ed Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side-click.png new file mode 100755 index 000000000..b66706676 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side-hover.png new file mode 100755 index 000000000..693ac8896 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side.png new file mode 100755 index 000000000..d2b3c4f93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn-side.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn.png new file mode 100755 index 000000000..e0d576570 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/bg-search-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-close-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-close-hover.png new file mode 100755 index 000000000..c6f540558 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-close-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-close.png new file mode 100755 index 000000000..159ed3112 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-custom-hide.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-custom-hide.png new file mode 100755 index 000000000..608993755 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-custom-hide.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-custom-show.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-custom-show.png new file mode 100755 index 000000000..b21b98c98 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-custom-show.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search-click.png new file mode 100755 index 000000000..31d004952 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search-hover.png new file mode 100755 index 000000000..a01e36716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search.png new file mode 100755 index 000000000..b3a7a12cd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/id_new_add_icon.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/id_new_add_icon.png new file mode 100755 index 000000000..eb59eef1f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/id_new_add_icon.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/tag_new_icon.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/tag_new_icon.png new file mode 100755 index 000000000..43e3174fe Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/img/tag_new_icon.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/jp/jp.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/jp/jp.tpl new file mode 100755 index 000000000..b3b01fd3c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/jp/jp.tpl @@ -0,0 +1,367 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + tn: { + timeStamp: "<%$sysInfo.baiduidCt%>", + serverTime: "<%$sysInfo.serverTime%>", + isInList:<%if !empty($root.urlparam.tn) && !empty($head.confTn) && in_array($root.urlparam.tn,explode("|", $head.confTn))%>1<%else%>0<%/if%>, + timeInterval: 1209600 + } + + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_jp": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + <%if !empty($body.useYahooSug)%> + "yahoo_jp": { + requestQuery: "query", + url: "/yahoosug", + callbackFn: "yahoo_partner_sug", + callbackDataKey: 1, + requestParas: { + } + }, + <%else%> + "yahoo_jp": { + requestQuery: "p", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "fxjson", + "src": "srch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "n": 11, + "callback": "yahooSuggest" + } + }, + <%/if%> + "baidu_jp": { + requestQuery: "wd", + url: "http://sug.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooImgSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "isrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooImgSuggest" + } + }, + "baidu_images": { + requestQuery: "wd", + url: "http://image.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "youtube": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "ja", + "client": "youtube", + "gl": "jp", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooVideoSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "vsrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooVideoSuggest" + } + }, + "baidu_video": { + requestQuery: "wd", + url: "http://video.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.jp/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "ja", + "gl": "jp", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "ds": "n", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "jp_jobs": { + url: null + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooDictSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "dic_all", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "crumb": "QKHAOjMgzamLb0jiQkkwyVvZN_UvDCDclNTtYF_zmIZt96JRlxPpz5OweLONIHfY82xzaoagN2EPsJ.006TjkYwNEmA-", + "resulsts": 10, + "callback": "yahooDictSuggest" + } + }, + "yahoo_chiebukuro": { + url: null + }, + "yahoo_auctions": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "auc", + "appid": "Hy5EaxCxg66QNDm0cEojk3JOZS470WbaRqWtIpaQ4Tc7s8v6IK8AO45lFd3bwAwJzlZc", + "resulsts": 10, + "callback": "yahooSuggest" + } + }, + "amazon_shopping": { + requestQuery: "q", + url: "http://completion.amazon.co.jp/search/complete", + callbackFn: "amazonShoppingCallback", + callbackDataKey: 1, + requestParas: { + "method": "completion", + "search-alias" : "aps", + "mkt": 6, + "callback": "amazonShoppingCallback" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "rakuten_shopping": { + requestQuery: "q", + url: "http://api.suggest.search.rakuten.co.jp/suggest", + callbackFn: "rakutenShoppingCallback", + callbackDataKey: "result", + requestParas: { + "cl": "dir", + "rid": "1252328571", + "sid": "1", + "oe": "euc-jp", + "cb": "rakutenShoppingCallback" + }, + templ: function(data) { + var _data = data["result"] || [], + q = _data["input"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_shopping": { + requestQuery: "p", + url: "http://suggest.shop.yahooapis.jp/Shopping/Suggest/V1/suggester", + callbackFn: "getJsonData", + callbackDataNum: 1, + requestParas: { + "callback":"getJsonData", + "output": "json", + "start": "1", + "result": "10", + ".src": "shp", + "brand": "0", + "da": "0", + "prod": "0", + "appid": "dj0zaiZpPWIyYVBwSXI3bmdqYSZzPWNvbnN1bWVyc2VjcmV0Jng9YWU-" + }, + templ: function(data) { + var _data = data[1][0].keyword || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +}; +<%/strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ltr/ltr.css new file mode 100755 index 000000000..7a1ee3bc7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ltr/ltr.css @@ -0,0 +1,173 @@ +.box-search_keyboard { + padding: 2px 1px; +} +.box-search { + width: 834px; + margin-top: 15px; + margin-left: 103px; +} +.box-search_tab { + position: relative; + z-index: 8; + + margin-left: 168px; + + white-space: nowrap; +} +.box-search_tab a { + float: left; + + margin-left: -1px; + padding: 4px 12px 3px; +} +.box-search_tab a.cur { + font-weight: 700; + + cursor: default; + + color: #1c81e5; +} +.box-search_sep { + float: left; + + height: 6px; + margin-top: 8px; + margin-left: -1px; + + border-right: 1px solid #b3b3b3; +} +.box-search_inner { + height: 68px; +} +.box-search_logo_wrap { + position: relative; + z-index: 6; + + float: left; + + width: 161px; + height: 65px; + margin: -13px 0 0 0; +} +.box-search_logo dt, +.box-search_logo dd { + padding: 10px 12px 10px 14px; + + cursor: pointer; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width: 120px; + height: 45px; +} +.box-search_form { + padding: 3px 0 5px 113px; +} +.box-search_form .input { + position: relative; + z-index: 5; + + margin-left: 6px; + margin-right: 0; + + border: 1px solid #d9d9d9; + border-top-color: #bfbfbf; + border-right-width: 0; + background-color: #fff; +} +.box-search_form .input input { + font-size: 14px; + line-height: 20px\9; + + float: left; + overflow: hidden; + + width: 539px; + height: 26px; + padding: 4px 0 3px 10px; + + border: 0; + outline: none; + background-color: #fff; +} + +.box-search .sug-search { + visibility: hidden; + + height: 0; +} +.btn-search { + line-height: 35px; + + overflow: hidden; + + width: 90px; + + border-width: 0; + border-radius: 2px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + background-color: #2085e9; + background-image: linear-gradient(#258bef, #248aee, #2287ec, #2085e9, #1e83e7, #1c81e5); +} +.btn-search_c { + font-size: 15px; + font-weight: 700; + line-height: 35px; + + float: right; + + width: 90px; + height: 35px; + + cursor: pointer; + text-align: center; + + color: #fff; + border: 0; + background: 0 0; +} +.box-search_hsrch { + overflow: hidden; + + width: 640px; + margin-left: 168px; + padding-top: 2px; + + height: 15px; + + color: #919191; +} +.hsrch_title { + font-weight: bold; + + margin-right: 8px; + + color: #919191; +} +.hsrch_word span { + display: inline-block; + + margin-right: 15px; +} +.hsrch_word a { + text-align: left; + + color: #919191; +} + + +/* 960 */ +.w960 .input input { + width: 433px; +} +.w960 .box-search { + width: 740px; + margin-left: 22px; +} +.w960 .box-search_hsrch { + width: 562px; +} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ltr/ltr.more.css new file mode 100755 index 000000000..6a46574e8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ltr/ltr.more.css @@ -0,0 +1,159 @@ +.box-search_tab a:hover { + color: #1c81e5; + border-radius: 2px; + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, .05); +} +.box-search_logo dt:hover, +.box-search_logo dd:hover { + border-radius: 2px; + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, .05); +} +.box-search_logos_show { + border: 1px solid #e5e6e7; + background-color: #fff; +} +.box-search_logos_show dt, +.box-search_logos_show dd { + padding: 10px 11px 10px 13px; +} +.box-search_logos_show dt { + padding-top: 9px; +} +.box-search_logo a { + display: block; + + padding-right: 15px; +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) right -61px no-repeat; +} +.box-search_logos_show dt a { + background-position: right -87px; +} + +.box-search_logo_disabled { + border-width: 0; + background-color: transparent; +} +.box-search_logo_disabled dt, +.box-search_logo_disabled dd { + padding: 10px 12px 10px 14px; +} +.box-search_logo_disabled dt:hover, +.box-search_logo_disabled dd:hover { + padding: 10px 12px 10px 14px; + + background-color: transparent; +} +.box-search_logo_disabled dt a { + background: none; +} + + +.box-search_form .box-search_focus { + border-color: #4ca6ff; +} + +.btn-search_ico { + line-height: 27px; + + display: block; + + width: 17px; + height: 17px; + margin: 0 auto; + + background: url(../img/i-search.png?__sprite) no-repeat; +} +.btn-search_c:hover { + background-color: #1e7ddc; +} + +.btn-search_c:active { + background-color: #1D6CBB; +} + +.hsrch_word a:hover { + text-decoration: underline; + color: #1c81e5; +} + + + +body .box-search .sug-search { + top: 0; + + visibility: visible; + + width: 548px; + height: auto; + margin-top: 34px; + + border-top: 0; +} + +/****黑色皮肤****/ +.skin-type-dark .box-search_tab a { + color: #fff; +} +.skin-type-dark .box-search_tab a:hover, +.skin-type-dark .box-search_logo dt:hover, +.skin-type-dark .box-search_logo dd:hover { + background-color: #0d0d0d; + background-color: rgba(0, 0, 0, .3); +} +.skin-type-dark .box-search_logos_show { + border: 1px solid #0d0d0d; + border-color: rgba(0, 0, 0, .3); + background-color: #8c8c8c; + background-color: rgba(0, 0, 0, .6); +} +.skin-type-dark .box-search_tab a:hover, +.skin-type-dark .box-search_tab a.cur { + color: #fff; +} +.skin-type-dark .hsrch_title, +.skin-type-dark .hsrch_word a { + color: #bbb; +} +.skin-type-dark .hsrch_word a:hover { + color: #eee; +} + + +/* 960 */ +.w960 .box-search .sug-search { + width: 469px; +} + + +/*header fixed*/ +.header-fixed-up .box-search_logo dt:hover, +.header-fixed-up .box-search_logo dd:hover { + background-color: #f2f2f2; +} +.header-fixed-up .box-search_logos_show { + border-width: 0 !important; +} + +/*搜索条中增加new提示*/ +.box-search_tab .new_add_prompt{ + display:block; + width:24px; + height:12px; + background: url(../img/tag_new_icon.png?__sprite) no-repeat 0 0; + position: absolute; + top: -6px; + right: -8px; +} +.box-search_tab .new_add_prompt_id{ + display:block; + width:28px; + height:14px; + background: url(../img/id_new_add_icon.png?__sprite) no-repeat 0 0; + position: absolute; + top: -8px; + right: -12px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ma/ma.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ma/ma.tpl new file mode 100755 index 000000000..c43966c84 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/ma/ma.tpl @@ -0,0 +1,244 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ma/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ma/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + detail = detail ? ' - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + } + } +} +<%/strip%> +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/rtl/rtl.css new file mode 100755 index 000000000..c458c776e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/rtl/rtl.css @@ -0,0 +1,173 @@ +.box-search_keyboard { + padding: 2px 1px; +} +.box-search { + width: 834px; + margin-top: 15px; + margin-right: 98px; +} +.box-search_tab { + position: relative; + z-index: 8; + + margin-right: 173px; + + white-space: nowrap; +} +.box-search_tab a { + float: right; + + margin-right: -1px; + padding: 4px 12px 3px; +} +.box-search_tab a.cur { + font-weight: 700; + + cursor: default; + + color: #1c81e5; +} +.box-search_sep { + float: right; + + height: 6px; + margin-top: 8px; + margin-right: -1px; + + border-left: 1px solid #b3b3b3; +} +.box-search_inner { + height: 68px; +} +.box-search_logo_wrap { + position: relative; + z-index: 6; + + float: right; + + width: 161px; + height: 65px; + margin: -13px 0 0 5px; +} +.box-search_logo dt, +.box-search_logo dd { + padding: 10px 14px 10px 12px; + + cursor: pointer; +} +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width: 120px; + height: 45px; +} +.box-search_form { + padding: 3px 113px 5px 0; +} +.box-search_form .input { + position: relative; + z-index: 5; + + margin-right: 6px; + margin-left: 0; + /* for IE9 */ + padding-right: 1px\9\0; + + border: 1px solid #d9d9d9; + border-top-color: #bfbfbf; + border-left-width: 0; + background-color: #fff; +} +.box-search_form .input input { + font-size: 14px; + line-height: 20px\9; + + float: right; + overflow: hidden; + + width: 512px; + height: 26px; + margin-right: 1px; + padding: 4px 9px 3px 0; + + border: 0; + outline: none; + background-color: #fff; +} +.box-search .sug-search { + visibility: hidden; + + height: 0; +} +.btn-search { + line-height: 35px; + + overflow: hidden; + + width: 90px; + + border-width: 0; + border-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + background-color: #2085e9; + background-image: linear-gradient(#258bef, #248aee, #2287ec, #2085e9, #1e83e7, #1c81e5); +} +.btn-search_c { + font-size: 15px; + font-weight: 700; + line-height: 35px; + + float: left; + + width: 90px; + height: 35px; + + cursor: pointer; + text-align: center; + + color: #fff; + border: 0; + background: 0 0; +} +.box-search_hsrch { + overflow: hidden; + + width: 640px; + margin-right: 171px; + padding-top: 2px; + + height: 15px; + + color: #919191; +} +.hsrch_title { + font-weight: bold; + + margin-left: 8px; + + color: #919191; +} +.hsrch_word span { + display: inline-block; + + margin-left: 15px; +} +.hsrch_word a { + text-align: right; + + color: #919191; +} + +/* 960 */ +.w960 .input input { + width: 433px; +} +.w960 .box-search { + width: 740px; + margin-right: 22px; +} +.w960 .box-search_hsrch { + width: 562px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/rtl/rtl.more.css new file mode 100755 index 000000000..ebe88b856 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/rtl/rtl.more.css @@ -0,0 +1,159 @@ +.box-search_tab a:hover { + color: #1c81e5; + border-radius: 2px; + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, .05); +} +.box-search_logo dt:hover, +.box-search_logo dd:hover { + border-radius: 2px; + background-color: #f2f2f2; + background-color: rgba(0, 0, 0, .05); +} +.box-search_logos_show { + border: 1px solid #e5e6e7; + background-color: #fff; +} +.box-search_logos_show dt, +.box-search_logos_show dd { + padding: 10px 13px 10px 11px; +} +.box-search_logos_show dt { + padding-top: 9px; +} +.box-search_logo a { + display: block; + + padding-left: 15px; +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) -10px -61px no-repeat; +} +.box-search_logos_show dt a { + background-position: -10px -87px; +} + +.box-search_logo_disabled { + border-width: 0; + background-color: transparent; +} +.box-search_logo_disabled dt, +.box-search_logo_disabled dd { + padding: 10px 14px 10px 12px; +} +.box-search_logo_disabled dt:hover, +.box-search_logo_disabled dd:hover { + padding: 10px 14px 10px 12px; + + background-color: transparent; +} +.box-search_logo_disabled dt a { + background: none; +} + + +.box-search_form .box-search_focus { + border-color: #4ca6ff; +} + +.btn-search_ico { + line-height: 27px; + + display: block; + + width: 17px; + height: 17px; + margin: 0 auto; + + background: url(../img/i-search.png?__sprite) no-repeat; +} +.btn-search_c:hover { + background-color: #1e7ddc; +} + +.btn-search_c:active { + background-color: #1D6CBB; +} + +.hsrch_word a:hover { + text-decoration: underline; + color: #1c81e5; +} + + +body .box-search .sug-search { + top: 0; + left: 0; + + visibility: visible; + + width: 548px; + height: auto; + margin-top: 34px; + + border-top: 0; +} + +/****黑色皮肤****/ +.skin-type-dark .box-search_tab a { + color: #fff; +} +.skin-type-dark .box-search_tab a:hover, +.skin-type-dark .box-search_logo dt:hover, +.skin-type-dark .box-search_logo dd:hover { + background-color: #0d0d0d; + background-color: rgba(0, 0, 0, .3); +} +.skin-type-dark .box-search_logos_show { + border: 1px solid #0d0d0d; + border-color: rgba(0, 0, 0, .3); + background-color: #8c8c8c; + background-color: rgba(0, 0, 0, .6); +} +.skin-type-dark .box-search_tab a:hover, +.skin-type-dark .box-search_tab a.cur { + color: #fff; +} +.skin-type-dark .hsrch_title, +.skin-type-dark .hsrch_word a { + color: #bbb; +} +.skin-type-dark .hsrch_word a:hover { + color: #eee; +} + + +/* 960 */ +.w960 .box-search .sug-search { + width: 469px; +} + + +/*header fixed*/ +.header-fixed-up .box-search_logo dt:hover, +.header-fixed-up .box-search_logo dd:hover { + background-color: #f2f2f2; +} +.header-fixed-up .box-search_logos_show { + border-width: 0 !important; +} + +/*搜索条中增加new提示*/ +.box-search_tab .new_add_prompt{ + display:block; + width:24px; + height:12px; + background: url(../img/tag_new_icon.png?__sprite) no-repeat 0 0; + position: absolute; + top: -6px; + left: -8px; +} +.box-search_tab .new_add_prompt_id{ + display:block; + width:28px; + height:14px; + background: url(../img/id_new_add_icon.png?__sprite) no-repeat 0 0; + position: absolute; + top: -8px; + left: -12px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/sa/sa.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/sa/sa.tpl new file mode 100755 index 000000000..b9355b6a4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/sa/sa.tpl @@ -0,0 +1,385 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/sa/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/sa/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.com.sa/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.sa/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.sa/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://sa.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_web": { + requestQuery: "q", + url: "http://clients1.google.com.sa/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_images": { + requestQuery: "q", + url: "http://clients1.google.com.sa/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_videos": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_maps": { + requestQuery: "q", + url: "http://maps.google.com.sa/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +<%/strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/search-box-new-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/search-box-new-async.js new file mode 100755 index 000000000..8aecc2efb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/search-box-new-async.js @@ -0,0 +1,537 @@ +/* + * Search box group + */ + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + helper = require("common:widget/ui/helper/helper.js"); + +require("common:widget/ui/suggest/suggest.js"); +require('common:widget/ui/jquery/jquery.cookie.js'); + +Gl.searchGroup = function(o) { + + var _conf = conf.searchGroup, + type = o.type || "index", + logoPath = _conf.conf[type].logoPath, + defaultN = _conf.conf[type].curN || 0, + + logo = $("#searchGroupLogo"), + logoGroup = $("#searchGroupLogos"), + tabs = $("#searchGroupTabs"), + form = $("#searchGroupForm"), + input = $("#searchGroupInput"), + btn = $("#searchGroupBtn"), + params = $("#searchGroupParams"), + hSeWords = $("#hotSearchWords"), + webEngine = $("#searchGroupWebEngine"), + inputWrap = input.parent(), + + curTab = $("a:eq(" + defaultN + ")", tabs), + curWordTab = curTab.attr("data-t"), + defaultData = _conf.sug[_conf.list[curWordTab].engine[defaultN].id], + + //record which form was selected in tabs + storeForm = {}, + onceTime = true, + logoHash = { + 'yahoo': 'yahoo', + 'google': 'google', + 'baidu': 'baidu', + 'defau': 'defau' + }, + defaultTab = _conf.conf[type].defaultTab || 'web', + + $bd = $(document.body), + + + getCurLogo = function(attr) { + var tmpObj = null; + attr = attr.toLowerCase(); + for (var i in logoHash) { + if (attr.search(i) > -1) { + tmpObj = logoHash[i]; + break; + } + } + if (tmpObj === 'yahoo' && conf.country === 'jp') { + tmpObj = 'yahoo_jp'; + } + return (tmpObj || 'defau'); + }, + + //reset the form about action and params + resetForm = function(data, n) { + + var ret = []; + var theLogoPath = $bd.hasClass("skin-type-dark") ? (_conf.conf[type].logoPath + "dark/") : _conf.conf[type].logoPath; + var logoGroupDt = $("dt", logoGroup).clone(); + var isFixed = $bd.hasClass("header-fixed-up"); + + // Fixed bug in IE8 + logoGroup.html(''); + logoGroup.append(logoGroupDt); + + // rebinding logo element + logo = $("#" + (o.logoId || "searchGroupLogo"), logoGroupDt); + + form.attr("action", data[n].action); + input.attr("name", data[n].q); + + logo.attr("alt", data[n].name); + logo.parent().attr("title", data[n].name); + logo.parent().attr("data-n", n); + logo.attr("data-id", data[n].id); + + if (isFixed) { + logo.attr("src", "/resource/fe/headerTest/search/" + getCurLogo(data[n].logo) + ".png"); + } else { + logo.attr("src", theLogoPath + data[n].logo + ".png"); + } + + logoGroup.append(function() { + ret = []; + $.each(data, function(key, val) { + if (isFixed) { + ret.push('
                              ' + val.name + '' + val.name + '
                              '); + } else { + ret.push('
                              ' + val.name + '
                              '); + } + }); + return ret.join(""); + }); + + params.html(function() { + ret = []; + $.each(data[n].params, function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + + if (data.length <= 1) { + logoGroup.addClass("box-search_logo_disabled"); + } else { + logoGroup.removeClass("box-search_logo_disabled"); + } + }, + + resetSug = function(data, n) { + data = _conf.sug[data[n].id]; + $.each(data, function(key, val) { + sug.o[key] = val; + }); + + //fix more prams + !data.templ && (sug.o.templ = false); + !data.callbackFn && (sug.o.callbackFn = false); + !data.callbackDataKey && (sug.o.callbackDataKey = false); + !data.callbackName && (sug.o.callbackName = false); + !data.callbackDataNum && (sug.o.callbackDataNum = false); + !data.customUrl && (sug.o.customUrl = false); + + !data.charset && (sug.o.charset = undefined); + sug.reset(true); + }, + + // toggle for baidu sug + resetBaiduSug = function(data, n) { + + if (!baidu_sug) { + return; + } + + data = data ? data[n].baiduSug : false; + + if (data) { + baidu_sug.setMode(data.mod); + baidu_sug.toggle(true); + } else { + baidu_sug.toggle(false); + } + }, + + // toggle for PS video sug + resetBaiduVideoSug = function(data, n) { + if (!window["baidu_video_sug"]) { + return; + } + + data = data ? data[n].otherSug : false; + + if (data) { + baidu_video_sug.setMode(data.mod); + baidu_video_sug.toggle(true); + } else { + baidu_video_sug.toggle(false); + } + }, + + switchTab = function(tab, sugStay) { + + tab = $(tab); + curTab.removeClass("cur"); + tab.addClass("cur"); + curTab = tab; + + var t = tab.attr("data-t"); + var engines = _conf.list[t].engine; + var engLen = engines.length; + + //ps sug gut add tab changed name + tabCategoryName = t; + + //if the last element is null, remove it + if ($.isEmptyObject(engines[engLen - 1])) { + engines.length = engLen - 1; + }; + + //record current form(add the current type to storeForm as a key) + storeForm[t] || (storeForm[t] = 0); + + //reset form + resetForm(engines, storeForm[t]); + + //reset suggest + !sugStay && resetSug(engines, storeForm[t]); + + // reset PS video sug + !sugStay && resetBaiduVideoSug(engines, storeForm[t]); + + // reset baidu sug + !sugStay && resetBaiduSug(engines, storeForm[t]); + }, + + showLogo = function() { + var n = logo.parent().attr("data-n"); + var logoList = $("dd", logoGroup); + var isFix = $bd.hasClass("header-fixed-up"); + var logLen = logoList.length; + + if (logoGroup.hasClass("box-search_logos_show")) { + logoGroup.removeClass("box-search_logos_show"); + logoList.each(function() { + $(this) + .addClass("box-search_logo_hide") + .removeClass("box-search_logo_first box-search_logo_last"); + }); + } else { + logoGroup.addClass("box-search_logos_show"); + logoList.each(function(key) { + var $that = $(this); + + if (onceTime) { + var $imgEle = $that.find("img").first(); + if ($imgEle.attr("data-src")) { + $imgEle.attr("src", $imgEle.attr("data-src")); + $imgEle.removeAttr("data-src"); + } + } + + key != n && $that.removeClass("box-search_logo_hide"); + if (isFix && (logLen > 1) && (key != n)) { + if (n == 0) { + if (key === 1) { + $that.addClass("box-search_logo_first"); + } + if (key === logLen - 1) { + $that.addClass("box-search_logo_last"); + } + } else if (n == logLen - 1) { + if (key === 0) { + $that.addClass("box-search_logo_first"); + } + if (key === logLen - 2) { + $that.addClass("box-search_logo_last"); + } + } else { + if (key === 0) { + $that.addClass("box-search_logo_first"); + } + if (key === logLen - 1) { + $that.addClass("box-search_logo_last"); + } + } + } + }); + onceTime = false; + } + }, + + //sug instantiation + sug = Gl.suggest(input[0], { + classNameWrap: "sug-search", + classNameQuery: "sug-query", + classNameSelect: "sug-select", + delay: _conf.conf[type].delay, + n: _conf.conf[type].n, + autoFocus: false, + requestQuery: defaultData.requestQuery, + requestParas: defaultData.requestParas, + url: defaultData.url, + callbackFn: defaultData.callbackFn, + callbackDataKey: defaultData.callbackDataKey, + onCheckForm: function(form) { + + if (!(/^hao123$/.test(logo.attr("data-id")))) return; + + if (!$(form).find("input[name='haobd']").get(0)) { + $(form).append(""); + } + }, + onMouseSelect: function(li) { + var t = curTab.attr("data-t"); + var _action = _conf.list[t].engine[storeForm[t]].action; + var utObj = { + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + modId: "search", + element: "sug", + tab: t + }; + + //fix action + if (/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, { + q: encodeURIComponent(input.val()) + })); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + }, 16); + } + input.select(); + + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + }, + templ: defaultData.templ + }); + + + //ps sug gut add tab + window.tabCategoryName = curTab.attr("data-t"); + + //clear the input's value after refresh + input.val(""); + + //record the default form'n + storeForm[curTab.attr("data-t")] = 0; + + //select text in input after submit + form.on("submit", function() { + // input.select(); + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action, + _url = _conf.list[t].engine[storeForm[t]].url, + val = encodeURIComponent(input.val()), + utObj = { + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + modId: "search", + element: "input", + tab: t, + value: val + }; + + if (/^hao123$/.test(logo.attr("data-id"))) { + if (!form.find("input[name='haobd']").get(0)) { + form.append(""); + } + } + form.attr("action", _action); + + + // set charset to big5 while the engine is ruten + if (t == "shopping" && /ruten.png/.test(logo.attr("src"))) { + form[0].acceptCharset = document.charset = "big5"; + } else { + form[0].acceptCharset = document.charset = "utf-8"; + } + + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + + UT.send(utObj); + + input.select(); + + //fix action + if (/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, { + q: val + })); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + input.select(); + }, 16); + } + + }); + + resetBaiduVideoSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + resetBaiduSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + //to let lv2 page NOT to auto focus SEARCH INPUT! by NE + if (o.autoFocus == null) { + o.autoFocus = true; //default TRUE! + } + if (o.autoFocus) { + input.focus(); + } + + input.on("focus", function() { + inputWrap.addClass("box-search_focus"); + }); + input.on("blur", function() { + inputWrap.removeClass("box-search_focus"); + }); + + tabs.on("mousedown", function(e) { + var el = e.target, + tabTo; + el.tagName === "SPAN" && (el = el.parentNode); + + tabTo = el.getAttribute("data-t"); + if (tabTo) { + switchTab(el); + UT.send({ + type: "click", + position: "switchTab", + modId: "search", + sort: tabTo + }); + } + form.acceptCharset = document.charset = "utf-8"; + + setTimeout(function() { + input.focus(); + }, 5); + }); + + conf.pageType !== "lv2" && window["PDC"] && PDC.mark("c_sxvi"); + + + $(document).on("mousedown", function(e) { + var el = e.target; + logoGroup.hasClass("box-search_logos_show") && el !== logoGroup[0] && !$.contains(logoGroup[0], el) && showLogo(); + }); + + logoGroup.on("click", function(e) { + var el = e.target, + $el = $(el), + $ta = el.tagName, + + t = curTab.attr("data-t"), + n = storeForm[t], + _n, + engines = _conf.list[t].engine, + engLen = engines.length; + + //remove the last null ,IE8 bug + if ($.isEmptyObject(engines[engLen - 1])) { + engines.length = engLen - 1; + }; + if ($ta === "IMG" || $ta === "SPAN") { + _n = ~~$el.parent().attr("data-n"); + } else if ($ta === "A") { + _n = ~~$el.attr("data-n"); + } else { + _n = ~~$el.children().attr("data-n"); + } + + if (curTab.attr("data-t") == "web") { + webEngine.attr("data-num", _n); + } + + + form[0].acceptCharset = document.charset = "utf-8"; + + + if (_n !== n) { + storeForm[t] = _n; + resetForm(engines, _n); + + //reset suggest + resetSug(engines, _n); + + //reset PS video sug + resetBaiduVideoSug(engines, _n); + + //reset baidu sug + resetBaiduSug(engines, _n); + } + showLogo(); + + }); + // realize hot search words module + hSeWords.on("click", function(e) { + var tar = e.target, + href = $(tar).attr("href"), + //data_n = webEngine.attr("data-num"), + engine = _conf.list[curWordTab].engine[0], // default first search engine + urlPath = engine.action, // url string except query string. some search engine end with '?' + query = engine.q, // query variable + param = $.param(engine.params), // like a=b&b=2 + hadlParam = param ? ("&" + param) : "", // like &a=b&b=2 or "" + url = ""; + + if (tar.tagName.toLowerCase() === "a" && href === "#") { + // handled url + url = urlPath + (urlPath.charAt(urlPath.length - 1) == "?" ? "" : "?") + query + "=" + encodeURIComponent($(tar).text()) + hadlParam; + window.open(url); + } + + }); + + // hot search word send search action UT + hSeWords.on("mousedown", "a", function(e) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[curWordTab].engine[0].id, + modId: "hot-word", + tab: curWordTab, + value: encodeURIComponent($.trim($(this).attr("data-val"))) + }); + e.stopPropagation(); // avoid links auto UT + }); + + + /*for header when fixed & width = 40px*/ + var $window = $(window), + recordTab = null, // 吸顶时刻如果tab不是web的话记录当前tab + restoreTo = function() { // 吸顶变正常时恢复之前的tab + if (recordTab) { + switchTab(recordTab); + } else { + switchTab($("a[data-t='"+defaultTab+"']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }, + transTo = function() { // 正常变吸顶时切到web的tab + if (curTab.attr("data-t") != defaultTab) { + recordTab = curTab; + switchTab($("a[data-t='"+defaultTab+"']", tabs)); + } else { + recordTab = null; + switchTab($("a[data-t='"+defaultTab+"']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }; + + $window.on("headerFixed.transTo", function() { + transTo(); + }); + $window.on("headerFixed.restore", function() { + restoreTo(); + }); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/search-box-new.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/search-box-new.tpl new file mode 100755 index 000000000..fa5b82570 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/search-box-new.tpl @@ -0,0 +1,210 @@ +<%*只有新首页用*%> +<%assign var="sBoxTag" value=$body.searchBox.sBoxTag%> +<%assign var="hSearchWords" value=$body.searchBox.hotSearchWords%> +<%assign var="sBtnWords" value=$body.searchBox.searchBtnWords%> + +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/search-box-new/ltr/ltr.css?__inline'); + <%else%> + @import url('/widget/search-box-new/rtl/rtl.css?__inline'); + <%/if%> +<%/style%> + +<%if $head.dir=='ltr'%> +<%require name="common:widget/search-box-new/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/search-box-new/rtl/rtl.more.css"%> +<%/if%> +<%strip%> + +<%/strip%> + +<%widget name="common:widget/search-box-new/`$sysInfo.country`/`$sysInfo.country`.tpl"%> + +<%script%> +<%strip%> +require.async(["common:widget/search-box-new/search-box-new-async.js"], function ($) { + var autoFocusSearch = true; +<%if $body.extAppMod%> + autoFocusSearch = false; +<%/if%> +<%if !empty($body.searchBox.sugUrl)%> + var head = document.getElementsByTagName("head")[0]; + var requestScript = function(url, onsuccess, onerror, timeout) { + + var script = document.createElement('script'); + if (onerror) { + var tid = setTimeout(function() { + script.onload = script.onreadystatechange = script.onerror = null; + timeout(); + }, 5000); + + script.onerror = function() { + clearTimeout(tid); + onerror(); + }; + + script.onload = script.onreadystatechange = function() { + if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) { + script.onload = script.onreadystatechange = null; + script = undefined; + clearTimeout(tid); + onsuccess(); + } + } + } + script.type = 'text/javascript'; + script.src = url; + head.appendChild(script); + }; + + requestScript("<%$body.searchBox.sugUrl%>", function() { + if(typeof baidu_sug !== 'undefined') { + baidu_sug.setMode('baidu'); + baidu_sug.toggle(false); + } + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + }); +<%else%> + baidu_sug = false; + Gl.searchGroup({type: conf.pageType, autoFocus: autoFocusSearch}); +<%/if%> + +<%if !empty($body.searchBox.sugMoreUrl)%> + setTimeout(function() { + window["require"] && require.async("<%$body.searchBox.sugMoreUrl%>"); + }, 1e3); +<%/if%> +}); +<%/strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/th/th.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/th/th.tpl new file mode 100755 index 000000000..b390be056 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/th/th.tpl @@ -0,0 +1,513 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://www.baidu.co.th/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "thai", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_th": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "th-TH", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "th", + "client": "img", + "ds": "i", + "cp": "4" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.co.th/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod": "image_thai" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://www.baidu.co.th/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_thai", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "th", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "th", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "mthai": { + url: null + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + }, + templ: function(data) { + var _data = data["suggestions"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filestube": { + requestQuery: "q", + url: "http://149.13.65.144:8087", + callbackFn: "filestube123", + callbackDataKey: "r", + charset: "utf-8", + requestParas: { + "callback": "filestube123", + "t": +new Date + }, + customUrl: function(para) { + return this.o.url + "/" + encodeURIComponent(this.q) + "?" + para.substr(1); + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.th/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "th", + "gl": "th", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_map": { + requestQuery: "key", + url: "http://search2.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "ds": "poi,poi2,poi3,s_pg", + "json": "1", + "num": "20", + "anyorder": "1", + "count": "19" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_dict": { + requestQuery: "key", + url: "http://search.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "json": "1", + "ds": "head", + "num": "20", + "count": "7" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://th.wikipedia.org/w/api.php", + callbackFn: "wikipedia.th", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.th" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filmes": { + requestQuery: "wds", + url: "http://th.hao123.com/video/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: {}, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_web": { + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "th", + "client": "serp", + "ds": "i", + "cp": "4" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_images": { + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "th", + "client": "img", + "ds": "i", + "cp": "4" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_videos": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "th", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ask_maps": { + requestQuery: "q", + url: "http://maps.google.co.th/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "th", + "gl": "th", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/tw/tw.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/tw/tw.tpl new file mode 100755 index 000000000..512a65e77 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/tw/tw.tpl @@ -0,0 +1,334 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_web": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "zh-TW" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "hao123": { + url: null + }, + "baidu": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://suggestion.baidu.com/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "cb": "window.bdsug.sug" + } + }, + "google_news": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "zh-TW", + "gs_nf": "1", + "ds": "n" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_news": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-ura", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "droprotated": "1", + "pubid": "184" + } + }, + "baidu_news": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "news" + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "zh-TW", + "gl": "tw", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "zh-TW", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "video" + } + }, + "yahoo_images": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "183" + } + }, + "google_images": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "zh-TW", + "client": "img", + "gs_nf": "1", + "ds": "i" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_images": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "image" + } + }, + "facebook": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://zh.wikipedia.org/w/api.php", + callbackFn: "wikipedia.zh", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.zh" + } + }, + "baidu_baike": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "baike" + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-pub_sayt", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "560" + } + }, + "baidu_dict": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://dictsug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.tw/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "zh-TW", + "gl": "tw", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_map": { + url: null + } + } +} +<%/strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/vn/vn.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/vn/vn.tpl new file mode 100755 index 000000000..b9504593a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box-new/vn/vn.tpl @@ -0,0 +1,210 @@ +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/vn/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/vn/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8, + defaultTab: "<%$body.searchBox.defaultTab|default:'web'%>" + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google_vn": { + requestQuery: "q", + url: "http://clients1.google.com.vn/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + client: "hp", + hl: "vi", + cp:"1", + gs_id: "c" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.vn/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + client:"img", + ds:"i", + hl:"vi", + gs_is:"1", + cp:"1", + gs_id:"k" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "vi", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.google.ac.hr", + callbackDataNum: 1, + requestParas: { + hl:"vi", + gl:"ZZ", + ds:"yt", + client:"suggest", + hjson:"t", + jsonp:"window.google.ac.hr", + cp:"1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + url: null + }, + "google_dict": { + url: null + }, + "mp3.zing": { + url: null + }, + "nhaccuatui": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com/maps/suggest", + callbackFn: "_xdc_._2gqj8p7jf", + callbackDataNum: 3, + requestParas: { + clid:"1", + cp:"2", + hl:"th", + gl:"", + json:"a", + ll:"21.739091,106.704712", + num:"5", + numps:"5", + spn:"1.347031,4.938354", + src:"1", + v:"2", + callback:"_xdc_._2gqj8p7jf", + auth:"d95a99a2:MA69F0jNrYbAN5QJuDKDqwnr1rU" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length; + + var detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "diadiem": { + url: null + }, + "google_answers": { + url: null + }, + "yahoo_answers": { + url: null + } + } +} +<%/strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ae/ae.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ae/ae.tpl new file mode 100755 index 000000000..636d61d3a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ae/ae.tpl @@ -0,0 +1,245 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ae/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ae/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.ae/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.ae/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.ae/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + detail = detail ? ' - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ar/ar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ar/ar.tpl new file mode 100755 index 000000000..8aa75bc2b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ar/ar.tpl @@ -0,0 +1,343 @@ +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ar/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.eg/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "eg", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "ar-EG", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.eg/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_eg", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://10.247.1.38:8333/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_eg" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://ar.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/br/br.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/br/br.tpl new file mode 100755 index 000000000..f5023ed07 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/br/br.tpl @@ -0,0 +1,349 @@ +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/br/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.br/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "br", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_br": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "pt-BR", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.br.search.yahoo.net/gossip-br-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://search.hao123.com.br/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_br", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "pt", + "gl": "br", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "kboing": { + url: null + }, + "google_dict": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.com.br/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod" : "image_brazil" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "postbar": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://br.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "americanas": { + requestQuery: "q", + url: "http://busca.americanas.com.br/autocomplete/search.php", + callbackFn: "window.americanas", + callbackDataKey: "sugestoes", + requestParas: { + "prod" : "image_brazil", + "type": "1", + "numsugestoes": "12", + "numprods": "0", + "callback":"window.americanas" + }, + templ: function(data, q) { + var _data = data["sugestoes"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].consulta.replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "walmart": { + url: null + }, + "netshoes": { + url: null + }, + "buscape": { + url: null + }, + "zoom": { + requestQuery: "q", + url: "http://s.zst.com.br/static/autocomplete-index-r/.js", + callbackFn: "zoomAutoCompleteBlackBoard.notify", + callbackDataKey: "completions", + customUrl: function(para) { + var str = this.q.split("").join("/") + ".js?_=" + +new Date; + return this.o.url.replace(".js", str); + }, + templ: function(data) { + var _data = data["completions"] || [], + ret = [], + i = 0, + q = data["key"], + tmp = "", + len = _data.length; + var isStr = function(value){ + return typeof value === 'string'; + }; + for(; i' + tmp.replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/br/minilogo/minilogo.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/br/minilogo/minilogo.tpl new file mode 100755 index 000000000..bdfe503c2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/br/minilogo/minilogo.tpl @@ -0,0 +1,316 @@ + +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "/resource/fe/br/minilogo/search_logo/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "/resource/fe/br/minilogo/search_logo/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + + "web": { + "hotWords": "<%$body.searchBox.sBoxTag[0].hotWords%>", + "engine": [{ + name: "Google Brasil", + logo: "google_br", + url: "http://www.google.com.br/", + action: "http://www.google.com.br/search", + params: { + "hl": "pt-BR" + }, + q: "q", + + sug: { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/s", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "pt-BR", + "sugexp": "lemsnc", + "xhr": "f" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + }, { + name: "Yahoo", + logo: "yahoo_web", + url: "http://br.yahoo.com/", + action: "http://br.search.yahoo.com/search", + params: { + }, + q: "p", + sug: { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.br.search.yahoo.net/gossip-br-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + } + } + ] + }, + + "downloads": { + "hotWords": "<%$body.searchBox.sBoxTag[1].hotWords%>", + "engine": [{ + name: "4shared", + logo: "4shared", + url: "http://www.4shared.com/", + action: "http://search.4shared.com/q/1/#{q}", + params: { + }, + q: "q", + sug: { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + } + }] + }, + + "video": { + "hotWords": "<%$body.searchBox.sBoxTag[2].hotWords%>", + "engine": [{ + name: "YouTube", + logo: "youtube", + url: "http://www.youtube.com/?gl=BR&hl=pt", + action: "http://www.youtube.com/results", + params: { + }, + q: "search_query", + sug: { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "google.sbox.p0 && google.sbox.p0", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "pt", + "gl": "br", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + },{ + name: "Google Vídeos", + logo: "google_video", + url: "http://www.google.com.br/videohp?hl=pt-BR", + action: "http://www.google.com.br/search?", + params: { + "tbm": "vid", + "hl": "pt-BR" + }, + q: "q", + sug: { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "pt-BR", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + }] + }, + "music": { + "hotWords": "<%$body.searchBox.sBoxTag[3].hotWords%>", + "engine": [{ + name: "kboing", + logo: "kboing", + url: "http://www.kboing.com.br/", + action: "http://www.kboing.com.br/searchmusic.php?", + params: { + "tb": "musica" + }, + q: "q", + sug: { + url: null + } + + }] + }, + "translator": { + "hotWords": "<%$body.searchBox.sBoxTag[4].hotWords%>", + "engine": [{ + name: "Google Tradutor", + logo: "google_dict", + url: "http://translate.google.com.br/?hl=pt-BR&tab=nT", + action: "http://translate.google.com.br/", + params: { + hl: "pt-BR" + }, + q: "q", + sug: { + url: null + } + }] + }, + + "map": { + "hotWords": "<%$body.searchBox.sBoxTag[5].hotWords%>", + "engine": [{ + name: "Google Mapas", + logo: "google_map", + url: "http://maps.google.com.br/maps?hl=pt-BR&tab=Tl", + action: "http://maps.google.com.br/maps", + params: { + "hl": "pt-BR" + }, + q: "q", + sug: { + requestQuery: "q", + url: "http://maps.google.com.br/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "100", + "hl": "pt-BR", + "gl": "br", + "v": "2", + "clid": "1", + "json": "a", + "ll": "-14.239424,-53.186502", + "spn": "24.779743,86.572266", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "10", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + }] + }, + + "images": { + "hotWords": "<%$body.searchBox.sBoxTag[6].hotWords%>", + "engine": [{ + name: "Google Imagens", + logo: "google_images", + url: "http://www.google.com.br/imghp?hl=pt-BR&tab=wi", + action: "http://www.google.com.br/search?", + params: { + "tbm": "isch", + "hl": "pt-BR" + }, + q: "q", + sug: { + requestQuery: "q", + url: "http://clients1.google.com.br/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "pt-BR" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + }] + }, + + "post": { + "hotWords": "<%$body.searchBox.sBoxTag[7].hotWords%>", + "engine": [{ + name: "Postbar", + logo: "postbar", + url: "http://br.tieba.com", + action: "http://br.tieba.com/frs/index?", + params: { + }, + q: "kw", + sug: { + url: null + } + }] + } + } +} +<%/strip%> +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/en/en.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/en/en.tpl new file mode 100755 index 000000000..1a92815ad --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/en/en.tpl @@ -0,0 +1,179 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/en/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/en/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google_web": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "en" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "en", + "client": "img", + "gs_nf": "1", + "ds": "i" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "en", + "gl": "", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "en", + "gl": "US", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "en", + "gs_nf": "1", + "ds": "n" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +<%strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/id/id.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/id/id.tpl new file mode 100755 index 000000000..bc450f63e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/id/id.tpl @@ -0,0 +1,194 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/id/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/id/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.co.id/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "id" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.id/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "id" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.id/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "id", + "gl": "id", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "id", + "client": "youtube", + "gl": "id", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "4shared": { + requestQuery: "search", + url: "http://dc446.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + } + }, + "google_dict": { + url: null + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.id.search.yahoo.com/gossip-id-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://id.wikipedia.org/w/api.php", + callbackFn: "wikipedia.id", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.id", + "format":"json" + } + }, + "google_news": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-click.png new file mode 100755 index 000000000..7828b5d56 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-hover.png new file mode 100755 index 000000000..d11e540ed Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side-click.png new file mode 100755 index 000000000..b66706676 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side-hover.png new file mode 100755 index 000000000..693ac8896 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side.png new file mode 100755 index 000000000..d2b3c4f93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn-side.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn.png new file mode 100755 index 000000000..e0d576570 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/bg-search-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-close-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-close-hover.png new file mode 100755 index 000000000..c6f540558 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-close-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-close.png new file mode 100755 index 000000000..159ed3112 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-custom-hide.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-custom-hide.png new file mode 100755 index 000000000..608993755 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-custom-hide.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-custom-show.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-custom-show.png new file mode 100755 index 000000000..b21b98c98 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-custom-show.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search-click.png new file mode 100755 index 000000000..31d004952 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search-hover.png new file mode 100755 index 000000000..a01e36716 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search.png new file mode 100755 index 000000000..b3a7a12cd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/id_new_add_icon.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/id_new_add_icon.png new file mode 100755 index 000000000..eb59eef1f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/id_new_add_icon.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/tag_new_icon.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/tag_new_icon.png new file mode 100755 index 000000000..43e3174fe Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/img/tag_new_icon.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/jp/jp.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/jp/jp.tpl new file mode 100755 index 000000000..b88edc204 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/jp/jp.tpl @@ -0,0 +1,367 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + tn: { + timeStamp: "<%$sysInfo.baiduidCt%>", + serverTime: "<%$sysInfo.serverTime%>", + isInList:<%if !empty($root.urlparam.tn) && !empty($head.confTn) && in_array($root.urlparam.tn,explode("|", $head.confTn))%>1<%else%>0<%/if%>, + timeInterval: 1209600 + } + + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_jp": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + <%if !empty($body.useYahooSug)%> + "yahoo_jp": { + requestQuery: "query", + url: "/yahoosug", + callbackFn: "yahoo_partner_sug", + callbackDataKey: 1, + requestParas: { + } + }, + <%else%> + "yahoo_jp": { + requestQuery: "p", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "fxjson", + "src": "srch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "n": 11, + "callback": "yahooSuggest" + } + }, + <%/if%> + "baidu_jp": { + requestQuery: "wd", + url: "http://sug.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooImgSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "isrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooImgSuggest" + } + }, + "baidu_images": { + requestQuery: "wd", + url: "http://image.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "youtube": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "ja", + "client": "youtube", + "gl": "jp", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooVideoSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "vsrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooVideoSuggest" + } + }, + "baidu_video": { + requestQuery: "wd", + url: "http://video.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.jp/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "ja", + "gl": "jp", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "ds": "n", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooDictSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "dic_all", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "crumb": "QKHAOjMgzamLb0jiQkkwyVvZN_UvDCDclNTtYF_zmIZt96JRlxPpz5OweLONIHfY82xzaoagN2EPsJ.006TjkYwNEmA-", + "resulsts": 10, + "callback": "yahooDictSuggest" + } + }, + "yahoo_chiebukuro": { + url: null + }, + "yahoo_auctions": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "auc", + "appid": "Hy5EaxCxg66QNDm0cEojk3JOZS470WbaRqWtIpaQ4Tc7s8v6IK8AO45lFd3bwAwJzlZc", + "resulsts": 10, + "callback": "yahooSuggest" + } + }, + "amazon_shopping": { + requestQuery: "q", + url: "http://completion.amazon.co.jp/search/complete", + callbackFn: "amazonShoppingCallback", + callbackDataKey: 1, + requestParas: { + "method": "completion", + "search-alias" : "aps", + "mkt": 6, + "callback": "amazonShoppingCallback" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "rakuten_shopping": { + requestQuery: "q", + url: "http://api.suggest.search.rakuten.co.jp/suggest", + callbackFn: "rakutenShoppingCallback", + callbackDataKey: "result", + requestParas: { + "cl": "dir", + "rid": "1252328571", + "sid": "1", + "oe": "euc-jp", + "cb": "rakutenShoppingCallback" + }, + templ: function(data) { + var _data = data["result"] || [], + q = _data["input"], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_shopping": { + requestQuery: "p", + url: "http://suggest.shop.yahooapis.jp/Shopping/Suggest/V1/suggester", + callbackFn: "getJsonData", + callbackDataNum: 1, + requestParas: { + "callback":"getJsonData", + "output": "json", + "start": "1", + "result": "10", + ".src": "shp", + "brand": "0", + "da": "0", + "prod": "0", + "appid": "dj0zaiZpPWIyYVBwSXI3bmdqYSZzPWNvbnN1bWVyc2VjcmV0Jng9YWU-" + }, + templ: function(data) { + var _data = data[1][0].keyword || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i].replace(q, '' + q + '') + ''); + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +}; +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/jp/with-google/with-google.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/jp/with-google/with-google.tpl new file mode 100755 index 000000000..5479a9f75 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/jp/with-google/with-google.tpl @@ -0,0 +1,276 @@ + +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/jp/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + tn: { + timeStamp: "<%$sysInfo.baiduidCt%>", + serverTime: "<%$sysInfo.serverTime%>", + isInList:<%if !empty($root.urlparam.tn) && !empty($head.confTn) && in_array($root.urlparam.tn,explode("|", $head.confTn))%>1<%else%>0<%/if%>, + timeInterval: 1209600 + } + + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_jp": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_jp": { + requestQuery: "p", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "fxjson", + "src": "srch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "n": 11, + "callback": "yahooSuggest" + } + }, + "baidu_jp": { + requestQuery: "wd", + url: "http://sug.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "img", + "ds": "i", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooImgSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "isrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooImgSuggest" + } + }, + "baidu_images": { + requestQuery: "wd", + url: "http://image.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "youtube": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "youtubeCallback", + callbackDataKey: 1, + requestParas: { + "hl": "ja", + "client": "youtube", + "gl": "jp", + "ds": "yt", + "callback": "youtubeCallback", + "cp": "1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooVideoSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + "src": "vsrch", + "ei": "UTF-8", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "resulsts": 10, + "callback": "yahooVideoSuggest" + } + }, + "baidu_video": { + requestQuery: "wd", + url: "http://video.baidu.jp/su?", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.jp/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "ja", + "gl": "jp", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + requestQuery: "q", + url: "http://clients1.google.co.jp/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "ds": "n", + "hl": "ja" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooDictSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "dic_all", + "appid": "GEI3l.2xg673b7_tjztd7mGq8if5tIPm86vXPjoW7cwqM6jdkuEfO73_xNbz8QA-", + "crumb": "QKHAOjMgzamLb0jiQkkwyVvZN_UvDCDclNTtYF_zmIZt96JRlxPpz5OweLONIHfY82xzaoagN2EPsJ.006TjkYwNEmA-", + "resulsts": 10, + "callback": "yahooDictSuggest" + } + }, + "yahoo_chiebukuro": { + url: null + }, + "yahoo_auctions": { + requestQuery: "query", + url: "http://suggest.search.yahooapis.jp/SuggestSearchService/V3/webassistSearch", + callbackFn: "yahooSuggest", + callbackDataKey: 1, + requestParas: { + "output": "json", + ".src": "auc", + "appid": "Hy5EaxCxg66QNDm0cEojk3JOZS470WbaRqWtIpaQ4Tc7s8v6IK8AO45lFd3bwAwJzlZc", + "resulsts": 10, + "callback": "yahooSuggest" + } + } + } +} +<%strip%> +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr.more.css new file mode 100755 index 000000000..ed38c9b1a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr.more.css @@ -0,0 +1,125 @@ +/*from inline css*/ +.box-search_tab a:focus { + outline:none; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) right -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: right -87px; +} +.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +} +.btn-search_l, .btn-search_r { + display: none !important; +} +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} + +.btn-search_hover{ + border-color: #2F5BB7; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4C8FFD 0%, #357AE8 100%); +} + +.btn-search_click{ + border-color: #2B79E6; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4A8DFB 0%, #357AE8 100%); + box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); +} + +.hsrch_word span .i-close{ + position: absolute; + display: none; + width: 8px; + height: 7px; + top: -2px; + right: 6px; + background: url(../img/i-close.png?__sprite) no-repeat; +} +.hsrch_word span .i-close:hover{ + display: inline-block; + background: url(../img/i-close-hover.png?__sprite) no-repeat; + cursor: pointer; +} +.skin-type-dark dt.box-search_logo_hover { + background: #737373; + background: rgba(0, 0, 0, 0.6); +} +.skin-type-dark .box-search_logos_show { + background: #8c8c8c; + background: rgba(0, 0, 0, 0.6); +} +.skin-type-dark .box-search_logos_show .box-search_logo_hover { + background: #737373; + background: rgba(0, 0, 0, 0.6); +} + + + + + +/*sug has url*/ +.sug-url { + height:45px; + border-bottom:1px solid #e1e1e1; +} +.sug-url a { + display: block; + text-decoration: none; + color: #0000EE; +} +.sug-url .sug-hl { + height: 25px; + text-decoration: underline; + font-weight:bold; + font-size:14px; +} +.sug-url .sug-frm { + line-height: 16px; + font-size: 12px; + color: green; +} + +/*搜索条中增加new提示*/ +.box-search_tab .new_add_prompt{ + display:block; + width:24px; + height:12px; + background: url(../img/tag_new_icon.png?__sprite) no-repeat 0 0; + position: absolute; + top: -6px; + right: -12px; +} +.box-search_tab .new_add_prompt_id{ + display:block; + width:28px; + height:14px; + background: url(../img/id_new_add_icon.png?__sprite) no-repeat 0 0; + position: absolute; + top: -8px; + right: -12px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr.tpl new file mode 100755 index 000000000..bae6e9235 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr.tpl @@ -0,0 +1,137 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($body.searchboxTab[$value.catagory])%> + <%if $value@first%> + <%$value.title%> + <%else%> + <%if !empty($value.isNewAdd) &&$value.isNewAdd == 'true'%> + <%if !empty($value.area) && $value.area =="id" %> + <%assign var="tmpClassName" value="new_add_prompt_id"%> + <%else%> + <%assign var="tmpClassName" value="new_add_prompt"%> + <%/if%> + + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              <%$value.title%>
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($body.searchboxEngine[$value.id])%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> +
                              + + + + + + +
                              + <%break%><%/if%><%/foreach%> +
                              +
                              box-search_hotright<%/if%>" id="hotSearchWords" log-mod="<%if $hSearchWords.hotRightMod == "1"%>hot-word-right<%else%>hot-word<%/if%>" style="font-size: <%$hSearchWords.fontSize%>px;"> + <%if !empty($hSearchWords.title)%> + <%if $hSearchWords.hotRightMod == "1"%> +
                              + <%foreach $hSearchWords.words as $val%> + <%if $val@index < 10%> + <%$val@index+1%><%$val.name%> + <%/if%> + <%/foreach%> +
                              +
                              + <%$hSearchWords.title%> +
                              + <%foreach $hSearchWords.words as $val%> + <%if $val@index < 10%> + + <%$val@index+1%><%if !empty($val.url)%><%$val.name%><%else%><%$val.name%><%/if%> + <%/if%> + <%/foreach%> +
                              +
                              + <%else%> + <%if !empty($hSearchWords.showPersonalHotSearchWords)%> + + <%/if%> + <%$hSearchWords.title%>: + + <%if empty($hSearchWords.showPersonalHotSearchWords)%> + <%foreach $hSearchWords.words as $val%> + <%if !empty($val.url)%> + <%$val@index+1%><%$val.name%> + <%else%> + <%$val@index+1%><%$val.name%> + <%/if%> + <%/foreach%> + <%/if%> + + <%/if%> + <%/if%> +
                              +
                              +
                              +
                              +<%script%> + conf.hSearchWords = <%json_encode($hSearchWords)%> || {}; + conf.emptyQuerySug = <%json_encode($body.emptyQuerySug)%>; +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr_inline.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr_inline.css new file mode 100755 index 000000000..046c54c87 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ltr/ltr_inline.css @@ -0,0 +1,634 @@ +/*============box_search=============*/ +.box-search_keyboard { + padding: 1px; +} + +.box-search { + margin: 20px auto 0; + width: 777px; +} +.box-search_inner { + height:68px; +} +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + margin-left: 161px; + position: relative; + z-index: 8; + clear: both; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:left; + padding: 4px 12px 3px; + margin-left: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + background: #dcdcde; + border-radius: 2px; +} +/*.box-search_more { + line-height:normal; + position: absolute; + float:right; + cursor:pointer; + z-index:8; + top: -8px; + right: -8px; + border: 1px solid #edf0ef; + border-bottom: 0 none; +} +.box-search_more dt { + margin-top: 6px; +} +.box-search_more a:hover { + background: transparent; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more dt a { + margin: 0; + padding: 4px 17px 3px 9px; + color: #4c4c4c; + text-align: right; + display: block; + float: none; + line-height: 14px; + background:url(../bg.png) right -337px no-repeat transparent !important; +} +.box-search_more dt a:focus { + outline: none; +} +.box-search_more_hover { + background-color: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_more_show { + border:1px solid #e3e4e6; + background: #fff; +} +.box-search_more_show dt { + margin-top: 0px; + padding-top: 6px; +} +.box-search_more_show dt a { + background-position:right -351px !important; +} +.box-search_more_show .box-search_more_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more_show dd { + line-height: 31px; +} +.box-search_more_show dd a { + padding:0 15px 0 9px; + display:block; + float:none; + color: #666; + text-align: right; + margin:0; +} +.box-search_more_hide { + display: none; +}*/ +/*.box-search_tab a:focus { + outline:none; +}*/ /*clear FF's focusborder*/ +.box-search_tab a.cur { + color:#00b075; /*font-weight:bold;*/ + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + /*display: block;*/ + float: left; + height: 6px; + /*line-height: 6px;*/ + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-left: -1px; +} +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 5px 0 0; + float: left; + z-index: 6; +} +.box-search_logo { + position: absolute; + /*overflow:hidden;*/ + vertical-align:bottom; + /*text-align:center;*/ +} +.box-search_logo a { + padding-right: 18px; + display: block; +} +/*.box-search_logo a:focus { + outline: none; +}*/ +.box-search_logo dt , .box-search_logo dd { + padding: 10px 8px 10px 7px; + cursor: pointer; +} +/*.box-search_logo dt a { + background: url(/widget/img/bg.png) right -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: right -87px; +}*/ +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none !important; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none !important; + cursor: default; +} + +/*box-search_form*/ +.box-search_form { + padding:3px 0px 5px 113px; +} +.box-search_form .input { + border: 1px solid #d9d9d9; + border-top: 1px solid #bfbfbf; + margin-right: 13px; + position: relative; + z-index:6; +} +.box-search_form .input input { + border:none; + background:#fff; + width:518px; + float:left; + overflow:hidden; + height:20px; + font-size: 14px; + line-height:20px\9; + padding:4px 0 3px 10px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + left: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} +/*.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +}*/ +.btn-search { + white-space:nowrap; + line-height:27px; + overflow: hidden; + /*_float: left; + *margin:0;*//*fix non-IE'problem because of vertical-align*/ + /*background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x;*/ + + + + /*--css3--*/ + width: 70px; + border-radius: 2px; + border: 1px solid #3079ED; + background-color: #4787ED; + background-image: linear-gradient(-180deg, #4D8FFD 0%, #4787ED 100%); +} +/*.btn-search_l, .btn-search_r { + display: none !important; +}*/ +.btn-search_c { + /*background:url(../img/bg-search-btn.png?__sprite) repeat-x;*/ + vertical-align:top; + border:none; + color:#fff; + height:27px; + text-align:center; + width:70px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; + background: none; +} +/*.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} + +.btn-search_hover{ + border-color: #2F5BB7; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4C8FFD 0%, #357AE8 100%); +} + +.btn-search_click{ + border-color: #2B79E6; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4A8DFB 0%, #357AE8 100%); + box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); +}*/ +/*.btn-search_hover .btn-search_l { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; +} +.btn-search_hover .btn-search_r { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_hover .btn-search_c { + background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x; +} +.btn-search_hover .btn-search_ico { + background: url(../img/i-search-hover.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_l { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_r { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_click .btn-search_c { + background:url(../img/bg-search-btn-click.png?__sprite) repeat-x; +} +.btn-search_click .btn-search_ico { + background: url(../img/i-search-click.png?__sprite) no-repeat; +}*/ + + +.box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ +} +.box-search_form .radios label { + display:block; + padding-left:15px; + text-indent:-15px; + float:left; + margin-right:18px; + color:#666; + font-size: 13px; + white-space: nowrap; +} +.box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-right:5px; + vertical-align:bottom; + position:relative; + top:-1px; + overflow:hidden; +} + +/*set hot search words & search button*/ +.box-search_hsrch { + width: 617px; + margin-left: 160px; + overflow: hidden; + padding-top: 2px; + color: #919191; + height: 15px; + /*_margin-top:-14px;*/ +} +.hsrch_title { + font-weight: bold; + margin-right: 8px; + /*padding-left: 10px;*/ + color: #919191; +} +.hsrch_word span { + position: relative; + display: inline-block; + padding-right: 16px; +} +/*.hsrch_word span .i-close{ + position: absolute; + display: none; + width: 8px; + height: 7px; + top: -2px; + right: 6px; + background: url(../img/i-close.png?__sprite) no-repeat; +} +.hsrch_word span .i-close:hover{ + display: inline-block; + background: url(../img/i-close-hover.png?__sprite) no-repeat; + cursor: pointer; +}*/ +.hsrch_word a { + color: #919191; +} +.hsrch_word a:hover { + color: #00B075; + text-decoration: underline; +} + +/*sug has url*/ +/*.sug-url { + height:45px; + border-bottom:1px solid #e1e1e1; +} +.sug-url a { + display: block; + text-decoration: none; + color: #0000EE; +} +.sug-url .sug-hl { + height: 25px; + text-decoration: underline; + font-weight:bold; + font-size:14px; +} +.sug-url .sug-frm { + line-height: 16px; + font-size: 12px; + color: green; +}*/ +/*size setting*/ +/*.box-search-m .box-search_logo img { + width:107px; + height:40px; +} +.box-search-m .box-search_logo_wrap { + width: 142px; + height: 62px; + margin-top: -14px; +} +.box-search-m .box-search_logo dt a { + background-position: right -62px; +} +.box-search-m .box-search_logos_show dt a { + background-position: right -87px; +} +.box-search-m .box-search_tab { + margin-left: 148px; +} +.box-search-m .box-search_hsrch { + margin-left: 148px; +} +.box-search-s .box-search_logo img { + width:85px; + height:32px; +} +.box-search-s .box-search_logo_wrap { + width: 120px; + height: 54px; + margin-top: -9px; +} +.box-search-s .box-search_logo dt a { + background-position: right -67px; +} +.box-search-s .box-search_logos_show dt a { + background-position: right -93px; +} +.box-search-s .box-search_tab { + margin-left: 126px; +} +.box-search-s .box-search_hsrch { + margin-left: 126px; +}*/ + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo { + border-width: 0px; +} +/*.skin-type-dark dt.box-search_logo_hover { + background: #737373; + background: rgba(0, 0, 0, 0.6); +} +.skin-type-dark .box-search_logos_show { + background: #8c8c8c; + background: rgba(0, 0, 0, 0.6); +}*/ +.skin-type-dark .box-search_logo_disabled { + background: transparent !important; + background: rgba(0, 0, 0, 0) !important; +} +/*.skin-type-dark .box-search_logos_show .box-search_logo_hover { + background: #737373; + background: rgba(0, 0, 0, 0.6); +}*/ +.skin-type-dark .box-search_tab a { + color: #ffffff; +} +body.skin-type-dark .box-search_tab a.cur { + color: #ffffff; +} +.skin-type-dark .box-search_tab a:hover { + background-color: #595959; + background: rgba(0, 0, 0, 0.6); +} +.skin-type-dark .hsrch_title { + color: #bbbbbb; +} +.skin-type-dark .hsrch_word a { + color: #bbbbbb; +} +.skin-type-dark .box-search_sep { + border-left-color: #bbbbbb; +} +.skin-type-dark span.hsrch_word a:hover { + color: #eeeeee; +} +.skin-type-dark .box-search_logo_disabled dt.box-search_logo_hover, +.skin-type-dark .box-search_logo_disabled dt a { + background: 0 !important; +} +.box-search_logo_disabled, +.box-search_logos_show { + border: 0; +} + +/*个性化热搜词的图标*/ +/*.box-search_hsrch .i-personal{ + display: inline-block; + width: 16px; + height: 16px; + margin-bottom: -2px; + cursor: pointer; +} +.box-search_hsrch .on-personal{ + background: url(../img/i-custom-show.png?__sprite) no-repeat; +} +.box-search_hsrch .off-personal{ + background: url(../img/i-custom-hide.png?__sprite) no-repeat; +} +.ui-bubble-hot-word{ + z-index: 9 !important; + width: 176px !important; + padding: 10px 11px !important; +} +.ui-bubble-hot-word .tip{ + display: block; + color: #595757; + font-weight: 600; +} +.ui-bubble-hot-word .bubble-btn{ + display: inline-block; + border: 1px solid #dadddc; + border-radius: 3px; + background-image: linear-gradient( 0deg, rgb(234,234,234) 0%, rgb(250,250,250) 100%); + width: 78px; + height: 30px; + line-height: 30px; + cursor: pointer; + text-align: center; +} +.ui-bubble-hot-word .btn-confirm{ + color: #1eba7e; + margin-right: 11px; + margin-top: 5px; +} + +.ui-bubble-hot-word .btn-cancle{ + color: #919191; +} +.ui-bubble-hot-word .ui-bubble_close{ + position: absolute; + top: 2px; + left: 170px; +} +.box-search .placeholder-iefix{ + position: absolute; + top: 16px; + left: 11px; + color: #a9a9a9; + cursor: text; + font-size: 12px; +}*/ + +.box-search_hsrch .hsword-rank{ + display: none; +} +/*.box-search_hotright{ + position: absolute; + right: 0; + top: 24px; + width: 180px!important; + text-align: center; + z-index: 6; + background-color: #fff; + text-align: left; + padding-top: 0; +} +.box-search_hotright .hsrch_word_right{ + height: 20px; + margin: 3px 0 0 1px; + + position: relative; + +} +.box-search_hotright .hsrch_word_hover{ + -webkit-box-shadow: 0 5px 20px #b0b0b0; + -moz-box-shadow: 0 5px 20px #b0b0b0; + -ms-box-shadow: 0 5px 20px #b0b0b0; + box-shadow: 0px 5px 20px #b0b0b0; + border: 1px solid #ccc; + display: none; +} +.box-search .box-search_hotright .hsrch_title{ + background: #f5f6f8; + width: 100%; + display: block; + height: 34px; + line-height: 34px; + color: #1b81e5; + text-align: center; + font-weight: normal; + font-size: 14px; + cursor: default; +} +.box-search_hotright .hsrch_word{ + padding: 4px 10px; +} +.box-search_hotright .hsrch_word a, .box-search_hotright .hsrch_word_right a{ + padding-left: 5px; + color: #666; +} +.box-search_hotright .hsrch_word a:hover, .box-search_hotright .hsrch_word_right a:hover { + color: #1b81e5; + text-decoration: underline; +} +.box-search_hotright .hsword-span{ + display: block; + height: 23px; + line-height: 23px; + overflow: hidden; +} +.box-search_hotright .hsword-rank{ + display: block; + width: 12px; + height: 12px; + color: #fff; + line-height: 13px; + text-align: center; + font-weight: normal; + display: inline-block; + font-size: 12px; +} +.box-search_hotright .hsword-rank1 { + background-color: #f5702f; +} +.box-search_hotright .hsword-rank2 { + background-color: #aaa; +} +.overvis{ + overflow: visible; +}*/ + + + + + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ma/ma.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ma/ma.tpl new file mode 100755 index 000000000..d801705f8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/ma/ma.tpl @@ -0,0 +1,247 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ma/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/ma/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.eg/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.eg/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + detail = detail ? ' - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i].replace(q, '' + q + '') + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl.more.css new file mode 100755 index 000000000..3f2b91c52 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl.more.css @@ -0,0 +1,164 @@ +/*from inline css*/ +.box-search_tab a:focus { + outline:none; +} +.box-search_logo a:focus { + outline: none; +} +.box-search_logo dt a { + background: url(/widget/img/bg.png) -10px -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: -10px -87px; +} +.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +} +.btn-search_l, .btn-search_r { + display: none !important; +} +.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} +.btn-search_hover{ + border-color: #2F5BB7; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4C8FFD 0%, #357AE8 100%); +} + +.btn-search_click{ + border-color: #2B79E6; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4A8DFB 0%, #357AE8 100%); + box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); +} + +.skin-type-dark dt.box-search_logo_hover { + background: #737373; + background: rgba(0, 0, 0, 0.6); +} +.skin-type-dark .box-search_logos_show { + background: #8c8c8c; + background: rgba(0, 0, 0, 0.6); +} +.skin-type-dark .box-search_logos_show .box-search_logo_hover { + background: #737373; + background: rgba(0, 0, 0, 0.6); +} + + + + +/*------------------------suggest------------------------*/ +/*提示层外框*/ +.sug-search { + position:absolute; + top: 28px; + *top: 30px; + left: -1px; + border:1px solid #e3e4e6; + border-top: 0 none; + background:#fff; + width:528px; + color:#454545; + z-index:999; + white-space:nowrap; + overflow:hidden; +} +/*ie6 shim*/ +.sug-shim { + position:absolute; + top:-1px; + left:-1px; + z-index:-1; + filter:alpha(opacity="0"); + width:430px; + height:250px; +} +/*列表外框*/ +.sug-search ol { + font:bold 12px/23px Tahoma,arial,helvetica,clean,sans-serif; + cursor:default; +} +/*列表项*/ +.sug-search li { + padding: 3px 10px; + cursor: pointer; +} +.sug-search li b { + font: inherit; + display: inline; +} +/*选中样式*/ +.sug-search .sug-select { + background: #f5f7f7; +} +/*头部*/ +.sug-search .top { + font-weight:normal; + color:#999; + height:21px; + line-height:21px; + background:#eee; + padding:0 2px; +} +/*底部*/ +.sug-search .bot { + position:relative; + height:19px; + line-height:19px; + font-weight:normal; + border-top:1px solid #666; +} +/*高亮查询词*/ +.sug-search .sug-query { + font-weight:normal; +} +.sug-search font { + font-weight:normal !important; + color:#333 !important; +} + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo{border-width:0px; border-color: #5a5a5a;} +.skin-type-dark dt.box-search_logo_hover{background-color: #737373;} +.skin-type-dark .box-search_logos_show{background-color: #8c8c8c;} +.skin-type-dark .box-search_logos_show .box-search_logo_hover{background-color: #737373;} +.skin-type-dark .box-search_tab a{color: #ffffff;} + +/*搜索条中增加new提示*/ +.box-search_tab .new_add_prompt{ + display:block; + width:24px; + height:12px; + background: url(../img/tag_new_icon.png?__sprite) no-repeat 0 0; + position: absolute; + top: -6px; + left: -12px; +} +.box-search_tab .new_add_prompt_id{ + display:block; + width:28px; + height:14px; + background: url(../img/id_new_add_icon.png?__sprite) no-repeat 0 0; + position: absolute; + top: -8px; + left: -12px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl.tpl new file mode 100755 index 000000000..0986a92d0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl.tpl @@ -0,0 +1,118 @@ + +
                              +
                              + <%foreach $sBoxTag as $value%> + <%if $value.catagory != 'more'%> + <%if empty($body.searchboxTab[$value.catagory])%> + <%if $value@first%> + <%$value.title%> + <%else%> + <%if !empty($value.isNewAdd) &&$value.isNewAdd == 'true'%> + <%if !empty($value.area) && $value.area =="id" %> + <%assign var="tmpClassName" value="new_add_prompt_id"%> + <%else%> + <%assign var="tmpClassName" value="new_add_prompt"%> + <%/if%> + + <%$value.title%> + <%else%> + + <%$value.title%> + <%/if%> + <%/if%> + <%/if%> + <%else%> + +
                              +
                              + <%$value.title%> +
                              +
                              +
                              +
                              +
                              +
                              + <%/if%> + <%/foreach%> +
                              +
                              +
                              +
                              + <%$sBoxCount = 0%> + <%foreach $sBoxTag[0].engine as $value%><%if !empty($body.searchboxEngine[$value.id])%><%$sBoxCount = $sBoxCount + 1%><%/if%><%/foreach%> + +
                              +
                              + <%foreach $sBoxTag[0].engine as $value%> + <%if empty($body.searchboxEngine[$value.id])%> +
                              + + + + <%widget name="common:widget/keyboard/keyboard.tpl"%> + + + +
                              + <%break%><%/if%><%/foreach%> +
                              +
                              + + <%if !empty($hSearchWords.title)%> + <%$hSearchWords.title%>: + + <%foreach $hSearchWords.words as $val%> + <%if !empty($val.url)%> + <%$val.name%> + <%else%> + <%$val.name%> + <%/if%> + <%/foreach%> + + <%/if%> +
                              +
                              +
                              +
                              +<%script%> + conf.hSearchWords = <%json_encode($hSearchWords)%> || {}; + conf.emptyQuerySug = <%json_encode($body.emptyQuerySug)%>; +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl_inline.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl_inline.css new file mode 100755 index 000000000..5b7c978c3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/rtl/rtl_inline.css @@ -0,0 +1,511 @@ +/*.box-search_form .input div{ float: left;}*/ /*为啥加?会导致ps sug出现问题*/ +.box-search_keyboard { + padding: 1px; +} +/*============box_search=============*/ +.box-search { + margin: 20px auto 0; + width: 780px; +} +.box-search_inner { + height:68px; +} +/*box-search_tab*/ +.box-search_tab { + white-space: nowrap; + margin-right: 161px; + position: relative; + z-index: 8; + clear: both; +} +.box-search_tab a { + /*font-size: 12px;*/ + float:right; + padding: 4px 12px 3px; + margin-right: -1px; + text-decoration: none; + letter-spacing: normal; + position: relative; + z-index: 1; +} +.box-search_tab a:hover { + text-decoration: none; + background: #dcdcde; + border-radius: 2px; +} +/*.box-search_more { + line-height:normal; + position: absolute; + float:right; + cursor:pointer; + z-index:8; + top: -8px; + left: -7px; + border: 1px solid #edf0ef; + border-bottom: 0 none; +} +.box-search_more dt { + position: relative; + margin-top: 6px; +} +.box-search_more a:hover { + background: transparent; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more dt a { + margin: 0; + padding: 4px 9px 3px 17px; + color: #4c4c4c; + text-align: right; + display: block; + float: none; + line-height: 14px; + width: 30px; + overflow: hidden; +} +.box-search_more dt a:focus { + outline: none; +} +.box-search_more_hover { + background-color: #dcdcde; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.box-search_more .arrow, .box-search_more .arrow_bg { + position: absolute; + height: 0; + width: 0; + border: 3px dashed transparent; +} +.box-search_more .arrow { + border-top-color: #4ac29a; + border-top-style: solid; + top: 10px; + right: 42px; +} +.box-search_more .arrow_bg { + border-top-color: #edf0ef; + border-top-style: solid; + margin: -5px -3px 0 0; + _display: none; +} +.box-search_more_hover .arrow_bg { + border-top-color: #dcdcde; +} +.box-search_more_show .arrow { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #4ac29a; + border-bottom-style: solid; + top: 12px; +} +.box-search_more_show .arrow_bg { + border-top-color: transparent; + border-top-style: dashed; + border-bottom-color: #fff; + border-bottom-style: solid; + margin-top: -1px; +} +.box-search_more_show .box-search_more_hover .arrow_bg { + border-bottom-color: #f5f7f7; +} +.box-search_more_show { + border:1px solid #e3e4e6; + background: #fff; + left: auto; + right: 472px; +} +.box-search_more_show dt { + margin-top: 0px; + padding-top: 6px; +} +.box-search_more_show dt a { + background-position:left -351px !important; +} +.box-search_more_show .box-search_more_hover { + background-color: #f5f7f7; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + border-radius: 0px; +} +.box-search_more_show dd { + line-height: 31px; +} +.box-search_more_show dd a { + padding:0 9px 0 15px; + display:block; + float:none; + color: #666; + text-align: right; + margin:0; + overflow: hidden; +} +.box-search_more_hide { + display: none; +}*/ +/*.box-search_tab a:focus { + outline:none; +}*/ /*clear FF's focusborder*/ +.box-search_tab a.cur { + color:#00b075; /*font-weight:bold;*/ + cursor:default; + text-decoration: none; + font-weight: bold; +} +.box-search_sep { + /*display: block;*/ + float: right; + height: 6px; + /*line-height: 6px;*/ + margin-top: 8px; + border-left: 1px solid #b3b3b3; + position: relative; + z-index: 0; + margin-right: -1px; +} +/*box-search_logo*/ +.box-search_logo_wrap { + position: relative; + width: 155px; + height: 67px; + margin:-16px 0 0 5px; + float: right; + z-index: 6; +} +.box-search_logo { + position: absolute; + right: 0; + /*overflow:hidden;*/ + vertical-align:bottom; + /*text-align:center;*/ +} +.box-search_logo a { + padding-left: 18px; + display: block; +} +/*.box-search_logo a:focus { + outline: none; +}*/ +.box-search_logo dt , .box-search_logo dd { + padding: 10px 7px 10px 8px; + cursor: pointer; +} +/*.box-search_logo dt a { + background: url(/widget/img/bg.png) -10px -61px no-repeat; +} +dt.box-search_logo_hover { + background-color: #e3e4e6; + border-radius: 2px; +} +.box-search_logos_show .box-search_logo_hover { + background-color: #f5f7f7; + border-radius: 0px; +} +.box-search_logos_show { + background-color: #fff; + border: 1px solid #e3e4e6 +} +.box-search_logos_show dt a { + background-position: -10px -87px; +}*/ +.box-search_logo_hide { + display: none; +} +.box-search_logo img { + width:120px; + height:45px; +} +.box-search_logo_disabled { + background: none !important; + border: 1px solid #EDF0EF; +} +.box-search_logo_disabled dt.box-search_logo_hover, .box-search_logo_disabled dt a { + background: none !important; + cursor: default; +} + +/*box-search_form*/ +.box-search_form { + padding:3px 113px 5px 0px; +} +.box-search_form .input { + background-color: #fff; + border: 1px solid #d9d9d9; + border-top: 1px solid #bfbfbf; + margin-left: 13px; + position: relative; + z-index:5; + /*for IE9*/ + padding-right: 1px\9\0; +} +.box-search_form .input input { + border:none; + background:#fff; + width:491px; + float:right; + overflow:hidden; + height:20px; + font-size: 14px; + line-height:20px\9; + padding:4px 9px 3px 0px; + /**width: 488px; + *float: none;*/ + /*fix ie10 bug*/ + margin-right: 1px; +} +.box-search_form input, .box-search_form button:focus { + outline:none; +} +.box-search_form .input label { + position: absolute; + right: 10px; + top: 6px; + font-size: 14px; + color: #D7D8D9; + white-space: nowrap; +} +/*.box-search_form .box-search_focus { + border: 1px solid #4d90fe; +}*/ +.btn-search { + white-space:nowrap; + line-height:27px; + overflow: hidden; + /*_float: left; + *margin:0;*//*fix non-IE'problem because of vertical-align*/ + /*background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x;*/ + + + /*--css3--*/ + width: 70px; + border-radius: 2px; + border: 1px solid #3079ED; + background-color: #4787ED; + background-image: linear-gradient(-180deg, #4D8FFD 0%, #4787ED 100%); +} +/*.btn-search_l, .btn-search_r { + display: none !important; +}*/ +.btn-search_c { + /*background:url(../img/bg-search-btn.png?__sprite) repeat-x;*/ + vertical-align:top; + border:none; + color:#fff; + height:27px; + text-align:center; + width:70px; + font-weight: bold; + font-size: 15px; + cursor: pointer; + float: left; + background: none; +} +/*.btn-search_ico { + display: block; + margin: 0 auto; + width: 17px; + height: 17px; + background: url(../img/i-search.png?__sprite) no-repeat; + line-height: 27px; +} +.btn-search_hover{ + border-color: #2F5BB7; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4C8FFD 0%, #357AE8 100%); +} + +.btn-search_click{ + border-color: #2B79E6; + background-color: #357AE8; + background-image: linear-gradient(-180deg, #4A8DFB 0%, #357AE8 100%); + box-shadow: inset 0px 2px 3px 0px rgba(0,0,0,0.50); +}*/ +/* +.btn-search_hover .btn-search_l { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; +} +.btn-search_hover .btn-search_r { + background:url(../img/bg-search-btn-side-hover.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_hover .btn-search_c { + background:url(../img/bg-search-btn-hover.png?__sprite) repeat-x; +} +.btn-search_hover .btn-search_ico { + background: url(../img/i-search-hover.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_l { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; +} +.btn-search_click .btn-search_r { + background:url(../img/bg-search-btn-side-click.png?__sprite) no-repeat; + background-position:-3px 0; +} +.btn-search_click .btn-search_c { + background:url(../img/bg-search-btn-click.png?__sprite) repeat-x; +} +.btn-search_click .btn-search_ico { + background: url(../img/i-search-click.png?__sprite) no-repeat; +}*/ +.box-search_form .radios { + padding-top:4px; + width:480px;/*for IE9*/ +} +.box-search_form .radios label { + display:block; + padding-right:15px; + text-indent:-15px; + float:right; + margin-left:18px; + color:#666; + font-size: 13px; + white-space: nowrap; +} +.box-search_form .radios input { + vertical-align:top; + width:13px; + height:13px; + margin-left:5px; + vertical-align:bottom; + position:relative; + top:-1px; + overflow:hidden; +} + +/*set hot search words & search button*/ +.box-search_hsrch { + width: 620px; + margin-right: 160px; + overflow: hidden; + padding-top: 2px; + color: #919191; + height: 15px; + /*_margin-top:-14px;*/ +} +.hsrch_title { + font-weight: bold; + margin-left: 8px; + /*padding-right: 10px;*/ + color: #919191; +} +.hsrch_word span { + display: inline-block; + margin-left: 15px; +} +.hsrch_word a{ + color: #919191; + text-align: right; +} +.hsrch_word a:hover { + color: #00B075; + text-decoration: underline; +} +/*size setting*/ +/*.box-search-m .box-search_logo img { + width:107px; + height:40px; +} +.box-search-m .box-search_logo_wrap { + width: 142px; + height: 62px; + margin-top: -14px; +} +.box-search-m .box-search_logo dt a { + background-position: -10px -62px; +} +.box-search-m .box-search_logos_show dt a { + background-position: -10px -87px; +} +.box-search-m .box-search_tab { + margin-right: 148px; +} +.box-search-m .box-search_hsrch { + margin-right: 148px; +} +.box-search-s .box-search_logo img { + width:85px; + height:32px; +} +.box-search-s .box-search_logo_wrap { + width: 120px; + height: 54px; + margin-top: -9px; +} +.box-search-s .box-search_logo dt a { + background-position: -10px -67px; +} +.box-search-s .box-search_logos_show dt a { + background-position: -10px -93px; +} +.box-search-s .box-search_tab { + margin-right: 126px; +} +.box-search-s .box-search_hsrch { + margin-right: 126px; +}*/ + +/**************************** 深色换肤搜索框优化 *******************************/ +.skin-type-dark .box-search_logo { + border-width: 0px; +} +/*.skin-type-dark dt.box-search_logo_hover { + background: #737373; + background: rgba(0, 0, 0, 0.6); +} +.skin-type-dark .box-search_logos_show { + background: #8c8c8c; + background: rgba(0, 0, 0, 0.6); +}*/ +.skin-type-dark .box-search_logo_disabled { + background: transparent !important; + background: rgba(0, 0, 0, 0) !important; +} +/*.skin-type-dark .box-search_logos_show .box-search_logo_hover { + background: #737373; + background: rgba(0, 0, 0, 0.6); +}*/ +.skin-type-dark .box-search_tab a { + color: #ffffff; +} +body.skin-type-dark .box-search_tab a.cur { + color: #ffffff; +} +.skin-type-dark .box-search_tab a:hover { + background-color: #595959; + background: rgba(0, 0, 0, 0.6); +} +.skin-type-dark .hsrch_title { + color: #bbbbbb; +} +.skin-type-dark .hsrch_word a { + color: #bbbbbb; +} +.skin-type-dark .box-search_sep { + border-left-color: #bbbbbb; +} +.skin-type-dark span.hsrch_word a:hover { + color: #eeeeee; +} +.skin-type-dark .box-search_logo_disabled dt.box-search_logo_hover, +.skin-type-dark .box-search_logo_disabled dt a { + background: 0 !important; +} +.box-search_logo_disabled, +.box-search_logos_show { + border: 0; +} + +.box-search .placeholder-iefix{ + position: absolute; + top: 16px; + right: 11px; + color: #a9a9a9; + cursor: text; + font-size: 12px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/sa/sa.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/sa/sa.tpl new file mode 100755 index 000000000..0baf9c9af --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/sa/sa.tpl @@ -0,0 +1,275 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf: { + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/sa/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/sa/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google": { + requestQuery: "q", + url: "http://clients1.google.com.sa/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + "client": "hp", + "hl": "ar", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo": { + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-ura", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973", + callbackDataKey: "r", + requestParas: { + "output": "yjsonp", + "callback": "YUI.Env.DataSource.callbacks.yui_3_3_0_1_1312871021408973" + }, + templ: function(data) { + var _data = data["r"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.yt.www.suggest.handleResponse", + callbackDataNum: 1, + requestParas: { + "hl": "ar", + "ds": "yt", + "client": "youtube", + "hjson": "t", + "jsonp": "window.yt.www.suggest.handleResponse", + "cp": "2" + }, + + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_video": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss/", + callbackFn: "fxsearch", + callbackDataNum: 1, + requestParas: { + "nresults": 8, + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.sa/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "ar", + "client": "img", + "sugexp": "gsihc" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i][0] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_images": { + requestQuery: "command", + url: "http://gossip-ss.us.search.yahoo.com/gossip-us_ss", + callbackFn: "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp", + "nresults": 10, + "callback": "{callback}", + "callback": "YUI.Env.DataSource.callbacks.yui_3_5_1_1_1354169017899_293", + "pubid": 103, + "queryfirst": 1 + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.sa/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "ar", + "gl": "ar", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for (; i < len; i++) { + try { + detail = _data[i][9][0][0] || _data[i][9][0] || _data[i][9] || ""; + } catch (e) { + detail = "" + } + + /*detail = detail ? ' - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "wikimapia": { + url: null + }, + "wiki_ar": { + requestQuery: "search", + url: "http://ar.wikipedia.org/w/api.php", + callbackFn: "wikipedia.ar", + callbackDataNum: 1, + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.ar" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "filmes": { + requestQuery: "wds", + url: "http://sa.hao123.com/movie/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/search-box-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/search-box-async.js new file mode 100755 index 000000000..d834b4114 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/search-box-async.js @@ -0,0 +1,1294 @@ +/* +* Search box group +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + helper = require("common:widget/ui/helper/helper.js"), + hex_md5 = require('common:widget/ui/md5/md5.js'), + bubble = require('common:widget/ui/bubble/src/bubble.js'); +require("common:widget/ui/suggest/suggest.js"); +require('common:widget/ui/jquery/jquery.cookie.js'); + +Gl.searchGroup = function(o) { + + var _conf = conf.searchGroup, + type = o.type || "index", + logoPath = _conf.conf[type].logoPath, + + emptySug = conf.emptyQuerySug, + eptNew = emptySug && emptySug.newTip, + eptTpl = '
                            • #{n}#{q}#{newTle}
                            • ', + eptTipStu = false, // record empty sug tips open and close status + $sugTip, // empty sug tips + $sugNum, // empty sug number + + logo = $("#" + (o.logoId || "searchGroupLogo")), + logoGroup = $("#" + (o.logoGroupId || "searchGroupLogos")), + tabs = $("#" + (o.tabsId || "searchGroupTabs")), + form = $("#" + (o.formId || "searchGroupForm")), + input = $("#" + (o.inputId || "searchGroupInput")), + label = $("#" + (o.labelId || "searchGroupLabel")), + // radios = $("#" + (o.radiosId || "searchGroupRadios")), + btn = $("#" + (o.btnId || "searchGroupBtn")), + // more = $("#" + (o.moreId || "searchGroupMore")), + moreTab = $("#" + (o.moreTabId || "searchGroupMoreTab")), + params = $("#" + (o.paramsId || "searchGroupParams")), + // radioName = o.radioName || "searchGroupRadio", + + hSeWords = $("#hotSearchWords"), + webEngine = $("#searchGroupWebEngine"), + + btnWrap = btn.parent(), + inputWrap = input.parent(), + defaultN = _conf.conf[type].curN || 0, + curTab = $("a:eq(" + defaultN + ")", tabs), + tabsChildren = $("a", tabs), + //render data when init sug + defaultData = _conf.sug[_conf.list[curTab.attr("data-t")].engine[defaultN].id], + //record which form was selected in tabs + storeForm = {}, + onceTime = true, + logoHash = { + 'yahoo': 'yahoo', + 'google': 'google', + 'baidu': 'baidu', + 'defau': 'defau' + }, + $bd = $(document.body), + //自定义推荐的热搜词 + hSeWordsWithUrlTpl = '#{name}', + hSeWordsWithOutUrlTpl = '#{name}', + deleteHswordTimer = null, + + hSeWdConf = conf.hSearchWords,// hot search words config + hSeWdTpl1 = '#{index}#{name}', // hot search words with url + hSeWdTpl2 = '#{index}#{name}',// hot search words without url + hSeWordWp = hSeWords.find(".hsrch_word"), + hSeWordRightWp = hSeWords.find(".hsrch_word_right"), + hSeWordsHover = hSeWords.find(".hsrch_word_hover"), + timer, + hotTimer, + curWordTab = curTab.attr("data-t"), + + getCurLogo = function(attr) { + var tmpObj = null; + attr = attr.toLowerCase(); + for(var i in logoHash) { + if(attr.search(i) > -1) { + tmpObj = logoHash[i]; + break; + } + } + if(tmpObj === 'yahoo' && conf.country === 'jp') { + tmpObj = 'yahoo_jp'; + } + return (tmpObj || 'defau'); + }, + //smallLogoPath = "/resource/fe/headerTest/search/#{logo}.png", + + //reset the form about action and params + resetForm = function(data, n) { + + var ret = []; + var theLogoPath = $bd.hasClass("skin-type-dark")?(_conf.conf[type].logoPath+"dark/"):_conf.conf[type].logoPath; + var logoGroupDt = $("dt", logoGroup).clone(); + var isFixed = $bd.hasClass("header-fixed-up"); + // Fixed bug in IE8 + logoGroup.html(''); + logoGroup.append(logoGroupDt); + // rebinding logo element + logo = $("#" + (o.logoId || "searchGroupLogo"), logoGroupDt); + + form.attr("action", data[n].action); + input.attr("name", data[n].q); + if(isFixed) { + logo.attr("src", "/resource/fe/headerTest/search/" + getCurLogo(data[n].logo) + ".png"); + } else { + logo.attr("src", theLogoPath + data[n].logo + ".png"); + } + logo.attr("alt", data[n].name); + logo.parent().attr("title", data[n].name); + logo.parent().attr("data-n", n); + logo.attr("data-id", data[n].id); + + // $("dd", logoGroup).remove(); + + logoGroup.append(function () { + ret = []; + $.each(data, function(key, val) { + if(isFixed) { + ret.push('
                              ' + val.name + ''+ val.name + '
                              '); + } else { + ret.push('
                              ' + val.name + '
                              '); + } + }); + return ret.join(""); + }); + // fix: show errors when click radios on IE + /*setTimeout(function() { + radios.html(function() { + ret = []; + $.each(data,function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + }, 0);*/ + + params.html(function() { + ret = []; + $.each(data[n].params, function(key, val) { + ret.push(''); + }); + return ret.join(""); + }); + + if (data.length <= 1) { + logoGroup.addClass("box-search_logo_disabled"); + } else { + logoGroup.removeClass("box-search_logo_disabled"); + } + logoGroup.children().on("mouseenter", function() { + $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $(this).removeClass("box-search_logo_hover"); + }); + + if(emptySug) { + resetEmptySugTip(); + } + }, + + resetSug = function(data, n) { + data = _conf.sug[data[n].id]; + $.each(data, function(key, val) { + sug.o[key] = val; + }); + //fix more prams + !data.templ && (sug.o.templ = false); + !data.callbackFn && (sug.o.callbackFn = false); + !data.callbackDataKey && (sug.o.callbackDataKey = false); + !data.callbackName && (sug.o.callbackName = false); + !data.callbackDataNum && (sug.o.callbackDataNum = false); + !data.customUrl && (sug.o.customUrl = false); + + !data.customUrl && (sug.o.customUrl = false); + !data.charset && (sug.o.charset = undefined); + sug.reset(true); + }, + + // toggle for baidu sug + resetBaiduSug = function (data, n) { + + if (!baidu_sug) { + return; + } + + data = data ? data[n].baiduSug : false; + + if (data) { + baidu_sug.setMode(data.mod); + baidu_sug.toggle(true); + } else { + baidu_sug.toggle(false); + } + }, + + // toggle for PS video sug + resetBaiduVideoSug = function(data, n) { + if(!window["baidu_video_sug"]) { + return; + } + + data = data ? data[n].otherSug : false; + + if (data) { + baidu_video_sug.setMode(data.mod); + baidu_video_sug.toggle(true); + } else { + baidu_video_sug.toggle(false); + } + }, + + // reset hot search word when switch the tab + resetHotSearchWords = function(t) { + if(hSeWdConf.resetWords === "1") { + var _tpl = ""; + $.each(hSeWdConf[t] || hSeWdConf["words"], function(i, val) { + if(hSeWdConf.hotRightMod == "1"){ + if(i<10) { + _tpl += helper.replaceTpl(val.url ? hSeWdTpl1 : hSeWdTpl2, $.extend(val,{index:i+1,num:i<3?1:2})); + } + }else{ + _tpl += helper.replaceTpl(val.url ? hSeWdTpl1 : hSeWdTpl2, $.extend(val,{index:i+1,num:i<3?1:2})); + } + }); + hSeWordWp.html(_tpl); + curWordTab = hSeWdConf[t] ? t : "web"; + } + }, + + switchTab = function(tab, sugStay) { + tab = $(tab); + curTab.removeClass("cur"); + tab.addClass("cur"); + curTab = tab; + + var t = tab.attr("data-t"), + + list = _conf.list, + engines = list[t].engine, + engLen = engines.length; + //ps sug gut add tab changed name + tabCategoryName = t; + //if the last element is null, remove it + if($.isEmptyObject(engines[engLen-1])){ + engines.length = engLen - 1; + }; + //record current form(add the current type to storeForm as a key) + storeForm[t] || (storeForm[t] = 0); + + //reset form + resetForm(engines, storeForm[t]); + + //set placeholder + setPlaceholder(engines, storeForm[t]); + //reset suggest + !sugStay && resetSug(engines, storeForm[t]); + + // reset PS video sug + !sugStay && resetBaiduVideoSug(engines, storeForm[t]); + + // reset baidu sug + !sugStay && resetBaiduSug(engines, storeForm[t]); + + // reset hot search words + resetHotSearchWords(t); + + /* + //reset hot word + label.text(list[t].hotWords) + */ + + /* + setTimeout(function() { + input.select(); + }, 16); + */ + //keep the cursor in end + /*setTimeout(function() { + setCursorPos(input[0], input.val().length); + }, 16); */ + }, + + emptySugShow = function(config, engineId) { + var _tpl = '
                                '; + $.each(config.data, function(inx, val) { + inx = inx + 1; + _tpl += helper.replaceTpl(eptTpl, { + "q":val.value, + "cls":"hl_"+ inx, + "n": inx, + "newTle": (val.isNew ? eptNew : "") + }) + }); + _tpl += "
                              "; + form.find(".sug-search").html(_tpl).show(); + changeEptTipStatus(true); + + if(!$.store("search_" + engineId)) { + $.store("search_" + engineId, config.version, {expires: 5}); + $sugNum.hide(); + } + //form.addClass("ept-sug_show"); + }, + /** + * + * @used when form reset + * @purpose reset tip condition + * @return + */ + resetEmptySugTip = function() { + var curEngine = logo.attr("data-id"), + newNum = 0, + data = emptySug[curEngine], + storeVal = $.store("search_" + curEngine); + if(data) { + $sugTip.show(); + $.each(data.data, function(i, val) { + if(val.isNew) { + newNum++; + } + }); + if(!storeVal || (newNum && (storeVal !== data.version))) { + $sugNum.html(newNum).show(); + } else { + $sugNum.hide(); + } + } else { + $sugTip.hide(); + $sugNum.hide(); + } + }, + /** + * @description switch tip btn open and close status + * @param {boolean} status true is open, false|undefined is close + * @return + */ + changeEptTipStatus = function(status) { + if(status) { + $sugTip.addClass('sug-tip_open'); + } else { + $sugTip.removeClass('sug-tip_open'); + } + eptTipStu = status; + }, + + showMore = function() { + var more = $("dd", moreTab), + list = _conf.more, + ret = []; + if ($("dd", moreTab).length === 0) { + $.each(list, function() { + ret.push('
                              ' + this.name + '
                              '); + }); + moreTab.append(ret.join("")); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + } + if(moreTab.hasClass("box-search_more_show")) { + moreTab.removeClass("box-search_more_show"); + more.each(function () { + $(this).addClass("box-search_more_hide"); + }); + } + else { + moreTab.addClass("box-search_more_show"); + more.each(function () { + $(this).removeClass("box-search_more_hide"); + }); + } + }, + + showLogo = function () { + var n = logo.parent().attr("data-n"), + logoList = $("dd", logoGroup); + var isFix = $bd.hasClass("header-fixed-up"), + logLen = logoList.length; + if (logoGroup.hasClass("box-search_logos_show")) { + logoGroup.removeClass("box-search_logos_show"); + logoList.each(function () { + $(this).addClass("box-search_logo_hide").removeClass("box-search_logo_first box-search_logo_last"); + }); + } + else { + logoGroup.addClass("box-search_logos_show"); + logoList.each(function (key) { + var $that = $(this); + + if (onceTime) { + var $imgEle = $that.find("img").first(); + if ($imgEle.attr("data-src")) { + $imgEle.attr("src", $imgEle.attr("data-src")); + $imgEle.removeAttr("data-src"); + } + } + + key != n && $that.removeClass("box-search_logo_hide"); + if (isFix && (logLen > 1) && (key != n)) { + if(n == 0) { + if(key === 1) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-1) { + $that.addClass("box-search_logo_last"); + } + } else if(n == logLen-1) { + if(key === 0) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-2) { + $that.addClass("box-search_logo_last"); + } + } else { + if(key === 0) { + $that.addClass("box-search_logo_first"); + } + if(key === logLen-1) { + $that.addClass("box-search_logo_last"); + } + } + } + }); + onceTime = false; + } + }, + + //disable selection for input elements + disableSelection = function(el) { + if (typeof el.onselectstart != "undefined") { //IE + el.onselectstart = function() { + return false; + } + } else if (typeof el.style.MozUserSelect != "undefined") { //FF + el.style.MozUserSelect = "none"; + } else { //Opera + el.onmousedown = function() { + return false; + } + } + }, + + setCursorPos = function(obj, pos) { + if (obj.setSelectionRange) { + obj.focus(); + obj.setSelectionRange(pos, pos); + } else if (obj.createTextRange) { + var range = obj.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + }, + //set placeholder + setPlaceholder = function(data, n){ + var _pl = data[n].placeholder || ""; + + input.attr("placeholder", _pl); + + //ie89浏览器不支持placeholder fix + var supportPlaceholder = ('placeholder' in document.createElement('input')); + if (!supportPlaceholder) { + var plElem = $('.box-search .placeholder-iefix'); + if (!plElem.length) { + if (_pl!=="") { + //pl不为空且未创建过默认词dom + var placeholderTpl = ''+_pl+''; + input.before(placeholderTpl); + }else{ + return; + } + }else{ + //已创建 只更改文案 + plElem.html(_pl); + } + input.on({ + focus: function() { + $(this).prev().hide(); + }, + blur: function() { + $(this).val() == "" && $(this).prev().show(); + } + }); + $('.box-search').on('click', '.placeholder-iefix', function(){ + $(this).next().focus(); + }); + } + }, + rightHotWord = function(){ + hSeWords.on("mouseenter", function(){ + hotTimer = setTimeout(function(){ + hSeWordRightWp.hide(); + hSeWordsHover.show(); + hSeWords.addClass('overvis'); + }, 300); + + }).on( "mouseleave", function(){ + hotTimer && clearTimeout(hotTimer); + hSeWordRightWp.show(); + hSeWordsHover.hide(); + hSeWords.removeClass('overvis'); + } ); + hSeWordRightWp.on( "mouseenter", function(){ + clearInterval( timer ); + timer = null; + } ).on( "mouseleave", function(){ + rightHotWordSlide(); + } ); + }, + rightHotWordSlide = function(){ + var slideItems = hSeWordRightWp.find( ".hsword-span" ); + timer = setInterval( function(){ + hSeWordRightWp.animate( { + top : -14 + "px" + }, 400, function(){ + hSeWordRightWp.append( hSeWordRightWp.find( ".hsword-span" ).first() ); + hSeWordRightWp.css( { + top : 0 + } ); + } ); + }, 4000 ); + }, + //sug instantiation + sug = Gl.suggest(input[0], { + classNameWrap: "sug-search", + classNameQuery: "sug-query", + classNameSelect: "sug-select", + //classNameClose: "sug-close", + delay: _conf.conf[type].delay, + n: _conf.conf[type].n, + autoFocus: false, + requestQuery: defaultData.requestQuery, + requestParas: defaultData.requestParas, + url: defaultData.url, + callbackFn: defaultData.callbackFn, + callbackDataKey: defaultData.callbackDataKey, + onQueryChange: function(val) { + var da = emptySug && emptySug[logo.attr("data-id")]; + if (da) { + if (!val) { + emptySugShow(da, logo.attr("data-id")); + } else { + changeEptTipStatus(); + } + } + }, + onKeyEsc: function() { + var da = emptySug && emptySug[logo.attr("data-id")]; + if (da) { + changeEptTipStatus(); + } + }, + onCheckForm: function(form) { + + if( !(/^hao123$/.test(logo.attr("data-id"))) ) return; + + if( !$(form).find("input[name='haobd']").get(0) ) { + $(form).append(""); + } + }, + onSearchDirect: function(li, q, prefix) { + var img = new Image(), + enco = encodeURIComponent, + collect = [], + _type = curTab.attr("data-t"), + url = "http://search.hao123.co.th/r/cl/i18n.gif?fm=se&st=3&rsv_sugtype=cr&lang=th-TH", + href = $( $(li).find("a").get(0) ).attr("href"), + title = $( $(li).find("a .sug-hl").get(0) ).text(), + + conf = { + url: href, + q: q, + title: title, + prefixsug: prefix, + haobd: $.cookie("BAIDUID"), + t: +new Date + }; + + + img.src = url + "&" + $.param(conf); // PS的统计 + + var utObj = { + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId: "search", + tab: _type + }; + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + // 我们的统计 + /*if (_conf.conf.sort) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + sort: _conf.conf.sort, + modId:"search" + }); + } else { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: enco(q), + url: href, + element: "sug", + modId:"search" + }); + }*/ + }, + onMouseSelect: function(li) { + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action; + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + }, 16); + } + input.select(); + + var _type = curTab.attr("data-t"); + var utObj = { + type: "click", + position: "search", + engine: _conf.list[_type].engine[storeForm[_type]].id.toLowerCase(), + value: encodeURIComponent(input.val()), + modId: "search", + element: "sug", + tab: t + }; + + if ($(li).hasClass("ept-sug-li")) { + utObj["element"] = "ept-sug"; + } + if ($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + UT.send(utObj); + }, + templ: defaultData.templ + }); + + if(emptySug) { + var cssStyl; + if(conf.dir === "rtl") { + cssStyl = '.box-search .sug-tip{cursor:pointer;position:absolute;left:27px;}' + + '.header-fixed-up .box-search .sug-tip{left:55px;}' + + '.box-search .sug-tip i{position:absolute;left:10px;top:10px;' + + 'width:0;height:0;border-top:6px solid #999;border-right:6px' + + ' solid transparent;border-left:6px solid transparent;font-size:' + + '0;line-height:0;}.box-search .sug-tip .sug-tip-new{width:18px;' + + 'height:18px;line-height:18px;position:absolute;text-align:' + + 'center;left:7px;top:-9px;font-size:12px;border-radius:10px;' + + 'background:#f66f2e;color:#fff;}.box-search .sug-tip_open i{border' + + '-bottom:6px solid #999;border-top:6px solid transparent;top:4px;}' + + '.box-search .ept-sug-li .num{display:block;float:right;width:16px;' + + 'height:16px;line-height:16px;color:#fff;font-size:12px;' + + 'background-color:#b2b2b2;text-align:center;' + + 'margin:7px 0 0 10px;}.box-search .ept-sug-li .new{padding-right:5px;' + + 'font-size:12px;color:#f00;}.box-search .sug-search .hl_1 .num' + + '{background-color:#ff4e17;}.box-search .sug-search .hl_2 .num' + + '{background-color:#ff7013;}.box-search .sug-search .hl_3 .num' + + '{background-color:#ff9b18;}.box-search .ept-sug-li{white-' + + 'space:nowrap;overflow:hidden;height:30px;font-size:13px;' + + 'line-height:30px;font-weight:normal;padding:0 8px;}' + + '#searchGroupInput::-ms-clear{display:none}'; + } else { + cssStyl = '.box-search .sug-tip{cursor:pointer;position:absolute;right:0;}' + + '.header-fixed-up .box-search .sug-tip{right:28px;}' + + '.box-search .sug-tip i{position:absolute;right:10px;top:10px;' + + 'width:0;height:0;border-top:6px solid #999;border-right:6px' + + ' solid transparent;border-left:6px solid transparent;font-size:' + + '0;line-height:0;}.box-search .sug-tip .sug-tip-new{width:18px;' + + 'height:18px;line-height:18px;position:absolute;text-align:' + + 'center;right:7px;top:-9px;font-size:12px;border-radius:10px;' + + 'background:#f66f2e;color:#fff;}.box-search .sug-tip_open i{border' + + '-bottom:6px solid #999;border-top:6px solid transparent;top:4px;}' + + '.box-search .ept-sug-li .num{display:block;float:left;width:16px;' + + 'height:16px;line-height:16px;color:#fff;font-size:12px;' + + 'background-color:#b2b2b2;text-align:center;' + + 'margin:7px 10px 0 0;}.box-search .ept-sug-li .new{padding-left:5px;' + + 'font-size:12px;color:#f00;}.box-search .sug-search .hl_1 .num' + + '{background-color:#ff4e17;}.box-search .sug-search .hl_2 .num' + + '{background-color:#ff7013;}.box-search .sug-search .hl_3 .num' + + '{background-color:#ff9b18;}.box-search .ept-sug-li{white-' + + 'space:nowrap;overflow:hidden;height:30px;font-size:13px;' + + 'line-height:30px;font-weight:normal;padding:0 8px;}' + + '#searchGroupInput::-ms-clear{display:none}'; + } + input.after(''); + $sugTip = form.find(".sug-tip"); + $sugNum = $sugTip.find(".sug-tip-new"); + + require.loadCss({ + content: cssStyl + }); + + resetEmptySugTip(); // fix when first engine has empty sug + + $sugTip.on("click", function() { + var curEngine = logo.attr("data-id"); + + if(eptTipStu) { + form.find(".sug-search").hide(); + changeEptTipStatus(); + } else { + emptySugShow(emptySug[curEngine], curEngine); + } + input.focus(); + }); + + input.on("click", function() { + var curId = logo.attr("data-id"); + if(!$.trim($(this).val()) && emptySug[curId]) { + emptySugShow(emptySug[curId], curId); + } + }); + input.on("blur", function() { + if(emptySug[logo.attr("data-id")]) { + $sugTip.removeClass('sug-tip_open'); + form.find(".sug-search").hide(); + } + }); + $(document).on("mousedown", function(e) { + var $curObj = $(e.target), + aimTarget = $curObj.closest(input).length || $curObj.closest($sugTip).length || $curObj.closest(btnWrap).length || 0; + if(!aimTarget) { + eptTipStu = false; + } + }); + } + //ps sug gut add tab + window.tabCategoryName = curTab.attr("data-t"); + //clear the input's value after refresh + input.val(""); + //some browsers may keep form's status after refresh + // $("[name = radioName]:first").attr("checked", true); + + //record the default form'n + storeForm[curTab.attr("data-t")] = 0; + //init placeholder + _conf.list[curTab.attr("data-t")].engine[0].placeholder && setPlaceholder(_conf.list[curTab.attr("data-t")].engine,storeForm[curTab.attr("data-t")]); + //select text in input after submit + form.on("submit", function() { + // input.select(); + var t = curTab.attr("data-t"), + _action = _conf.list[t].engine[storeForm[t]].action, + _url = _conf.list[t].engine[storeForm[t]].url, + isBlank = false, + _placeholder = _conf.list[t].engine[storeForm[t]].placeholder; + /*var radioEl = $("input", radios); + for(var i = 0; i < radioEl.length; i++) { + if(radioEl.eq(i).attr("checked")) { + var checkedRadio = radioEl.eq(i); + } + } + if(t == "shopping" && checkedRadio.attr("id") == "searchGroupRadio_0") { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + }*/ + //default placeholder submit + if($.trim(input.val()) === "" && _placeholder) { + input.val(_placeholder); + } + /* cancel hot word + // set input's value to the hot word if it was blank + if($.trim(input.val()) === "") { + if($.trim(label.text()) === ""){ + var action = _action && _url ? _url : _action; + form.attr("action", action); + } else { + input.val(label.text()); + input.css("color", "#fff"); + isBlank = true; + } + } else {*/ + if(/^hao123$/.test(logo.attr("data-id"))) { + if(!form.find("input[name='haobd']").get(0)) { + form.append(""); + } + } + form.attr("action", _action); + //} + + // set charset to big5 while the engine is ruten + if(t == "shopping" && /ruten.png/.test(logo.attr("src"))) { + form[0].acceptCharset = document.charset = "big5"; + } + else { + form[0].acceptCharset = document.charset = "utf-8"; + } + var utObj = { + type: "click", + position: "search", + engine: _conf.list[t].engine[storeForm[t]].id.toLowerCase(), + modId: "search", + element: "input", + tab: t + }, + val = encodeURIComponent(input.val()); + /*if (_conf.conf.sort) { + utObj.sort = _conf.conf.sort; + } else { + if(conf.country === "tw" && $(document.body).hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + }*/ + if($bd.hasClass("header-fixed-up")) { + utObj.sort = "header"; + } + //if(conf.country != "jp") { + utObj.value = val; + //} + UT.send(utObj); + //reset input after search + if(isBlank) { + setTimeout(function() { + input.val(""); + input.removeAttr("style"); + }, 16); + } else { + input.select(); + } + //fix action + if(/#\{([^}]*)\}/mg.test(_action)) { + form.attr("action", helper.replaceTpl(_action, {q: encodeURIComponent(input.val())})); + input.attr("disabled", true); + setTimeout(function() { + input.attr("disabled", false); + input.select(); + }, 16); + } + //no action while engine is hao123 and input val is blank + /*if(/^hao123$/.test(logo.attr("data-id")) && input.val() === "") { + return false; + }*/ + }); + hSeWdConf.hotRightMod == "1" && rightHotWordSlide(); + hSeWdConf.hotRightMod == "1" && rightHotWord(); + + + //把个人热搜词排在CMS配置的热搜词之前 + var renderPersonalHotSearchWords = function( result ){ + + var dom = "", + len = 5; + + result = result || []; + result = result.concat(conf.hSearchWords.words); + len = Math.min( result.length,len ); + for (var i = 0; i < len; i++) { + var data = result[i], + currentTpl = data.url ? hSeWordsWithUrlTpl : hSeWordsWithOutUrlTpl, + frc = data.name ? "true" : ""; + + dom = dom + helper.replaceTpl( currentTpl,{"url" : data.url || "","name" : data.word || data.name,"frc" : frc}); + }; + + $(".hsrch_word").html(dom); + }, + //获取个人热搜词 + getPersonalHotSearchWords = function(){ + var result = "", + params = "?app=recomquery&act=contents&vk=0&num=5&country=" + conf.country; + + + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType : "jsonp", + jsonp : "jsonp", + jsonpCallback : "ghao123_" + hex_md5(params,16), + success : function ( result ) { + renderPersonalHotSearchWords( result.content.data ); + }, + error : function(){ + renderPersonalHotSearchWords(); + } + }); + + }, + //把用户删除的热搜词加入黑名单 + deletePersonalHotSearchWords = function( word ){ + var params = "?app=recomquery&act=delete&vk=0&num=5&content=" + encodeURIComponent(word) + "&country=" + conf.country, + result = ""; + + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType : "jsonp", + jsonp : "jsonp", + jsonpCallback : "ghao123_" + hex_md5(params,16), + success : function( result ){ + renderPersonalHotSearchWords( result.content.data ); + UT.send({ + modId : "hot-word", + position : "delete", + type : "click", + ac : "b", + value : encodeURIComponent(word) + }); + }, + error : function(){ + renderPersonalHotSearchWords(); + } + }); + }, + handlePersonalSwitch = function () { + + var cookie = $.cookie.get("pHotWord"), + icon = hSeWords.find(".i-personal"), + title = conf.hSearchWords; + + if(cookie !== null) { + $.store("pHotWord", cookie, {expires: 2000}); + $.cookie.set("pHotWord", null); + } + cookie = $.store("pHotWord"); + + if(!cookie || cookie == "1"){ + icon.addClass("on-personal"); + getPersonalHotSearchWords(); + icon.attr("title",title.showTip); + } else { + icon.addClass("off-personal"); + renderPersonalHotSearchWords(); + icon.attr("title",title.hideTip); + } + }, + offRecordPersonal = function () { + var params = "?app=recomquery&act=close&vk=0&country=" + conf.country; + + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType : "jsonp", + jsonp : "jsonp", + jsonpCallback : "ghao123_" + hex_md5(params,16), + success : function( result ){} + }); + }, + onRecordPersonal = function () { + var params = "?app=recomquery&act=open&vk=0&country=" + conf.country; + + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType : "jsonp", + jsonp : "jsonp", + jsonpCallback : "ghao123_" + hex_md5(params,16), + success : function( result ){ + } + }); + UT.send({ + modId : "hot-word", + position : "empty", + type : "click", + ac : "b" + }); + }; + //get personal hot words + conf.hSearchWords && conf.hSearchWords.showPersonalHotSearchWords && handlePersonalSwitch(); + + //disableSelection + disableSelection(tabs[0]); + // disableSelection(radios[0]); + + resetBaiduVideoSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + resetBaiduSug(_conf.list[curTab.attr('data-t')].engine, defaultN); + + //focus the input when init + + //to let lv2 page NOT to auto focus SEARCH INPUT! by NE + if(o.autoFocus == null){ + o.autoFocus = true; //default TRUE! + } + if(o.autoFocus) { + input.focus(); + } + + btn.on("mousedown", function() { + btnWrap.addClass("btn-search_click"); + }); + btn.on("mouseup", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseout", function() { + btnWrap.removeClass("btn-search_click"); + }); + btn.on("mouseenter", function() { + btnWrap.addClass("btn-search_hover"); + }); + btn.on("mouseleave", function() { + btnWrap.removeClass("btn-search_hover"); + }); + input.on("focus", function() { + inputWrap.addClass("box-search_focus"); + label.hide(); + }); + input.on("blur", function() { + inputWrap.removeClass("box-search_focus"); + // $.trim(input.val()) === "" && label.show(); + }); + logoGroup.children().on("mouseenter", function() { + $(this).addClass("box-search_logo_hover"); + }); + logoGroup.children().on("mouseleave", function() { + $(this).removeClass("box-search_logo_hover"); + }); + moreTab.children().on("mouseenter", function() { + $(this).addClass("box-search_more_hover"); + }); + moreTab.children().on("mouseleave", function() { + $(this).removeClass("box-search_more_hover"); + }); + + tabs.on("mousedown", function(e) { + var el = e.target, + tabTo; + el.tagName === "SPAN" && (el = el.parentNode); + //el.tagName !== "DT" && !hasClass(el, "cur") && !hasClass(el, "more") && switchTab(el); + tabTo = el.getAttribute("data-t"); + if(tabTo) { + switchTab(el); + UT.send({ + type: "click", + position: "switchTab", + modId: "search", + sort: tabTo + }); + } + form.acceptCharset = document.charset = "utf-8"; + + // e.stopPropagation(); + + // focus the input when tab element exchanges + setTimeout(function() { + input.focus(); + // clearTimeout(t); + }, 5); + }); + conf.pageType !=="lv2" && window["PDC"] && PDC.mark("c_sxvi"); + moreTab.on("mousedown", function(e) { + var el = e.target; + if(el.parentNode.tagName === "DD") { + setTimeout(showMore, 200); + }else { + showMore(); + } + }); + + $(document).on("mousedown", function(e) { + var el = e.target; + logoGroup.hasClass("box-search_logos_show") && el !== logoGroup[0] && !$.contains(logoGroup[0], el) && showLogo(); + moreTab.hasClass("box-search_more_show") && el !== moreTab[0] && !$.contains(moreTab[0], el) && showMore(); + // more.css("display") === "block" && el !== moreTab[0] && !$.contains(moreTab[0], el) && !$.contains(more[0], el) && showMore(); + }); + + logoGroup.on("click", function(e) { + var el = e.target, + $el = $(el), + $ta = el.tagName, + t = curTab.attr("data-t"), + n = storeForm[t], + _n, + engines = _conf.list[t].engine, + engLen = engines.length; + + //remove the last null ,IE8 bug + if($.isEmptyObject(engines[engLen-1])){ + engines.length = engLen - 1; + }; + if ($ta === "IMG"||$ta === "SPAN") { + _n = ~~$el.parent().attr("data-n"); + } else if ($ta === "A") { + _n = ~~$el.attr("data-n"); + } else { + _n = ~~$el.children().attr("data-n"); + } + + if(curTab.attr("data-t") == "web") { + webEngine.attr("data-num", _n); + } + //input.select(); + //keep the cursor in end + form[0].acceptCharset = document.charset = "utf-8"; + /*setTimeout(function() { + setCursorPos(input[0], input.val().length); + }, 16);*/ + + if(_n !== n) { + storeForm[t] = _n; + resetForm(engines, _n); + setPlaceholder(engines, _n); + //reset suggest + resetSug(engines, _n); + + //reset PS video sug + resetBaiduVideoSug(engines, _n); + + //reset baidu sug + resetBaiduSug(engines, _n); + } + showLogo(); + + }); + // realize hot search words module + hSeWords.on("click", function(e) { + var tar = e.target, + href = $(tar).attr("href"), + //data_n = webEngine.attr("data-num"), + engine = _conf.list[curWordTab].engine[0], // default first search engine + urlPath = engine.action, // url string except query string. some search engine end with '?' + query = engine.q, // query variable + param = $.param(engine.params), // like a=b&b=2 + hadlParam = param ? ("&"+param) : "", // like &a=b&b=2 or "" + url = ""; + + if(tar.tagName.toLowerCase() === "a" && href === "#") { + // handled url + url = urlPath + (urlPath.charAt(urlPath.length-1) == "?" ? "" : "?") + query + "=" + encodeURIComponent($(tar).text()) + hadlParam; + window.open(url); + } + + }); + + // hot search word send search action UT + hSeWords.on("mousedown", "a", function(e) { + UT.send({ + type: "click", + position: "search", + engine: _conf.list[curWordTab].engine[0].id, + modId: hSeWdConf.hotRightMod == "1" ? "hot-word-right" : "hot-word", + tab: curWordTab, + value: encodeURIComponent($.trim($(this).attr("data-val"))) + }); + e.stopPropagation(); // avoid links auto UT + }); + + if( conf.hSearchWords && conf.hSearchWords.showPersonalHotSearchWords ){ + hSeWords.on("click",".i-close",function(){ + var el = $(this).parent(); + + el.fadeOut(); + deletePersonalHotSearchWords( el.find("a").text() ); + }). + on("mouseover",".i-close",function(){ + deleteHswordTimer && clearTimeout(deleteHswordTimer); + $(this).show(); + }). + on("mouseleave",".i-close",function(){ + $(".i-close").hide(); + deleteHswordTimer && clearTimeout(deleteHswordTimer); + }). + on("mouseover",".hsword-span",function(){ + var $this = $(this); + + $(".i-close").hide(); + deleteHswordTimer && clearTimeout(deleteHswordTimer); + !$this.attr("frc").length && $(this).find(".i-close").show(); + }). + on("mouseleave",".hsword-span",function(){ + var $this = $(this); + + deleteHswordTimer = setTimeout(function(){ + $(".i-close").hide(); + },200); + + }). + on("click",".on-personal",function(){ + var content = ''+conf.hSearchWords.deleteTip+'' + +''+conf.hSearchWords.confirm+'' + +''+conf.hSearchWords.cancle+'', + option = { + 'wrapOpt': { + 'modId': 'hot-word', + 'content': content + }, + 'pos': { + 'left': -20, + 'top': 30 + } + }, + tip = null, + bubble = $(".ui-bubble-hot-word"), + cookie = $.store("pHotWord"); + + if( bubble.length ){ + bubble.show(); + } else { + tip = hSeWords.bubble(option), + tip.show(); + } + UT.send({ + modId: "hot-word", + position: "switch", + sort: "off", + ac: "b" + }); + + }). + on("click",".off-personal",function(){ + $(this).removeClass("off-personal").addClass('on-personal').attr("title",conf.hSearchWords.showTip); + $.store("pHotWord","1",{expires: 2000}); + UT.send({ + modId: "hot-word", + position: "switch", + sort: "on", + ac: "b" + }); + onRecordPersonal(); + }); + $(document).on("click",".ui-bubble-hot-word .btn-confirm",function(){ + $(".ui-bubble-hot-word").hide(); + hSeWords.find(".i-personal").removeClass("on-personal").addClass("off-personal").attr("title",conf.hSearchWords.hideTip); + $.store("pHotWord","0",{expires: 2000}); + renderPersonalHotSearchWords(); + UT.send({ + modId: "hot-word", + position: "switch", + sort: "confirm", + ac: "b" + }); + offRecordPersonal(); + }).on("click",".ui-bubble-hot-word .btn-cancle,.ui-bubble-hot-word .ui-bubble_close",function(){ + $(".ui-bubble-hot-word").hide(); + UT.send({ + modId: "hot-word", + position: "switch", + sort: "cancle", + ac: "b" + }); + }); + } + + + if (_conf.conf.tn) { + var timInter = _conf.conf.tn.timeInterval, + timeStamp = _conf.conf.tn.timeStamp, + isInList = _conf.conf.tn.isInList, + separTime = parseInt(_conf.conf.tn.serverTime) - parseInt(timeStamp), + searGroup = $(".box-search").parent(); + if (isInList > 0 && separTime < timInter) { + searGroup.next().css("margin-top", "10px"); + searGroup.hide(); + } + } + + /*for header when fixed & width = 40px*/ + var $window = $(window), + recordTab = null, // 吸顶时刻如果tab不是web的话记录当前tab + restoreTo = function() { // 吸顶变正常时恢复之前的tab + if(recordTab) { + switchTab(recordTab); + } else { + switchTab($("a[data-t='web']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }, + transTo = function() { // 正常变吸顶时切到web的tab + if (curTab.attr("data-t") != "web") { + recordTab = curTab; + switchTab($("a[data-t='web']", tabs)); + } else { + recordTab = null; + switchTab($("a[data-t='web']", tabs), true); + logoGroup.removeClass("box-search_logos_show"); + } + }; + + $window.on("headerFixed.transTo", function() { + transTo(); + }); + $window.on("headerFixed.restore", function() { + restoreTo(); + }); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/search-box.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/search-box.tpl new file mode 100755 index 000000000..68ae71f96 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/search-box.tpl @@ -0,0 +1,105 @@ +<%* 搜索引擎根据TN号显隐*%> +<%foreach $body.searchBox.sBoxTag as $value%> + <%foreach $value.engine as $engine%> + <%if !empty($engine.tn[0].param)%> + <%foreach $engine.tn as $tn%> + <%if $tn.param == $root.urlparam.tn%> + <%$body.searchboxEngine[$engine.id] = 'true'%> + <%/if%> + <%/foreach%> + <%/if%> + <%/foreach%> +<%/foreach%> + +<%assign var="sBoxTag" value=$body.searchBox.sBoxTag%> +<%assign var="hSearchWords" value=$body.searchBox.hotSearchWords%> +<%assign var="sBtnWords" value=$body.searchBox.searchBtnWords%> +<%* 搜索框 --- 首屏模块 inline css*%> +<%style%> + <%if $head.dir=='ltr'%> + @import url('/widget/search-box/ltr/ltr_inline.css?__inline'); + <%else%> + @import url('/widget/search-box/rtl/rtl_inline.css?__inline'); + <%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="common:widget/search-box/ltr/ltr.more.css"%> +<%else%> +<%require name="common:widget/search-box/rtl/rtl.more.css"%> +<%/if%> + +<%widget name="common:widget/search-box/`$head.dir`/`$head.dir`.tpl"%> +<%widget name="common:widget/search-box/`$sysInfo.country`/`$sysInfo.country`.tpl"%> +<%script%> + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/search-box/search-box-async.js"], function ($) { + var autoFocusSearch = true; + <%if $body.extAppMod%> + autoFocusSearch = false; //if app show DO NOT autoFocus + <%/if%> + <%if !empty($body.searchBox.sugUrl)%> + var head = document.getElementsByTagName("head")[0]; + var requestScript = function(url, onsuccess, onerror, timeout) { + + var script = document.createElement('script'); + if (onerror) { + var tid = setTimeout(function() { + script.onload = script.onreadystatechange = script.onerror = null; + timeout(); + }, 5000); + + script.onerror = function() { + clearTimeout(tid); + onerror(); + }; + + script.onload = script.onreadystatechange = function() { + if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) { + script.onload = script.onreadystatechange = null; + script = undefined; + clearTimeout(tid); + onsuccess(); + } + } + } + script.type = 'text/javascript'; + script.src = url; + head.appendChild(script); + }; + + requestScript("<%$body.searchBox.sugUrl%>", function() { + baidu_sug.setMode('baidu'); + baidu_sug.toggle(false); + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "success"}); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "error"}); + }, function() { + baidu_sug = false; + Gl.searchGroup({ + type: conf.pageType, + autoFocus: autoFocusSearch + }); + UT && UT.send && UT.send({type: "others", modId: "search", position: "timeout"}); + }); + <%else%> + baidu_sug = false; + Gl.searchGroup({type: conf.pageType, autoFocus: autoFocusSearch}); + <%/if%> + + <%if !empty($body.searchBox.sugMoreUrl)%> + setTimeout(function() { + window["require"] && require.async("<%$body.searchBox.sugMoreUrl%>"); + }, 1e3); + <%/if%> + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/th/th.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/th/th.tpl new file mode 100755 index 000000000..e78f2b646 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/th/th.tpl @@ -0,0 +1,405 @@ +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +require.async('common:widget/ui/jquery/jquery.js', function () { +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/th/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + <%if isset($body.searchBox.sort)%>, sort: "<%$body.searchBox.sort%>"<%/if%> + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + <%if !empty($engine.otherSug)%>otherSug:{mod: "<%$engine.otherSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "hao123": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://www.baidu.co.th/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "thai", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_th": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "th-TH", + "authuser": "0" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.us.search.yahoo.net/gossip-us-sayt/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "th", + "client": "img", + "ds": "i", + "cp": "4" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "hao123_images": { + requestQuery: "wd", + url: "http://sugimg.hao123.co.th/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: { + "prod": "image_thai" + }, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "ps_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://www.baidu.co.th/r/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + requestParas: { + "prod": "video_thai", + "cb": "window.bdsug.sug" + }, + templ: function(data) { + var _data = data['s'] || [], + q = data['q'], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "th", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.co.th/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "th", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "mthai": { + url: null + }, + "4shared": { + requestQuery: "search", + url: "http://dc413.4shared.com/network/search-suggest.jsp", + callbackFn: "ajaxSuggestions.jsonpCallback", + callbackDataKey: "suggestions", + requestParas: { + "format": "jsonp" + }, + customUrl: function(para) { + return this.o.url + "?search=" + btoa(this.q) + "&format=jsonp"; + }, + templ: function(data) { + var _data = data["suggestions"] || [], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i] + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filestube": { + requestQuery: "q", + url: null, + callbackFn: "filestube123", + callbackDataKey: "r", + charset: "utf-8", + requestParas: { + "callback": "filestube123", + "t": +new Date + }, + customUrl: function(para) { + return this.o.url + "/" + encodeURIComponent(this.q) + "?" + para.substr(1); + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.co.th/maps/suggest", + callbackFn: "_xdc_._bgnkibby8", + callbackDataKey: 3, + requestParas: { + "cp": "2", + "hl": "th", + "gl": "th", + "v": "2", + "clid": "1", + "json": "a", + "ll": "21.902278,101.469727", + "spn": "5.706298,39.506836", + "auth": "ac0dbe60:A6KQ3ztz8bQ13_rnpShsJPs6jOU", + "src": "1", + "num": "5", + "numps": "5", + "callback": "_xdc_._bgnkibby8" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : "";*/ + + ret.push('
                            • ' + _data[i][0] + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_map": { + requestQuery: "key", + url: "http://search2.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "ds": "poi,poi2,poi3,s_pg", + "json": "1", + "num": "20", + "anyorder": "1", + "count": "19" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "longdo_dict": { + requestQuery: "key", + url: "http://search.longdo.com/BWTSearch/HeadSearch", + callbackFn: "processJSONSuggest", + requestParas: { + "json": "1", + "ds": "head", + "num": "20", + "count": "7" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data, + q = this.q, + ret = [], + i = 0, + len = _data.length; + + for(; i' + _data[i].d + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_translate": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://th.wikipedia.org/w/api.php", + callbackFn: "wikipedia.th", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.th" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "filmes": { + requestQuery: "wds", + url: "http://th.hao123.com/video/sug", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + requestParas: {}, + templ: function(data) { + var _data = data["s"] || [], + q = data["q"], + ret = [], + i = 0, + len = _data.length; + for (; i < len; i++) { + ret.push('
                            • ' + _data[i] + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + } + } +} +}); +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/tw/tw.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/tw/tw.tpl new file mode 100755 index 000000000..1abb0433e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/tw/tw.tpl @@ -0,0 +1,334 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/tw/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 10 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + + sug: { + "google_web": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "hp", + "hl": "zh-TW" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_web": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw/", + callbackFn: "fxsearch", + callbackDataKey: 1, + requestParas: { + "output": "fxjsonp" + } + }, + "baidu": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://suggestion.baidu.com/su", + callbackFn: "window.bdsug.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "cb": "window.bdsug.sug" + } + }, + "google_news": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "serp", + "hl": "zh-TW", + "gs_nf": "1", + "ds": "n" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_news": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-ura", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "droprotated": "1", + "pubid": "184" + } + }, + "baidu_news": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "news" + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "zh-TW", + "gl": "tw", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "video-hp", + "hl": "zh-TW", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_video": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "video" + } + }, + "yahoo_images": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "183" + } + }, + "google_images": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com.tw/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "hl": "zh-TW", + "client": "img", + "gs_nf": "1", + "ds": "i" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "baidu_images": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "image" + } + }, + "facebook": { + url: null + }, + "wiki": { + autoCompleteData: false, + requestQuery: "search", + url: "http://zh.wikipedia.org/w/api.php", + callbackFn: "wikipedia.zh", + callbackDataKey: "1", + requestParas: { + "action": "opensearch", + "namespace": "0", + "suggest": "", + "callback": "wikipedia.zh" + } + }, + "baidu_baike": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://nssug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + "prod": "baike" + } + }, + "google_dict": { + url: null + }, + "yahoo_dict": { + autoCompleteData: false, + requestQuery: "command", + url: "http://sugg.tw.search.yahoo.net/gossip-tw-pub_sayt", + callbackFn: "fxsearch", + callbackDataKey: "1", + requestParas: { + "output": "fxjsonp", + "pubid": "560" + } + }, + "baidu_dict": { + autoCompleteData: false, + requestQuery: "wd", + url: "http://dictsug.baidu.com/su", + callbackFn: "window.baidu.sug", + callbackDataKey: "s", + charset:"gbk", + requestParas: { + } + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com.tw/maps/suggest", + callbackFn: "googleMapCallback", + callbackDataKey: 3, + requestParas: { + "cp": "1", + "hl": "zh-TW", + "gl": "tw", + "v": "2", + "clid": "1", + "json": "a", + "vpsrc": "1", + "src": "1", + "num": "10", + "numps": "3", + "callback": "googleMapCallback" + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length, + detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "yahoo_map": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/vn/vn.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/vn/vn.tpl new file mode 100755 index 000000000..044aafb9e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/search-box/vn/vn.tpl @@ -0,0 +1,213 @@ + +<%if !empty($body.searchBox.tplUrl)%> + <%widget name="common:widget/search-box/`$sysInfo.country`/`$body.searchBox.tplUrl`/`$body.searchBox.tplUrl`.tpl"%> +<%else%> +<%script%> +<%strip%> +<%*注意:不能写JS注释*%> +conf.searchGroup = { + conf:{ + index: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/vn/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + }, + lv2: { + logoPath: "<%if !empty($head.cdn)%><%$head.cdn%><%/if%>/resource/fe/vn/search_logo<%if $body.searchBox.logoSize == 's'%>_s<%elseif $body.searchBox.logoSize == 'm'%>_m<%/if%>/", + curN: 0, + delay: 200, + n: 8 + } + }, + list: { + <%foreach $body.searchBox.sBoxTag as $tag%>"<%$tag.catagory%>": { + "engine": [<%foreach $tag.engine as $engine%> + <%if empty($body.searchboxEngine[$engine.id])%>{ + id: "<%$engine.id%>", + name: "<%$engine.title%>", + logo: "<%$engine.logo%>", + url: "<%$engine.url%>", + action: "<%$engine.action%>", + params: { + <%if !empty($engine.params[0].name)%><%foreach $engine.params as $params%><%if !empty($params.name)%>"<%$params.name%>": "<%$params.value%>"<%if !$params@last%>,<%/if%><%/if%><%/foreach%><%/if%> + }, + <%if !empty($engine.baiduSug)%>baiduSug:{mod: "<%$engine.baiduSug%>"},<%/if%> + q: "<%$engine.q|default:'q'%>", + placeholder: "<%$engine.placeholder%>" + }<%if !$engine@last%>,<%/if%><%/if%><%/foreach%> + ] + }<%if !$tag@last%>,<%/if%><%/foreach%> + }, + sug: { + "google_vn": { + requestQuery: "q", + url: "http://clients1.google.com.vn/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + client: "hp", + hl: "vi", + cp:"1", + gs_id: "c" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_images": { + requestQuery: "q", + url: "http://clients1.google.com.vn/complete/search", + callbackFn: "window.google.ac.h", + callbackDataNum: 1, + requestParas: { + client:"img", + ds:"i", + hl:"vi", + gs_is:"1", + cp:"1", + gs_id:"k" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "youtube": { + autoCompleteData: false, + requestQuery: "q", + url: "http://clients1.google.com/complete/search", + callbackFn: "window.google.ac.h", + callbackDataKey: 1, + requestParas: { + "client": "youtube", + "hl": "vi", + "gl": "us", + "gs_nf": "1", + "ds": "yt" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_video": { + requestQuery: "q", + url: "http://suggestqueries.google.com/complete/search", + callbackFn: "window.google.ac.hr", + callbackDataNum: 1, + requestParas: { + hl:"vi", + gl:"ZZ", + ds:"yt", + client:"suggest", + hjson:"t", + jsonp:"window.google.ac.hr", + cp:"1" + }, + templ: function(data) { + var _data = data[1] || [], + q = data[0], + ret = [], + i = 0, + len = _data.length; + for(; i' + _data[i][0].replace(q, '' + q + '') + '') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "google_news": { + url: null + }, + "google_dict": { + url: null + }, + "mp3.zing": { + url: null + }, + "nhaccuatui": { + url: null + }, + "google_map": { + requestQuery: "q", + url: "http://maps.google.com/maps/suggest", + callbackFn: "_xdc_._2gqj8p7jf", + callbackDataNum: 3, + requestParas: { + clid:"1", + cp:"2", + hl:"th", + gl:"", + json:"a", + ll:"21.739091,106.704712", + num:"5", + numps:"5", + spn:"1.347031,4.938354", + src:"1", + v:"2", + callback:"_xdc_._2gqj8p7jf", + auth:"d95a99a2:MA69F0jNrYbAN5QJuDKDqwnr1rU" + }, + customUrl: function(para) { + return this.o.url + "?" + para.substr(1) + "&" + this.o.requestQuery + '=' + encodeURIComponent(this.q); + }, + templ: function(data) { + var _data = data[3] || [], + q = this.q, + ret = [], + i = 0, + len = _data.length; + + var detail = ""; + + for(; i - ' + detail + '' : ""; + + ret.push('
                            • ' + _data[i][0].replace(q, '' + q + '') + detail + '
                            • ') + } + return '
                                ' + ret.join("") + '
                              '; + } + }, + "diadiem": { + url: null + }, + "google_answers": { + url: null + }, + "yahoo_answers": { + url: null + } + } +} +<%/strip%> +<%/script%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/uaq/uaq.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/uaq/uaq.tpl new file mode 100755 index 000000000..30cff322f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/uaq/uaq.tpl @@ -0,0 +1,10 @@ + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/baidu-template/baidu-template.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/baidu-template/baidu-template.js new file mode 100755 index 000000000..ac17f98d2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/baidu-template/baidu-template.js @@ -0,0 +1,187 @@ +/** + * @file + * baiduTemplate简单好用的Javascript模板引擎 1.0.2 版本 + * 开源协议:BSD License + * 浏览器环境占用命名空间 baidu.template ,nodejs环境直接安装 npm install baiduTemplate + * @param str{String|HtmlElement} dom结点ID,dom,或者模板string + * @param data{Object} 需要渲染的json对象,可以为空。当data为{}时,仍然返回html。 + * @return 如果无data,直接返回编译后的函数;如果有data,返回html。 + * @author wangxiao + * @email 1988wangxiao@gmail.com +*/ + + +// 模板函数 +var bt = function (str, data){ + + // 检查是否有该id的元素存在,如果有元素则获取元素的innerHTML/value,否则认为字符串为模板 + var fn = (function () { + + // 判断如果没有document,则为非浏览器环境 + if (!this.document) { + return compile(str); + }; + + // HTML5规定ID可以由任何不包含空格字符的字符串组成 + var element = document.getElementById(str); + if (element) { + + // 取到对应id的dom,缓存其编译后的HTML模板函数 + if (cache[str]) { + return cache[str]; + }; + + // textarea或input则取value,其它情况取innerHTML + var html = /^(textarea|input)$/i.test(element.nodeName) ? element.value : element.innerHTML; + return compile(html); + + }else { + + // 是模板字符串,则生成一个函数 + // 如果直接传入字符串作为模板,则可能变化过多,因此不考虑缓存 + return compile(str); + }; + + })(); + + // 有数据则返回HTML字符串,没有数据则返回函数 支持data={}的情况 + return isObject(data) ? fn( data ) : fn; +}; + +// 取得命名空间 baidu.template +baidu = window.baidu ? window.baidu : {}; +baidu.template = bt; + +// 缓存 将对应id模板生成的函数缓存下来。 +var cache = {}; + +// 自定义分隔符,可以含有正则中的字符,可以是HTML注释开头 +// 因为hao123smarty模版的分隔符为'<%'和'%>',为避免冲突修改默认分隔符为'{%'和'%}' by huangjunwei +bt.LEFT_DELIMITER = bt.LEFT_DELIMITER||'{%'; +bt.RIGHT_DELIMITER = bt.RIGHT_DELIMITER||'%}'; + +// HTML转义 +bt._encodeHTML = function (source) { + return String(source) + .replace(/&/g,'&') + .replace(//g,'>') + .replace(/\\/g,'\') + .replace(/"/g,'"') + .replace(/'/g,'''); +}; + +// 转义影响正则的字符 +bt._encodeReg = function (source) { + return String(source).replace(/([.*+?^=!:${}()|[\]/\\])/g,'\\$1'); +}; + +// 转义UI UI变量使用在HTML页面标签onclick等事件函数参数中 +bt._encodeEventHTML = function (source) { + return String(source) + .replace(/&/g,'&') + .replace(//g,'>') + .replace(/"/g,'"') + .replace(/'/g,''') + .replace(/\\/g,'\\') + .replace(/\//g,'\/') + .replace(/\n/g,'\n') + .replace(/\r/g,'\r'); +}; + +// 将字符串拼接生成函数,即编译过程(compile) +var compile = function (str) { + return new Function ("_template_object", + "var _template_fun_array=[];\nwith(_template_object){\n_template_fun_array.push('"+analysisStr(str)+"');\n}\nreturn _template_fun_array.join('');" + ); +}; + +// 判断是否是Object类型 +var isObject = function (source) { + return 'function' === typeof source || !!(source && 'object' === typeof source); +}; + +// 解析模板字符串 +var analysisStr = function (str) { + + // 取得分隔符 + var _left_ = bt.LEFT_DELIMITER; + var _right_ = bt.RIGHT_DELIMITER; + + // 对分隔符进行转义,支持正则中的元字符,可以是HTML注释 + var _left = bt._encodeReg(_left_); + var _right = bt._encodeReg(_right_); + + str=String(str) + + // 去掉分隔符中js注释 + .replace(new RegExp("("+_left+"[^"+_right+"]*)// .*\n","g"), "$1") + + // 去掉注释内容 <%* 这里可以任意的注释 *%> + // 默认支持HTML注释,将HTML注释匹配掉的原因是用户有可能用 来做分割符 + .replace(new RegExp("", "g"),"") + .replace(new RegExp(_left+"\\*.*?\\*"+_right, "g"),"") + + // 把所有换行去掉 \r回车符 \t制表符 \n换行符 + .replace(new RegExp("[\\r\\t\\n]","g"), "") + + // 用来处理非分隔符内部的内容中含有 斜杠 \ 单引号 ‘ ,处理办法为HTML转义 + .replace(new RegExp(_left+"(?:(?!"+_right+")[\\s\\S])*"+_right+"|((?:(?!"+_left+")[\\s\\S])+)","g"),function (item, $1) { + var str = ''; + if ($1) { + + // 将 斜杠 单引 HTML转义 + str = $1.replace(/\\/g,"\").replace(/'/g,'''); + while (/<[^<]*?'[^<]*?>/g.test(str)) { + + // 将标签内的单引号转义为\r 结合最后一步,替换为\' + str = str.replace(/(<[^<]*?)'([^<]*?>)/g,'$1\r$2') + }; + }else { + str = item; + } + return str ; + }) + + // 对变量后面的分号做容错(包括转义模式 如<%:h=value%>) <%=value;%> 排除掉函数的情况 <%fun1();%> 排除定义变量情况 <%var val='test';%> + .replace(new RegExp("("+_left+":?[hvu]?[\\s]*?=[\\s]*?[^;|"+_right+"]*?);[\\s]*?"+_right,"g"),"$1"+_right_) + + // 定义变量,如果没有分号,需要容错 <%var val='test'%> + .replace(new RegExp("("+_left+"[\\s]*?var[\\s]*?.*?[\\s]*?[^;])[\\s]*?"+_right,"g"),"$1;"+_right_) + + // 按照 <% 分割为一个个数组,再用 \t 和在一起,相当于将 <% 替换为 \t + // 将模板按照<%分为一段一段的,再在每段的结尾加入 \t,即用 \t 将每个模板片段前面分隔开 + .split(_left_).join("\t") + + // 找到 \t=任意一个字符%> 替换为 ‘,任意字符,' + // 即替换简单变量 \t=data%> 替换为 ',data,' + // 默认HTML转义 也支持HTML转义写法<%:h=value%> + .replace(new RegExp("\\t(?::h)?=(.*?)"+_right,"g"),"',typeof($1) === 'undefined'?'':baidu.template._encodeHTML($1),'") + + // 支持不转义写法 <%:=value%>和<%-value%> + .replace(new RegExp("\\t(?::=|-)(.*?)"+_right,"g"),"',typeof($1)==='undefined'?'':$1,'") + + // 支持url转义 <%:u=value%> + .replace(new RegExp("\\t:u=(.*?)"+_right,"g"),"',typeof($1)==='undefined'?'':encodeURIComponent($1),'") + + // 支持UI 变量使用在HTML页面标签onclick等事件函数参数中 <%:v=value%> + .replace(new RegExp("\\t:v=(.*?)"+_right,"g"),"',typeof($1)==='undefined'?'':baidu.template._encodeEventHTML($1),'") + + // 将字符串按照 \t 分成为数组,在用'); 将其合并,即替换掉结尾的 \t 为 '); + // 在if,for等语句前面加上 '); ,形成 ');if ');for 的形式 + .split("\t").join("');") + + // 将 %> 替换为_template_fun_array.push(' + // 即去掉结尾符,生成函数中的push方法 + // 如:if (list.length=5){%>

                              ',list[4],'

                              ');} + // 会被替换为 if (list.length=5){_template_fun_array.push('

                              ',list[4],'

                              ');} + .split(_right_).join("_template_fun_array.push('") + + // 将 \r 替换为 \ + .split("\r").join("\\'"); + + return str; +}; + +module.exports = bt; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bigpipe/BigPipe.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bigpipe/BigPipe.js new file mode 100755 index 000000000..573e8bc45 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bigpipe/BigPipe.js @@ -0,0 +1,156 @@ +var BigPipe = function() { + + function ajax(url, cb, data) { + var xhr = new XMLHttpRequest; + xhr.onreadystatechange = function() { + if (this.readyState == 4) { + cb(this.responseText); + } + }; + xhr.open(data?'POST':'GET', url + '&t=' + ~~(1e6 * Math.random()), true); + if (data) xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + xhr.send(data); + } + + + function renderPagelet(obj, pageletsMap, rendered) { + if (obj.id in rendered) { + return; + } + rendered[obj.id] = true; + + if (obj.parent_id) { + renderPagelet( + pageletsMap[obj.parent_id], pageletsMap, rendered); + } + + // + // 将pagelet填充到对应的DOM里 + // + var dom = document.getElementById(obj.id); + if (!dom) { + dom = document.createElement('div'); + dom.id = obj.id; + document.body.appendChild(dom); + } + dom.innerHTML = obj.html; + var fragment = document.createElement("div"), + scriptText = [], + text = "", + node; + fragment.innerHTML = obj.html; + scriptText = fragment.getElementsByTagName("script"); + for (var i = scriptText.length - 1; i >= 0; i--) { + node = scriptText[i]; + text = node.text || node.textContent || node.innerHTML || ""; + window[ "eval" ].call( window, text ); + }; + } + + + function render(pagelets) { + var i, n = pagelets.length; + var pageletsMap = {}; + var rendered = {}; + + // + // 初始化 pagelet.id => pagelet 映射表 + // + for(i = 0; i < n; i++) { + var obj = pagelets[i]; + pageletsMap[obj.id] = obj; + } + + for(i = 0; i < n; i++) { + renderPagelet(pagelets[i], pageletsMap, rendered); + } + } + + + function process(data) { + var rm = data.resource_map; + + if (rm.async) { + require.resourceMap(rm.async); + } + + + if (rm.css) { + LazyLoad.css(rm.css, function() { + if (rm.style) { + var dom = document.createElement('style'); + dom["type"] = "text/css"; + if (dom.styleSheet) { // IE + dom.styleSheet.cssText = rm.style; + } else { + dom.innerHTML = rm.style; + } + + document.getElementsByTagName('head')[0].appendChild(dom); + } + render(data.pagelets); + if (rm.js) { + LazyLoad.js(rm.js, function() { + rm.script && window.eval(rm.script); + }); + } + else { + rm.script && window.eval(rm.script); + } + }); + } else { + if (rm.style) { + var dom = document.createElement('style'); + dom["type"] = "text/css"; + if (dom.styleSheet) { // IE + dom.styleSheet.cssText = rm.style; + } else { + dom.innerHTML = rm.style; + } + document.getElementsByTagName('head')[0].appendChild(dom); + } + render(data.pagelets); + if (rm.js) { + LazyLoad.js(rm.js, function() { + rm.script && window.eval(rm.script); + }); + } + else { + rm.script && window.eval(rm.script); + } + } + } + + + function asyncLoad(arg) { + if (!(arg instanceof Array)) { + arg = [arg]; + } + var obj, arr = []; + for (var i = arg.length - 1; i >= 0; i--) { + obj = arg[i]; + if (!obj.id) { + throw new Error('missing pagelet id'); + } + arr.push('pagelets[]=' + obj.id); + } + + var url = location.href.split('#')[0] + (location.search? '&' : '?') + arr.join('&') ; + + //test ajax no debug's `mode=` + url=url.replace(/mode=\d*&/, ''); + + ajax(url, function(res) { + var data = window.JSON? + JSON.parse(res) : + eval('(' + res + ')'); + + process(data); + }); + } + + return { + asyncLoad: asyncLoad + } +}(); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bubble/.bower.json b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bubble/.bower.json new file mode 100755 index 000000000..f6bb35777 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bubble/.bower.json @@ -0,0 +1,24 @@ +{ + "name": "bubble", + "version": "0.1.3-pre", + "authors": [ + "chenguangyin " + ], + "description": "A bubble plugin for jQuery.", + "keywords": [], + "license": "MIT", + "homepage": "http://gitlab.pro/common-ui/bubble", + "ignore": [ + "**/*", + "!src/**" + ], + "_release": "0.1.3-pre", + "_resolution": { + "type": "version", + "tag": "v0.1.3-pre", + "commit": "e2d7a4b8efa395f3f483aed56e3848dff2ecfb60" + }, + "_source": "http://gitlab.pro/common-ui/bubble.git", + "_target": "*", + "_originalSource": "http://gitlab.pro/common-ui/bubble.git" +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bubble/src/bubble.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bubble/src/bubble.js new file mode 100755 index 000000000..d98bf99a8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/bubble/src/bubble.js @@ -0,0 +1,225 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var helper = require('common:widget/ui/helper/helper.js'); +/** + * @author Cgy + * @version 1.0.0 + * @description + * 基于css-ui.css生成气泡,样式参考http://ui.i18n.pro/demo/#bubble + * 如果需要自定义样式,可在.ui-bubble-modId(对应modId)类名下来修改 + * 如果需要自定义z-index, 需要在样式后添加!important + * + * 用法: var demo = $("#test").bubble(opt); + * // demo对象为jQuery对象,指向生成的气泡对象 + * + * + * + opt = { + 'wrapOpt': { + // 用于统计参数和自定义样式,为空时自动向上遍历获得最近的modId,可选,推荐必填 + 'modId': '', + // 用于控制arrow的方向,共有四个值t,b,l,r,默认为t,可选 + 'direc': 't', + // 主体内容前面的额外内容,可为HTML字符串,可选 + 'before': '', + // 主体内容后面的额外内容,可为HTML字符串,可选 + 'after': '', + // 主体内容,可为HTML字符串,必填 + 'content': '', + // 气泡皮肤类名(ui-bubble--skin),可选 + 'skin': '' + }, // 以下为可选 + 'moreOpt': { + // 更多链接的位置,r,t,b,l. 默认值r。可选. 参考http://ui.i18n.pro/demo/#arrow + 'direc': '', + // 更多链接align的位置,aa,av,ah. 默认值av。可选. 参考http://ui.i18n.pro/demo/#arrow + 'microDirec': '', + // 更多链接的链接, 默认值#。可选 + 'url': '', + // 更多链接的内容,为空时不显示更多链接,可选 + 'content': '' + }, + 'btnOpt': { + // 按钮的位置,l,r,可选。默认值r. 参考http://ui.i18n.pro/demo/#button + 'direc': 'r', + // 按钮的内容,为空时不显示按钮,可选 + 'content': '' + }, + 'pos': { + 'left': 20, // 气泡位置距离生成气泡元素左上角的距离,可选. 默认值0 + 'top': 10 // 可选. 默认值0 + }, + 'callback': {// 事件绑定通过类名和方法的映射。当点击拥有类名的a标签时触发对应事件。可选 + 'ui-bubble_close': function() { + alert("close") + }, + 'ui-bubble_more': function() { + alert("more") + }, + 'ui-btn': function() { + alert("btn") + } + } + } + * + */ +(function() { + var _defaultTpl = '', + _moreTpl = '#{content}', + _btnTpl = '#{content}'; + var _defaultOpt = { + 'wrapOpt': { + 'modId': '', + 'direc': 't', + 'before': '', + 'after': '', + 'content': '', + 'more': '', + 'btn': '', + 'skin': '' + }, + 'moreOpt': { + 'direc': 'r', + 'microDirec': 'av', + 'url': '#', + 'content': '' + }, + 'btnOpt': { + 'direc': 'r', + 'content': '' + }, + 'pos': { + 'left': 0, + 'top': 0 + }, + 'callback': null + }; + + var _data = [];// 所有使用本组件生成的气泡都放于该数组中,用于位置同步 + + /** + * 同步气泡和生成气泡对象的位置 + * 初始化监听器,每500毫秒查询一下每个生成气泡的对象是否位置发生变化 + * 如果气泡或者生成气泡对象有一个display为none的话,气泡位置不发生变化 + */ + function init() { + setTimeout(function() { + var i = 0, + tmp = null, + offset = null, + toObj = null, + fromObj = null, + len = _data.length; + + for (; i < len; i++) { + tmp = _data[i]; + toObj = tmp.toObj; + fromObj = tmp.fromObj; + offset = fromObj.offset(); + + if (toObj.css("display") === "none" || fromObj.css("display") === "none") { + continue; + } + if (offset.left == tmp["oldPos"].left && offset.top == tmp["oldPos"].top) { + + } else { + _data[i] = fixPosition(toObj, fromObj, tmp.pos); + } + } + setTimeout(arguments.callee, 500); + }, 500); + } + + /** + * + * @param {object} opt 配置参数 + * @return {string} 拼接好的html模版 + */ + function getHtml(opt) { + var wrapOpt = opt["wrapOpt"], + moreOpt = opt["moreOpt"], + btnOpt = opt["btnOpt"]; + + moreOpt && (wrapOpt.more = moreOpt.content ? helper.replaceTpl(_moreTpl, moreOpt) : ""); + btnOpt && (wrapOpt.btn = btnOpt.content ? helper.replaceTpl(_btnTpl, btnOpt) : ""); + wrapOpt["skin"] = wrapOpt["skin"] ? ("ui-bubble--" + wrapOpt["skin"]) : ""; + return helper.replaceTpl(_defaultTpl, wrapOpt); + } + /** + * 绑定事件 + * @param {jQuery} wrap 事件代理对象 + * @param {object} opt 类名和对应触发事件映射 + * + */ + function bindEventHandler(wrap, opt) { + wrap.on("click", ".ui-bubble_close", function(e) { + wrap.hide(); + }); + + if (!opt) return; + wrap.on("click", "a", function(e) { + var that = $(this), + i; + for (i in opt) { + if (that.hasClass(i)) { + opt[i].call(that, wrap, e); + } + } + + }); + } + + /** + * toObj相对于fromObj的左上角和pos对象整合后定位 + * @param {jQuery} toObj 气泡对象 + * @param {jQuery} fromObj 生成气泡对象 + * @param {object} pos 偏移位置信息 + * @return {object} {气泡对象,生成气泡对象,偏移位置,生成气泡对象当前位置信息} + */ + function fixPosition(toObj, fromObj, pos) { + var offset = fromObj.offset(), + curPos = offset; + + pos = pos || { + left: 0, + top: 0 + }; + curPos.left += pos.left; + curPos.top += pos.top; + toObj.offset(curPos); + + return { + toObj: toObj, + fromObj: fromObj, + pos: pos, + oldPos: offset + }; + } + + $.fn.extend({ + bubble: function(opt) { + var _wrap = $("#bubbleUIWrap"), + origin = $(this), + that = null, + curOpt; + if (_wrap.length) {} else { + $(document.body).append('
                              '); + _wrap = $("#bubbleUIWrap"); + } + + if (opt["wrapOpt"].modId === "") { + opt["wrapOpt"].modId = this.closest("[log-mod]").attr("log-mod"); + } + + curOpt = $.extend(true, {}, _defaultOpt, opt); + curOpt["wrapOpt"].zIndex = parseInt(0 + origin.css("z-index"), 10) + 1; + $(getHtml(curOpt)).appendTo(_wrap); + that = _wrap.find(".ui-bubble-" + opt["wrapOpt"].modId); + bindEventHandler(that, curOpt["callback"]); + _data.push(fixPosition(that, origin, curOpt["pos"])); + + return that; + } + }); + + init(); +})(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/calendar/calendar.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/calendar/calendar.css new file mode 100755 index 000000000..bddfae666 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/calendar/calendar.css @@ -0,0 +1,304 @@ +.mod-calendar{ + width: 377px; + border-radius: 2px; + background: #F0FFFB; + position: relative; + + /*fix ie prents bug*/ + *padding-right: 3px; +} + +.mod-calendar .ui-bubble_in{ + border-bottom-color: #F0FFFB; +} + +.mod-calendar a{ + color: #39BE8D; +} + +.mod-calendar_hd{ + text-align: center; + padding: 10px; +} + +.mod-calendar_prev a{ display: inline;} + +.mod-calendar_prev{ float: left; margin-left: 40px;} +.mod-calendar_next{ float: right; margin-right: 40px;} + +.mod-calendar_bd{ + /*background: #fff;*/ + border-left: 1px solid #DCDEDD; + margin: 5px 0; +} + +.mod-calendar_ft{ + line-height: 23px; + text-align: right; +} + +.mod-calendar_grid{ + width: 100%; +} + +.mod-calendar_grid li{ +/* display: inline-block; + _display: inline; + zoom: 1;*/ + float: left; + + width: 14.285%; + *width: 13.1%; + /*_width: 12.2%;*/ + + text-align: center; + + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; +} + +.mod-calendar_weeks{ + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + + border-right: 1px solid #D8DAD9; + *border: none; +} + +.mod-calendar_weeks li{ + + height: 32px; + line-height: 32px; + + border-top: 3px solid #DCDEDD; + border-bottom: 1px solid #DCDEDD; + *border-right: 1px solid #DCDEDD; + *margin-right: -1px; + *padding-left: 1px; + + background-color: #FCFCFC; + background-image: -o-linear-gradient(-90deg, #FFFFFF 0%, #F5F5F5 100%); + background-image: -moz-linear-gradient(-90deg, #FFFFFF 0%, #F5F5F5 100%); + background-image: -webkit-linear-gradient(-90deg, #FFFFFF 0%, #F5F5F5 100%); + background-image: -ms-linear-gradient(-90deg, #FFFFFF 0%, #F5F5F5 100%); + background-image: linear-gradient(-180deg, #FFFFFF 0%, #F5F5F5 100%); +} + + +.mod-calendar_days{ +} + +.mod-calendar_days li{ + border-right: 1px solid #D8DAD9; + border-bottom: 1px solid #D8DAD9; +} + +.mod-calendar_days a{ + height: 50px; + border: 1px solid #fff; + display: block; + position: relative; +} + +.mod-calendar_days dl{ + background: #fff; + color: #9E9D9D; + height: 50px; + position: relative; + text-align: center; + overflow: hidden; + width: 100%; +} + +.mod-calendar_days dt{ + color: #444; + font-weight: bold; + font-size: 18px; + padding-top: 13px; +} + +.mod-calendar_days dd{ + /*top: 100%;*/ + padding: 3px; + /*margin-left: 3px;*/ + line-height: 2; + margin-top: -10px; + /*width: 100%;*/ + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.mod-calendar_days a:hover{ + overflow: visible; +} + +.mod-calendar_days a:hover dl{ + overflow: visible; + position: absolute; + z-index: 9; + left: -2px; + top: -2px; + padding: 1px; + /*background: inherit;*/ + border: 1px solid #DCDEDD; + + width: auto; + _width: 200%; + min-width: 100%; +} + +.mod-calendar_days a:hover dt{ +} + +.mod-calendar_days a:hover dd{ + overflow: visible; +} + +.mod-calendar_ft{ + *padding-right: 3px; +} + +/* +status + */ +/*li.mod-calendar-today{ position: relative; border-bottom: none;}*/ + +.mod-calendar-today dl{ background: #1EB57D; /*border: 1px solid #1A986A; padding: 1px 0; top: -1px; left: -1px; position: relative; z-index: 2; margin-bottom: -1px; margin-right: -2px;*/ color: #fff;} +.mod-calendar-today dt{ color: #fff;} +/*.mod-calendar-today a{ border: none;} +.mod-calendar-today a:hover dl{ border: 1px solid #1A986A; left: -1px; top: -1px; padding: 1px 0;}*/ + + +.mod-calendar-holiday dl{ background: #FCA438; color: #fff;} +.mod-calendar-holiday dt{ color: #fff;} +.mod-calendar-festival dl{ background: #E76984; color: #fff;} +.mod-calendar-festival dt{ color: #fff;} +.mod-calendar-event dl{ background: #4084F1; color: #fff;} +.mod-calendar-event dt{ color: #fff;} +.mod-calendar-event dd{ color: #fff;} +.mod-calendar-holder a{ border-color: #F3F2F2; cursor: default; pointer-events: none;} +.mod-calendar-holder dl{ background: #F3F2F2; color: #BFBEBE;} +.mod-calendar-holder dt{ color: #B5B5B5;} + +.mod-calendar-disable{ color: #999 !important; cursor: default;} + +/* +extend + */ +.mod-calendar--mini{ + width: 250px; + *padding-right: 5px; + border-color: #E0E0E0; + padding: 0; + background: #fff; + display: none; + position: absolute; + z-index: 11; +} + +.mod-calendar--mini .mod-calendar_hd{ + border-bottom: 1px solid #DBDBDB; + margin-bottom: 0; + background: #FAFCFC; +} + +.mod-calendar--mini .mod-calendar_bd{ + margin: 0; + background: #fff; +} + +.mod-calendar--mini .ui-bubble_in{ + border-bottom-color: #FAFCFC; +} + +.mod-calendar--mini .ui-bubble_out{ + border-bottom-color: #E0E0E0; +} + +.mod-calendar--mini .mod-calendar_prev{ float: left; margin-left: 5px;} +.mod-calendar--mini .mod-calendar_next{ float: right; margin-right: 5px;} + +.mod-calendar--mini .mod-calendar_grid{ + width: 95%; + /*padding: 0 10px;*/ + margin: 0 auto; +} + +.mod-calendar--mini .mod-calendar_weeks{ + background-color: #F5F7F7; + border: none; + color: #7F7F7F; + padding: 0 5px; + width: 100%; +} + +.mod-calendar--mini .mod-calendar_weeks li{ + height: 25px; + line-height: 25px; + border: none; + background: none; +} + +.mod-calendar--mini .mod-calendar_days{ + margin: 5px auto; +} + +.mod-calendar--mini .mod-calendar_days li{ + border: none; +} + + +.mod-calendar--mini .mod-calendar_grid li{ + *width: 13.4%; +} + +.mod-calendar--mini .mod-calendar_days li{ + +} + +.mod-calendar--mini .mod-calendar_days a{ + height: 28px; + line-height: 28px; +} + +.mod-calendar--mini .mod-calendar_days dl{ + height: 28px; +} + +.mod-calendar--mini .mod-calendar_days dt{ + font-size: 14px; + font-weight: normal; + padding-top: 0; +} +.mod-calendar--mini .mod-calendar_days dd{ + display: none; +} + +.mod-calendar--mini .mod-calendar_days a:hover dl{ + border-color: #fff; + background: #E8EAEB; +} + +.mod-calendar--mini .mod-calendar-today dl{ background: #1EB57D; border-color: #fff;} +.mod-calendar--mini .mod-calendar-today a:hover dl{ background: #1EB57D; border-color: #fff;} + +.mod-calendar--mini .mod-calendar-holder a{ border-color: #fff;} +.mod-calendar--mini .mod-calendar-holder dl{ background: #fff; color: #aaa;} + +.mod-calendar--full{ + width: 980px; + *padding-right: 2px; +} + +.mod-calendar--full .ui-arrow{ + display: none; +} + +.mod-calendar--full .mod-calendar_grid li{ + *width: 14.1%; +} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/calendar/calendar.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/calendar/calendar.js new file mode 100755 index 000000000..93ddb11bb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/calendar/calendar.js @@ -0,0 +1,387 @@ +/** + * jQuery calendar plugin + * @author yuji@baidu.com + * @update 2013/10/17 + * + * Compatibility: + * 1. IE 6-10, Firefox, Opera, Chrome, Safari + * 2. ltr/rtl + * 3. Windows / Mac + * + * TODO: + * + */ +!function(WIN, DOC, $, undef) { + + $ = $ || window.require && require("common:widget/ui/jquery/jquery.js"); + + if (!$) return; + var noop = function() {} + , replaceTpl = window.require && require("common:widget/ui/helper/helper.js").replaceTpl || function(tpl, data, label) { + var s = label || /#\{([^}]*)\}/mg, + trim = function (str) { + return str.replace(/^\s+|\s+$/g, '') + }; + return (tpl + "").replace(s, function (value, name) { + return value = data[trim(name)] || ""; + }); + } + , calendar = function($el, args) { + + var that = this; + + that.$el = $el; + that.el = $el[0]; + + that.args = $.extend({ + + /** + * You may provide a new date object to rewrite now + * @type {Date} + */ + now: new Date + + /** + * Default module selector prefix + * @type {String} + */ + , selectorPrefix: "mod-calendar" + + /** + * Default text of weeks + * @type {Array} + */ + , weeks: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] + + /** + * Menu tpl + * @type {String} + */ + , tplMenu: '' + + /** + * Week cell tpl + * @type {String} + */ + , tplWeek: '
                            • #{name}
                            • ' + + /** + * Day cell tpl + * @type {String} + */ + , tplDay: '
                            • #{d}
                              #{info}
                            • ' + + /** + * Footer html snippets + * @type {String} + */ + , footer: "" + + /** + * Custom min date or the offset of begin date + * @notice support: "2014-3-1" | 2 | "-1" + * @notice Built-Lunar only supports 1901-1-1 ~ 2049-12-31 + * @type {String | Number} + */ + , minDate: "2004-3-1" + + /** + * Custom max date or the offset of end date + * @notice support: "2014-3-1" | 2 | "-1" + * @notice Built-Lunar only supports 1901-1-1 ~ 2049-12-31 + * @type {String | Number} + */ + , maxDate: "2024-3-1" + + /** + * Abbreviation week(3 letters, uppercase) + * @type {Boolean} + */ + , isAbbrWeek: true + + /** + * the beginning week name of the week + * @type {Number} + */ + , beginDay: 1 + + /** + * Whether to allow loop switch + * @type {Boolean} + */ + , switchLoop: false + + /** + * Custom switch date handle + * @type {[Function]} + */ + , onSwitch: noop + + /** + * Custom click handle + * @type {[Function]} + */ + , onClick: noop + + /** + * The filter of day render + * @param {[Object]} o {className, d, y, M, info, url} + * @return {[Object]} + */ + , onFilterDays: function(o) { + return o; + } + }, args); + + that.pre = that.args.selectorPrefix; + + that.args.weeks = that.args.weeks.splice(that.args.beginDay, that.args.weeks.length).concat(that.args.weeks.splice(0, that.args.beginDay + 1)); + + that.now = new Date(that.args.now); + + that.minDate = (+(that.minDate = that.args.minDate) ? that.now.add(+that.minDate) : new Date(that.minDate)).format(); + + that.maxDate = (+(that.maxDate = that.args.maxDate) ? that.now.add(+that.maxDate) : new Date(that.maxDate)).format(); + + that.now = that.now.format(); + + that.state = {}; + + that.init(); + } + + , fn = calendar.prototype; + + /** + * Initialization + * @return {[type]} [description] + */ + fn.init = function() { + var that = this + , $el = that.$el + , render = that.render; + + $("year|month|weeks|days|prev|next|ft".split("|")).map(function(i, li) { + that["$" + li] = $el.find("." + that.pre + "_" + li); + }) + + // render year + that.render(that.$year, that.args.tplMenu, new Array(that.maxDate.y - that.minDate.y + 1), function(li, i) { + var year = i + that.minDate.y + , name = year; + + if(that.args.fixYear) name = that.args.fixYear(year); + + return { + val: year + , name: name + , selected: year === that.now.y ? 'selected="selected"' : "" + } + }); + + that.render(that.$weeks, that.args.tplWeek, that.args.weeks, function(li, i) { + return { + name: that.args.isAbbrWeek ? li.slice(0, 3).toUpperCase() : li + } + }); + + that.$ft.html(that.args.footer); + that.renderMonths(that.now.y, that.now.M); + that.renderDays(that.now.M, that.now.y); + that.fixBtnStatus(that.now.y, that.now.M); + that.bindEvents(); + } + + fn.renderMonths = function(y) { + var that = this + , l = 12; + + if(y === that.maxDate.y) l = that.maxDate.M; + if(y === that.minDate.y) l = l - that.minDate.M + 1; + + that.render(that.$month, that.args.tplMenu, new Array(l), function(li, i) { + i = i + (y === that.minDate.y ? that.minDate.M : 1); + return { + val: i + , name: that.args.fixMonth ? that.args.fixMonth(i) : i + , selected: i === that.now.M ? 'selected="selected"' : "" + } + }); + } + + // handle events. + fn.filterDays = function(y, M, d, className, info, url) { + var that = this; + return that.args.onFilterDays.call(that, { + className: className + , d: d + , y: y + , M: M + , info: info + , url: url || "#" + }); + } + + fn.renderDays = function(M, y, filter) { + var that = this; + + that.render(that.$days, that.args.tplDay, new Array(7 * 6), function(className, d, info) { + + var begin = new Date(y, M - 1, 1).format().w - 1 - that.args.beginDay + , total = Date.days(M, y) + , _M = M; + + if(begin < -1) begin = begin + 7; + d = d - begin; + info = ""; + className = ""; + + // fix month + if(d < 1) { + _M = M - 1; + d = d + (!_M ? Date.days(12, y - 1) : Date.days(_M, y)); + className = 'class=' + that.pre + "-holder"; + } + else if(d > total) { + d = d - total; + _M = M + 1; + className = 'class=' + that.pre + "-holder"; + } + else if(y === that.now.y && _M === that.now.M && d === that.now.d) { + className = 'class=' + that.pre + "-today"; + } + + // fix selectable date range + if(new Date(that.minDate.y, that.minDate.M - 1, that.minDate.d).diff(new Date(y, _M - 1, d - 1)).d < 0 + || new Date(that.maxDate.y, that.maxDate.M - 1, that.maxDate.d).diff(new Date(y, _M - 1, d + 1)).d > 0) + className = 'class=' + that.pre + "-holder"; + + return that.filterDays(y, _M, d, className, info); + }); + } + + fn.render = function($el, tpl, data, filter) { + data = $.isArray(data) ? data : [data]; + var ret = []; + $.map(data, function(li, i) { + ret.push(replaceTpl(tpl, filter ? filter(li, i) : data)); + }); + $el.html(ret.join("")); + } + + fn.fixBtnStatus = function(y, M) { + var that = this + , className = that.pre + "-disable"; + if(that.args.switchLoop) return; + $(that.$next).removeClass(className); + $(that.$prev).removeClass(className); + y = y || +that.$year.val(); + M = M || +that.$month.val(); + M === 1 || y === that.minDate.y && M === that.minDate.M && that.$prev.addClass(className); + M === 12 || y === that.maxDate.y && M === that.maxDate.M && that.$next.addClass(className); + } + + fn.bindEvents = function() { + var that = this + , switchHandle = function(e) { + that.fixBtnStatus(); + that.renderDays(+that.$month.val(), +that.$year.val()); + that.args.onSwitch.call(that, { + y: +that.$year.val() + , M: +that.$month.val() + }, that.$year, that.$month); + }; + that.$year.change(function(e) { + var curMonth = +that.$month.val(); + that.renderMonths(+that.$year.val()); + that.$month.val(curMonth); + switchHandle(e); + }); + that.$month.change(switchHandle); + + that.$prev.click(function(e) { + e.preventDefault(); + if($(this).hasClass(that.pre + "-disable")) return; + var M = +that.$month.val() + , y = +that.$year.val(); + + // redraw month panel + y === that.maxDate.y && M === 1 && that.renderMonths(y - 1); + + that.args.switchLoop && y === that.minDate.y && M === that.minDate.M && that.renderMonths(that.maxDate.y); + + // overflow handle + if(y === that.minDate.y && M === that.minDate.M) { + + // keep loop + if(that.args.switchLoop) { + that.$month.val(that.maxDate.M); + that.$year.val(that.maxDate.y); + } + } + + else { + if(M === 1) { + that.$month.val(12); + that.$year.val(y - 1); + } + else { + that.$month.val(M - 1); + } + } + + switchHandle(); + }); + + that.$next.click(function(e) { + e.preventDefault(); + if($(this).hasClass(that.pre + "-disable")) return; + var M = +that.$month.val() + , y = +that.$year.val(); + + // redraw month panel + y === that.minDate.y && M === that.minDate.M && that.renderMonths(y - 1); + + that.args.switchLoop && y === that.maxDate.y && M === that.maxDate.M && that.renderMonths(that.minDate.y); + + // overflow handle + if(y === that.maxDate.y && M === that.maxDate.M) { + + // keep loop + if(that.args.switchLoop) { + that.$month.val(1); + that.$year.val(that.minDate.y); + } + } + + else { + if(M === 12) { + that.$month.val(1); + that.$year.val(y + 1); + } + else { + that.$month.val(M + 1); + } + } + switchHandle(); + }); + + that.$days.on("click", "li", function(e) { + //e.preventDefault(); + !$(this).hasClass("mod-calendar-holder") && that.args.onClick.call(this, that.$year.val(), that.$month.val(), $(this).text()); + }); + } + + // jQuery plugin wraper + $.fn.extend({ + /** + * plugin + * + * @param {Object} argument comment + */ + calendar: function(args) { + return new calendar(this, args); + } + }); + +}(window, document, window.jQuery); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cookieless/cookieless.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cookieless/cookieless.js new file mode 100755 index 000000000..f5c74985a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cookieless/cookieless.js @@ -0,0 +1,151 @@ +/** + * all data store in one key(GSTORE), and the value split by "; ". + * The value is like: "a=b,expire=1403767282089; c=d,expire=1403767282089" + * + * not support session store(session storage seems to a little ugly), use cookie instead + * + * Internet Explorer 10 in Windows 8 access the localStorage is denied. Leave it alone! + * + * + * + * Create a local Data with the given key and value and other optional parameters. + * + * @example $.store('the_store', 'the_value', { expires: 7}); + * @desc Create a store with all available options. + * + * @example $.store('the_store', null); + * @desc Delete a store by passing null as value + * + * @example $.store('the_store'); + * @desc get a store value + */ + + +window.jQuery || (window.jQuery = {}); + +;;(function ($, WIN, NAME) { + var STORENAME = "GSTORE", // the key + STORE = "localStorage", + encode = encodeURIComponent, + decode = decodeURIComponent; + + /** + * get value + * @param {String} key the key + * @return {Null} null + */ + function getItem(key) { + var data = WIN[STORE].getItem(STORENAME), + result = new RegExp('(?:^|; )' + encode(key) + '=([^,;]*),expire=([0-9]*)').exec(data); + + if(result && +result[2] >= +new Date) { + return decode(result[1]); + } else { + deleteItem(key); + return null; + } + } + + /** + * get position of data has the key in array + * @param {Array} arr where data group + * @param {String} key key The key of the store + * @return {Number} key's position, without is -1 + */ + function posItem(arr, key) { + var reg = new RegExp('^' + encode(key) + '=[^,;]*,expire='), + pos = -1, i = 0, j = arr.length; + + for (; i < j; i++) { + if (reg.exec(arr[i])) { + pos = i; + break; + } + } + return pos; + } + + /** + * [cleanDirty description] + * @param {[type]} arr [description] + * @return {[type]} [description] + */ + function cleanDirty(arr) { + var tmp = []; + for(var i = 0, j = arr.length; i < j; i++) { + arr[i] && tmp.push(arr[i]); + } + return tmp; + } + /** + * store data + * @param {[type]} key [description] + * @param {[type]} value [description] + * @param {[type]} expire [description] + */ + function setItem(key, value, expire) { + var data = cleanDirty((WIN[STORE].getItem(STORENAME) || "").split("; ")), + pos = posItem(data, key), + j = data.length; + + + if (isNumber(expire)) { + var days = expire; + expire = new Date(); + expire.setDate(expire.getDate() + days); + } + + if (Object.prototype.toString.call(expire) === '[object Date]') { + data[(pos > -1) ? pos : j] = encode(key) + "=" + encode(value) + ",expire=" + expire.getTime(); + WIN[STORE].setItem(STORENAME, data.join("; ")); + } + } + + /** + * delete the store data in localStorage with the key + * @param {String} key The key of the store + * @return {null} null + */ + function deleteItem(key) { + var data = cleanDirty((WIN[STORE].getItem(STORENAME) || "").split("; ")), + pos = posItem(data, key); + + if(pos > -1) { + data.splice(pos, 1); + } + + data = data.join("; "); + data && WIN[STORE].setItem(STORENAME, data); + } + + function isNumber(o) { + return typeof o === 'number'; + } + /** + * @param String key The key of the store + * @param String value The value of the store + * @param Object options An object containing key/value pairs to provide expires attributes + * @option Number|Date expires Either an integer specifying the expiration date from now on + * in days or a Date object + * If a negative value is specified (e.g. a date in the past), the store will be deleted + * + */ + $[NAME] = function (key, value, options) { + try { + WIN[STORE]; // win8 IE10. http://www.baidufe.com/item/0b74532d151f6dc9308e.html + } catch(e) { + return false; + } + + if (arguments.length > 1) { + if (value === null || (options && isNumber(options.expires) && options.expires <= 0)) { + deleteItem(key); + } else { + options && setItem(key, String(value), options.expires); + } + } else { + return getItem(key); + } + + }; +})(jQuery, window, "store"); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/body.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/body.css new file mode 100755 index 000000000..d21534f1f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/body.css @@ -0,0 +1,5 @@ +body { + background: #edf0ef; + font:12px/1.231 arial,Tahoma,helvetica,clean,sans-serif; + position:relative; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/css-framework-base.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/css-framework-base.css new file mode 100755 index 000000000..c0ca7a4a3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/css-framework-base.css @@ -0,0 +1,5 @@ +@import url('/widget/ui/css-framework-base/reset.css?__inline'); +@import url('/widget/ui/css-framework-base/html5.css?__inline'); +@import url('/widget/ui/css-framework-base/tool.css?__inline'); +@import url('/widget/ui/css-framework-base/body.css?__inline'); +@import url('/widget/ui/css-framework-base/layout.css?__inline'); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/html5.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/html5.css new file mode 100755 index 000000000..5e17fe486 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/html5.css @@ -0,0 +1,21 @@ +/*********** +* HTML5 特有标签格式化 +*/ +article, aside, details, figcaption, figure, footer, header, hgroup, nav, section, summary { + display: block +} + +audio, canvas, video { + display: inline-block; + *display: inline; + *zoom: 1 +} + +audio:not([controls]) { + display: none; + height: 0 +} + +[hidden] { + display: none +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/layout.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/layout.css new file mode 100755 index 000000000..910472461 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/layout.css @@ -0,0 +1,307 @@ + +.l-fl { + float: left; + _margin-right: -3px +} + +.l-fr { + float: right; + _margin-left: -3px +} + +.l-ff, .l-g0 { + overflow: hidden; + zoom: 1 +} + +.l-wrap { + width: 960px; + margin: 0 auto +} + +/********** +* layout +*/ + +.l-g { + width: 100%; + zoom: 1; + _zoom: expression(function(el){el.firstChild.style.marginLeft = 0;el.style.zoom = "1"}(this)) +} + +.l-g:before, .l-g:after { + content: ''; + display: table +} + +.l-g:after { + clear: both +} + +.l-g1-1 { + float: none +} + +.l-g1-2 { + width: 50% +} + +.l-g1-3 { + width: 33.33333% +} + +.l-g2-3 { + width: 66.66666% +} + +.l-g1-4 { + width: 25% +} + +.l-g3-4 { + width: 75% +} + +.l-g1-5 { + width: 20% +} + +.l-g2-5 { + width: 40% +} + +.l-g3-5 { + width: 60% +} + +.l-g4-5 { + width: 80% +} + +.l-g1-8 { + width: 12.5% +} + +.l-g3-8 { + width: 37.5% +} + +.l-g5-8 { + width: 62.5% +} + +.l-g7-8 { + width: 87.5% +} + +.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + float: left; + _margin-right: -3px +} + +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + display: inline; + float: left; + margin-left: 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + background: #aaa +} + +[class*="l-g"]:first-child { + margin-left: 0 +} + +.l-g1 { + width: 70px +} + +.l-g2 { + width: 150px +} + +.l-g3 { + width: 230px +} + +.l-g4 { + width: 310px +} + +.l-g5 { + width: 390px +} + +.l-g6 { + width: 470px +} + +.l-g7 { + width: 550px +} + +.l-g8 { + width: 630px +} + +.l-g9 { + width: 710px +} + +.l-g10 { + width: 790px +} + +.l-g11 { + width: 870px +} + +.l-g12 { + width: 950px +} + +.l-g_1 { + margin-left: 80px !important +} + +.l-g_2 { + margin-left: 160px !important +} + +.l-g_3 { + margin-left: 240px !important +} + +.l-g_4 { + margin-left: 320px !important +} + +.l-g_5 { + margin-left: 400px !important +} + +.l-g_6 { + margin-left: 480px !important +} + +.l-g_7 { + margin-left: 560px !important +} + +.l-g_8 { + margin-left: 640px !important +} + +.l-g_9 { + margin-left: 720px !important +} + +.l-g_10 { + margin-left: 800px !important +} + +.l-g_11 { + margin-left: 880px !important +} + +.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + margin-right: 10px; + _zoom: expression(function(el){if(!el.nextSibling || el.nextSibling.nodeType!== 1) el.style.marginRight = 0;el.style.zoom = "1"}(this)) +} + +.l-wrap_l .l-wrap { + width: 1130px +} + +.l-wrap_l .l-g1 { + width: 85px +} + +.l-wrap_l .l-g2 { + width: 180px +} + +.l-wrap_l .l-g3 { + width: 275px +} + +.l-wrap_l .l-g4 { + width: 370px +} + +.l-wrap_l .l-g5 { + width: 465px +} + +.l-wrap_l .l-g6 { + width: 560px +} + +.l-wrap_l .l-g7 { + width: 655px +} + +.l-wrap_l .l-g8 { + width: 750px +} + +.l-wrap_l .l-g9 { + width: 845px +} + +.l-wrap_l .l-g10 { + width: 940px +} + +.l-wrap_l .l-g11 { + width: 1035px +} + +.l-wrap_l .l-g12 { + width: 1130px +} + +.l-wrap_l .l-g_1 { + margin-left: 95px !important +} + +.l-wrap_l .l-g_2 { + margin-left: 190px !important +} + +.l-wrap_l .l-g_3 { + margin-left: 285px !important +} + +.l-wrap_l .l-g_4 { + margin-left: 380px !important +} + +.l-wrap_l .l-g_5 { + margin-left: 475px !important +} + +.l-wrap_l .l-g_6 { + margin-left: 570px !important +} + +.l-wrap_l .l-g_7 { + margin-left: 665px !important +} + +.l-wrap_l .l-g_8 { + margin-left: 760px !important +} + +.l-wrap_l .l-g_9 { + margin-left: 855px !important +} + +.l-wrap_l .l-g_10 { + margin-left: 950px !important +} + +.l-wrap_l .l-g_11 { + margin-left: 1045px !important +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/reset.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/reset.css new file mode 100755 index 000000000..1b6f100f6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/reset.css @@ -0,0 +1,215 @@ + + +/*********** +* reset +*/ +body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, figure, blockquote, th, td { + margin: 0; + padding: 0 +} + +fieldset, img, iframe { + border: 0 +} + +address, caption, cite, code, dfn, em, i, th, var { + font-style: normal; + font-weight: normal +} + +ul, li, ol { + list-style: none +} + +caption, th { + text-align: left +} + +h1, h2, h3, h4, h5, h6 { + font-size: 100%; + font-weight: normal +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100% +} + +body { + -webkit-text-size-adjust: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -o-tap-highlight-color: rgba(0, 0, 0, 0); + -moz-tap-highlight-color: rgba(0, 0, 0, 0); + vertical-align: baseline; + background-color: transparent; + _zoom: expression(function(el){document.execCommand('BackgroundImageCache',false,true);el.style.zoom = "1"}(this)) +} + +a { + text-decoration: none; + color: #333 +} + +a:hover { + text-decoration: none +} + +a:focus, a:hover, a:active, input:focus, textarea:focus { + outline: 0 +} + +a::-moz-focus-inner, input::-moz-focus-inner, button::-moz-focus-inner { + border: 0 +} + +button::-moz-focus-inner, input::-moz-focus-inner { + padding: 0; + border: 0 +} + +img { + -ms-interpolation-mode: bicubic; + vertical-align: middle +} + +table { + font-size: inherit; + font: 100%; + border-collapse: collapse; + border-spacing: 0 +} + +td { + vertical-align: top +} + +th { + text-align: inherit +} + +iframe { + display: block +} + +svg:not(:root) { + overflow: hidden +} + +textarea { + resize: none; + overflow: auto; + vertical-align: top +} + +button, input, select, textarea { + font-size: 100%; + vertical-align: baseline; + *vertical-align: middle +} + +button, input { + *overflow: visible; + line-height: normal; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box +} + +button { + cursor: pointer +} + +input[type="button"], input[type="reset"], input[type="submit"] { + -webkit-appearance: button +} + +input[type="search"] { + -webkit-appearance: textfield; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box +} + +input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none +} + +input[type="checkbox"], input[type="radio"] { + box-sizing: border-box; + padding: 0; + *width: 13px; + *height: 13px +} + +button[disabled], input[disabled] { + cursor: default +} + +q { + quotes: none +} + +q:before, q:after { + content: ''; + content: none +} + +abbr, acronym { + border: 0; + font-variant: normal +} + +strong, .strong { + font-weight: bold +} + +pre, .pre { + white-space: pre; + white-space: pre-wrap; + white-space: pre-line; + word-wrap: break-word +} + +h1, .h1 { + font-size: 1.8em +} + +h2, .h2 { + font-size: 1.6em +} + +h3, .h3 { + font-size: 1.4em +} + +h4, .h4 { + font-size: 1.2em +} + +h5, .h5 { + font-size: 1em +} + +h6, .h6 { + font-size: 1em +} + +small, .small { + font-size: 75% +} + +sub, .sub, sup, .sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline +} + +sup, .sup { + top: -0.5em +} + +sub, .sub { + bottom: -0.25em +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/tool.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/tool.css new file mode 100755 index 000000000..e757ea113 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-base/tool.css @@ -0,0 +1,263 @@ + +/*************** +* tool css: +* include named css style +*/ +.unselect, i, .i, .icon { + -moz-user-select: -moz-none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none +} + +b, .b, .border { + display: block; + font: 0/0 a +} + +.s-ptn, .s-pvn, .s-pan { + padding-top: 0 !important +} + +.s-pts, .s-pvs, .s-pas { + padding-top: 5px !important +} + +.s-ptm, .s-pvm, .s-pam { + padding-top: 10px !important +} + +.s-ptl, .s-pvl, .s-pal { + padding-top: 20px !important +} + +.s-prn, .s-phn, .s-pan { + padding-right: 0 !important +} + +.s-prs, .s-phs, .s-pas { + padding-right: 5px !important +} + +.s-prm, .s-phm, .s-pam { + padding-right: 10px !important +} + +.s-prl, .s-phl, .s-pal { + padding-right: 20px !important +} + +.s-pbn, .s-pvn, .s-pan { + padding-bottom: 0 !important +} + +.s-pbs, .s-pvs, .s-pas { + padding-bottom: 5px !important +} + +.s-pbm, .s-pvm, .s-pam { + padding-bottom: 10px !important +} + +.s-pbl, .s-pvl, .s-pal { + padding-bottom: 20px !important +} + +.s-pln, .s-phn, .s-pan { + padding-left: 0 !important +} + +.s-pls, .s-phs, .s-pas { + padding-left: 5px !important +} + +.s-plm, .s-phm, .s-pam { + padding-left: 10px !important +} + +.s-pll, .s-phl, .s-pal { + padding-left: 20px !important +} + +.s-mtn, .s-mvn, .s-man { + margin-top: 0 !important +} + +.s-mts, .s-mvs, .s-mas { + margin-top: 5px !important +} + +.s-mtm, .s-mvm, .s-mam { + margin-top: 10px !important +} + +.s-mtl, .s-mvl, .s-mal { + margin-top: 20px !important +} + +.s-mrn, .s-mhn, .s-man { + margin-right: 0 !important +} + +.s-mrs, .s-mhs, .s-mas { + margin-right: 5px !important +} + +.s-mrm, .s-mhm, .s-mam { + margin-right: 10px !important +} + +.s-mrl, .s-mhl, .s-mal { + margin-right: 20px !important +} + +.s-mbn, .s-mvn, .s-man { + margin-bottom: 0 !important +} + +.s-mbs, .s-mvs, .s-mas { + margin-bottom: 5px !important +} + +.s-mbm, .s-mvm, .s-mam { + margin-bottom: 10px !important +} + +.s-mbl, .s-mvl, .s-mal { + margin-bottom: 20px !important +} + +.s-mln, .s-mhn, .s-man { + margin-left: 0 !important +} + +.s-mls, .s-mhs, .s-mas { + margin-left: 5px !important +} + +.s-mlm, .s-mhm, .s-mam { + margin-left: 10px !important +} + +.s-mll, .s-mhl, .s-mal { + margin-left: 20px !important +} +/*提供给bigrender作为lazyload*/ +.g-area-lazyload{ + visibility: hidden; +} +.hide { + display: none !important; + visibility: hidden +} + +.hide-layout { + visibility: hidden +} + +.hide-text { + border: 0; + font: 0/0 a; + text-shadow: none; + color: transparent; + background-color: transparent +} + +.hide-read, .hide-focus { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px +} + +.hide-focus:active, .hide-focus:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto +} +/* float */ +.cf { + zoom: 1 +} + +.cf:before, .cf:after { + content: ''; + display: table +} + +.cf:after { + clear: both +} + +.fl, .fr { + display: inline +} + +.fl { + float: left +} + +.fr { + float: right +} + +.ibw, .ibw-span { + word-spacing: -0.35em; + letter-spacing: -.32em +} + +.ib, .ibw .ib, .ibw-span span, s, .s, .space, .btn { + display: -moz-inline-box; + display: inline-block; + *display: inline; + *zoom: 1 +} + +.ibw .ib, .ibw-span span { + word-spacing: normal; + letter-spacing: normal; + vertical-align: top +} + +.mod { + overflow: hidden; + *overflow: visible; + zoom: 1 +} + +.mod .img { + float: left +} + +.mod .img img { + display: block +} + +.transparent { + filter: alpha(opacity=50); + -moz-opacity: .5; + -khtml-opacity: .5; + opacity: .5 +} + +/** from common.css +常用的命名样式,方便PM在CMS中配置 */ + +.triangle{ + width:0; + height:0; + overflow:hidden; + font-size:0; + line-height:0; + border-color:transparent; + border-style:dashed; + border-width:5px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-ltr/css-framework-ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-ltr/css-framework-ltr.css new file mode 100755 index 000000000..91db0b5cb --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-ltr/css-framework-ltr.css @@ -0,0 +1,6 @@ +@import url('/widget/ui/css-framework-base/css-framework-base.css?__inline'); +@import url('/widget/ui/css-framework-ltr/link.css?__inline'); +/*@require common:widget/ui/jquery/widget/jquery.ui.button/ltr/ltr.css*/ +/*@require common:widget/ui/jquery/widget/jquery.ui.tip/ltr/ltr.css*/ +/*@require common:widget/ui/cycletabs/ltr/ltr.css*/ +/*@require common:widget/ui/notice-pop/ltr/ltr.css*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-ltr/link.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-ltr/link.css new file mode 100755 index 000000000..c28f4f65c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-ltr/link.css @@ -0,0 +1,38 @@ +/** from common.css +常用的命名样式,方便PM在CMS中配置 */ + +/*special status of links*/ +.icon-hot{ + display: inline-block; + width: 30px; + height: 11px; + margin-left: 3px; + cursor: pointer; + background: url(../img/i-hot.png?__sprite) no-repeat; + _position: absolute; + font-size:0; +} +.icon-new{ + display: inline-block; + width: 30px; + height: 11px; + margin-left: 3px; + cursor: pointer; + background: url(../img/i-new.png?__sprite) no-repeat; + _position: absolute; + font-size:0; +} +.icon-new_red{ + display: inline-block; + width: 25px; + height: 15px; + cursor: pointer; + background: url(../img/i-big-new.png?__sprite) no-repeat; + _position: absolute; + font-size:0; +} +.orange,.orange a{color:#f56f2f!important;} +.red,.red a{color:#f00!important;} +.green,.green a{color:#008000!important;} +.bold,.bold a{font-weight:600!important;} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/css-framework-rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/css-framework-rtl.css new file mode 100755 index 000000000..1b01b8482 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/css-framework-rtl.css @@ -0,0 +1,7 @@ +@import url('/widget/ui/css-framework-base/css-framework-base.css?__inline'); +@import url('/widget/ui/css-framework-rtl/layout-rtl.css?__inline'); +@import url('/widget/ui/css-framework-rtl/link-rtl.css?__inline'); +/*@require common:widget/ui/jquery/widget/jquery.ui.button/rtl/rtl.css*/ +/*@require common:widget/ui/jquery/widget/jquery.ui.tip/rtl/rtl.css*/ +/*@require common:widget/ui/cycletabs/rtl/rtl.css*/ +/*@require common:widget/ui/notice-pop/rtl/rtl.css*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/layout-rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/layout-rtl.css new file mode 100755 index 000000000..e238be127 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/layout-rtl.css @@ -0,0 +1,80 @@ +.l-g1-1, .l-g1-2, .l-g1-3, .l-g2-3, .l-g3-3, .l-g1-4, .l-g2-4, .l-g3-4, .l-g4-5, .l-g1-5, .l-g2-5, .l-g3-5, .l-g4-5, .l-g1-8, .l-g3-8, .l-g5-8, .l-g7-8 { + float: right; + _margin-left: -3px !important; + _margin-right: 0 +} + +.l-g1, .l-g2, .l-g3, .l-g4, .l-g5, .l-g6, .l-g7, .l-g8, .l-g9, .l-g10, .l-g11, .l-g12 { + display: inline; + float: right; + margin-right: 10px; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + background: #aaa +} + +[class*="l-g"]:first-child { + margin-right: 0 +} + +.l-g_1 { + margin-right: 80px !important; + margin-left: 0 !important +} + +.l-g_2 { + margin-right: 160px !important; + margin-left: 0 !important +} + +.l-g_3 { + margin-right: 240px !important; + margin-left: 0 !important +} + +.l-g_4 { + margin-right: 320px !important; + margin-left: 0 !important +} + +.l-g_5 { + margin-right: 400px !important; + margin-left: 0 !important +} + +.l-g_6 { + margin-right: 480px !important; + margin-left: 0 !important +} + +.l-g_7 { + margin-right: 560px !important; + margin-left: 0 !important +} + +.l-g_8 { + margin-right: 640px !important; + margin-left: 0 !important +} + +.l-g_9 { + margin-right: 720px !important; + margin-left: 0 !important +} + +.l-g_10 { + margin-right: 800px !important; + margin-left: 0 !important +} + +.l-g_11 { + margin-right: 880px !important; + margin-left: 0 !important +} + +.l-g_1, .l-g_2, .l-g_3, .l-g_4, .l-g_5, .l-g_6, .l-g_7, .l-g_8, .l-g_9, .l-g_10, .l-g_11 { + margin-left: 10px; + margin-right: 0 +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/link-rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/link-rtl.css new file mode 100755 index 000000000..916d052fe --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-framework-rtl/link-rtl.css @@ -0,0 +1,37 @@ +/** from common.css +常用的命名样式,方便PM在CMS中配置 */ + +/*special status of links*/ +.icon-hot{ + display: inline-block; + width: 30px; + height: 11px; + margin-left: 3px; + cursor: pointer; + background: url(../img/i-rtl-hot.png?__sprite) no-repeat; + _position: absolute; + font-size:0; +} +.icon-new{ + display: inline-block; + width: 30px; + height: 11px; + margin-left: 3px; + cursor: pointer; + background: url(../img/i-rtl-new.png?__sprite) no-repeat; + _position: absolute; + font-size:0; +} +.icon-new_red{ + display: inline-block; + width: 25px; + height: 15px; + cursor: pointer; + background: url(../img/i-big-rtl-new.png?__sprite) no-repeat; + _position: absolute; + font-size:0; +} +.orange,.orange a{color:#f56f2f!important;} +.red,.red a{color:#f00!important;} +.green,.green a{color:#008000!important;} +.bold,.bold a{font-weight:600!important;} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-icon/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-icon/ltr/ltr.css new file mode 100755 index 000000000..63157eae7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-icon/ltr/ltr.css @@ -0,0 +1,56 @@ +/** from common.css +常用的命名样式,方便PM在CMS中配置 */ + +/*special status of links*/ + +/*large*/ +/*.i-l{}*/ +/*media*/ +/*.i-m{} */ +/*small*/ +/*.i-s{}*/ + +.icon-hot, .icon-new, .icon-new_red{ + display: inline-block; + *display: inline; + zoom: 1; + margin-left: 3px; + cursor: pointer; + _position: absolute; + font-size:0; +} +.icon-hot{ + width: 30px; + height: 11px; + background: url(../../img/i-hot.png?__sprite) no-repeat; +} +.icon-new{ + width: 30px; + height: 11px; + background: url(../../img/i-new.png?__sprite) no-repeat; +} +.icon-new_red{ + width: 25px; + height: 15px; + background: url(../../img/i-big-new.png?__sprite) no-repeat; +} + + +/* +模块加载时的菊花 + +USAGE: + +
                              +

                              content

                              +
                              + + */ +.mod-o{ + width: 100%; + height: 100%; + background: #fff url(../../img/o.gif) no-repeat center center; + display: inline-block; + *display: inline; + zoom: 1; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-icon/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-icon/rtl/rtl.css new file mode 100755 index 000000000..23880b245 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-icon/rtl/rtl.css @@ -0,0 +1,56 @@ +/** from common.css +常用的命名样式,方便PM在CMS中配置 */ + +/*special status of links*/ + +/*large*/ +/*.i-l{}*/ +/*media*/ +/*.i-m{} */ +/*small*/ +/*.i-s{}*/ + +.icon-hot, .icon-new, .icon-new_red{ + display: inline-block; + *display: inline; + zoom: 1; + /*margin-right: 3px;*/ + cursor: pointer; + _position: absolute; + font-size:0; +} +.icon-hot{ + width: 30px; + height: 11px; + background: url(../../img/i-rtl-hot.png?__sprite) no-repeat; +} +.icon-new{ + width: 30px; + height: 11px; + background: url(../../img/i-rtl-new.png?__sprite) no-repeat; +} +.icon-new_red{ + width: 25px; + height: 15px; + background: url(../../img/i-big-rtl-new.png?__sprite) no-repeat; +} + + +/* +模块加载时的菊花 + +USAGE: + +
                              +

                              content

                              +
                              + + */ +.mod-o{ + width: 100%; + height: 100%; + background: #fff url(../../img/o.gif) no-repeat center center; + display: inline-block; + *display: inline; + zoom: 1; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/css-ui.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/css-ui.css new file mode 100755 index 000000000..894697509 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/css-ui.css @@ -0,0 +1,690 @@ +/** + * ui-arrow + * + * common arrow + * + * @author yuji + * @version 0.1.0 + * @update 2013/11/12 + * + * @compatible IE6-10 / Chrome / Firefox / Opera / Safari + * + * @extend + * .ui-arrow-t(op) Arrow Up + * .ui-arrow-r(ight) Arrow Right + * .ui-arrow-b(ottom) Arrow down + * .ui-arrow-l(eft) Arrow Left + * + * .ui-arrow-a(lign)a(ll) Align Centers + * .ui-arrow-a(lign)v(ertical) Align Vertical Centers + * .ui-arrow-a(lign)h(orizontal) Align Horizontal Centers + * + * @usage + *
                              + * + * content + *
                              + */ + +/** + * 1. Make IE6/7 border transparent. + * 2. Default width. + * 3. Transparent border with problem on firefox. + */ +.ui-arrow { + position: absolute; + width: 0; + height: 0; + font-size: 0; + border-style: solid; + /* 3 */ + border-color: rgba(255,255,255,0); + border-color: transparent\0; + *border-color: white; + /* 1 */ + *filter: chroma(color=white); + border-width: 5px; + /* 2 */ +} + +/** + * 1. Double border-width. + * 2. Default border color. + * 3. Support IE6/7 + */ +.ui-arrow-t { + top: -10px; + /* 1 */ + border-bottom-color: #00b075; + /* 2 */ +} +.ui-arrow-r { + right: -10px; + border-left-color: #00b075; +} +.ui-arrow-b { + bottom: -10px; + border-top-color: #00b075; +} +.ui-arrow-l { + left: -10px; + border-right-color: #00b075; +} +.ui-arrow-aa { + margin: auto; + left: 0; + right: 0; + top: 0; + bottom: 0; + *bottom: auto; + *top: 50%; + *margin-top: -5px; + /* 3 */ + *right: auto; + *left: 50%; + *margin-left: -5px; +} +.ui-arrow-av { + margin: auto 0; + top: 0; + bottom: 0; + *bottom: auto; + *top: 50%; + *margin-top: -5px; +} +.ui-arrow-ah { + margin: 0 auto; + left: 0; + right: 0; + *right: auto; + *left: 50%; + *margin-left: -5px; +} +.ui-flag { + overflow: hidden; + line-height: 1; + padding-bottom: 5px; + position: absolute; + z-index: 1; + pointer-events: none; + -webkit-transform:scale(.8); + -moz-transform:scale(.8); + -ms-transform:scale(.8); + transform:scale(.8); + /*-webkit-filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); + -moz-filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); + -ms-filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); + filter: drop-shadow(0 1px 1px rgba(0,0,0,.2));*/ + text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); +} +.ui-flag_t { + display: inline-block; + padding: 1px 3px; + padding: 1px 2px\9; + border-radius: 3px; + font-family: Arial, sans-serif; + font-size: 12px; + font-size: 8px\9; + color: #fff; + background: #F66540; + box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, .15); +} +.ui-flag .ui-arrow { + bottom: -3px; + right: -4px; + border-top-color: #F66540; + border-width: 3px\9; + bottom: -1px\9; + *bottom: 1px; +} +.ui-flag--green .ui-flag_t { + background: #00ac73; +} +.ui-flag--green .ui-arrow { + border-top-color: #00ac73; +} +.ui-flag--blue .ui-flag_t { + background: #4787ED; +} +.ui-flag--blue .ui-arrow { + border-top-color: #4787ED; +} +.ui-btn { + background-color: #00CD8D; + background-image: -o-linear-gradient(-90deg, #00CD8D 0%, #01BF87 100%); + background-image: -moz-linear-gradient(-90deg, #00CD8D 0%, #01BF87 100%); + background-image: -webkit-linear-gradient(-90deg, #00CD8D 0%, #01BF87 100%); + background-image: -ms-linear-gradient(-90deg, #00CD8D 0%, #01BF87 100%); + background-image: linear-gradient(-180deg, #00CD8D 0%, #01BF87 100%); + border: 1px solid #00AF82; + border-radius: 2px; + padding: 0 10px; + display: inline-block; + color: #fff; + outline: none; + text-align: center; + box-shadow: 1px 1px 0 0 rgba(0, 0, 0, .1); + font-weight: bold; + vertical-align: bottom; + cursor: pointer; + min-width:40px; + width: auto!important; + width: 40px; + height: 23px; + line-height: 23px; + text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); +} +.ui-btn:active { + box-shadow: none; + background: #01BF87; + text-shadow: none; +} +.ui-btn_i { + display: inline-block; + margin-right: 3px; + vertical-align: middle; +} +.ui-btn-s { + height: 19px; + line-height: 19px; + padding: 0 5px; +} +.ui-btn-l { + height: 28px; + line-height: 28px; + font-size: 14px; + padding: 0 15px; +} +.ui-btn--white { + border-color: #ddd; + color: #00AF82; + font-weight: bold; + background-color: #F5F8F7; + box-shadow: 1px 1px 0 0 rgba(0, 0, 0, .035); + background-image: -o-linear-gradient(-90deg, #FFFFFF 0%, #F5F8F7 100%); + background-image: -moz-linear-gradient(-90deg, #FFFFFF 0%, #F5F8F7 100%); + background-image: -webkit-linear-gradient(-90deg, #FFFFFF 0%, #F5F8F7 100%); + background-image: -ms-linear-gradient(-90deg, #FFFFFF 0%, #F5F8F7 100%); + background-image: linear-gradient(-180deg, #FFFFFF 0%, #F5F8F7 100%); + text-shadow: none; +} +.ui-btn--white:active { + background: #F5F8F7; +} +.ui-btn--gray { + border-color: #999; + background-color: #aaa; + box-shadow: 1px 1px 0 0 rgba(0, 0, 0, .03); + background-image: -o-linear-gradient(-90deg, #C0C0C0 0%, #aaa 100%); + background-image: -moz-linear-gradient(-90deg, #C0C0C0 0%, #aaa 100%); + background-image: -webkit-linear-gradient(-90deg, #C0C0C0 0%, #aaa 100%); + background-image: -ms-linear-gradient(-90deg, #C0C0C0 0%, #aaa 100%); + background-image: linear-gradient(-180deg, #C0C0C0 0%, #aaa 100%); + /*text-shadow: none;*/ +} +.ui-btn--gray:active { + background: #aaa; +} +.ui-btn--blue { + border-color: #2F75FD; + background-color: #4883FD; + /*box-shadow: 1px 1px 0 0 rgba(0,0,0,.03);*/ + background-image: -o-linear-gradient(-90deg, #4E8DFF 0%, #4883FD 100%); + background-image: -moz-linear-gradient(-90deg, #4E8DFF 0%, #4883FD 100%); + background-image: -webkit-linear-gradient(-90deg, #4E8DFF 0%, #4883FD 100%); + background-image: -ms-linear-gradient(-90deg, #4E8DFF 0%, #4883FD 100%); + background-image: linear-gradient(-180deg, #4E8DFF 0%, #4883FD 100%); + /*text-shadow: none;*/ +} +.ui-btn--blue:active { + background: #4883FD; +} +.ui-btn_bar, .ui-btn_bar-r { + width: 100%; + display: inline-block; +} +.ui-btn_bar .ui-btn { + float: left; + margin-right: 10px; +} +.ui-btn_bar-r .ui-btn { + margin: 0; + float: right; + margin-left: 10px; +} +.ui-bubble { + position: absolute; + z-index: 9; + border-radius: 8px; + line-height: 1.3; + border: 1px solid #8ECDB7; + border-bottom-color: #98d7c2; + border-bottom-width: 2px; + background-color: #fcfefd; + padding: 4px 8px; + width: 230px; + box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, .05); + display: inline-block; + *display: inline; + zoom: 1; +} +.ui-bubble .ui-bubble_in, .ui-bubble .ui-bubble_out { + border-width: 7px; +} +.ui-bubble-t .ui-bubble_in, .ui-bubble-t .ui-bubble_out { + top: -14px; + left: 20px; + border-bottom-color: #8ECDB7; +} +.ui-bubble-t .ui-bubble_in { + margin-top: 1px; + border-bottom-color: #fcfefd; +} +.ui-bubble-b .ui-bubble_in, .ui-bubble-b .ui-bubble_out { + bottom: -14px; + left: 20px; + border-top-color: #98d7c2; +} +.ui-bubble-b .ui-bubble_in { + margin-bottom: 2px; + border-top-color: #fcfefd; +} + +.ui-bubble-l .ui-bubble_in, .ui-bubble-l .ui-bubble_out { + left: -14px; + top: 7px; + border-right-color: #98d7c2; +} +.ui-bubble-l .ui-bubble_in { + margin-left: 1px; + border-right-color: #fcfefd; +} +.ui-bubble-l .ui-bubble_out { + top: 7px; + left: -16px; + border-width: 8px; +} +.ui-bubble-r .ui-bubble_in, .ui-bubble-r .ui-bubble_out { + right: -14px; + top: 7px; + border-left-color: #98d7c2; +} +.ui-bubble-r .ui-bubble_in { + margin-right: 1px; + border-left-color: #fcfefd; +} +.ui-bubble-r .ui-bubble_out { + top: 7px; + right: -16px; + border-width: 8px; +} +/*.ui-bubble .ui-bubble_in{ left: 20px; top: -12px; right: auto; border-width: 6px; border-bottom-color: #fcfefd;} +.ui-bubble .ui-bubble_out{ left: 19px; top: -14px; right: auto; border-width: 7px; border-bottom-color: #98d7c2;}*/ + .ui-bubble .ui-bubble_more { + padding-right: 5px; + color: #00b075; + display: inline-block; + position: relative; + float: right; + margin-right: 7px; + *margin-top: -20px; +} +.ui-bubble .ui-bubble_more:hover { + text-decoration: underline; +} +.ui-bubble_close { + font-size: 14px; + color: #AEE2D0; + font-weight: bold; + cursor: pointer; + padding: 10px; + margin-right: -10px; + line-height: 0; + outline: none; + float: right; + font-family: Tahoma; + position: relative; + top: 0; + left: 0; +} +/*.ui-bubble_close:hover{ color: #00b075;} + +.ui-bubble_close:active{ top: 1px; left: 1px;}*/ + .ui-bubble_t { + color: #666; + font: 12px/1.7 Arial; +} +.ui-bubble_i { + float: left; + margin: 3px 5px 0 0; +} +.ui-bubble .ui-btn_bar-r { + margin-top: 5px; +} +.ui-bubble-s { + border-radius: 4px; + line-height: 1; + padding: 0px 5px; + width: auto; + white-space: nowrap; + border-bottom-width: 1px; +} +.ui-bubble-s .ui-bubble_in, .ui-bubble-s .ui-bubble_out { + /*margin-left: -10px;*/ +} +.ui-bubble-hover .ui-bubble { + -webkit-transition: all .2s linear; + -moz-transition: all .2s linear; + -o-transition: all .2s linear; + -ms-transition: all .2s linear; + transition: all .2s linear; + pointer-events: none; + visibility: hidden; + opacity: 0; +} +.ui-bubble-hover:hover .ui-bubble { + visibility: visible; + opacity: 1; + top: -55px; +} + + +/* +模块加载时的菊花 + +USAGE: + +
                              +

                              content

                              +
                              + + */ +.ui-o{ + width: 100%; + height: 100%; + vertical-align: middle; + background: url(data:image/gif;base64,R0lGODlhIAAgAPMAAA4Q/DU1/E1N/HFx/JCP/LS0/NDQ/PDw/P///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkOAAgAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAIAAgAAAE+BDJSekZ49TNuzSCYHjkNxAUKFLDWkoFNsLhjBhBgL7IJRAaRKEmOQhyQV5sUPgQhbkdr4fJ3IiHnCDJMRS4Q+ZNhiDkmhODeEJof4uE9eRgtlIDgABl2TZo/B0HI3R4eAMVBm1xQC8gAI8CaBUHBYpcHQZ5OpeTBZIlcZxTHqI9B6engKOerJ6UioqfL3iPtZFuBJWyJbS1eYLAfqUdrazDo1OCNiUGqoFeri+UrqKCrM6k0AXYN9czp4Ea1td7nqrWyx/bc9oW2NOD23/R7MfTb9Pi0Mcb+0X00NKRuBck3z96jRAaPCgw0Lo5CLvxGxgRmUNuHiIAACH5BAkOAAgALAAAAAAgACAAgxET/DU2/E9P/Ghp/I6O/LW1/M/O/PDw/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT3EMlJ6SHk1M27NINgeORHFBQ4jBOxllMxZJPKIoYgELB0YRrc4IU4hATBnuz0GbIKOl7P56LZisckx2DQGjCoL42gQ9UIN0QB0/XJzJOLYBC8BO4pcKF90Fo0B1B3AVI1a2B+WwODIhwHBoeJGwaDBZJxXFNAU5wefZ+fnZB7BaWPpailnQIAAAGuAAKpqGkwrK+wSJ9dfZ2ktJecwRWPtR5Dw32owx+tADQbgcAwlM4AcB+pdZe9F9YDFNNFkMaBNyDOFm1xpSNcbaNeA9jRy0Wm9/ic8W6W2XvC7OWrw69HwYHsAPYwZ6FdCn+dGkKM6GkPswkRAAAh+QQJDgAIACwAAAAAIAAgAIMREfwxMvxSU/xwcPyUlPy0tPzQz/zw8fwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE+hDJSekh5dTNuzTDYHjkVxSUQYjUOpYfQWjxPIECCiMXRqsD2iVE26kILxALUQjpdryT7Tg6hIKkg6GIoHZlGoJg8OQhKafCVnIonC0Fgc0sqKfShteBa9G063UEFW14fBw4dUuDhBkwB4CNHlovMGBQl5Jae5uYeWp5WwZpo5gCAaeoOaMnlDsDqKhBm1t7nayehpg8UJNQRFmMuRUGAQABc4OjayUGAgDGOcOjQsJaUcXGA2isQqKtPAPGQgTPARbLbKxRjeEAgjcYWWl+J37PAMIdopGENO3avOal43fvm4d9RfpNKPAMoCM1cCJJcFZGl0Jd8tCViAAAIfkECQ4ACAAsAAAAACAAIACDDhD8MzP8TE38cHD8j478tLT80dH88PD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABP0QyUnpKeXUzbs0BaF5JHIYBmUQIhWm5YeNJkuvQxFLV2GMoFZtINyBfDzbh6Xb8TAZxIqQOrCKnBPNhKnOEIXBAPYkg7ujE9ISEl4GgoEKGjVtLZoTXNycqNExK3FEZn49dSQGYjl3FSeFHl9Okx0HWpaWlCibKH90fTtwAqOjOZ9rTqKkcZitjYmcnZSzjj9OSh6WUK8VBgIBAohsULYligHIAoVHPjCZWV7IyAQugCYghVYAAmkEyRbFT0gFyCkDAQCgK5DDUQQA6SboAbwdRyMF8E3vAXJOh/j08ZjHjsO9CfniSUjoL8YFM+8USjhXcEdCULQ2HEBWr0IEACH5BAkOAAgALAAAAAAgACAAgxET/DU2/E9P/Gxs/JCQ/LW1/NHQ/PDw/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT+EMlJ6THl1M27xJknSkdhWEU4pdr4sVOpIgdBFC6ZqnJb3q0cyAdDGGynnA7Wo6UIQc4lKjs1C0hUUrIz+DDbyZGHHRAooOIhatFcbIQBzpL2uo4DM1SaZkvhM3xhIkVKhlJriWuHBo2OXjuRc0pxAnl5BGldh3GXl1OgfiKPjqKHhheDHlimJDKBHQcClrBLKXYjBgOzloN1SY2xVgW8Amcrtz4BAAMVNQEDPgSzzTG4EgQAAAIIxAEnAwEBk0aZIgfaABoFy1biAq0cAtrHBQDj2AIBx0LaAS32AMyRJS4ehQHaJtnD90EcvxH2qnFJeFCAKkMLyZ2SMsvghAgAIfkECQ4ACAAsAAAAACAAIACDEBL8MTL8U1P8b2/8k5L8tLX80dD88PD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABP4QyUnpMeXUzbs8ReaNX2FYoTZhKolgYhkjoOnKhlrrcOvCJ1pKArxNaqKdcOi5+GonZc+So4RMPFsFE6QZCIQCBWYKHnwWzaUADlWQWBeoPUtf0ZwDmFBtGrokf3hGhEdOZ2eFOX+Ma1dXhQQDknthjyGALpUDkwSIh4MejIJ9G6GFWwIDRkwdegCwp0ecA3UTBbCwAZkcX7R8FQO5ACJ/rlEFnKpiE7kDOgEBBG8FqjqSnFYDgASwq9UCJwQCAswfwE3RARoG0VHkArIbAwHERO4S4NNGBrDx+dGYHRhATt4EYQHMtdu1gtw+FwUCrLqFb8I4XoQiMkQ1YuC/GwIRAAAh+QQJDgAIACwAAAAAIAAgAIMOEPwyM/xMTfxwcPyRkPy1tfzQ0Pzw8PwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE8xDJSekp5tTNu7yF5o3IZVhFSBkqKbFtmYoy5n5pC4oHTLs+XAt2uglVu1qM0/uBTsngpEnJZT6s4sqGzW1ThuLhZ9H0YNxpDkNmoq+bca4dt9KnYWP4buwr135jgoIBAIaHAX4FBIyNBYWHhgKKjY5ogH2CGYIdfH4WAwRGMyMHBAGoWh6moXAVj6gAAaqdjKEEtAOIKq4VYyUGBLcFFKgBAzwCAaIoA8g4wswSBQOqsKIGzicFAtUotL7KARoGAgJQzs99pwHECOXn087SLgcB5iLc8SXpnhTs7t6Z05JtQEAS3OjpUyUMXB94Dj+BUuciAgAh+QQJDgAIACwAAAAAIAAgAIMSE/w1NvxQUPxrbPyPj/y1tfzPz/zw8PwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE+hDJSekp5tTNu7yF5o3IZVhFSBkqKbFtmYoy5n5phrcHTLuwE8L3yt0mIB1IA4pxCgNh0dZTEZG6CWArEFWlE5a0mqIItlsC82dhGmA2SiGADoA7ZAz7M0DfOU1ZeAMDR297eEceeUaKB48Zjwd0AHR0AopDKZsYZ2hcmZycJmJxR5KQj4mZLgcDBIaCgAUCAV2tBAUEsmG1AbZ/GxcEuU4IA7+2VoglJz3ExAVmv2p8AtIWBsReLLkru3ICArDa4FDgWMwf4rcGhM7Q6k/i2O5REroD2DcG4gMi9oQciHeEgDgpAcMQ0Gdo3AoB9yboCmboHSsSA6vdiAAAIfkECQ4ACAAsAAAAACAAIACDDxH8MDH8UlL8b2/8lJL8tLT80M/88PD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABP4QyUnpMebUzbs0RaF5JFIAghWOn1hOAwAU07HWofF+cjDaLsTltkMIZIRWEFTQFYUygAY4DQU7BYJTQpANhCANkwUmBwCBwe/8rQBrTBoMjSZoru4pMFcpHNECWx5DOWQ1BGcBgh17GSQHA20vGIaDT4wgGHxPB50ZnZABoqOSO3FWBgKjoylPp4WZGBiXoJ6dl7huBEmmjoN+AgKVG3u3GwYDwQJqL4RNhgTKAy6+xFOngsp2EgcE08cEQc4UBtsTyANJ3dvlWhbVHJDLYpE6NuHDHt4DTu39u4seRWImJJ2Te3hIFKh3ztsWf0WQ8fpgkJy5XAjKEcQYL0u+DQIRAAAh+QQJDgAIACwAAAAAIAAgAIMOEPw0NfxOT/xxcfyQj/y0tPzS0fzx8PwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE/hDJSakJ4dTNuywAUHjkFwwUKFqFVkoDEIxfSCNHURivZIQCF8EmORh0rt5whVDRjrve5IDJNIk5JKlASCKWqAJmBPUavQJMt5gmbKBT6A0xqApaCAOPc9D0dTp7EwYCaQECgh5GgAZeUwRVjnyMkhQHBG49epV8Uop6O3qJL32NfX0DhaoCKJ6ArwapqwOtUnKvRqKhnjinZ5y8UpdzJJskRrQDwFOAfRyxtAIEo3xyjRUE0QPXznx+t4nJeDjZxHlHcYAsidBkWmWW14qYa5f1zbwFA9NFXC5Q1BTtW5MH055F417o41eEQMIsAZ85ZMHQR8JgBQli7JBlGYUIACH5BAkOAAgALAAAAAAgACAAgxIT/DY2/E5P/Gpq/I6O/LW1/M/P/PDw/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT+EMlJ6RHi1M27LAFQeKRkBARVAIBBCWI5DUHgfuyIA4MsHbXM7gZk3XyEmg4UQxBYPd+vFtCsAqMDC6DxGAjdTy1lwIwGrNTkYAgjMALwj6Zeo6s/Q2FPIcAHBRptHQYubHp7RyYDf4odbHsFgxsHBYxCJZV7B26UBHUlhZ1SpBaFp4WlnG2cnAQDsLGgMoiRkq+xsLOhtomHqI6ZrWycpcYVmlKiJGyfcpmRxRtfnwPPzLWTEwXVBIPSlBqQkYrWBIE/3MGVR+M6JugTtQjsgpumoxbccpri0aXUuvRLJ4nUgU/xBtL75yPgmnsEgxHypq+gvHjHFmLMSElSPg4CEQAAIfkECQ4ACAAsAAAAACAAIACDEBL8MTL8VFT8b2/8k5P8tbX80M/88PD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABP0QyUnpGeLUzbs0QWB45CcQVBEW1CCWEyEIo6S+NgAMsCkMGsStdhAAAsGeTMBCgHAEHaonKf40N9YhcExyDAVvYYYyYEaD4/QzaEoGcELwcqpcAplqWkchwOEGGoEdBiMHUToAAhUGMn9ehFyJbhYFjzAGiXIkh5QkcJBUnB0HhYGFoZylB6ysBK9xr6JCBbW2ja+wsqJgtrWnpqizrayBqbOiBwU1mIMepbWbJcq1rBydr2Ew0L+QBbnLGtbX4r2/Ka/O0MwTyszclMpe1IbhTtUWzqS24vjU2rzwIaA25xyVfwUBIqTSKwnBdga3Las0cQKYYz0eIuNkr0cEADs=) no-repeat center center; + *background: url(./img/o.gif) center center no-repeat; + display: inline-block; *display: inline; zoom: 1; + color: #999; +} + +.ui-o-s{ + background-size: 21px 21px; + width: 36px; height: 36px; text-indent: 36px; line-height: 36px; +} + + + +/* + +star + */ + +/** + * 1. Make radius. + * 2. Fix IE6 bug. + * 3. Fix firefox font-size bug. + */ +.ui-star{ + font: 15px Arial; + position: relative; + color: #555; + float: left; + margin: 0 3px; + vertical-align: middle; + -moz-transform:scale(1.5); + line-height: 1; + + /* 1 */ + /*border-radius: 30%; + overflow: hidden; + width: 12px; + height: 12px; + text-indent: -1px; + line-height: 11px;*/ +} + +/* 3 */ +@-moz-document url-prefix() { + .ui-star{ + margin: 0 6px; + } +} + +.ui-star_bg{ + display: none; + position: absolute; + color: #FDC942; + left: 0; + top: 0; + _top: 1px; + overflow: hidden; + -webkit-filter: drop-shadow(0 0 1px rgba(253,200,63,.7)); + -moz-filter: drop-shadow(0 0 1px rgba(253,200,63,.7)); + -ms-filter: drop-shadow(0 0 1px rgba(253,200,63,.7)); + -o-filter: drop-shadow(0 0 1px rgba(253,200,63,.7)); + filter: drop-shadow(0 0 1px rgba(253,200,63,.7)); + +} + +.ui-star-half .ui-star_bg{ + width: 50%; +} + +.ui-star:hover{ + /* 2 */ + zoom: 1; +} + +.ui-star-cur .ui-star_bg, +.ui-star:hover .ui-star_bg{ + display: inline-block; + cursor: pointer; +} + +.ui-star-l{ + font-size: 25px; +} + + +/* + +ui-form + */ + +/** + * 1. IE8 fallback + * 2. Fix IE6 bug. + * 3. Fix firefox font-size bug. + */ + +.ui-form{} + +.ui-form_radio, +.ui-form_checkbox{ + position: relative; +} + +.ui-form_radio input[type="radio"], +.ui-form_checkbox input[type="checkbox"]{ + vertical-align: middle; + cursor: pointer; + outline: none; + opacity: 0; +} + +.ui-form_radio input[type="radio"] + span, +.ui-form_checkbox input[type="checkbox"] + span{ + vertical-align: middle; + line-height: 1.5; + cursor: pointer; + text-indent: 12px; + display: inline-block; +} + +/* 1 */ +@media \0screen { + .ui-form_radio input[type="radio"] + span, + .ui-form_checkbox input[type="checkbox"] + span{ + text-indent: 3px; + } +} + +.ui-form_radio input[type="radio"] + span::before, +.ui-form_checkbox input[type="checkbox"] + span::before{ + content: ""; + display: inline-block; + width: 14px; + height: 14px; + vertical-align: middle; + background: #fff; + cursor: pointer; + border-radius: 4px; + border: 2px solid #D7DCDE; + position: absolute; + left: 0; + top: -2px; +} +.ui-form_radio-rtl input[type="radio"] + span::before, +.ui-form_checkbox-rtl input[type="checkbox"] + span::before{ + left: auto; + right: 0; +} +.ui-form_radio input[type="radio"] + span::before{ + border-radius: 50%; + border: 2px solid #D7DCDE; + background: #fff; + width: 12px; + height: 12px; + margin: 0 2px; + top: 0; +} + +.ui-form_radio input[type="radio"]:focus, +.ui-form_checkbox input[type="checkbox"]:focus{ + outline: none; +} + +.ui-form_radio:hover input[type="radio"] + span::before, +.ui-form_checkbox:hover input[type="checkbox"] + span::before{ + border-color: #06AC76; +} + +.ui-form_radio input[type="radio"]:focus + span::before, +.ui-form_checkbox input[type="checkbox"]:focus + span::before{ + border-color: #06AC76; +} + +.ui-form_radio input[type="radio"] + span::after, +.ui-form_checkbox input[type="checkbox"] + span::after{ + content: "\2713"; + font-family: Tahoma; + width: 16px; + height: 16px; + vertical-align: top; + cursor: pointer; + position: absolute; + top: -6px; + left: 3px; + text-indent: 0; + display: none; + font-size: 18px; + color: #fff; + outline: none; + margin-left: -2px \9; + margin-top: -1px \9; + margin-left: -2px \0; + margin-top: 0 \0; +} +.ui-form_radio-rtl input[type="radio"] + span::after, +.ui-form_checkbox-rtl input[type="checkbox"] + span::after{ + left: auto; + right: 3px; +} + +.ui-form_radio input[type="radio"] + span::after{ + content: ""; + border-radius: 50%; + background: #fff; + width: 8px; + height: 8px; + top: 4px; + left: 6px; + border-radius: 50%; + background: #53C5A0; + background-image: -o-radial-gradient(50% 164%, #0DA064 82%, #53C5A0 100%); + background-image: -moz-radial-gradient(50% 164%, #0DA064 82%, #53C5A0 100%); + background-image: -ms-radial-gradient(50% 164%, #0DA064 82%, #53C5A0 100%); + background-image: radial-gradient(50% 164%, #0DA064 82%, #53C5A0 100%); + margin-left: -1px \9; + margin-top: -1px \9; + margin-left: 0 \0; + margin-top: 0 \0; +} +.ui-form_radio-rtl input[type="radio"] + span::after{ + left: auto; + right: 6px; + margin-left: auto \9; + margin-right: -1px \9; + margin-right: 0 \0; + margin-left: auto \0; +} + +.ui-form_radio input[type="radio"]:checked + span::before, +.ui-form_checkbox input[type="checkbox"]:checked + span::before{ + border-color: #06AC76; +} + +.ui-form_checkbox input[type="checkbox"]:checked + span::before{ + background: #06AC76; +} + +.ui-form_radio input[type="radio"]:checked + span::after, +.ui-form_checkbox input[type="checkbox"]:checked + span::after{ + display: inline-block; +} + +.ui-form_checkbox input[type="checkbox"]:disabled + span::before, +.ui-form_radio input[type="radio"]:disabled + span::before{ + border-color: #eee !important; + background: #fefefe !important; +} + +.ui-form_checkbox input[type="checkbox"]:disabled + span::after{ + color: #ddd !important; +} +.ui-form_radio input[type="radio"]:disabled + span::after{ + background: #ddd !important; +} + +/* + +skin + */ +.ui-form--blue{} +.ui-form--blue .ui-form_radio:hover input[type="radio"] + span::before, +.ui-form--blue .ui-form_checkbox:hover input[type="checkbox"] + span::before{ + border-color: #46A4FF; +} + +.ui-form--blue .ui-form_radio input[type="radio"]:focus + span::before, +.ui-form--blue .ui-form_checkbox input[type="checkbox"]:focus + span::before{ + border-color: #46A4FF; +} +.ui-form--blue .ui-form_radio input[type="radio"]:checked + span::before, +.ui-form--blue .ui-form_checkbox input[type="checkbox"]:checked + span::before{ + border-color: #46A4FF; +} + +.ui-form--blue .ui-form_checkbox input[type="checkbox"]:checked + span::before{ + background: #46A4FF; +} + +.ui-form--blue .ui-form_radio input[type="radio"] + span::after{ + background: #53C5A0; + background-image: -o-radial-gradient(50% 164%, #46A4FF 82%, #2C97DE 100%); + background-image: -moz-radial-gradient(50% 164%, #46A4FF 82%, #2C97DE 100%); + background-image: -ms-radial-gradient(50% 164%, #46A4FF 82%, #2C97DE 100%); + background-image: radial-gradient(50% 164%, #46A4FF 82%, #2C97DE 100%); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/img/o.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/img/o.gif new file mode 100755 index 000000000..765d60f55 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/img/o.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/img/o2.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/img/o2.gif new file mode 100755 index 000000000..a3a5b9ee5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/css-ui/img/o2.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/cycletabs.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/cycletabs.js new file mode 100755 index 000000000..5d069836c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/cycletabs.js @@ -0,0 +1,853 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var helper = require('common:widget/ui/helper/helper.js'); +var cycletabs = {}; + +/** + * 一个特殊的数组,具有循环的特征。起始位会随着数据的获取而自行跳循环处理 + * @constructor + */ +cycletabs.UserLoopArray = function(){ + this.first = 0; + this.last = 0; + this.size = 0; + this.numberList = []; + this.count = 7; + this.current = 0; +}; +cycletabs.UserLoopArray.prototype = { + init: function(count, size, first){ + //初始化下标队列 + for(var i=0;i (this.count-1)){ + this.last = (this.last+1) % this.count - 1; + if(this.last < 0){ + this.last = this.count-1; + } + } + }, + /** + * 获得当前的首位下标 + */ + getFirst: function(){ + return this.first; + }, + getLast: function(){ + return this.last; + }, + getCurrent: function(){ + return this.current; + }, + getCount: function(){ + return this.count; + }, + getList: function(){ + var counter = this.size; + var arr = new Array(counter); + var i = 0; + var pointer = this.first; + while(counter){ + arr[i] = this.numberList[pointer]; + if(pointer == this.count-1){ + pointer = 0; //reset + } else { + pointer++; + } + i++; + counter--; + } + return arr; + }, + /** + * 在数可以循环的情况下,根据给定的两个index,计算前进或者后退的距离 + * @param index + * @param diffIndex + */ + getDiff: function(index, diffIndex){ + + var forwardStep = diffIndex - index; + var backwardStep = index - diffIndex; + + if(forwardStep < 0){ + forwardStep += this.count; + } + if(backwardStep < 0){ + backwardStep += this.count; + } + return { + forwardStep: forwardStep, + backwardStep: backwardStep + }; + + }, + getPrev: function(){ + var first = this.first; + first--; + if(first < 0){ + first = this.count-1; + } + return first; + }, + getNext: function(){ + var last = this.last; + last++; + if(last == this.count){ + last = 0; + } + return last; + }, + /** + * 向后一位或指定位数 + * @param {number} [step=1] 指定后退的步长 + */ + stepPrev: function(step){ + if(step == null){ + step = 1; + } + while(step){ + this.first--; + this.last--; + this.current--; + if(this.first < 0){ + this.first = this.count-1; + } + if(this.last < 0){ + this.last = this.count-1; + } + if(this.current < 0){ + this.current = this.count-1; + } + step--; + } + return { + first: this.first, + last: this.last, + current: this.current, + list: this.getList() + } + }, + /** + * 向前一位或指定位数 + * @param {number} [step=1] 指定前进的步长 + */ + stepNext: function(step){ + if(step == null){ + step = 1; + } + while(step){ + this.first++; + this.last++; + this.current++; + if(this.first == this.count){ + this.first = 0; + } + if(this.last == this.count){ + this.last = 0; + } + if(this.current == this.count){ + this.current = 0; + } + step--; + } + return { + first: this.first, + last: this.last, + current: this.current, + list: this.getList() + } + }, + debug: function(){ + return [ + ' first:', this.first, + ' last:', this.last, + ' current:', this.current, + ' prev:', this.getPrev(), + ' next:', this.getNext(), + ' arr:', '[',this.getList().join('|'),']' + ].join(''); + } +}; +/** + * =功能= + * 这个是一个纯JS的Nav UI控件。有以下特征: + * 单元数是固定的、单元的轮换是循环的、单元间的切换需要有动画效果 + * 有左、右箭头,控制Nav的左右切换。 + * Nav单元,可以被点击进行选中,则Nav进行切换 + * =实现思路= + * Nav自身由1+size的大小构成,其中的第一个,方便形成动画效果(暂不考虑数据<=1+size的情况,后面走特殊流程) + * 由json数据,进行初始化:根据展现的current和offset,算得实际dom中的first单元,渲染DOM结构,完成选中效果,并最后完成第一次的展现 + * 当next时,则将新展现的last追加到Nav元素列表中,将first那个单元收缩(=>width:0px)产生动画,最后将first从DOM中移除 + * 当prev时,则将新展现的first的前一个(即不可见的占位)补充到Nav元素最前边(width:0),然后展开(=>width:WIDTH px),最后移除原来的last + * 当select选中某个元素时,如果是当前元素,忽略;如果是前面的元素,则循环的执行后移操作;如果是后面的元素,则循环的执行前移操作。 + * @constructor + */ +cycletabs.NavUI = function(){ + /* + //功能接口:[动画、选中、左右箭头+移动] + //switchPrev + //switchNext + //switchTo [移动到特定单元] + //--movePrev + //--moveNext + //_scrollPrev + //_scrollNext + //事件: + //e-nav-arrow-prev-click + //e-Nav-arrow-next-click + //e-nav-item-click + //UI效果类: + //.ui-nav-hover + // .prev-hover/active/normal .arrow-prev + // .next-hover/active/normal .arrow-next + + //.nav-item + //.nav-item-hover + //.nav-item-active + //.nav-item-current + */ + // this.minIndex = 1; //数据最小下标(一般是0) + // this.maxIndex = 6; //数据最大下标(一般是total) + // this.firstIndex = 0; //当前展现的首位的index + // this.lastIndex = 0; //当前展现末位的index + // this.currentIndex = 2; //当前指向的ITEM索引 + this.indexObj = new cycletabs.UserLoopArray(); //用于记录当前的指针循环 + //以下为UI默认效果,这里不处理 + // this.loopView = true; //循环浏览; 默认循环 + this.ITEM_SIZE = 100; //(px) + this.Nav_SIZE = 3; //显示单元数 + this.CURRENT_OFFSET = 1; //偏移显示(居中) + this.dataList = []; + this.$itemList = []; + this.containerId = ''; + this.$listContainer = null; + this.$container = null; + // 标识,本身是否需要循环 + this.needLoop = false; + this._scrollDuration = 300; //500ms + this._isScrolling = false; //用于标识Nav处理动画状态 + this._autoScrollDirection = 'forward'; //自动滚动方向 + + this.idKey = 'id'; //ITEM的唯一标识(非index) + + //自动滚动的逻辑 + this._timerAutoScroll = null; + this._autoDuration = 1000; + this._autoScroll = false; + this.dir = 'ltr'; + this.direction = 'h'; //todo 声明UI的横向还是纵向放置 + this.DIR_KEY_CONFIG = { //修正ltr/rtl的文字方向+横纵向的影响 + 'h-ltr':{ + 'BACKWARD':'right' //后退向右 + ,'FORWARD':'left' //前进向左 + ,'SIZE': 'width' + }, + 'h-rtl': { + 'BACKWARD':'left' //前进向左 + ,'FORWARD':'right' //前进向右 + ,'SIZE': 'width' + }, + 'v': { + 'BACKWARD':'bottom' + ,'FORWARD':'top' + ,'SIZE': 'height' + } + }; + this.DIR_KEY = null; //修正rtl/ltr的动作方向差异; 默认是 left/right => right/left + this.quickSwitch = false; //是否显示快速跳转 + this.completeLi = false; //完整li模板 +}; +cycletabs.NavUI.prototype = { + + /** + * 根据给定的数据,生成需要的DOM结构 + * @param {Object} config 配置参数 + * @config {Array} data + * @config {string} [idKey='id'] item数据的唯一标识 + * @config {string|Number} defaultId typeID + * @config {number} [navSize=3] + * @config {number} itemSize + * @config {string} containerId Nav容器 + * @config {number} offset + * @config {boolean} [autoScroll=false] 是否自动滚动 + * @config {number} [autoDuration=5000] 自动滚动间隔 + * @config {string} [autoScrollDirection='forward'] {'backward','forward'} + * @config {number} [scrollDuration=300] 单次滚动动画用时 + * @config {string} [dir='ltr'] {'ltr','rtl'} + * @config {string} [hoverContainerId] hover容器,mouseenter时停止自动滚动,mouseleave时恢复自动滚动 + */ + init: function(config){ + var that = this; + /** + * @type [{id:number, content:string}] 描述Nav数据结构;//Good!可以这样描述数据结构 + * @demo + * [{content:'default',id:'1'},{content:'new2',id:'2'},{content:'new3',id:'3'},{content:'new4',id:'4'},{content:'new5',id:'5'},{content:'new6',id:'6'}] + */ + var data = config.data; + that.dataList = data; + that.$itemList = new Array(data.length); + that.containerId = config.containerId; + that.$container = $(that.containerId); //cache jQueryObject + config.hoverContainerId && (that.$hoverContainer = $(config.hoverContainerId));//extra hover container + that.idKey = config.idKey || 'id'; + that.ITEM_SIZE = config.itemSize; + //fix + if(config.offset != null){ + that.CURRENT_OFFSET = config.offset; + } + var count = data.length; + if(count === 1) { + that.CURRENT_OFFSET = 0; + config.autoScroll = false; + } + that._autoDuration = config.autoDuration || 5000; + that._scrollDuration = config.scrollDuration || 300; + that._autoScrollDirection = config.autoScrollDirection || 'forward'; + that.showTitle = config.showTitle || 0; + that.quickSwitch = config.quickSwitch || false; + that.completeLi = config.completeLi || false; + that.itemTpl = { + "completeLi": '', + "showTitle": '', + "normal": '' + }; + + // 添加渐显切换支持 + // for需求: hao123首页各种切换动画统一, + // 升级不影响其他调用该函数的页面 + // by + this.animateFade = !!config.animateFade; + + //指定方向 + that.dir = config.dir || 'ltr'; + //that.direction = 'h'; //TODO,暂不支持纵向的 + + that.direction = config.direction || 'h'; + if(that.direction === 'v'){ + that.DIR_KEY = that.DIR_KEY_CONFIG[that.direction]; + }else{ + that.DIR_KEY = that.DIR_KEY_CONFIG[that.direction+'-'+that.dir]; + } + + + var defaultIndex = 0; + var defaultId = config.defaultId; + for(var i= 0,len=data.length; i', + '
                              ', + '

                              ', + '

                              ', + '
                              ', + '
                              ', + '', + '
                              ', + '
                              ', + '
                              ', + '
                              ' + ]; + that.$container.html(strArr.join('')); + that.$container.find('.wrap').css( that.DIR_KEY.SIZE , that.ITEM_SIZE*that.Nav_SIZE ); + + //更新Nav的容器宽度 + var list = that.indexObj.getList(); + var data = that.dataList; + //构建元素;只有需要展现的才build + var $tempList = []; + for(var i= 0,len=list.length; i'+data[index].content+''].join('')); + var $item = that._getItemObj({ + idKey: idKey, + index: index, + content: data[index].content + }); + that.$itemList[index]=$item; + $item.css( that.DIR_KEY.SIZE , that.ITEM_SIZE+'px' ); + $tempList.push($item); + } + //strArr.push('
                              '); // /.nav-nav-item-list /.wrap /.ui-ctrl + that.$listContainer = that.$container.find('.nav-item-list'); + $($tempList).each(function(index, item){ + that.$listContainer.append(item); + }); + if(that.quickSwitch){ + var switchStr = ""; + for(i=0,len=data.length;i'; + } + that.$container.find(".switch").html(switchStr); + } + + }, + _getItemObj: function(paramObj){ + var that = this, + tplType = "normal"; + if (that.completeLi) { + tplType = "completeLi"; + }else if(that.showTitle){ + tplType = "showTitle"; + } + return $(helper.replaceTpl(that.itemTpl[tplType],paramObj)); + }, + bindEvent: function(){ + var that = this, + $that = $(that); + var $container = $(that.containerId); + ///////FOR LOGIC ///////////////// + //UI事件 + $($container).on('click', '.prev', function(e){ + that.switchPrev(); + $that.trigger("e_click_prev"); + }).on('click','.next',function(e){ + that.switchNext(); + $that.trigger("e_click_next"); + }).on('click','.nav-item',function(e){ + var index = $(this).attr('data-index'); + that.switchTo(index); + $that.trigger("e_click_nav",[index]); + }).on('mouseenter','.nav-item',function(e){ + var index = $(this).attr('data-index'); + $that.trigger("e_hover_nav",[index]); + }).on('click', '.switch-item', function(){ + var idKey = $(this).attr('data-id'); + for(var i=0; i count 时,动画实现bug的问题 + var removeCount = Math.min(step , that.dataList.length - that.Nav_SIZE); + + var keyForward = that.DIR_KEY.FORWARD;//left + //动画实现:先将所需呈现的结点加入容器,调整容器的宽高和定位信息,保持与原来所见内容一致;再用animate函数移到最终的效果定位,最后移除旧的结点,并恢复容器的宽和定位(虽然分开执行,但是视觉上面是连贯的。结点的动画处理方式,参考的Tangram:Magic) + var confStartStyle = {}; //{'left':0, 'width': that.ITEM_SIZE*(that.Nav_SIZE+step)} + confStartStyle[keyForward] = 0; //left|right: 0px + confStartStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*(that.Nav_SIZE+step); + var confEndStyle = {}; + confEndStyle[keyForward] = -that.ITEM_SIZE*removeCount; //left|right: -xxx px; + var confFinalStyle = {}; //{'left':0, width:that.ITEM_SIZE*that.Nav_SIZE} + confFinalStyle[keyForward] = 0; //left|right: 0; + confFinalStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*that.Nav_SIZE; + + that.$listContainer + //.append($newItems) + .css(confStartStyle) + .animate(confEndStyle, that._scrollDuration, function(){ + that.$listContainer.css(confFinalStyle); + var $oldItems = that.$listContainer.find('[data-index]').slice(0,removeCount); + $oldItems.remove(); + $(that).trigger('e_after_scroll'); + }); + } + }, + /** + * 实现前进的后退的效果,支持滚动多个单元 + * @param {number} [step=1] + * @private + */ + _scrollPrev: function(step){ + if(step == null){ + step = 1; + } + var that = this; + var indexList = that.indexObj.getList().slice(0, step); //获取前面的step个ITEM;然后从末尾到前面,这样倒插到Nav区域中 + //原有的last,要隐藏;新的first,要show + + //var strArr = []; + var $tempList = []; + for(var i= 0; i'+newObj.content+''); + $item = that._getItemObj({ + idKey: newObj[that.idKey], + index: index, + content: newObj.content + }); + //console.log(newObj); + that.$itemList[index] = $item; + // $item.css( that.DIR_KEY.SIZE , that.ITEM_SIZE+'px' ); + } + $item.css( that.DIR_KEY.SIZE , that.ITEM_SIZE+'px' ); + $tempList.unshift($item); //从后面开始放入 + } + + // 动画效果不同,构建dom的方式相同 + if (this.animateFade) { + $($tempList).each(function(index,item){ + item.hide(); + that.$listContainer.prepend(item); + }); + + var removeCount = Math.min(step, that.dataList.length - that.Nav_SIZE); + var $oldItems = that.$listContainer.find('[data-index]').slice(-removeCount); //移除旧的结点 + + that.$listContainer.find('[data-index]').last().fadeOut(that._scrollDuration); + that.$listContainer.find('[data-index]').first().fadeIn(that._scrollDuration, function () { + $oldItems.remove(); + $(that).trigger('e_after_scroll'); + }); + } else { + $($tempList).each(function(index,item){ + that.$listContainer.prepend(item); + }); + + var removeCount = Math.min(step , that.dataList.length - that.Nav_SIZE); + + var keyForward = that.DIR_KEY.FORWARD;//left + var confStartStyle = {}; //{'left':-that.ITEM_SIZE*step, 'width': that.ITEM_SIZE*(that.navSize+step)} + confStartStyle[keyForward] = -that.ITEM_SIZE*removeCount; //left: -xxxpx + confStartStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*(that.Nav_SIZE+step); + var confEndStyle = {}; + confEndStyle[keyForward] = 0; //left:0px; + var confFinalStyle = {}; //{'left':0, width:that.ITEM_SIZE*that.Nav_SIZE} + confFinalStyle[keyForward] = 0; //left: 0px; + confFinalStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*that.Nav_SIZE; + + that.$listContainer + //.prepend($newFirstItems) + .css(confStartStyle) + .animate(confEndStyle, that._scrollDuration, function(){ + that.$listContainer.css(confFinalStyle); + var $oldItems = that.$listContainer.find('[data-index]').slice(-removeCount); //移除旧的结点 + $oldItems.remove(); + $(that).trigger('e_after_scroll'); + }); + } + }, + /** + * 定位到特定的元素。 + * 首先,计算当前选中的元素(current)与目前位置的距离"targetStep",再采用“动画”的方式进行划向。 + * 但是,因为Nav本身是可循环的,向左向右都可以到达目标,如果navs的count>size,则我们采用“最短的滚动策略”,来决定向前移还是向后移。 + * @param targetIndex + */ + switchTo: function(targetIndex){ //第几个项 + var that = this; + var list = that.indexObj.getList(); + var currentIndex = list[this.CURRENT_OFFSET]; + if(currentIndex == targetIndex){ + //console.warn('currentIndex == targetIndex'); + $(that).trigger('e_toggle',{index: targetIndex}); + return ; + } + if(that._isScrolling){ + //console.warn('_isScrolling = true'); + return; + } + that._isScrolling = true; + if(that.needLoop){ + /** + * @type UserLoopArray.getDiff + */ + var diff = this.indexObj.getDiff(currentIndex, targetIndex); + if(diff.backwardStep < diff.forwardStep){ //后退更短 + that.indexObj.stepPrev(diff.backwardStep); + //note:回调,相当于一种“私有的事件”,其他人接收不到(或不需要) + //这里scroll后,需要调用 updateFocus;其实,用fire事件,这里就不用管了 + that._scrollPrev(diff.backwardStep); + } else if(diff.backwardStep >= diff.forwardStep){ //前进更短 + that.indexObj.stepNext(diff.forwardStep); + that._scrollNext(diff.forwardStep); + } + } else { + //TODO: fix this + if(currentIndex < targetIndex){ //=> forward + that.indexObj.stepNext(targetIndex-currentIndex); + } else { //backward + that.indexObj.stepPrev(currentIndex-targetIndex); + } + that._updateFocus(); + that._isScrolling = false; + } + }, + /** + * + * @param isInit + * @private + */ + _updateFocus: function(isInit){ + var that = this; + //更新聚焦元素 + var list = this.indexObj.getList(); + var currentIndex = list[this.CURRENT_OFFSET]; + that.$listContainer.find('[data-index]').removeClass('nav-item-current') + .filter('[data-index='+currentIndex+']').addClass('nav-item-current'); + + if (that.quickSwitch) { + that.$container.find(".switch .switch-item-current").removeClass("switch-item-current"); + that.$container.find(".switch .switch-item_"+(1+currentIndex)).addClass("switch-item-current"); + } + $(this).trigger('e_change',{isInit: isInit, index: currentIndex, itemObj:this.dataList[currentIndex]}); + }, + /** + * Nav可按需要,定时跳到下一张 + * @private + */ + _startAutoScroll: function(){ + var that = this; + //console.log('start auto scroll'); + that._timerAutoScroll = setInterval(function(){ + if(that._autoScrollDirection == 'forward'){ + that.switchNext(); + } else { //backward + that.switchPrev(); + } + }, that._autoDuration); + }, + _stopAutoScroll: function(){ + //console.log('stop auto scroll'); + var that = this; + clearInterval(that._timerAutoScroll); + } +}; + +module.exports = cycletabs; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/img/i-news_item.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/img/i-news_item.png new file mode 100755 index 000000000..7a03ec848 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/img/i-news_item.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/img/repeat-x.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/img/repeat-x.png new file mode 100755 index 000000000..f7e71ad0a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/img/repeat-x.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/ltr/ltr.css new file mode 100755 index 000000000..9a1afd17e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/ltr/ltr.css @@ -0,0 +1,98 @@ +.cycletabs{ + position: relative; + z-index: 1; + line-height: 27px; + height: 27px; + /**/font-size: 13px; + font-weight: 400; + color: #5a5a5a; + padding-bottom: 0; +} +.cycletabs .ui-nav { + width: 236px; + position: relative; +} +.cycletabs .ui-nav .wrap { + width: 204px; + height: 28px; + overflow: hidden; + position: relative; + left: 16px; +} +.cycletabs .ui-nav .ctrl { + position: absolute; + right: 0; + width: 100%; + height: 28px; +} +.cycletabs .ui-nav .prev, .cycletabs .ui-nav .next { + position: absolute; + z-index: 2; + height: 27px; + width: 16px; + text-indent: -9999em; + margin:0; +} +.cycletabs .ui-nav .prev { + left: 0; +} +.cycletabs .ui-nav .next { + right: 0; +} +.cycletabs .ui-nav .arrow-prev, .cycletabs .ui-nav .arrow-next { + display: block; + cursor: pointer; + width: 16px; + height: 27px; + border-bottom: 1px solid #e3e5e6; + background: url(../img/i-news_item.png) 0 -375px no-repeat; +} +.cycletabs .ui-nav .arrow-prev { + background-position: 0 -425px; +} +.cycletabs .ui-nav .arrow-next { + background-position: -25px -425px; +} +.cycletabs .ui-nav .prev-hover .arrow-prev { + background-position: 0 -475px; +} +.cycletabs .ui-nav .next-hover .arrow-next { + background-position: -25px -475px; +} +.cycletabs .ui-nav .prev-active .arrow-prev { + background-position: 0 -525px; +} +.cycletabs .ui-nav .next-active .arrow-next { + background-position: -25px -525px; +} +.cycletabs .nav-item-list { + position: absolute; + right: 0; + list-style: none; + white-space: nowrap; + padding: 0; +} +.cycletabs .nav-item { + display: inline-block; + *display: inline; + *zoom: 1; + width: 68px; + text-align: center; + background: url(../img/repeat-x.png) repeat-x 0 0; + border-right: 1px solid #e3e5e6; + border-bottom: 1px solid #e3e5e6; +} +.cycletabs .nav-item-hover { + cursor: pointer; +} +.cycletabs .nav-item-current { + background: #f5f7f7; + border-bottom:1px solid #f5f7f7; + position: relative; + bottom: -1px; + z-index: 2; + font-weight: normal; + font-size: 12px !important; + color: #00b075; + cursor: default; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/rtl/rtl.css new file mode 100755 index 000000000..b06d5b77a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/cycletabs/rtl/rtl.css @@ -0,0 +1,98 @@ +.cycletabs{ + position: relative; + z-index: 1; + line-height: 27px; + height: 27px; + /**/font-size: 13px; + font-weight: 400; + color: #5a5a5a; + padding-bottom: 0; +} +.cycletabs .ui-nav { + width: 236px; + position: relative; +} +.cycletabs .ui-nav .wrap { + width: 204px; + height: 28px; + overflow: hidden; + position: relative; + right: 16px; +} +.cycletabs .ui-nav .ctrl { + position: absolute; + right: 0; + width: 100%; + height: 28px; +} +.cycletabs .ui-nav .prev, .cycletabs .ui-nav .next { + position: absolute; + z-index: 2; + height: 27px; + width: 16px; + text-indent: -9999em; + margin:0; +} +.cycletabs .ui-nav .prev { + right: 0; +} +.cycletabs .ui-nav .next { + left: 0; +} +.cycletabs .ui-nav .arrow-prev, .cycletabs .ui-nav .arrow-next { + display: block; + cursor: pointer; + width: 16px; + height: 27px; + border-bottom: 1px solid #e3e5e6; + background: url(../img/i-news_item.png) 0 -375px no-repeat; +} +.cycletabs .ui-nav .arrow-prev { + background-position: 0 -425px; +} +.cycletabs .ui-nav .arrow-next { + background-position: -25px -425px; +} +.cycletabs .ui-nav .prev-hover .arrow-prev { + background-position: 0 -475px; +} +.cycletabs .ui-nav .next-hover .arrow-next { + background-position: -25px -475px; +} +.cycletabs .ui-nav .prev-active .arrow-prev { + background-position: 0 -525px; +} +.cycletabs .ui-nav .next-active .arrow-next { + background-position: -25px -525px; +} +.cycletabs .nav-item-list { + position: absolute; + right: 0; + list-style: none; + white-space: nowrap; + padding: 0; +} +.cycletabs .nav-item { + display: inline-block; + *display: inline; + *zoom: 1; + width: 68px; + text-align: center; + background: url(../img/repeat-x.png) repeat-x 0 0; + border-right: 1px solid #e3e5e6; + border-bottom: 1px solid #e3e5e6; +} +.cycletabs .nav-item-hover { + cursor: pointer; +} +.cycletabs .nav-item-current { + background: #f5f7f7; + border-bottom:1px solid #f5f7f7; + position: relative; + bottom: -1px; + z-index: 2; + font-weight: normal; + font-size: 12px !important; + color: #00b075; + cursor: default; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/date.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/date.js new file mode 100755 index 000000000..3b8292480 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/date.js @@ -0,0 +1,309 @@ +/* +Time Landscape +@VERSION 0.0.1 +@AUTUAR yuji@baidu.com + +-- +y year +M month +d day + +h hour +m minute +s second + +w week +z timezone offset +---- + */ + +!function(WIN, D, undef) { + + var _ = {} + + , scale = { + d: 864e5 + , h: 36e5 + , m: 6e4 + , s: 1e3 + , ms: 1 + } + + , pad = function(num, len) { + len = Math.pow(10, len || 2); + return num < len ? ((len + num) + "").slice(1) : num + ""; + } + + , each = function(obj, cb) { + if(obj.length !== undef) { + for(var i = 0, l = obj.length; i= start.getTime() && date <= end.getTime(); + } + + /** + * [clone description] + * @param {[type]} date [description] + * @return {[type]} [description] + */ + _.clone = function(date) { + return new D(+date); + }; + + /** + * Returns a timestamp of now + * @return {Number} [description] + */ + _.now = D.now || function() { + return +new D; + } + + /** + * Converts a Date object into unix timestamp + * @return {Number} [description] + */ + _.toUnix = function(date) { + return Math.round(date.getTime() / scale.s); + } + + /** + * Converts a Date object into UTC(GMT) time + * @return {Number} [description] + */ + _.toUTC = function(date) { + return new D(date.getTime() + date.getTimezoneOffset() * scale.m); + } + + +/* _.toAmPM: function(date) { + return date.getHours() >= 12 ? 'PM' : 'AM'; + },*/ + + /** + * Converts a Date object into ISO 8601 formatted string + * @see: http://en.wikipedia.org/wiki/ISO_8601 + * @param {[type]} date [description] + * @return {[type]} "YYYY-MM-DDTHH:mm:ss.sssZ" + */ + _.toISOString = function(date) { + return date.getUTCFullYear() + + '-' + pad(date.getUTCMonth() + 1) + + '-' + pad(date.getUTCDate()) + + 'T' + pad(date.getUTCHours()) + + ':' + pad(date.getUTCMinutes()) + + ':' + pad(date.getUTCSeconds()) + + '.' + ((date.getUTCMilliseconds() / scale.s).toFixed(3) + "").slice(2, 5) + + 'Z'; + } + + /** + * format Date object + * @param {Date} date [description] + * @param {String} pattern "yyyy-MM-dd hh:mm:ss" + * @return {Object | String} [description] + * + * y: year + * M: month + * h: hour + * m: minute + * s: seconds + * w: week + * z: timezone offset in hours + * + * @notice + * 1. "yyyy" --> "2011", "yyy" --> "011", "y" --> "1"; + * 2. otherwise: "m" --> "1", "mm" --> "01" + */ + _.format = function(date, pattern) { + + var result = { + y: date.getFullYear() + , M: date.getMonth() + 1 + , d: date.getDate() + , h: date.getHours() + , m: date.getMinutes() + , s: date.getSeconds() + , w: date.getDay() + , z: date.getTimezoneOffset() / 60 * -1 + }; + + if(!pattern) return result; + + each(result, function(v, k) { + pattern = pattern + .replace(/(y+)/g, function(a, b) { + return (v + "").substr(4 - Math.min(4, b.length)); + }) + .replace(new RegExp("(" + k + "+)", "g"), function(a, b) { + return pad(v, b.length); + }); + }); + + return pattern; + } + + /** + * Returns the Date Object by specified timezone offset + * @param {Date} date [description] + * @param {Number} timezone timezone offset + * @return {Date} [description] + */ + _.timezone = function(date, timezone) { + date.setTime(_.toUTC(date).getTime() + (timezone || 0) * scale.h); + return date; + } + + /** + * Check if the Date object is a leap year + * @param {Date | Number} date Date object or year + * @return {Boolean} [description] + */ + _.isLeapYear = function(y) { + if(_.is(y)) y = y.getFullYear(); + return (((y % 4 === 0) && (y % 100 !== 0)) || (y % 400 === 0)); + }; + + /** + * Get days in month + * @param {[type]} year [description] + * @param {[type]} month [description] + * @return {[type]} [description] + * new Date().days() + * Date.days(10) + * Date.days(10, 1983) + */ + _.days = function(M, y) { + if(_.is(M)) { + y = M.getFullYear(); + M = M.getMonth() + 1; + } + return [31, (_.isLeapYear(y || (new D).getFullYear()) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][M - 1]; + }; + + /** + * [add description] + * @param {[type]} date [description] + * @param {Number | Object} offset [description] + * new Date().add(2) + * new Date().add({ + * y: 3 + * , w: 1 + * , M: 1 + * , d: 1 + * , h: 1 + * , m: 1 + * , s: 1 + * , ms: 1 + * }) + */ + _.add = function(date, offset) { + + if(offset === +offset) offset = { + d: offset + } + offset = offset || {}; + + var addMonths = function (date, n) { + var _d = date.getDate(); + date.setDate(1); + date.setMonth(date.getMonth() + n); + date.setDate(Math.min(_d, _.days(date))); + return date; + }; + + each(offset, function(v, k) { + if(k === "M") date = addMonths(date, v); + if(k === "y") date = addMonths(date, v * 12); + scale[k] && date.setMilliseconds(date.getMilliseconds() + scale[k] * v); + }); + + return date; + } + + /** + * Diffent between two Date object + * @param {Date} date [description] + * @param {Date} _date [description] + * @return {Object} [description] + */ + _.diff = function(date, _date) { + var diff = _date - date + , result = {}; + + each(scale, function(v, k) { + var n = 0; + if(Math.abs(diff) > v) { + n = Math.floor(diff / v); + diff = diff % v; + } + result[k] = n; + }); + + return result; + } + + /** + * Date extend + * @param {[type]} source [description] + * @param {[type]} target [description] + * @return {[type]} [description] + * Date.extend({ + * hi: function(date) { + * console.log("hi: " + date); + * } + * }) + * Date.hi(new Date(2000,10,20)) + * new Date(2000,10,20).hi() + */ + _.extend = function(source, target) { + target = target || D; + source = source || this; + var args = arguments; + each(source, function(v, k) { + target[k] = v; + v !== args.callee + && target.prototype[k] === undef + && (target.prototype[k] = function() { + var self = this; + return v.apply(self, [].concat.apply(self, [].slice.call(arguments))); + }); + }); + return _; + } + + _.extend(); + +}(window, window.Date); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/buddhist.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/buddhist.js new file mode 100755 index 000000000..c8ff71f1d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/buddhist.js @@ -0,0 +1,21 @@ +/** + * get thailand buddhist calendar + * @param {Date} date + * @return {Object} { + * y year + * M month + * d day + * h hour + * m minute + * s second + * w week + * z timezone offset + * } + */ +Date.extend && Date.extend({ + toFl: function(date) { + var d = new Date(date).format(); + d.y += 543; + return d; + } +}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/isl.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/isl.js new file mode 100755 index 000000000..2f2f171fd --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/isl.js @@ -0,0 +1,95 @@ +/** +*公历转伊历 +*@method: toIsl +*@param: {Num} year +*@param: {Num} month +*@param: {Num} day +*@return: {iy: 伊历年,im: 伊历月,id: 伊历日,iw: 伊历第几周,jd: 儒略日} +*/ + +Date.extend({ + toIsl: function(date) { + var islDateFix = conf.clock.islDateFix ? ~~conf.clock.islDateFix : 0; + + date = new Date(date); + date.setDate(date.getDate() + islDateFix); + + var dateFormat = date.format(), + y = dateFormat.y, + m = dateFormat.M, + d = dateFormat.d; + + if(m<3) { + y -= 1; + m += 12; + } + + var a = Math.floor(y/100.), + b = 2-a+Math.floor(a/4.), + jd, bb, cc, dd, ee; + + if(y<1583) b = 0; + if(y==1582) { + if(m>10) b = -10; + if(m==10) { + b = 0; + if(d>4) b = -10; + } + } + + //求儒略日(julian day) + jd = Math.floor(365.25*(y+4716))+Math.floor(30.6001*(m+1))+d+b-1524; + + b = 0; + + if(jd>2299160){ + a = Math.floor((jd-1867216.25)/36524.25); + b = 1+a-Math.floor(a/4.); + } + bb = jd+b+1524; + cc = Math.floor((bb-122.1)/365.25); + dd = Math.floor(365.25*cc); + ee = Math.floor((bb-dd)/30.6001); + d = (bb-dd)-Math.floor(30.6001*ee); + m = ee-1; + if(ee>13) { + cc += 1; + m = ee-13; + } + y = cc-4716; + + + /* + 从儒略日计算星期几 + function gmod(n,m){ + return ((n%m)+m)%m; + } + */ + var wd = (((jd+1)%7)+7)%7+1, + iyear = 10631./30., + epochastro = 1948084, + epochcivil = 1948085, + shift1 = 8.01/60., + z = jd-epochastro, + cyc = Math.floor(z/10631.), + j,iy,im,id; + + z = z-10631*cyc; + j = Math.floor((z-shift1)/iyear); + iy = 30*cyc+j; + z = z-Math.floor(j*iyear+shift1); + im = Math.floor((z+28.5001)/29.5); + if(im==13) im = 12; + id = z-Math.floor(29.5001*im-29); + + var _fixDate = Gl.date && Gl.date.fixResult(conf.date.isl && conf.date.isl.fixDate, dateFormat.y, dateFormat.M, dateFormat.d, iy, im, id); + return { + iy: _fixDate.y, //islamic year + im: _fixDate.m, //islamic month + id: _fixDate.d, //islamic date + + iw: wd, //weekday number + jd: jd-1 //julian day number + } + } +}) \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/lunar.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/lunar.js new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/rokuyou.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/rokuyou.js new file mode 100755 index 000000000..0829c34c0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date-new/plugin/rokuyou.js @@ -0,0 +1,34 @@ +/** + * get japanese rokuyou calendar + * @depend toLunar() function + * @param {Date} date + * @return {Object} { + * y year + * M month + * d day + * h hour + * m minute + * s second + * w week + * z timezone offset + * jl japan rokuyou frequency[0, 5] + * } + */ +Date.extend && Gl.date && Gl.date.toLunar && Date.extend({ + toLyl: function(date) { + var lunar, lm, ld; + + date = new Date(date); + lunar = Gl.date.toLunar(date.getFullYear(), date.getMonth() + 1, date.getDate()); + + d = date.format(); + + lm = parseInt(lunar.cm, 10); + ld = parseInt(lunar.cd, 10); + + lm = lm > 6 ? lm - 7 : lm - 1; + d.jl = (lm + ld - 1) % 6; + + return d; + } +}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date/date.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date/date.js new file mode 100755 index 000000000..1b76cbfd0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/date/date.js @@ -0,0 +1,653 @@ +/* +author: 斯人 +QQ: 103024979 +Email: leecade@163.com +update: + +2012.9.7 + +Fixed: mac + firefox13 下农历日期显示为 Undefined +原因:对数组索引的浮点数时处理 有差异 [2.0001] ==> [2] + +2011.9.26: +1. 按jsdoc规范更新注释 +2. 扩展G.date.format方法 +3. 调整接口,参数省略策略统一为 G.date.format/G.date.lunarTpl/G.date.islTpl 允许省略 +4. 获取生肖名拆分为独立接口 G.date.toSx() +*/ + + +//parse string to array by bit +/*String.prototype.parseToArray = function(bit, s) { + var ret = this.split(s || "|"); + return bit ? function(l, n){ + for(; l--;) ret[l] = parseInt(ret[l], bit); + return ret; + }(ret.length) : ret; +}*/ + +//fastst trim, form: http://blog.stevenlevithan.com/archives/faster-trim-javascript +String.trim || (String.prototype.trim = function() { + var str = this, + str = str.replace(/^\s\s*/, ''), + ws = /\s/, + i = str.length; + while (ws.test(str.charAt(--i))); + return str.slice(0, i + 1); +}); + +//replace string by object, like "#{name}" +String.replaceTpl || (String.prototype.replaceTpl = function(o) { + return this.replace(/#\{([^}]*)\}/mg, function(v, k) { + return v = o[k.trim()] + }); +}); + +var WIN = window; + +//storage and namespace +WIN.conf || (WIN.conf = {}), WIN.Gl || (WIN.Gl = {}); + +var map = conf.date, + +_ = { + + /** + *检查是否date对象 + *@method: isDate + *@param: {Date} + *@return: {Bool} + */ + isDate: function(date) { + return date instanceof Date && !isNaN(date); + }, + + /** + *获取日期 + *@method: getDate + *@param: {Date} || new Date() + *@return: {y: 年, m: 月, d: 日} + */ + getDate: function(date) { + !_.isDate(date) && (date = new Date()); + return { + y: date.getFullYear(), + m: (date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1) : (date.getMonth() + 1), + d: date.getDate() < 10 ? "0" + date.getDate() : date.getDate() + }; + }, + + /** + *格式化日期对象(from youa) + *@method: format + *@param: {String} || 'yyyy-MM-dd', 如:"yyyy年M月d日", "yyyy-MM-dd", "MM-dd-yy", "yyyy-MM-dd hh:mm:ss" + *@param: {Date} || new Date() + *@return: {Bool} + *@notice: 为区分minute, month对应大写M + *@notice: 位数不全: 1. 年份 "yyyy" --> 2011, "yyy" --> 011, "y" --> 1; 2. 其他均为 single --> 不补0, double --> 补0 + */ + format: function(pattern, date) { + date = date || new Date(); + pattern = pattern || 'yyyy-MM-dd'; + + var d = _.getDate(date), //y, m, d + o = { + M: d.m, //month + d: d.d, //day + h: date.getHours(), //hour + m: date.getMinutes(), //minute + s: date.getSeconds() //second + }, + li; + + for(var k in o) { + li = o[k]; + pattern = pattern.replace(new RegExp('(' + k + '+)', 'g'), function(a, b) { + return (((typeof li == "number" && li < 10) || (typeof li == "string" && li.length < 2)) && b.length > 1) ? '0' + li : li; + }); + } + + //replace year + return pattern.replace(/(y+)/ig, function(a, b) { + return (d.y + "").substr(4 - Math.min(4, b.length)); + }); + }, + + /** + *返回返回农历月份天数 + *@method: getDaysByLunarMonth + *@param: {Num} lunar year + *@param: {Num} lunar month + *@return: {Num} + */ + getDaysByLunarMonth: function(y, m) { + return map.lunar.leap[y-1900] & (0x10000 >> m) ? 30 : 29; + }, + + /** + *返回公历年份的闰月月份 + *@method: getLeapMonth + *@param: {Num} year + *@return: {Num} || 0 + */ + getLeapMonth: function(y) { + return map.lunar.leap[y-1900] & 0xf; + }, + + /** + *返回公历年份的闰月天数 + *@method: getLeapDays + *@param: {Num} year + *@return: {Num} || 0 + */ + getLeapDays: function(y) { + return _.getLeapMonth(y) ? (map.lunar.leap[y-1900] & 0x10000) ? 30 : 29 : 0; + }, + + /** + *返回公历月份天数 + *@method: getDaysByMonth + *@param: {Num} year + *@param: {Num} month + *@return: {Num} + */ + getDaysByMonth: function(y, m) { + + //table lookup except month == 2 + return m == 2 ? ((y%4 == 0) && (y%100 != 0) || (y%400 == 0)) ? 29 : 28 : map.days[m-1]; + }, + + /** + *返回公历年份天数 + *@method: getDaysByYear + *@param: {Num} year + *@return: {Num} + */ + getDaysByYear: function(y) { + for(var i=0x8000, sum=348; i>0x8; i>>=1) sum += (map.lunar.leap[y-1900] & i) ? 1 : 0; + return sum + _.getLeapDays(y); + }, + + /** + *返回公历年份的第n个节气日期 + *@method: getDateBySolar + *@param: {Num} year + *@param: {Num} 0 --> 小寒 + *@return: {m:month, d:year} + */ + getDateBySolar: function(y, n) { + var d = new Date((31556925974.7*(y-1900) + map.lunar.jqmap[n]*60000) + Date.UTC(1900,0,6,2,5)); + return { + m:d.getUTCMonth() + 1, + d:d.getUTCDate() + } + }, + + /** + *返回日期(公历/农历)对应节日名 + *@method: getFeast + *@param: {Num} month + *@param: {Num} day + *@param: {Bool}(0 and 1) || 1 节日map(0 || null --> 公历,1 --> 农历,为空则默认为公历) + *@param: {Num} year + *@return: {String} || "" + *@notice: 年、月、日须与type保持一致,当且仅当需要匹配“除夕”,才需传y(年份) + */ + /*getFeast: function(m, d, type, y) { + + var name = (type ? map.lunar.feast : map.feast)[m + '-' + d] || ""; + + //fix"除夕"(农历12月最后一天) + type && y && m == 12 && _.getDaysByLunarMonth(y, 12) == d && (name = "除夕"); + return name; + },*/ + + /** + *返回公历日期对应节气名 + *@method: getSolar + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@return: {String} || "" + */ + /*getSolar: function(y, m, d) { + + var solarNames = map.lunar.jqnames, + l = solarNames.length, + solarName; + while(l--) { + solarName = _.getDateBySolar(y, l); + if(solarName.m == m && solarName.d == d) return solarNames[l]; + } + return ""; + },*/ + + /** + *根据序号返回干支组合名 + *@method: cyclical + *@param: {Num} 序号 (0 --> 甲子,以60进制循环) + *@return: {String} + */ + cyclical: function(n) { + return(map.lunar.tg[n%10] + map.lunar.dz[n%12]); + }, + + /** + * 修正农历闰年两个闰月问题 + * @param {Array} data 配置修复数据 + * @param {Number} y 年 + * @param {Number} m 月 + * @param {Number} d 日 + * @param {Number} maxY 可修正的最大年份(2025) + * @param {Number} minY 可修正的最小年份(2000) + * @return {[number]} 1为农历闰月,2不为农历闰月,3无法判断 + */ + fixLeapMonth: function(data, y, m, d, maxY, minY) { + maxY = maxY || 2025; + minY = minY || 2000; + var r = 2; + if (y > maxY || y < minY) return 3; + if (data && data.length) { + var l = data.length, + _match = function(y, m, d, str, pre, suf) { + str = str.split("~"); + str[1] = str[1] || str[0]; + pre = str[0].split("-"); + suf = str[1].split("-"); + return new Date(y, m-1, d) >= new Date(pre[0], pre[1]-1, pre[2]) && new Date(y, m-1, d) <= new Date(suf[0], suf[1]-1, suf[2]) + }; + + for(var i = 0; i < l; i++) { + if(_match(y, m, d, data[i])) { + r = 1; + break; + } + } + return r; + } else { + return 3; + } + }, + + /** + * 对异常日期结果进行修正 + * @param {Array} data 配置修复数据 + * @param {Number} y 年 + * @param {Number} m 月 + * @param {Number} d 日 + * @return {Object} {y, m, d} + * fixDate: ["2013-1-11=0|-1|1", "2013-1-12~2013-2-9=0|-1|0"] + */ + fixResult: function(data, Y, M, D, y, m, d) { + if(data && data.length) { + var l = data.length, + _match = function(y, m, d, str, pre, suf) { + str = str.split("~"); + str[1] = str[1] || str[0]; + pre = str[0].split("-"); + suf = str[1].split("-"); + return new Date(y, m, d) >= new Date(pre[0], pre[1], pre[2]) && new Date(y, m, d) <= new Date(suf[0], suf[1], suf[2]) + }, + val, + li; + while(l--) { + li = data[l].split("="); + val = li[1].split("|"); + _match(Y, M, D, li[0]) && (y = y + ~~(val[0]), m = m + ~~(val[1]), d = d + ~~(val[2])); + } + } + return { + y: ~~y, + m: ~~m, + d: ~~d + } + }, + + /** + *根据公历日期返回农历日期 + *@method: toLunar + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@return: {cy: 农历年, cm: 农历月, cd: 农历日, CM: 农历月(中文), CD: 农历日(中文), isleap: 是否闰月} + *@notice: 遵从农历习惯表达方式,如一月 --> 正月,十二月 --> 腊月,闰月等 + */ + toLunar: function(Y, M, D) { + var m = 1900, //起始年份 + n = 0, + d = (new Date(Y, M-1, D) - new Date(1900, 0, 31))/86400000, //起始date + leap = _.getLeapMonth(Y), //当年闰月 + isleap = false, //标记闰月 + _y; + var isLeapMonth = _.fixLeapMonth(map.lunar.fixMonth, Y, M, D), // 标记日期是否为农历闰月 + showLeap; // 是否显示润字 + + for(; m < 2050 && d>0; m++){n = _.getDaysByYear(m); d -= n}; + + if(d < 0){d += n, m--}; + + _y = m; + + for(m=1; m<13 && d>0; m++) { + + if(leap>0 && m == leap+1 && isleap === false){--m; isleap = true; n = _.getLeapDays(_y)} + + else{n = _.getDaysByLunarMonth(_y, m)}; + + if(isleap == true && m == (leap+1)) isleap = false; + + d -= n; + }; + + if(d == 0 && leap > 0 && m == leap + 1 && !isleap) --m; + + if(d < 0){d += n; --m}; + + //修正闰月下一月第一天为非闰月 + if(d == 0) isleap = m == leap; + + //转换日期格式为1开始 + d = d + 1; + + var _fixDate = _.fixResult(map.lunar.fixDate, + Y, M, D, + + // BUG? + Y - ( M < m ? 1 : 0), //如果公历月份小于农历就是跨年期,农历年份比公历-1 + m, d); + + if (isLeapMonth === 1) { + showLeap = true; + } else if (isLeapMonth === 2) { + showLeap = false; + } else if (isleap) { + showLeap = true; + } + + return { + cy: _fixDate.y, + cm: _fixDate.m, + cd: _fixDate.d, + CM: (showLeap ? "闰" : "") + ((_fixDate.m > 9 ? '十' : '') + map.lunar.c1[_fixDate.m%10]).replace('十二','腊').replace(/^一/,'正') + '月', + CD: {'10': '初十', '20': '二十', '30': '三十'}[_fixDate.d] || (map.lunar.c2[Math.floor(_fixDate.d/10)] + map.lunar.c1[~~_fixDate.d%10]), + isleap: isleap + } + }, + + /** + *公历转干支 + *@method: toGz + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@return: {gy:干支年, gm:干支月, gd:干支日} + */ + toGz: function(y, m, d) { + var getDateBySolar = _.getDateBySolar, + cyclical = _.cyclical; + + m = m - 1; //换算月份为0起始(考虑对代码压缩友好,日期未换算) + + //fix: 生肖以农历年份计算 + return { + gy: (m >= 2 || (m==1 && d>=getDateBySolar(y, 2).d)) ? cyclical(y-1864) : cyclical(y-1865), + gm: d >= getDateBySolar(y, m*2).d ? cyclical((y-1900)*12+m+13) : cyclical((y-1900)*12+m+12), + gd: cyclical(Date.UTC(y,m,1,0,0,0,0)/86400000+25576+d) + } + }, + + /** + *公历转生肖 + *@method: toSx + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@return: {String} + */ + toSx: function(y, m, d) { + + //by lunar year + return map.lunar.sx[(_.toLunar(y, m, d).cy-4)%12]; + }, + + /** + *公历转中文格式化农历 + *@method: formatLunar + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@return: {y: 年,m: 月,d: 日,w: 星期(数字),W: 星期(中文),cm: 农历月(数字),cd: 农历日(数字),CM: 农历月(中文),CD: 农历日(中文),gy: 干支年,gm: 干支月,gd: 干支日,so: 节气,cf: 农历节日,gf: 公历节日,sx: 生肖,isleap: 是否闰月} + */ + formatLunar: function(y, m, d) { + + var gz = _.toGz(+y, +m, +d), //干支 + lunar = _.toLunar(+y, +m, +d), //农历 + w = new Date(y, m-1, d).getDay(); //星期 + + return { + y: y, //年 + m: m, //月 + d: d, //日 + w: w, //星期(数字) + W: map.lunar.wk[w], //星期(中文) + // jpW:map.lunar.jpwk.charAt(w), //星期(日文) + thy: y + 543, //佛历年 + + cm: lunar.cm, //农历月(数字) + cd: lunar.cd, //农历日(数字) + CM: lunar.CM, //农历月(中文) + CD: lunar.CD, //农历日(中文) + + gy: gz.gy, //干支纪年 + gm: gz.gm, //干支纪月 + gd: gz.gd, //干支纪日 + + // so: _.getSolar(y, m, d), //节气 + // cf: _.getFeast(lunar.cm, lunar.cd, 1, lunar.cy), //农历节日 + // gf: _.getFeast(m, d), //公历节日 + sx: map.lunar.sx[(lunar.cy-4)%12], //生肖 + isleap: lunar.isleap //是否闰月 + } + }, + + /** + *公历日期按模板返回农历 + *@method: lunarTpl + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@param: {String} null --> 默认内置模板 + *@return: {String} || {} + *@notice: 参数允许为{Date}/{y, m, d} + *@example: + G.date.lunarTpl() --> 今日+内置模板 + G.date.lunarTpl(tpl) --> 今日+tpl + G.date.lunarTpl(y, m, d) --> y, d, m+内置模板 + G.date.lunarTpl(date) --> date+内置模板 + G.date.lunarTpl(date, tpl) --> date+tpl + */ + /*lunarTpl: function(y, m, d, tpl) { + //check and fix arguments + if(arguments.length < 4 && typeof d !== "number") { + var isDate = _.isDate(y), + today = isDate ? _.getDate(y) : _.getDate(); + isDate && (tpl = m); + typeof y === "string" && (tpl = y); + y = today.y; + m = today.m; + d = today.d; + } + return (tpl || map.lunar.tpl).replaceTpl(_.formatLunar(y, m, d)); + },*/ + + /** + *公历转伊历 + *@method: toIsl + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@return: {iy: 伊历年,im: 伊历月,id: 伊历日,iw: 伊历第几周,jd: 儒略日} + */ + toIsl: function(Y, M, D) { + + var y = Y, + m = M, + d = D; + + if(m<3) { + y -= 1; + m += 12; + } + + var a = Math.floor(y/100.), + b = 2-a+Math.floor(a/4.), + jd, bb, cc, dd, ee; + + if(y<1583) b = 0; + if(y==1582) { + if(m>10) b = -10; + if(m==10) { + b = 0; + if(d>4) b = -10; + } + } + + //求儒略日(julian day) + jd = Math.floor(365.25*(y+4716))+Math.floor(30.6001*(m+1))+d+b-1524; + + b = 0; + + if(jd>2299160){ + a = Math.floor((jd-1867216.25)/36524.25); + b = 1+a-Math.floor(a/4.); + } + bb = jd+b+1524; + cc = Math.floor((bb-122.1)/365.25); + dd = Math.floor(365.25*cc); + ee = Math.floor((bb-dd)/30.6001); + d = (bb-dd)-Math.floor(30.6001*ee); + m = ee-1; + if(ee>13) { + cc += 1; + m = ee-13; + } + y = cc-4716; + + + /* + 从儒略日计算星期几 + function gmod(n,m){ + return ((n%m)+m)%m; + } + */ + var wd = (((jd+1)%7)+7)%7+1, + iyear = 10631./30., + epochastro = 1948084, + epochcivil = 1948085, + shift1 = 8.01/60., + z = jd-epochastro, + cyc = Math.floor(z/10631.), + j,iy,im,id; + + z = z-10631*cyc; + j = Math.floor((z-shift1)/iyear); + iy = 30*cyc+j; + z = z-Math.floor(j*iyear+shift1); + im = Math.floor((z+28.5001)/29.5); + if(im==13) im = 12; + id = z-Math.floor(29.5001*im-29); + + var _fixDate = _.fixResult(map.isl.fixDate, Y, M, D, iy, im, id); + return { + iy: _fixDate.y, //islamic year + im: _fixDate.m, //islamic month + id: _fixDate.d, //islamic date + + iw: wd, //weekday number + jd: jd-1 //julian day number + } + }, + + /** + *公历转格式化伊历 + *@method: formatIsl + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@return: {y: 年,m: 月,d: 日,iy: 伊历年,im: 伊历月,id: 伊历日,iw: 伊历第几周,jd: 儒略日,IW: 伊历星期名,MW: 马来语星期名,IM: 伊历月份名,MM: 马来语月份名} + */ + formatIsl: function(y, m, d) { + + var isl = _.toIsl(+y, +m, +d), + _map = map.isl, + iw = isl.iw, + im = isl.im; + + return { + y: y, //年 + m: m, //月 + d: d, //日 + iy: isl.iy, //伊历年 + im: im, //伊历月 + id: isl.id, //伊历日 + iw: iw, //伊历第几周 + jd: isl.jd, //儒略日 + + M: _map.gMonthNames[m - 1], //公历月份的伊历名 + IW: _map.weekNames[iw - 1], //伊历星期名 + // MW: _map.weekNames_Malay[iw - 1], //马来语星期名 + + IM: _map.monthNames[im - 1] //伊历月份名 + // MM: _map.monthNames_Malay[im - 1] //马来语月份名 + }; + } + + /** + *公历日期按模板返回伊历模板 + *@method: islTpl + *@param: {Num} year + *@param: {Num} month + *@param: {Num} day + *@param: {String} null --> 默认内置模板 + *@return: {String} + *@notice: 参数允许为{Date}/{y, m, d} + *@example: + G.date.islTpl() --> 今日+内置模板 + G.date.islTpl(tpl) --> 今日+tpl + G.date.islTpl(y, m, d) --> y, d, m+内置模板 + G.date.islTpl(date) --> date+内置模板 + G.date.islTpl(date, tpl) --> date+tpl + */ + /*islTpl: function(y, m, d, tpl) { + //判断全为数字: isFinite(t) && !/infinity/.test(t) + + //check and fix arguments + if(arguments.length < 4 && typeof d !== "number") { + var isDate = _.isDate(y), + today = isDate ? _.getDate(y) : _.getDate(); + isDate && (tpl = m); + typeof y === "string" && (tpl = y); + y = today.y; + m = today.m; + d = today.d; + } + return (tpl || map.isl.tpl).replaceTpl(_.formatIsl(y, m, d)); + },*/ + + + //debug + /*debug: function(y, m) { + var i = 0, + l = Gl.date.getDaysByMonth(y, m); + for(;ititle×", + content: "
                              content
                              ", + foot: "
                              footer
                              " + } + }; + + typeof opt == "function" && (opt = opt.call()); + self.opt = $.extend(defaultOpt,opt); + + self._init($el); +}; +// class variables +Dialog.counter = 0; +Dialog.mask = null; +Dialog.PCLASS = "g-dialog"; + +var fn = Dialog.prototype; + +/** + * modal + * + * @param {Object} argument comment + */ +fn._modalise = function(){ + if(!Dialog.mask){ + Dialog.mask = $("
                              ").appendTo($("body")); + /*Dialog.mask.css({ + width: "100%", + height: "100%", + backgroundColor: "#000", + opacity: ".5" + });*/ + } + /*if(Dialog.mask.is(":hidden")){ + Dialog.mask.show(); + }*/ + if(this.opt.display == "none"){ + Dialog.mask.hide(); + }else{ + Dialog.mask.show(); + // 禁止滚动 + $("html").addClass("freeze-scroll"); + } + +}; + +/** + * get $el + * + * @param {Object} argument comment + */ +fn._getElement = function($el){ + var self = this, + html = ""; + $.each(self.opt.tpl, function(i,v){ + html += v; + }); + return ( + $el ? + (function(){ + // $el.html("×\;"); + $el.addClass(Dialog.PCLASS).html(html); + return $el; + })() : + (function(){ + var dialogId = "dialog_auto_" + Dialog.counter++; + if($("#" + dialogId).length){ + arguments.callee(); + }else{ + var $newDialog = $("
                              " + html + "
                              "); + $newDialog.appendTo($("body")); + return $newDialog; + } + })() + ); +}; + +/** + * adjust position + * + * @param {Object} argument comment + */ +fn._adjustPos = function(opt){ + var self = this; + + // 默认在可视区域内居中 + if(opt.top == undefined){ + $.extend(opt, { + // "top": "50%", + "top": opt.position == "absolute" ? $(document).scrollTop() + $(window).height()/2 : "50%", + "margin-top": -parseInt(opt.height, 10)/2 + }); + } + if(opt.left == undefined){ + $.extend(opt, { + // "left": "50%", + "left": opt.position == "absolute" ? $(document).scrollLeft() + $(window).width()/2 : "50%", + "margin-left": -parseInt(opt.width, 10)/2 + }); + } +}; + +/** + * draggable + * + * @param {Object} argument comment + */ +fn._draggable = function(){ + var self = this; + + self.$el.drag({ + circlimit: false + }); +}; + +/** + * show interface + * + * @param {Object} argument comment + */ +fn.show = function(speed){ + var self = this; + self.opt.customBodyClass && $("body").addClass(self.opt.customBodyClass); + if(self.opt.modal){ + Dialog.mask.show(); + // 恢复滚动 + $("html").addClass("freeze-scroll"); + } + self.$el.show(speed); + return self; +}; + +/** + * close interface + * + * @param {Object} argument comment + */ +fn.close = function(speed){ + var self = this; + self.opt.customBodyClass && $("body").addClass(self.opt.customBodyClass); + if(self.opt.modal){ + Dialog.mask.hide(); + // 恢复滚动 + $("html").removeClass("freeze-scroll"); + } + self.$el.hide(speed); + return self; +}; + +/** + * destroy interface + * + * @param {Object} argument comment + */ +fn.destroy = function(){ + var self = this; + this.$el.remove(); +}; + +/** + * bind events + * + * @param {Object} argument comment + */ +fn._bindEvents = function(opt){ + var self = this; + + self.$el.on("click", ".close", function(){ + self.close(); + }); +}; + +fn._initStyle = function(opt){ + var STYLES = ["width", "height", "position", "top", "left", "margin-top", "margin-left", "backgroundColor", "display"], + styleOpt = {}; + $.each(STYLES, function(k, v) { + opt[v] && (styleOpt[v] = opt[v]); + }); + this.$el.css(styleOpt); +}; + +/** + * init + * + * @param {Object} argument comment + */ +fn._init = function($el){ + var self = this, + opt = self.opt; + + // modal + opt.modal && self._modalise(); + + // get $el + self.$el = self._getElement($el); + // adjust position + self._adjustPos(opt); + + // (debug-only)random background color + opt.debug && (opt.backgroundColor = "RGB(" + Math.floor(Math.random()*255) + " ," + Math.floor(Math.random()*255) + " ," + Math.floor(Math.random()*255) + ")"); + + self.opt.customBodyClass && $("body").addClass(self.opt.customBodyClass); + // init dialog styles + self._initStyle(opt); + + // draggable + opt.draggable && self._draggable(); + + // bind events + self._bindEvents(opt); + + // bind complete callback + opt.onComplete && opt.onComplete.call(self); +}; + +// jQuery plugin wraper +$.fn.extend({ + /** + * create dialog from an existed dom + * + * @param {Object} argument comment + */ + dialog: function(args) { + return new Dialog(this, args); + }, + + /** + * create dialog from a dom interaction + * + * @param {Object} argument comment + */ + bindDialog: function(type,args) { + var self = this; + self.on(type+".dialog", function(e){ + e.preventDefault(); + if(args.initOnce && self.data("dialogObj")){ + self.data("dialogObj").show(); + }else{ + self.data({ + "etype": type+".dialog", + "dialogObj": new Dialog(null, args) + }); + } + }); + }, + + /** + * unbind bindDrag event interface + * + * @param {Object} argument comment + */ + unBindDialog: function(){ + this.off(self.data("etype")); + } +}); + +module.exports = Dialog; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/drap/drap.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/drap/drap.js new file mode 100755 index 000000000..7a92faba4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/drap/drap.js @@ -0,0 +1,145 @@ +/* + @param + "id":"drapBox",//元素id + "direct":"xy",//移动方向 + "move":that.move, //移动的处理方法 + "moveCallback":null,//移动后回调 + "circlimit":true //是否限制在父区域移动 + + + 使用 + var d = new Drap({ + id:"d", + circlimit:false, + direct:"x" + }) + d.enable(); +*/ +var $ = require("common:widget/ui/jquery/jquery.js"); +var uid = 0; + +var Drap = function(opts,elem){ + var that = this; + + that.opts = $.extend({ + "direct":"xy",//移动方向 + "move":that.move, + "moveCallback":null, + "dragStartCallback":null, + "dropCallback":null, + "circlimit":true //是否限制在父区域移动 + },opts); + + that.top = 0; + that.left = 0; + that.status = 0; + uid++; + + //事件命名空间。 + that.eventNamespace = "drag_" + uid; + that.obj = elem; +}; + +Drap.prototype = { + //启用 + enable:function(){ + var that = this; + + that.obj.on("mousedown." + that.eventNamespace,function(e){that.handleEvent(e)}); + $(document).on("mousemove." + that.eventNamespace + " mouseup."+ that.eventNamespace,function(e){that.handleEvent(e)}); + }, + //禁用 + unable:function(){ + var that = this; + that.obj.off("mousedown."+ that.eventNamespace); + $(document).off("mousemove." + that.eventNamespace + " mouseup."+ that.eventNamespace); + }, + // 显式触发mouseup,阻止当前的拖拽 + interrupt:function(){ + var that = this; + $(document).trigger("mouseup."+ that.eventNamespace); + }, + handleEvent:function(event){ + var that = this, + ele = event.target, + opts = that.opts; + switch(event.type){ + case "mousedown": + var position = that.obj.position(); + position_top = position.top, + position_left = position.left; + + //阻止选中 + event.preventDefault(); + that.status = 1; + that.startpositon = {x:event.pageX,y:event.pageY}; + that.diff = {x:that.startpositon.x-position_left,y:that.startpositon.y-position_top}; + opts.dragStartCallback && opts.dragStartCallback.apply(that, [event]); + break; + case "mousemove": + if(that.status === 1) + { + that.endposition = {x:event.pageX,y:event.pageY}; + that.left = that.endposition.x - that.diff.x; + that.top = that.endposition.y - that.diff.y; + that.move(event); + } + event.preventDefault(); + break; + case "mouseup": + if(that.status === 1) + { + that.status = 0; + opts.dropCallback && opts.dropCallback.apply(that, [event]); + } + break; + default:break; + } + }, + //修正y方向的高度 + fixTop:function(){ + var that = this, + opts = that.opts, + $pobk = that.obj.offsetParent(), + height = $pobk.height()-that.obj.outerHeight(); + + return that.top < 0?0:(that.top > height?height:that.top); + }, + //修正x方向的高度 + fixLeft:function(){ + var that = this, + opts = that.opts, + $pobk = that.obj.offsetParent(), + width = $pobk.width()-that.obj.outerWidth(); + + return that.left < 0?0:(that.left > width?width:that.left); + }, + //移动方法 + move:function(event){ + var that = this, + opts = that.opts; + if(opts.circlimit){ + that.top = that.fixTop(); + that.left = that.fixLeft(); + } + if(opts.direct === "xy"){ + that.obj.css({"top":that.top + "px","left":that.left + "px"}); + } + if(opts.direct === "x"){ + that.obj.css({"left":that.left + "px"}); + } + if(opts.direct === "y"){ + that.obj.css({"top":that.top + "px"}); + } + opts.moveCallback && opts.moveCallback.apply(that, [event]); + } +}; + +$.fn.drag = function (opts) { + return this.each(function () { + var dragbox = new Drap(opts,$(this)); + $(this).data("data-drag-obj",dragbox); + dragbox.enable(); + + }); +}; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/dropdownlist.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/dropdownlist.css new file mode 100755 index 000000000..8957d09ae --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/dropdownlist.css @@ -0,0 +1,100 @@ +/*general dropdown component, including input and list*/ +.dropdown{ + position:relative; + _zoom:1; + vertical-align: middle; + display: inline-block; +} +.dropdown-trigger{ + border: 1px solid #d9d9d9; + display: inline-block; + height:24px; +} +.dropdown-input{ + cursor:pointer; + line-height:24px; + height:24px; + font-size:12px; + /*width: 71px;*/ + border:0; + display:inline-block; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + background: #fff; +} +.dropdown-ltr .dropdown-input{ + padding-right: 25px; + padding-left: 5px; +} +.dropdown-rtl .dropdown-input{ + padding-right: 5px; + padding-left: 25px; +} +.dropdown-arrow{ + background-color:#f5f7f7; + background-image: -moz-linear-gradient(top , #f5f7f7, #ffffff 100.0%); + background-image: -webkit-linear-gradient(top , #f5f7f7, #ffffff 100.0%); + background-image: -o-linear-gradient(top , #f5f7f7, #ffffff 100.0%); + background-image: -ms-linear-gradient(top , #f5f7f7, #ffffff 100.0%); + background-image: linear-gradient(top , #f5f7f7, #ffffff 100.0%); + border:0; + width:23px; + height:24px; + position:absolute; + top: 1px; + _top:2px; + cursor:pointer; +} +.dropdown-ltr .dropdown-arrow{ + right: 1px; + border-left:1px solid #ebebeb; +} +.dropdown-rtl .dropdown-arrow{ + left: 1px; + border-right:1px solid #ebebeb; +} +.dropdown-arrow i{ + background:url(./img/i-arrow-bottom-green.png?__sprite) no-repeat; + display:block; + width: 11px; + height: 6px; + position: relative; + font-size:0; + top: 9px; +} +.dropdown-ltr .dropdown-arrow i{ + right: -6px; +} +.dropdown-rtl .dropdown-arrow i{ + left: -6px; +} +.dropdown-arrow-up i{ + background-image:url(./img/i-arrow-top-green.png?__sprite); +} +.dropdown-list{ + position: absolute; + top: 26px; + _top:27px; + left: 0; + background: #fff; + border-top: 0; + text-indent:5px; + display:none; + /*text-align:left;*/ + z-index:502; + border: 1px solid #d9d9d9; + border-top:0; + line-height:24px; + font-size:12px; +} +.dropdown-list li{ + cursor:pointer; + text-overflow: ellipsis; + overflow: hidden; + _width: 100%; + white-space: nowrap; +} +.dropdown-list li:hover, .dropdown-list-hover{ + background:#e8eaeb; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/dropdownlist.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/dropdownlist.js new file mode 100755 index 000000000..4a6d2bf59 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/dropdownlist.js @@ -0,0 +1,460 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var helper = require('common:widget/ui/helper/helper.js'); +/** + * 【功能说明】针对目前页面上有很多相同自定义样式的下拉列表散布在多个模块中(因为样式需要自定义,故不能使用原始的select标签,需要用其它标签来模拟一个select),将初始化及此部分的通用事件绑定代码提出来作为一个单独的组件,提供初始化、通用事件(包括下拉列表的显隐、列表项的选择等)、一套通用样式 + * 【使用方法】在页面上添加一个隐藏的select元素,参数至少需要提供一个id, + * - 如果select里面是空白则下拉内容通过js赋值给data参数来生成(适用于动态内容),如 + * + * - 如果在select内写option则下拉内容直接从页面的option里取(适用于固定内容,option的值和显示名称一样则可以省略value属性),如 + * * + * 实例化语句如下: + * var typelist = + * new Dropdownlist({ + * selector: "#{id}", + * ... + * }) + * 生成的自定义下拉列表将插在占位select的后面,宽度取决于占位selector的宽度,默认比其宽度少30px + * + * @author wangmingfei + * @constructor + * @this {Dropdownlist} + * @param {object} opt 初始化参数,必填 + * { + * selector: {string}, 占位元素的id,必填 + * data: {array}, 指定下拉列表的数据,选填 + * defIndex: {number} 默认选中项的index,选填,默认是取列表中的第一项即0,特殊需要留白但是不占用下拉项时可以设置为-1 + * allowEmpty: {number} 是否允许留空 + * emptyItem: {object} 空白项数据,不填是{id:"", name:""} + * visibleNum: {number} 最多可见的行数,选填,多于此数就显示滚动条 + * lineHeight: {number} 列表项高度,选填,默认为24,如想覆盖才需要在初始化参数中指定 + * supportSubmit: {number} 是否支持提交或级联操作,选填,默认为false + * customScrollbar: {number} 是否使用自定义滚动条,选填,默认为false + * onChange: {function} select的onChange回调,选填, + * customLiTpl {string} 自定义li的tpl,选填, + * appendToBody: {number} 是否需要添加到body下,避免被祖先元素的任何样式限制(比如说z-index和overflow:hidden都可能导致下拉列表被挡住) + * } + * typelist.value: 返回当前选中的值 + * typelist.reset(data,defIndex): 重置下拉列表内容 + */ +var Dropdownlist = function(opt){ + var that = this; + //占位select的id + that.selector = opt.selector; + //初始化占位select相关 + that._initTarget(); + //是否支持表单提交或级联 + that.supportSubmit = parseInt(opt.supportSubmit,10) || 0; + //如果有级联元素,则supportSubmit一定为1 + if(opt.child){ + that.child = opt.child; + that.supportSubmit = 1; + } + //占位select下的option + that.options = that.target.find("option"); + //根据是否有option判断数据是固定来源还是动态获取 + that.isDataFixed = that.options.length ? 1 : 0; + // 是否需要添加到body下 + that.appendToBody = parseInt(opt.appendToBody,10) || 0; + //缓存列表数据 + that.data = opt.data || []; + // 是否存在空白项 + that.allowEmpty = parseInt(opt.allowEmpty,10) || 0; + // 无选项或可以留空时要显示的文字 + that.emptyItem = opt.emptyItem || {id:"", name:""}; + //记录默认选中项的序号 + that.defIndex = parseInt(opt.defIndex,10) || 0; + //记录被选中项的序号 + that.selIndex = that._initSelIndex(that.defIndex); + //下拉列表的宽度根据占位select的宽度决定 + that.targetWidth = that.target.css("width"); + //最多可见的行数,实际数量多于此数就显示滚动条 + that.visibleNum = opt.visibleNum || 5; + //列表项高度 + that.lineHeight = opt.lineHeight || 24; + //是否使用自定义滚动条 + that.customScrollbar = parseInt(opt.customScrollbar,10) || 0; + // select的onChange回调 + that.onChange = opt.onChange; + //下拉列表的tpl + that.listTpl = ""; + //自定义li的tpl + that.customLiTpl = opt.customLiTpl || "
                            • #{name}
                            • "; + //初始化 + that._init(); +}; + +//是否已经绑定document事件的标识位 +Dropdownlist._hasBindEvent = 0; +//记录当前正在显示的dropdownlist对象 +Dropdownlist._curObj; +//记录当前正在显示的下拉列表 +Dropdownlist._curList; +//跟随input的移动而移动的计时器 +Dropdownlist._fixPosTimer; +//处理窗口滚动的计时器 +Dropdownlist._scrollTimer; + +/** + * 收起展开的下拉列表 + * + * @this {Dropdownlist} + */ +Dropdownlist._hide = function(){ + var curList = Dropdownlist._curList; + curList.hide(0,function(){ + var parent = $("#"+curList.attr("id").replace(/List$/,"DropDown")); + parent.find(".dropdown-arrow-up").removeClass("dropdown-arrow-up"); + //当下拉列表被收起时,去掉监听参考对象位置的计时器 + clearInterval(Dropdownlist._fixPosTimer); + }); +}; + +/** + * 初始化占位select的jQuery对象和绑定change事件 + * + * @this {Dropdownlist} + */ +Dropdownlist.prototype._initTarget = function(){ + var that = this; + //占位select的jQuery对象 + that.target = $("#"+that.selector); + //绑定占位select的change事件 + that.target.on("change",function(e){ + that.onChange && that.onChange.call(that); + }); +}; +/** + * 初始化默认选中项的序号,取值规则为先依据默认选中项参数,如果没有,再看是否是isDataFixed固定数据类型并且已经在dom里指定了默认选中项的,如果还是没有则指定为0 + * + * @this {Dropdownlist} + * @param {object} opt The init parameter + * @return {number} the index of list item being selected + */ +Dropdownlist.prototype._initSelIndex = function(defIndex){ + var that = this, + tmp; + if(defIndex){ + tmp = defIndex; + }else if(that.isDataFixed){ + tmp = that.options.find(":selected").index(); + !(tmp + 1) && (tmp = 0); + }else{ + tmp = 0; + } + return tmp; +}; + +/** + * 生成自定义下拉列表 + * + * @this {Dropdownlist} + */ +Dropdownlist.prototype._initDom = function(){ + var that = this, + counter = 0; + // 生成整个下拉列表的html + that.listTpl = helper.replaceTpl(that.listTpl,{ + dir: conf.dir, + targetPrefix: that.selector, + targetWidth: that.targetWidth!=="0px"?" style='width:"+that.targetWidth+"'":"", + liTpl: that._formLiTpl() + }); + // 把新生成的下拉列表html包成一个jQuery对象 + that.newSelector = $(that.listTpl); + // 找到其中的下拉列表 + that.list = that.newSelector.find(".dropdown-list"); + that.innerList = that.list.find(".dropdown-list-inner"); + // 找到其中的输入区域 + that.newInput = that.newSelector.find(".dropdown-input"); + // 插入占位dom的后面 + that.target.after(that.newSelector).hide(); + // 设置默认选中项 + that._setDefaultVal(); + //设置下拉部分的宽度,和input保持一致 + that.list.css("width",that.newInput.outerWidth()); + // 把下拉部分添加到body下 + that.appendToBody && that.list.appendTo($("body")); + // 是否使用自定义滚动条 + if(that.customScrollbar){ + if(typeof(require) != "undefined"){ + require.async("common:widget/ui/scrollable/scrollable.js", function(){ + that.scrollbar = that.innerList.scrollable(); + }); + }else{ + that.scrollbar = that.innerList.scrollable(); + } + that.list.css({ + "max-height": that.visibleNum * that.lineHeight + }); + }else{ + //设置下拉部分的最大高度,超出部分出滚动条 + that.innerList.css({ + "max-height": that.visibleNum * that.lineHeight, + "overflow-y": "auto", + "overflow-x": "hidden" + }); + } +}; + +/** + * 生成下拉列表的所有列表项html + * + * @this {Dropdownlist} + * @return {string} The html of all list items + */ +Dropdownlist.prototype._formLiTpl = function(){ + var that = this, + html = ""; + + // 拼装列表项的html + $.each(that.data,function(key,value){ + html += helper.replaceTpl(that.customLiTpl, value); + }); + return html; +}; + +/** + * 提取非动态数据类型的数据,和动态数据保持一致 + * + * @this {Dropdownlist} + */ +Dropdownlist.prototype._formData = function(){ + var that = this; + // 如果是option形式,用来抽取数据 + if(that.isDataFixed && !that.data.length){ + $.each(that.target.find("option"),function(i,v){ + var opt = $(v); + that.data[that.data.length] = { + id: opt.attr("value") || opt.html(), + name: opt.html() + }; + }); + } + // 如果允许空白项,则将空白项数据插入为data数组的第一个元素 + that.allowEmpty && that.data.unshift(that.emptyItem); +}; + +/** + * 设置默认选中项 + * + * @this {Dropdownlist} + */ +Dropdownlist.prototype._setDefaultVal = function(){ + var that = this,selValue; + // 如果想默认留空或者数据为空,则输入区为空值;否则输入区显示被选中项的值 + if(that.allowEmpty || !that.data.length){ + selValue = that.emptyItem; + }else if(that.selIndex === -1){ + selValue = {id: "", name:""}; + }else{ + selValue = that.data[that.selIndex]; + } + // 设置默认选中项 + that.newInput.html(selValue.name).attr({"title":selValue.name,"value":selValue.id}); + that.value = selValue.id; + that.title = selValue.name; + // 如果要支持表单提交或级联需要做的工作 + that.supportSubmit && that._prepareSubmit(selValue); +}; + +/** + * 让select和自定义下拉列表一起联动 + * + * @this {Dropdownlist} + * @param {object} selValue The new data needed to be updated + */ +Dropdownlist.prototype._prepareSubmit = function(selValue){ + var that = this; + if(that.isDataFixed){ + that.target.find("option").removeAttr("selected").eq(that.selIndex).attr("selected","true"); + }else{ + that.target.html(""); + } + // 触发select的change事件 + that.target.trigger("change"); +}; + +/** + * 重置自定义下拉列表事件 + * + * @this {Dropdownlist} + * @param {array} data The new data needed to be updated + * @param {number} defIndex The default selection index + */ +Dropdownlist.prototype.reset = function(data,defIndex){ + var that = this; + that.data = data; + // 如果允许留空,则不论是data数组为空还是data数组的第一个元素不是空元素的时候,都会往data数组中插入空白项作为第一个元素,以便下拉列表中第一项为空白项 + if(that.allowEmpty && (!that.data.length || that.data[0].id !== that.emptyItem.id)){ + that.data.unshift(that.emptyItem); + } + that.selIndex = typeof defIndex !== "undefined" ? parseInt(defIndex,10) : that.defIndex; + that.innerList.html(that._formLiTpl()); + that._setDefaultVal(); +}; + +/** + * 重置自定义下拉列表位置 + * + * @this {Dropdownlist} + * @param {object} toObj 跟随对象 + * @param {object} fromObj 位置参考对象 + * @param {object} pos 偏移位置信息 + * @return {object} {跟随对象,位置参考对象,偏移位置,位置参考对象当前位置信息} + */ +Dropdownlist.prototype._fixPosition = function(toObj, fromObj, pos) { + var offset = fromObj.offset(), + curPos = offset; + + pos = pos || { + left: 0, + top: 0 + }; + curPos.left += pos.left; + curPos.top += pos.top; + toObj.offset(curPos); +}; + +/** + * 绑定自定义下拉列表事件 + * + * @this {Dropdownlist} + */ +Dropdownlist.prototype._bindEvent = function(){ + var thisObj = this; + thisObj.newSelector + //触发下拉列表展开、收起 + .on("click.dropdownlist",".dropdown-trigger",function(e){ + if(thisObj.list.is(":hidden")){ + var that = $(this), + // 在body下则获取绝对位置,否则获取相对定位容器的相对位置 + baseOffset = thisObj.appendToBody ? that.offset() : that.position(), + pos = { + top: that.outerHeight(), + left: 0 + }, + listTriggerArrow = that.find(".dropdown-arrow"); + //如果下拉部分在body下,则当下拉列表被展开时,开始设置计时器循环监听参考对象位置是否移动,如果移动了就修正下拉列表的位置 + thisObj.appendToBody && (Dropdownlist._fixPosTimer = setInterval(function(){ + var newOffset = that.offset(); + if (newOffset.left != baseOffset.left || newOffset.top != baseOffset.top) { + thisObj._fixPosition(thisObj.list, that, pos); + baseOffset = that.offset(); + } + },200)); + //设置下拉部分的位置及向下滑动展开 + thisObj.list + .css({ + left: baseOffset.left, + top: baseOffset.top + that.outerHeight() + }) + .show(0,function(){ + Dropdownlist._curObj = thisObj; + Dropdownlist._curList = Dropdownlist._curObj.list; + }); + // 根据当前被选中项重置默认选中效果和定位显示 + if(thisObj.selIndex >= 0){ + var step = thisObj.selIndex >= thisObj.visibleNum ? thisObj.selIndex : 0; + thisObj.innerList.find("li").removeClass("dropdown-list-hover") + .eq(thisObj.selIndex).addClass("dropdown-list-hover"); + if(thisObj.customScrollbar){ + thisObj.scrollbar.goTo({ + y: -thisObj.lineHeight * step + }) + }else{ + thisObj.innerList.scrollTop(thisObj.lineHeight * step); + } + } + listTriggerArrow.addClass("dropdown-arrow-up"); + }else{ + Dropdownlist._hide(); + } + }); + + thisObj.list + // 鼠标进入下拉列表时去掉列表项的选中样式,让样式跟随鼠标移动而变化 + .on("mouseenter.dropdownlist",function(){ + $(this).find(".dropdown-list-hover").removeClass("dropdown-list-hover"); + }) + // 鼠标离开下拉列表时选中样式停留在最后一个停留过的列表项上 + .on("mouseleave.dropdownlist",function(){ + $(this).find("li").eq(thisObj.lastIndex).addClass("dropdown-list-hover"); + }) + // 鼠标离开任意列表项时记录下它的序号,用来帮助上个方法 + .on("mouseleave.dropdownlist","li",function(){ + thisObj.lastIndex = $(this).index(); + }) + //点击下拉列表项 + .on("mousedown.dropdownlist","li",function(){ + var that = $(this), + newIndex = that.index(), + newVal = thisObj.data[newIndex]; + if(newVal.id != thisObj.newInput.attr("value")){ + thisObj.selIndex = newIndex; + thisObj.newInput.html(that.html()).attr({ + "value": newVal.id, + "title": newVal.name + }); + thisObj.value = newVal.id; + thisObj.title = newVal.name; + thisObj.supportSubmit && thisObj._prepareSubmit(newVal); + that.addClass("dropdown-list-hover") + .siblings(".dropdown-list-hover").removeClass("dropdown-list-hover"); + } + }); + //绑定所有实例公用的事件 + if(!Dropdownlist._hasBindEvent){ + //当页面滚动时,如果下拉列表有展开并且其位置在body下是,要先暂时隐藏下拉列表,等到滚动结束后才重新显示 + $(window).scroll(function(){ + var cur = Dropdownlist._curList; + if(cur && cur.is(":visible") && cur.parent("body").length){ + clearTimeout(Dropdownlist._scrollTimer); + // cur.hide(); + cur.css("visibility","hidden"); + Dropdownlist._scrollTimer = setTimeout(function(){ + // cur.show(); + cur.css("visibility","visible"); + },500); + } + }); + //收起日期列表 + $(document).on("mouseup.dropdownlist", function(e) { + var el = e.target, + curObj = Dropdownlist._curObj, + curList = Dropdownlist._curList; + // 排除掉下拉列表滚动条的点击,其它都会触发收起 + if(curList && el !== curList.find(".dropdown-list-inner")[0] && !$.contains($(".dropdown-trigger",curObj.newSelector)[0],el)){ + /*curList.hide(0,function(){ + var parent = $("#"+curList.attr("id").replace(/List$/,"DropDown")); + parent.find(".dropdown-arrow-up").removeClass("dropdown-arrow-up"); + //当下拉列表被收起时,去掉监听参考对象位置的计时器 + clearInterval(Dropdownlist._fixPosTimer); + });*/ + if(curObj.customScrollbar && (el == $(".mod-scroll",curObj.newSelector)[0] || $.contains($(".mod-scroll",curObj.newSelector)[0],el))){ + return; + } + Dropdownlist._hide(); + } + }); + Dropdownlist._hasBindEvent = 1; + } +}; + +/** + * 初始化自定义下拉列表 + * + * @this {Dropdownlist} + * @return {object} Dropdownlist instance + */ +Dropdownlist.prototype._init = function(){ + var that = this; + that._formData(); + that._initDom(); + that._bindEvent(); + return that; +}; + +module.exports = Dropdownlist; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/img/i-arrow-bottom-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/img/i-arrow-bottom-green.png new file mode 100755 index 000000000..f53d572d6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/img/i-arrow-bottom-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/img/i-arrow-top-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/img/i-arrow-top-green.png new file mode 100755 index 000000000..98c23d67a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/dropdownlist/img/i-arrow-top-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/eventcenter/eventcenter.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/eventcenter/eventcenter.js new file mode 100755 index 000000000..657050b31 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/eventcenter/eventcenter.js @@ -0,0 +1,3 @@ +var jQuery = require('common:widget/ui/jquery/jquery.js'); +var eventCenter = jQuery({}); +module.exports = eventCenter; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/helper/helper.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/helper/helper.js new file mode 100755 index 000000000..10b754489 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/helper/helper.js @@ -0,0 +1,69 @@ +/** + * 定义一些常用的工具函数 + * User: ne + * Date: 13-5-20 + * Time: 下午6:09 + * To change this template use File | Settings | File Templates. + + * Change log: + * 2013-8-1 11:00 Add Global Eval function by @Frank F. + */ + +var helper = { + /** + * Format datas with a template + */ + replaceTpl: function (tpl, data, label) { + var t = String(tpl), + s = label || /#\{([^}]*)\}/mg, + trim = String.trim || + function (str) { + return str.replace(/^\s+|\s+$/g, '') + }; + return t.replace(s, function (value, name) { + //从模板获取name,容错处理 + return value = data[trim(name)]; + }); + }, + + /** + * Get url's query and put it into an object + */ + getQuery: function (url) { + url = url ? url : window.location.search; + if (url.indexOf("?") < 0) return {}; + var queryParam = url.substring(url.indexOf("?") + 1, url.length).split("&"), + queryObj = {}; + for (i = 0; j = queryParam[i]; i++) { + queryObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length); + } + return queryObj; + }, + + /** + * Eval JS code in global scope, support all browsers. + */ + globalEval: function( code ) { + if ( code && /\S/.test(code) ) { + var method = window.execScript ? "execScript" : "eval"; + window[method](code); + } + }, + /** + * 地址栏url中如果带了指定的参数(如uid),则对应跳转链接的末尾也要带上这个参数(主要用在通过活动客户端进入首页后 + * 通过其他入口进入活动页时能保留首页的uid) + * @param {String} url 跳转链接url + * @param {String} queryParam 要带上的指定参数 + * @return {String} 拼接好的url + */ + appendQueryToUrl: function(url, queryParam) { + var paramVal; + // 有passQueryParam并且地址栏url带了queryParam指定的参数 + if(queryParam && (paramVal = this.getQuery(location.href)[queryParam])){ + url += (url.indexOf("?") != -1?"&":"?") + queryParam + "=" + paramVal; + } + return url; + } +}; + +module.exports = helper; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/history/history.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/history/history.js new file mode 100755 index 000000000..e19bec7f6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/history/history.js @@ -0,0 +1,66 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var History = function() { + + // whether support html5 history API + var supportHistory = null; + + // History instance returned to the outer scope + var self = null; + + /* extract hash part from a given url */ + var _getHash = function(url) { + url = url || window.location.href; + return window.location.hash.substr(1); // url.replace( /^[^#]*#?(.*)$/, '$1' ) + }; + + /* set a new hash in the location bar */ + var _setHash = function(newHash) { + window.location.hash = newHash; + }; + + /* bind history listener */ + var _bind = function() { + if(supportHistory){ + $(window).on("popstate", function(e){ + var hash = _getHash(); + $(self).trigger("popstate", [hash]); + // console.log("%c popstate "+hash, "color: #f00"); + }); + }else{ + $(window).on("hashchange", function(e) { + var hash = _getHash(); + $(self).trigger("popstate", [hash]); + // console.log("%c hash "+hash, "color: #f00"); //+" "+e.oldURL+" -> "+e.newURL + }); + } + }; + + /* init */ + var _init = function() { + var self = this; + supportHistory = (function() { + return !!(window.history && window.history.pushState && window.history.replaceState); + })(); + _bind(); + }; + + // initialization entrance + _init(); + + /* return outer interface */ + // 1) instance object for capturing custom event "popstate" + return self = { + // 2) a method triggering history to change + pushState: function(newHash) { + if(supportHistory){ + window.history.pushState(null, null, "#"+newHash); + $(self).trigger("popstate", [newHash]); // callback(newHash); + }else{ + _setHash(newHash); // trigger hashchange event + } + } + }; + +}; + +module.exports = History; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-big-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-big-new.png new file mode 100755 index 000000000..8e6adfee1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-big-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-big-rtl-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-big-rtl-new.png new file mode 100755 index 000000000..623f70e1c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-big-rtl-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-hot.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-hot.png new file mode 100755 index 000000000..6a5fb573c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-hot.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-new.png new file mode 100755 index 000000000..cd6c5982a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-rtl-hot.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-rtl-hot.png new file mode 100755 index 000000000..6abc3ae71 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-rtl-hot.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-rtl-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-rtl-new.png new file mode 100755 index 000000000..caf333513 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/i-rtl-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/icon_common.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/icon_common.png new file mode 100755 index 000000000..f345e6d58 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/icon_common.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/icon_common_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/icon_common_rtl.png new file mode 100755 index 000000000..1504b341e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/icon_common_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/o.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/o.gif new file mode 100755 index 000000000..f8c96bd22 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/img/o.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.0/jquery-1.8.0.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.0/jquery-1.8.0.js new file mode 100755 index 000000000..077068294 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.0/jquery-1.8.0.js @@ -0,0 +1,9227 @@ +/*! + * jQuery JavaScript Library v1.8.0 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: Thu Aug 09 2012 16:24:48 GMT-0400 (Eastern Daylight Time) + */ +(function( window, undefined ) { +var + // A central reference to the root jQuery(document) + rootjQuery, + + // The deferred used on DOM ready + readyList, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + location = window.location, + navigator = window.navigator, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // Save a reference to some core methods + core_push = Array.prototype.push, + core_slice = Array.prototype.slice, + core_indexOf = Array.prototype.indexOf, + core_toString = Object.prototype.toString, + core_hasOwn = Object.prototype.hasOwnProperty, + core_trim = String.prototype.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, + + // Used for detecting and trimming whitespace + core_rnotwhite = /\S/, + core_rspace = /\s+/, + + // IE doesn't match non-breaking spaces with \s + rtrim = core_rnotwhite.test("\xA0") ? (/^[\s\xA0]+|[\s\xA0]+$/g) : /^\s+|\s+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // The ready event handler and self cleanup method + DOMContentLoaded = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + } else if ( document.readyState === "complete" ) { + // we're here because readyState === "complete" in oldIE + // which is good enough for us to call the dom ready! + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = ( context && context.nodeType ? context.ownerDocument || context : document ); + + // scripts is true for back-compat + selector = jQuery.parseHTML( match[1], doc, true ); + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + this.attr.call( selector, context, true ); + } + + return jQuery.merge( this, selector ); + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.8.0", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + eq: function( i ) { + i = +i; + return i === -1 ? + this.slice( i ) : + this.slice( i, i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ), + "slice", core_slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ core_toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // scripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, scripts ) { + var parsed; + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + scripts = context; + context = 0; + } + context = context || document; + + // Single tag + if ( (parsed = rsingleTag.exec( data )) ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); + return jQuery.merge( [], + (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); + }, + + parseJSON: function( data ) { + if ( !data || typeof data !== "string") { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && core_rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var name, + i = 0, + length = obj.length, + isObj = length === undefined || jQuery.isFunction( obj ); + + if ( args ) { + if ( isObj ) { + for ( name in obj ) { + if ( callback.apply( obj[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( obj[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in obj ) { + if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var type, + ret = results || []; + + if ( arr != null ) { + // The window, strings (and functions) also have 'length' + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + type = jQuery.type( arr ); + + if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { + core_push.call( ret, arr ); + } else { + jQuery.merge( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, + ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, pass ) { + var exec, + bulk = key == null, + i = 0, + length = elems.length; + + // Sets many values + if ( key && typeof key === "object" ) { + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); + } + chainable = 1; + + // Sets one value + } else if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = pass === undefined && jQuery.isFunction( value ); + + if ( bulk ) { + // Bulk operations only iterate when executing function values + if ( exec ) { + exec = fn; + fn = function( elem, key, value ) { + return exec.call( jQuery( elem ), value ); + }; + + // Otherwise they run against the entire set + } else { + fn.call( elems, value ); + fn = null; + } + } + + if ( fn ) { + for (; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + } + + chainable = 1; + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" || ( document.readyState !== "loading" && document.addEventListener ) ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready, 1 ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.split( core_rspace ), function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) { + list.push( arg ); + } else if ( arg && arg.length ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Control if a given callback is in the list + has: function( fn ) { + return jQuery.inArray( fn, list ) > -1; + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( list && ( !fired || stack ) ) { + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? + function() { + var returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + } : + newDefer[ action ] + ); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return typeof obj === "object" ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] = list.fire + deferred[ tuple[0] ] = list.fire; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function() { + + var support, + all, + a, + select, + opt, + input, + fragment, + eventName, + i, + isSupported, + clickFn, + div = document.createElement("div"); + + // Preliminary tests + div.setAttribute( "className", "t" ); + div.innerHTML = "
                              a"; + + all = div.getElementsByTagName("*"); + a = div.getElementsByTagName("a")[ 0 ]; + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.5/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode + boxModel: ( document.compatMode === "CSS1Compat" ), + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + boxSizingReliable: true, + pixelPosition: false + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", clickFn = function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent("onclick"); + div.detachEvent( "onclick", clickFn ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + input.setAttribute( "checked", "checked" ); + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for ( i in { + submit: true, + change: true, + focusin: true + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + // Run tests that need a body at doc ready + jQuery(function() { + var container, div, tds, marginDiv, + divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "
                              t
                              "; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + support.boxSizing = ( div.offsetWidth === 4 ); + support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); + + // NOTE: To any future maintainer, window.getComputedStyle was used here + // instead of getComputedStyle because it gave a better gzip size. + // The difference between window.getComputedStyle and getComputedStyle is + // 7 bytes + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = document.createElement("div"); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = "block"; + div.style.overflow = "visible"; + div.innerHTML = "
                              "; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + container.style.zoom = 1; + } + + // Null elements to avoid leaks in IE + body.removeChild( container ); + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + fragment.removeChild( div ); + all = a = select = opt = input = fragment = div = null; + + return support; +})(); +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + deletedIds: [], + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = jQuery.deletedIds.pop() || ++jQuery.uuid; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, part, attr, name, l, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attr = elem.attributes; + for ( l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split( ".", 2 ); + parts[1] = parts[1] ? "." + parts[1] : ""; + part = parts[1] + "!"; + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + data = this.triggerHandler( "getData" + part, [ parts[0] ] ); + + // Try to fetch any internally stored data first + if ( data === undefined && elem ) { + data = jQuery.data( elem, key ); + data = dataAttr( elem, key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } + + parts[1] = value; + this.each(function() { + var self = jQuery( this ); + + self.triggerHandler( "setData" + part, parts ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + part, parts ); + }); + }, null, value, arguments.length > 1, null, false ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + if ( !queue.length && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery.removeData( elem, type + "queue", true ); + jQuery.removeData( elem, key, true ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + if ( (tmp = jQuery._data( elements[ i ], type + "queueHooks" )) && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, fixSpecified, + rclass = /[\t\r\n]/g, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea|)$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( core_rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var removes, className, elem, c, cl, i, l; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + if ( (value && typeof value === "string") || value === undefined ) { + removes = ( value || "" ).split( core_rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + if ( elem.nodeType === 1 && elem.className ) { + + className = (" " + elem.className + " ").replace( rclass, " " ); + + // loop over each item in the removal list + for ( c = 0, cl = removes.length; c < cl; c++ ) { + // Remove until there is nothing to remove, + while ( className.indexOf(" " + removes[ c ] + " ") > -1 ) { + className = className.replace( " " + removes[ c ] + " " , " " ); + } + } + elem.className = value ? jQuery.trim( className ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( core_rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val, + self = jQuery(this); + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 + attrFn: {}, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, isBool, + i = 0; + + if ( value && elem.nodeType === 1 ) { + + attrNames = value.split( core_rspace ); + + for ( ; i < attrNames.length; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + isBool = rboolean.test( name ); + + // See #9699 for explanation of this approach (setting first, then removal) + // Do not do this for boolean attributes (see #10870) + if ( !isBool ) { + jQuery.attr( elem, name, "" ); + } + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( isBool && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true, + coords: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? + ret.value : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.value = value + "" ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, + rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var t, tns, type, origType, namespaces, origCount, + j, events, special, eventType, handleObj, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, "events", true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, + type = event.type || event, + namespaces = []; + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + for ( old = elem; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old === (elem.ownerDocument || document) ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related, + handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments ), + run_all = !event.exclusive && !event.namespace, + special = jQuery.event.special[ event.type ] || {}, + handlerQueue = []; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers that should run if there are delegated events + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !(event.button && event.type === "click") ) { + + // Pregenerate a single jQuery object for reuse with .is() + jqcur = jQuery(this); + jqcur.context = this; + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + + // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #xxxx) + if ( cur.disabled !== true || event.type !== "click" ) { + selMatch = {}; + matches = []; + jqcur[0] = cur; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = jqcur.is( sel ); + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) + event.metaKey = !!event.metaKey; + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 – + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === "undefined" ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "_submit_attached" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "_submit_attached", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "_change_attached", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { // && selector != null + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ +(function( window, undefined ) { + +var cachedruns, + dirruns, + sortOrder, + siblingCheck, + assertGetIdNotName, + + document = window.document, + docElem = document.documentElement, + + strundefined = "undefined", + hasDuplicate = false, + baseHasDuplicate = true, + done = 0, + slice = [].slice, + push = [].push, + + expando = ( "sizcache" + Math.random() ).replace( ".", "" ), + + // Regex + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = "([*^$|!~]?=)", + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)", + pos = ":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)", + combinators = whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*", + groups = "(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|" + attributes + "|" + pseudos.replace( 2, 7 ) + "|[^\\\\(),])+", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcombinators = new RegExp( "^" + combinators ), + + // All simple (non-comma) selectors, excluding insignifant trailing whitespace + rgroups = new RegExp( groups + "?(?=" + whitespace + "*,|$)", "g" ), + + // A selector, or everything after leading whitespace + // Optionally followed in either case by a ")" for terminating sub-selectors + rselector = new RegExp( "^(?:(?!,)(?:(?:^|,)" + whitespace + "*" + groups + ")*?|" + whitespace + "*(.*?))(\\)|$)" ), + + // All combinators and selector components (attribute test, tag, pseudo, etc.), the latter appearing together when consecutive + rtokens = new RegExp( groups.slice( 19, -6 ) + "\\x20\\t\\r\\n\\f>+~])+|" + combinators, "g" ), + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, + + rsibling = /[\x20\t\r\n\f]*[+~]/, + rendsWithNot = /:not\($/, + + rheader = /h\d/i, + rinputs = /input|select|textarea|button/i, + + rbackslash = /\\(?!\\)/g, + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "[-", "[-\\*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|nth|last|first)-child(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "POS": new RegExp( pos, "ig" ), + // For use in libraries implementing .is() + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) + }, + + classCache = {}, + cachedClasses = [], + compilerCache = {}, + cachedSelectors = [], + + // Mark a function for use in filtering + markFunction = function( fn ) { + fn.sizzleFilter = true; + return fn; + }, + + // Returns a function to use in pseudos for input types + createInputFunction = function( type ) { + return function( elem ) { + // Check the input's nodeName and type + return elem.nodeName.toLowerCase() === "input" && elem.type === type; + }; + }, + + // Returns a function to use in pseudos for buttons + createButtonFunction = function( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; + }, + + // Used for testing something on an element + assert = function( fn ) { + var pass = false, + div = document.createElement("div"); + try { + pass = fn( div ); + } catch (e) {} + // release memory in IE + div = null; + return pass; + }, + + // Check if attributes should be retrieved by attribute nodes + assertAttributes = assert(function( div ) { + div.innerHTML = ""; + var type = typeof div.lastChild.getAttribute("multiple"); + // IE8 returns a string for some attributes even when not present + return type !== "boolean" && type !== "string"; + }), + + // Check if getElementById returns elements by name + // Check if getElementsByName privileges form controls or returns elements by ID + assertUsableName = assert(function( div ) { + // Inject content + div.id = expando + 0; + div.innerHTML = "
                              "; + docElem.insertBefore( div, docElem.firstChild ); + + // Test + var pass = document.getElementsByName && + // buggy browsers will return fewer than the correct 2 + document.getElementsByName( expando ).length === + // buggy browsers will return more than the correct 0 + 2 + document.getElementsByName( expando + 0 ).length; + assertGetIdNotName = !document.getElementById( expando ); + + // Cleanup + docElem.removeChild( div ); + + return pass; + }), + + // Check if the browser returns only elements + // when doing getElementsByTagName("*") + assertTagNameNoComments = assert(function( div ) { + div.appendChild( document.createComment("") ); + return div.getElementsByTagName("*").length === 0; + }), + + // Check if getAttribute returns normalized href attributes + assertHrefNotNormalized = assert(function( div ) { + div.innerHTML = ""; + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute("href") === "#"; + }), + + // Check if getElementsByClassName can be trusted + assertUsableClassName = assert(function( div ) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = ""; + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return false; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + return div.getElementsByClassName("e").length !== 1; + }); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + var match, elem, xml, m, + nodeType = context.nodeType; + + if ( nodeType !== 1 && nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + xml = isXML( context ); + + if ( !xml && !seed ) { + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { + push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); + return results; + } + } + } + + // All others + return select( selector, context, results, seed, xml ); +}; + +var Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + match: matchExpr, + + order: [ "ID", "TAG" ], + + attrHandle: {}, + + createPseudo: markFunction, + + find: { + "ID": assertGetIdNotName ? + function( id, context, xml ) { + if ( typeof context.getElementById !== strundefined && !xml ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + } : + function( id, context, xml ) { + if ( typeof context.getElementById !== strundefined && !xml ) { + var m = context.getElementById( id ); + + return m ? + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? + [m] : + undefined : + []; + } + }, + + "TAG": assertTagNameNoComments ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + var elem, + tmp = [], + i = 0; + + for ( ; (elem = results[i]); i++ ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + } + }, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( rbackslash, "" ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr.CHILD + 1 type (only|nth|...) + 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 3 xn-component of xn+y argument ([+-]?\d*n|) + 4 sign of xn-component + 5 x of xn-component + 6 sign of y-component + 7 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1] === "nth" ) { + // nth-child requires argument + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); + match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); + + // other types prohibit arguments + } else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var argument, + unquoted = match[4]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Relinquish our claim on characters in `unquoted` from a closing parenthesis on + if ( unquoted && (argument = rselector.exec( unquoted )) && argument.pop() ) { + + match[0] = match[0].slice( 0, argument[0].length - unquoted.length - 1 ); + unquoted = argument[0].slice( 0, -1 ); + } + + // Quoted or unquoted, we have the full argument + // Return only captures needed by the pseudo filter method (type and argument) + match.splice( 2, 3, unquoted || match[3] ); + return match; + } + }, + + filter: { + "ID": assertGetIdNotName ? + function( id ) { + id = id.replace( rbackslash, "" ); + return function( elem ) { + return elem.getAttribute("id") === id; + }; + } : + function( id ) { + id = id.replace( rbackslash, "" ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === id; + }; + }, + + "TAG": function( nodeName ) { + if ( nodeName === "*" ) { + return function() { return true; }; + } + nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); + + return function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className ]; + if ( !pattern ) { + pattern = classCache[ className ] = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ); + cachedClasses.push( className ); + // Avoid too large of a cache + if ( cachedClasses.length > Expr.cacheLength ) { + delete classCache[ cachedClasses.shift() ]; + } + } + return function( elem ) { + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); + }; + }, + + "ATTR": function( name, operator, check ) { + if ( !operator ) { + return function( elem ) { + return Sizzle.attr( elem, name ) != null; + }; + } + + return function( elem ) { + var result = Sizzle.attr( elem, name ), + value = result + ""; + + if ( result == null ) { + return operator === "!="; + } + + switch ( operator ) { + case "=": + return value === check; + case "!=": + return value !== check; + case "^=": + return check && value.indexOf( check ) === 0; + case "*=": + return check && value.indexOf( check ) > -1; + case "$=": + return check && value.substr( value.length - check.length ) === check; + case "~=": + return ( " " + value + " " ).indexOf( check ) > -1; + case "|=": + return value === check || value.substr( 0, check.length + 1 ) === check + "-"; + } + }; + }, + + "CHILD": function( type, argument, first, last ) { + + if ( type === "nth" ) { + var doneName = done++; + + return function( elem ) { + var parent, diff, + count = 0, + node = elem; + + if ( first === 1 && last === 0 ) { + return true; + } + + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.sizset) ) { + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.sizset = ++count; + if ( node === elem ) { + break; + } + } + } + + parent[ expando ] = doneName; + } + + diff = elem.sizset - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + }; + } + + return function( elem ) { + var node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + /* falls through */ + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + } + }; + }, + + "PSEUDO": function( pseudo, argument, context, xml ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + var fn = Expr.pseudos[ pseudo ] || Expr.pseudos[ pseudo.toLowerCase() ]; + + if ( !fn ) { + Sizzle.error( "unsupported pseudo: " + pseudo ); + } + + // The user may set fn.sizzleFilter to indicate + // that arguments are needed to create the filter function + // just as Sizzle does + if ( !fn.sizzleFilter ) { + return fn; + } + + return fn( argument, context, xml ); + } + }, + + pseudos: { + "not": markFunction(function( selector, context, xml ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var matcher = compile( selector.replace( rtrim, "$1" ), context, xml ); + return function( elem ) { + return !matcher( elem ); + }; + }), + + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + var nodeType; + elem = elem.firstChild; + while ( elem ) { + if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { + return false; + } + elem = elem.nextSibling; + } + return true; + }, + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "text": function( elem ) { + var type, attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + (type = elem.type) === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); + }, + + // Input types + "radio": createInputFunction("radio"), + "checkbox": createInputFunction("checkbox"), + "file": createInputFunction("file"), + "password": createInputFunction("password"), + "image": createInputFunction("image"), + + "submit": createButtonFunction("submit"), + "reset": createButtonFunction("reset"), + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "focus": function( elem ) { + var doc = elem.ownerDocument; + return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); + }, + + "active": function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + + setFilters: { + "first": function( elements, argument, not ) { + return not ? elements.slice( 1 ) : [ elements[0] ]; + }, + + "last": function( elements, argument, not ) { + var elem = elements.pop(); + return not ? elements : [ elem ]; + }, + + "even": function( elements, argument, not ) { + var results = [], + i = not ? 1 : 0, + len = elements.length; + for ( ; i < len; i = i + 2 ) { + results.push( elements[i] ); + } + return results; + }, + + "odd": function( elements, argument, not ) { + var results = [], + i = not ? 0 : 1, + len = elements.length; + for ( ; i < len; i = i + 2 ) { + results.push( elements[i] ); + } + return results; + }, + + "lt": function( elements, argument, not ) { + return not ? elements.slice( +argument ) : elements.slice( 0, +argument ); + }, + + "gt": function( elements, argument, not ) { + return not ? elements.slice( 0, +argument + 1 ) : elements.slice( +argument + 1 ); + }, + + "eq": function( elements, argument, not ) { + var elem = elements.splice( +argument, 1 ); + return not ? elements : elem; + } + } +}; + +// Deprecated +Expr.setFilters["nth"] = Expr.setFilters["eq"]; + +// Back-compat +Expr.filters = Expr.pseudos; + +// IE6/7 return a modified href +if ( !assertHrefNotNormalized ) { + Expr.attrHandle = { + "href": function( elem ) { + return elem.getAttribute( "href", 2 ); + }, + "type": function( elem ) { + return elem.getAttribute("type"); + } + }; +} + +// Add getElementsByName if usable +if ( assertUsableName ) { + Expr.order.push("NAME"); + Expr.find["NAME"] = function( name, context ) { + if ( typeof context.getElementsByName !== strundefined ) { + return context.getElementsByName( name ); + } + }; +} + +// Add getElementsByClassName if usable +if ( assertUsableClassName ) { + Expr.order.splice( 1, 0, "CLASS" ); + Expr.find["CLASS"] = function( className, context, xml ) { + if ( typeof context.getElementsByClassName !== strundefined && !xml ) { + return context.getElementsByClassName( className ); + } + }; +} + +// If slice is not available, provide a backup +try { + slice.call( docElem.childNodes, 0 )[0].nodeType; +} catch ( e ) { + slice = function( i ) { + var elem, results = []; + for ( ; (elem = this[i]); i++ ) { + results.push( elem ); + } + return results; + }; +} + +var isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Element contains another +var contains = Sizzle.contains = docElem.compareDocumentPosition ? + function( a, b ) { + return !!( a.compareDocumentPosition( b ) & 16 ); + } : + docElem.contains ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); + } : + function( a, b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + return false; + }; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + } else { + + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } + return ret; +}; + +Sizzle.attr = function( elem, name ) { + var attr, + xml = isXML( elem ); + + if ( !xml ) { + name = name.toLowerCase(); + } + if ( Expr.attrHandle[ name ] ) { + return Expr.attrHandle[ name ]( elem ); + } + if ( assertAttributes || xml ) { + return elem.getAttribute( name ); + } + attr = elem.getAttributeNode( name ); + return attr ? + typeof elem[ name ] === "boolean" ? + elem[ name ] ? name : null : + attr.specified ? attr.value : null : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +// Check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + return (baseHasDuplicate = 0); +}); + + +if ( docElem.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? + a.compareDocumentPosition : + a.compareDocumentPosition(b) & 4 + ) ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Document sorting and removing duplicates +Sizzle.uniqueSort = function( results ) { + var elem, + i = 1; + + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( ; (elem = results[i]); i++ ) { + if ( elem === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +function multipleContexts( selector, contexts, results, seed ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results, seed ); + } +} + +function handlePOSGroup( selector, posfilter, argument, contexts, seed, not ) { + var results, + fn = Expr.setFilters[ posfilter.toLowerCase() ]; + + if ( !fn ) { + Sizzle.error( posfilter ); + } + + if ( selector || !(results = seed) ) { + multipleContexts( selector || "*", contexts, (results = []), seed ); + } + + return results.length > 0 ? fn( results, argument, not ) : []; +} + +function handlePOS( selector, context, results, seed, groups ) { + var match, not, anchor, ret, elements, currentContexts, part, lastIndex, + i = 0, + len = groups.length, + rpos = matchExpr["POS"], + // This is generated here in case matchExpr["POS"] is extended + rposgroups = new RegExp( "^" + rpos.source + "(?!" + whitespace + ")", "i" ), + // This is for making sure non-participating + // matching groups are represented cross-browser (IE6-8) + setUndefined = function() { + var i = 1, + len = arguments.length - 2; + for ( ; i < len; i++ ) { + if ( arguments[i] === undefined ) { + match[i] = undefined; + } + } + }; + + for ( ; i < len; i++ ) { + // Reset regex index to 0 + rpos.exec(""); + selector = groups[i]; + ret = []; + anchor = 0; + elements = seed; + while ( (match = rpos.exec( selector )) ) { + lastIndex = rpos.lastIndex = match.index + match[0].length; + if ( lastIndex > anchor ) { + part = selector.slice( anchor, match.index ); + anchor = lastIndex; + currentContexts = [ context ]; + + if ( rcombinators.test(part) ) { + if ( elements ) { + currentContexts = elements; + } + elements = seed; + } + + if ( (not = rendsWithNot.test( part )) ) { + part = part.slice( 0, -5 ).replace( rcombinators, "$&*" ); + } + + if ( match.length > 1 ) { + match[0].replace( rposgroups, setUndefined ); + } + elements = handlePOSGroup( part, match[1], match[2], currentContexts, elements, not ); + } + } + + if ( elements ) { + ret = ret.concat( elements ); + + if ( (part = selector.slice( anchor )) && part !== ")" ) { + if ( rcombinators.test(part) ) { + multipleContexts( part, ret, results, seed ); + } else { + Sizzle( part, context, results, seed ? seed.concat(elements) : elements ); + } + } else { + push.apply( results, ret ); + } + } else { + Sizzle( selector, context, results, seed ); + } + } + + // Do not sort if this is a single filter + return len === 1 ? results : Sizzle.uniqueSort( results ); +} + +function tokenize( selector, context, xml ) { + var tokens, soFar, type, + groups = [], + i = 0, + + // Catch obvious selector issues: terminal ")"; nonempty fallback match + // rselector never fails to match *something* + match = rselector.exec( selector ), + matched = !match.pop() && !match.pop(), + selectorGroups = matched && selector.match( rgroups ) || [""], + + preFilters = Expr.preFilter, + filters = Expr.filter, + checkContext = !xml && context !== document; + + for ( ; (soFar = selectorGroups[i]) != null && matched; i++ ) { + groups.push( tokens = [] ); + + // Need to make sure we're within a narrower context if necessary + // Adding a descendant combinator will generate what is needed + if ( checkContext ) { + soFar = " " + soFar; + } + + while ( soFar ) { + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + soFar = soFar.slice( match[0].length ); + + // Cast descendant combinators to space + matched = tokens.push({ part: match.pop().replace( rtrim, " " ), captures: match }); + } + + // Filters + for ( type in filters ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match, context, xml )) ) ) { + + soFar = soFar.slice( match.shift().length ); + matched = tokens.push({ part: type, captures: match }); + } + } + + if ( !matched ) { + break; + } + } + } + + if ( !matched ) { + Sizzle.error( selector ); + } + + return groups; +} + +function addCombinator( matcher, combinator, context ) { + var dir = combinator.dir, + doneName = done++; + + if ( !matcher ) { + // If there is no matcher to check, check against the context + matcher = function( elem ) { + return elem === context; + }; + } + return combinator.first ? + function( elem, context ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 ) { + return matcher( elem, context ) && elem; + } + } + } : + function( elem, context ) { + var cache, + dirkey = doneName + "." + dirruns, + cachedkey = dirkey + "." + cachedruns; + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 ) { + if ( (cache = elem[ expando ]) === cachedkey ) { + return elem.sizset; + } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { + if ( elem.sizset ) { + return elem; + } + } else { + elem[ expando ] = cachedkey; + if ( matcher( elem, context ) ) { + elem.sizset = true; + return elem; + } + elem.sizset = false; + } + } + } + }; +} + +function addMatcher( higher, deeper ) { + return higher ? + function( elem, context ) { + var result = deeper( elem, context ); + return result && higher( result === true ? elem : result, context ); + } : + deeper; +} + +// ["TAG", ">", "ID", " ", "CLASS"] +function matcherFromTokens( tokens, context, xml ) { + var token, matcher, + i = 0; + + for ( ; (token = tokens[i]); i++ ) { + if ( Expr.relative[ token.part ] ) { + matcher = addCombinator( matcher, Expr.relative[ token.part ], context ); + } else { + token.captures.push( context, xml ); + matcher = addMatcher( matcher, Expr.filter[ token.part ].apply( null, token.captures ) ); + } + } + + return matcher; +} + +function matcherFromGroupMatchers( matchers ) { + return function( elem, context ) { + var matcher, + j = 0; + for ( ; (matcher = matchers[j]); j++ ) { + if ( matcher(elem, context) ) { + return true; + } + } + return false; + }; +} + +var compile = Sizzle.compile = function( selector, context, xml ) { + var tokens, group, i, + cached = compilerCache[ selector ]; + + // Return a cached group function if already generated (context dependent) + if ( cached && cached.context === context ) { + return cached; + } + + // Generate a function of recursive functions that can be used to check each element + group = tokenize( selector, context, xml ); + for ( i = 0; (tokens = group[i]); i++ ) { + group[i] = matcherFromTokens( tokens, context, xml ); + } + + // Cache the compiled function + cached = compilerCache[ selector ] = matcherFromGroupMatchers( group ); + cached.context = context; + cached.runs = cached.dirruns = 0; + cachedSelectors.push( selector ); + // Ensure only the most recent are cached + if ( cachedSelectors.length > Expr.cacheLength ) { + delete compilerCache[ cachedSelectors.shift() ]; + } + return cached; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + return Sizzle( expr, null, null, [ elem ] ).length > 0; +}; + +var select = function( selector, context, results, seed, xml ) { + // Remove excessive whitespace + selector = selector.replace( rtrim, "$1" ); + var elements, matcher, i, len, elem, token, + type, findContext, notTokens, + match = selector.match( rgroups ), + tokens = selector.match( rtokens ), + contextNodeType = context.nodeType; + + // POS handling + if ( matchExpr["POS"].test(selector) ) { + return handlePOS( selector, context, results, seed, match ); + } + + if ( seed ) { + elements = slice.call( seed, 0 ); + + // To maintain document order, only narrow the + // set if there is one group + } else if ( match && match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + if ( tokens.length > 1 && contextNodeType === 9 && !xml && + (match = matchExpr["ID"].exec( tokens[0] )) ) { + + context = Expr.find["ID"]( match[1], context, xml )[0]; + if ( !context ) { + return results; + } + + selector = selector.slice( tokens.shift().length ); + } + + findContext = ( (match = rsibling.exec( tokens[0] )) && !match.index && context.parentNode ) || context; + + // Get the last token, excluding :not + notTokens = tokens.pop(); + token = notTokens.split(":not")[0]; + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = matchExpr[ type ].exec( token )) ) { + elements = Expr.find[ type ]( (match[1] || "").replace( rbackslash, "" ), findContext, xml ); + + if ( elements == null ) { + continue; + } + + if ( token === notTokens ) { + selector = selector.slice( 0, selector.length - notTokens.length ) + + token.replace( matchExpr[ type ], "" ); + + if ( !selector ) { + push.apply( results, slice.call(elements, 0) ); + } + } + break; + } + } + } + + // Only loop over the given elements once + // If selector is empty, we're already done + if ( selector ) { + matcher = compile( selector, context, xml ); + dirruns = matcher.dirruns++; + + if ( elements == null ) { + elements = Expr.find["TAG"]( "*", (rsibling.test( selector ) && context.parentNode) || context ); + } + for ( i = 0; (elem = elements[i]); i++ ) { + cachedruns = matcher.runs++; + if ( matcher(elem, context) ) { + results.push( elem ); + } + } + } + + return results; +}; + +if ( document.querySelectorAll ) { + (function() { + var disconnectedMatch, + oldSelect = select, + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + rbuggyQSA = [], + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + // A support test would require too much code (would include document ready) + // just skip matchesSelector for :active + rbuggyMatches = [":active"], + matches = docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector; + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + div.innerHTML = ""; + + // IE8 - Some boolean attributes are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here (do not put tests after this one) + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Opera 10-12/IE9 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = "

                              "; + if ( div.querySelectorAll("[test^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here (do not put tests after this one) + div.innerHTML = ""; + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push(":enabled", ":disabled"); + } + }); + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + + select = function( selector, context, results, seed, xml ) { + // Only use querySelectorAll when not filtering, + // when this is not xml, + // and when no QSA bugs apply + if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + if ( context.nodeType === 9 ) { + try { + push.apply( results, slice.call(context.querySelectorAll( selector ), 0) ); + return results; + } catch(qsaError) {} + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var old = context.getAttribute("id"), + nid = old || expando, + newContext = rsibling.test( selector ) && context.parentNode || context; + + if ( old ) { + nid = nid.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + + try { + push.apply( results, slice.call( newContext.querySelectorAll( + selector.replace( rgroups, "[id='" + nid + "'] $&" ) + ), 0 ) ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + + return oldSelect( selector, context, results, seed, xml ); + }; + + if ( matches ) { + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + try { + matches.call( div, "[test!='']:sizzle" ); + rbuggyMatches.push( Expr.match.PSEUDO ); + } catch ( e ) {} + }); + + // rbuggyMatches always contains :active, so no need for a length check + rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); + + Sizzle.matchesSelector = function( elem, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + // rbuggyMatches always contains :active, so no need for an existence check + if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, null, null, [ elem ] ).length > 0; + }; + } + })(); +} + +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +var runtil = /Until$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + isSimple = /^.[^:#\[\.,]*$/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, l, length, n, r, ret, + self = this; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + ret = this.pushStack( "", "find", selector ); + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + rneedsContext.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + cur = this[i]; + + while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + } + cur = cur.parentNode; + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +jQuery.fn.andSelf = jQuery.fn.addBack; + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( this.length > 1 && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /]", "i"), + rcheckableType = /^(?:checkbox|radio)$/, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /\/(java|ecma)script/i, + rcleanScript = /^\s*\s*$/g, + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
                              ", "
                              " ], + thead: [ 1, "", "
                              " ], + tr: [ 2, "", "
                              " ], + td: [ 3, "", "
                              " ], + col: [ 2, "", "
                              " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, +// unless wrapped in a div with non-breaking characters in front of it. +if ( !jQuery.support.htmlSerialize ) { + wrapMap._default = [ 1, "X
                              ", "
                              " ]; +} + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + }, + + append: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 ) { + this.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 ) { + this.insertBefore( elem, this.firstChild ); + } + }); + }, + + before: function() { + if ( !isDisconnected( this[0] ) ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this ); + }); + } + + if ( arguments.length ) { + var set = jQuery.clean( arguments ); + return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); + } + }, + + after: function() { + if ( !isDisconnected( this[0] ) ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + } + + if ( arguments.length ) { + var set = jQuery.clean( arguments ); + return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); + } + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + jQuery.cleanData( [ elem ] ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName( "*" ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function( value ) { + if ( !isDisconnected( this[0] ) ) { + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this), old = self.html(); + self.replaceWith( value.call( this, i, old ) ); + }); + } + + if ( typeof value !== "string" ) { + value = jQuery( value ).detach(); + } + + return this.each(function() { + var next = this.nextSibling, + parent = this.parentNode; + + jQuery( this ).remove(); + + if ( next ) { + jQuery(next).before( value ); + } else { + jQuery(parent).append( value ); + } + }); + } + + return this.length ? + this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : + this; + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, table, callback ) { + + // Flatten any nested arrays + args = [].concat.apply( [], args ); + + var results, first, fragment, iNoClone, + i = 0, + value = args[0], + scripts = [], + l = this.length; + + // We can't cloneNode fragments that contain checked, in WebKit + if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { + return this.each(function() { + jQuery(this).domManip( args, table, callback ); + }); + } + + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + args[0] = value.call( this, i, table ? self.html() : undefined ); + self.domManip( args, table, callback ); + }); + } + + if ( this[0] ) { + results = jQuery.buildFragment( args, this, scripts ); + fragment = results.fragment; + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + table = table && jQuery.nodeName( first, "tr" ); + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + // Fragments from the fragment cache must always be cloned and never used in place. + for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { + callback.call( + table && jQuery.nodeName( this[i], "table" ) ? + findOrAppend( this[i], "tbody" ) : + this[i], + i === iNoClone ? + fragment : + jQuery.clone( fragment, true, true ) + ); + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + + if ( scripts.length ) { + jQuery.each( scripts, function( i, elem ) { + if ( elem.src ) { + if ( jQuery.ajax ) { + jQuery.ajax({ + url: elem.src, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } else { + jQuery.error("no ajax"); + } + } else { + jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } + }); + } + } + + return this; + } +}); + +function findOrAppend( elem, tag ) { + return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function cloneFixAttributes( src, dest ) { + var nodeName; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + // clearAttributes removes the attributes, which we don't want, + // but also removes the attachEvent events, which we *do* want + if ( dest.clearAttributes ) { + dest.clearAttributes(); + } + + // mergeAttributes, in contrast, only merges back on the + // original attributes, not the events + if ( dest.mergeAttributes ) { + dest.mergeAttributes( src ); + } + + nodeName = dest.nodeName.toLowerCase(); + + if ( nodeName === "object" ) { + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + + // IE blanks contents when cloning scripts + } else if ( nodeName === "script" && dest.text !== src.text ) { + dest.text = src.text; + } + + // Event data gets referenced instead of copied if the expando + // gets copied too + dest.removeAttribute( jQuery.expando ); +} + +jQuery.buildFragment = function( args, context, scripts ) { + var fragment, cacheable, cachehit, + first = args[ 0 ]; + + // Set context from what may come in as undefined or a jQuery collection or a node + context = context || document; + context = (context[0] || context).ownerDocument || context[0] || context; + + // Ensure that an attr object doesn't incorrectly stand in as a document object + // Chrome and Firefox seem to allow this to occur and will throw exception + // Fixes #8950 + if ( typeof context.createDocumentFragment === "undefined" ) { + context = document; + } + + // Only cache "small" (1/2 KB) HTML strings that are associated with the main document + // Cloning options loses the selected state, so don't cache them + // IE 6 doesn't like it when you put or elements in a fragment + // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache + // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 + if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && + first.charAt(0) === "<" && !rnocache.test( first ) && + (jQuery.support.checkClone || !rchecked.test( first )) && + (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { + + // Mark cacheable and look for a hit + cacheable = true; + fragment = jQuery.fragments[ first ]; + cachehit = fragment !== undefined; + } + + if ( !fragment ) { + fragment = context.createDocumentFragment(); + jQuery.clean( args, context, fragment, scripts ); + + // Update the cache, but only store false + // unless this is a second parsing of the same content + if ( cacheable ) { + jQuery.fragments[ first ] = cachehit && fragment; + } + } + + return { fragment: fragment, cacheable: cacheable }; +}; + +jQuery.fragments = {}; + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + l = insert.length, + parent = this.length === 1 && this[0].parentNode; + + if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { + insert[ original ]( this[0] ); + return this; + } else { + for ( ; i < l; i++ ) { + elems = ( i > 0 ? this.clone(true) : this ).get(); + jQuery( insert[i] )[ original ]( elems ); + ret = ret.concat( elems ); + } + + return this.pushStack( ret, name, insert.selector ); + } + }; +}); + +function getAll( elem ) { + if ( typeof elem.getElementsByTagName !== "undefined" ) { + return elem.getElementsByTagName( "*" ); + + } else if ( typeof elem.querySelectorAll !== "undefined" ) { + return elem.querySelectorAll( "*" ); + + } else { + return []; + } +} + +// Used in clean, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var srcElements, + destElements, + i, + clone; + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + // IE copies events bound via attachEvent when using cloneNode. + // Calling detachEvent on the clone will also remove the events + // from the original. In order to get around this, we use some + // proprietary methods to clear the events. Thanks to MooTools + // guys for this hotness. + + cloneFixAttributes( elem, clone ); + + // Using Sizzle here is crazy slow, so we use getElementsByTagName instead + srcElements = getAll( elem ); + destElements = getAll( clone ); + + // Weird iteration because IE will replace the length property + // with an element if you are cloning the body and one of the + // elements on the page has a name or id of "length" + for ( i = 0; srcElements[i]; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + cloneFixAttributes( srcElements[i], destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + cloneCopyEvent( elem, clone ); + + if ( deepDataAndEvents ) { + srcElements = getAll( elem ); + destElements = getAll( clone ); + + for ( i = 0; srcElements[i]; ++i ) { + cloneCopyEvent( srcElements[i], destElements[i] ); + } + } + } + + srcElements = destElements = null; + + // Return the cloned set + return clone; + }, + + clean: function( elems, context, fragment, scripts ) { + var j, safe, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, + i = 0, + ret = []; + + // Ensure that context is a document + if ( !context || typeof context.createDocumentFragment === "undefined" ) { + context = document; + } + + // Use the already-created safe fragment if context permits + for ( safe = context === document && safeFragment; (elem = elems[i]) != null; i++ ) { + if ( typeof elem === "number" ) { + elem += ""; + } + + if ( !elem ) { + continue; + } + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + if ( !rhtml.test( elem ) ) { + elem = context.createTextNode( elem ); + } else { + // Ensure a safe container in which to render the html + safe = safe || createSafeFragment( context ); + div = div || safe.appendChild( context.createElement("div") ); + + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(rxhtmlTag, "<$1>"); + + // Go to html and back, then peel off extra wrappers + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + depth = wrap[0]; + div.innerHTML = wrap[1] + elem + wrap[2]; + + // Move to the right depth + while ( depth-- ) { + div = div.lastChild; + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + hasBody = rtbody.test(elem); + tbody = tag === "table" && !hasBody ? + div.firstChild && div.firstChild.childNodes : + + // String was a bare or + wrap[1] === "
                              " && !hasBody ? + div.childNodes : + []; + + for ( j = tbody.length - 1; j >= 0 ; --j ) { + if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { + tbody[ j ].parentNode.removeChild( tbody[ j ] ); + } + } + } + + // IE completely kills leading whitespace when innerHTML is used + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); + } + + elem = div.childNodes; + + // Remember the top-level container for proper cleanup + div = safe.lastChild; + } + } + + if ( elem.nodeType ) { + ret.push( elem ); + } else { + ret = jQuery.merge( ret, elem ); + } + } + + // Fix #11356: Clear elements from safeFragment + if ( div ) { + safe.removeChild( div ); + elem = div = safe = null; + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + for ( i = 0; (elem = ret[i]) != null; i++ ) { + if ( jQuery.nodeName( elem, "input" ) ) { + fixDefaultChecked( elem ); + } else if ( typeof elem.getElementsByTagName !== "undefined" ) { + jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); + } + } + } + + // Append elements to a provided document fragment + if ( fragment ) { + // Special handling of each script element + handleScript = function( elem ) { + // Check if we consider it executable + if ( !elem.type || rscriptType.test( elem.type ) ) { + // Detach the script and store it in the scripts array (if provided) or the fragment + // Return truthy to indicate that it has been handled + return scripts ? + scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : + fragment.appendChild( elem ); + } + }; + + for ( i = 0; (elem = ret[i]) != null; i++ ) { + // Check if we're done after handling an executable script + if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { + // Append to fragment and handle embedded scripts + fragment.appendChild( elem ); + if ( typeof elem.getElementsByTagName !== "undefined" ) { + // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration + jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); + + // Splice the scripts into ret after their former ancestor and advance our index beyond them + ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); + i += jsTags.length; + } + } + } + } + + return ret; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var data, id, elem, type, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + jQuery.deletedIds.push( id ); + } + } + } + } + } +}); +// Limit scope pollution from any deprecated API +(function() { + +var matched, browser; + +// Use of jQuery.browser is frowned upon. +// More details: http://api.jquery.com/jQuery.browser +// jQuery.uaMatch maintained for back-compat +jQuery.uaMatch = function( ua ) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || + /(webkit)[ \/]([\w.]+)/.exec( ua ) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || + /(msie) ([\w.]+)/.exec( ua ) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; +}; + +matched = jQuery.uaMatch( navigator.userAgent ); +browser = {}; + +if ( matched.browser ) { + browser[ matched.browser ] = true; + browser.version = matched.version; +} + +// Deprecated, use jQuery.browser.webkit instead +// Maintained for back-compat only +if ( browser.webkit ) { + browser.safari = true; +} + +jQuery.browser = browser; + +jQuery.sub = function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; +}; + +})(); +var curCSS, iframe, iframeDoc, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity=([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), + elemdisplay = {}, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400, + lineHeight: 1 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], + + eventsToggle = jQuery.fn.toggle; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var elem, display, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + values[ index ] = jQuery._data( elem, "olddisplay" ); + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && elem.style.display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + display = curCSS( elem, "display" ); + + if ( !values[ index ] && display !== "none" ) { + jQuery._data( elem, "olddisplay", display ); + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state, fn2 ) { + var bool = typeof state === "boolean"; + + if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { + return eventsToggle.apply( this, arguments ); + } + + return this.each(function() { + if ( bool ? state : isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + + } + } + } + }, + + // Exclude the following css properties to add px + cssNumber: { + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, numeric, extra ) { + var val, num, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( numeric || extra !== undefined ) { + num = parseFloat( val ); + return numeric || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +// NOTE: To any future maintainer, we've used both window.getComputedStyle +// and getComputedStyle here to produce a better gzip size +if ( window.getComputedStyle ) { + curCSS = function( elem, name ) { + var ret, width, minWidth, maxWidth, + computed = getComputedStyle( elem, null ), + style = elem.style; + + if ( computed ) { + + ret = computed[ name ]; + if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + curCSS = function( elem, name ) { + var left, rsLeft, + ret = elem.currentStyle && elem.currentStyle[ name ], + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + elem.runtimeStyle.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + elem.runtimeStyle.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + // we use jQuery.css instead of curCSS here + // because of the reliableMarginRight CSS hook! + val += jQuery.css( elem, extra + cssExpand[ i ], true ); + } + + // From this point on we use curCSS for maximum performance (relevant in animations) + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; + } + } else { + // at this point, extra isn't content, so add padding + val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + valueIsBorderBox = true, + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; + + if ( val <= 0 ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox + ) + ) + "px"; +} + + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + if ( elemdisplay[ nodeName ] ) { + return elemdisplay[ nodeName ]; + } + + var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), + display = elem.css("display"); + elem.remove(); + + // If the simple way fails, + // get element's real default display by attaching it to a temp iframe + if ( display === "none" || display === "" ) { + // Use the already-created iframe if possible + iframe = document.body.appendChild( + iframe || jQuery.extend( document.createElement("iframe"), { + frameBorder: 0, + width: 0, + height: 0 + }) + ); + + // Create a cacheable copy of the iframe document on first call. + // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML + // document to it; WebKit & Firefox won't allow reusing the iframe document. + if ( !iframeDoc || !iframe.createElement ) { + iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; + iframeDoc.write(""); + iframeDoc.close(); + } + + elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); + + display = curCSS( elem, "display" ); + document.body.removeChild( iframe ); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + + return display; +} + +jQuery.each([ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { + return getWidthOrHeight( elem, name, extra ); + } else { + return jQuery.swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + }); + } + } + }, + + set: function( elem, value, extra ) { + return setPositiveNumber( elem, value, extra ? + augmentWidthOrHeight( + elem, + name, + extra, + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" + ) : 0 + ); + } + }; +}); + +if ( !jQuery.support.opacity ) { + jQuery.cssHooks.opacity = { + get: function( elem, computed ) { + // IE uses filters for opacity + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? + ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : + computed ? "1" : ""; + }, + + set: function( elem, value ) { + var style = elem.style, + currentStyle = elem.currentStyle, + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", + filter = currentStyle && currentStyle.filter || style.filter || ""; + + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 + if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && + style.removeAttribute ) { + + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText + // if "filter:" is present at all, clearType is disabled, we want to avoid this + // style.removeAttribute is IE Only, but so apparently is this code path... + style.removeAttribute( "filter" ); + + // if there there is no filter style applied in a css rule, we are done + if ( currentStyle && !currentStyle.filter ) { + return; + } + } + + // otherwise, set new filter values + style.filter = ralpha.test( filter ) ? + filter.replace( ralpha, opacity ) : + filter + " " + opacity; + } + }; +} + +// These hooks cannot be added until DOM ready because the support test +// for it is not run until after DOM ready +jQuery(function() { + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + return jQuery.swap( elem, { "display": "inline-block" }, function() { + if ( computed ) { + return curCSS( elem, "marginRight" ); + } + }); + } + }; + } + + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 + // getComputedStyle returns percent when specified for top/left/bottom/right + // rather than make the css module depend on the offset module, we just check for it here + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { + jQuery.each( [ "top", "left" ], function( i, prop ) { + jQuery.cssHooks[ prop ] = { + get: function( elem, computed ) { + if ( computed ) { + var ret = curCSS( elem, prop ); + // if curCSS returns percentage, fallback to offset + return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; + } + } + }; + }); + } + +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + +// These hooks are used by animate to expand properties +jQuery.each({ + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i, + + // assumes a single number if not a string + parts = typeof value === "string" ? value.split(" ") : [ value ], + expanded = {}; + + for ( i = 0; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +}); +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, + rselectTextarea = /^(?:select|textarea)/i; + +jQuery.fn.extend({ + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map(function(){ + return this.elements ? jQuery.makeArray( this.elements ) : this; + }) + .filter(function(){ + return this.name && !this.disabled && + ( this.checked || rselectTextarea.test( this.nodeName ) || + rinput.test( this.type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val, i ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +//Serialize an array of form elements or a set of +//key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); +}; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // If array item is non-scalar (array or object), encode its + // numeric index to resolve deserialization ambiguity issues. + // Note that rack (as of 1.0.0) can't currently deserialize + // nested arrays properly, and attempting to do so may cause + // a server error. Possible fixes are to modify rack's + // deserialization algorithm or to provide an option or flag + // to force array serialization to be shallow. + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} +var // Document location + ajaxLocation, + // Document location segments + ajaxLocParts, + + rhash = /#.*$/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rquery = /\?/, + rscript = /)<[^<]*)*<\/script>/gi, + rts = /([?&])_=[^&]*/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = ["*/"] + ["*"]; + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, list, placeBefore, + dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), + i = 0, + length = dataTypes.length; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + for ( ; i < length; i++ ) { + dataType = dataTypes[ i ]; + // We control if we're asked to add before + // any existing element + placeBefore = /^\+/.test( dataType ); + if ( placeBefore ) { + dataType = dataType.substr( 1 ) || "*"; + } + list = structure[ dataType ] = structure[ dataType ] || []; + // then we add to the structure accordingly + list[ placeBefore ? "unshift" : "push" ]( func ); + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, + dataType /* internal */, inspected /* internal */ ) { + + dataType = dataType || options.dataTypes[ 0 ]; + inspected = inspected || {}; + + inspected[ dataType ] = true; + + var selection, + list = structure[ dataType ], + i = 0, + length = list ? list.length : 0, + executeOnly = ( structure === prefilters ); + + for ( ; i < length && ( executeOnly || !selection ); i++ ) { + selection = list[ i ]( options, originalOptions, jqXHR ); + // If we got redirected to another dataType + // we try there if executing only and not done already + if ( typeof selection === "string" ) { + if ( !executeOnly || inspected[ selection ] ) { + selection = undefined; + } else { + options.dataTypes.unshift( selection ); + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, selection, inspected ); + } + } + } + // If we're only executing or nothing was selected + // we try the catchall dataType if not done already + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, "*", inspected ); + } + // unnecessary when only executing (prefilters) + // but it'll be ignored by the caller in that case + return selection; +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + // Don't do a request if no elements are being requested + if ( !this.length ) { + return this; + } + + var selector, type, response, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( typeof params === "object" ) { + type = "POST"; + } + + // Request the remote document + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params, + complete: function( jqXHR, status ) { + if ( callback ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + } + } + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + // See if a selector was specified + self.html( selector ? + + // Create a dummy div to hold the results + jQuery("
                              ") + + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append( responseText.replace( rscript, "" ) ) + + // Locate the specified elements + .find( selector ) : + + // If not, just inject the full result + responseText ); + + }); + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ + jQuery.fn[ o ] = function( f ){ + return this.on( o, f ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + type: method, + url: url, + data: data, + success: callback, + dataType: type + }); + }; +}); + +jQuery.extend({ + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + if ( settings ) { + // Building a settings object + ajaxExtend( target, jQuery.ajaxSettings ); + } else { + // Extending ajaxSettings + settings = target; + target = jQuery.ajaxSettings; + } + ajaxExtend( target, settings ); + return target; + }, + + ajaxSettings: { + url: ajaxLocation, + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: true, + async: true, + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": allTypes + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // List of data converters + // 1) key format is "source_type destination_type" (a single space in-between) + // 2) the catchall symbol "*" can be used for source_type + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + context: true, + url: true + } + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // ifModified key + ifModifiedKey, + // Response headers + responseHeadersString, + responseHeaders, + // transport + transport, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events + // It's the callbackContext if one was provided in the options + // and if it's a DOM node or a jQuery collection + globalEventContext = callbackContext !== s && + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? + jQuery( callbackContext ) : jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + + readyState: 0, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( !state ) { + var lname = name.toLowerCase(); + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match === undefined ? null : match; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + statusText = statusText || strAbort; + if ( transport ) { + transport.abort( statusText ); + } + done( 0, statusText ); + return this; + } + }; + + // Callback for when everything is done + // It is defined here because jslint complains if it is declared + // at the end of the function (which would be more logical and readable) + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ ifModifiedKey ] = modified; + } + modified = jqXHR.getResponseHeader("Etag"); + if ( modified ) { + jQuery.etag[ ifModifiedKey ] = modified; + } + } + + // If not modified + if ( status === 304 ) { + + statusText = "notmodified"; + isSuccess = true; + + // If we have data + } else { + + isSuccess = ajaxConvert( s, response ); + statusText = isSuccess.state; + success = isSuccess.data; + error = isSuccess.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( !statusText || status ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = "" + ( nativeStatusText || statusText ); + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + // Attach deferreds + deferred.promise( jqXHR ); + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + jqXHR.complete = completeDeferred.add; + + // Status-dependent callbacks + jqXHR.statusCode = function( map ) { + if ( map ) { + var tmp; + if ( state < 2 ) { + for ( tmp in map ) { + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; + } + } else { + tmp = map[ jqXHR.status ]; + jqXHR.always( tmp ); + } + } + return this; + }; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // We also use the url parameter if available + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); + + // Determine if a cross-domain request is in order + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Get ifModifiedKey before adding the anti-cache parameter + ifModifiedKey = s.url; + + // Add anti-cache in url if needed + if ( s.cache === false ) { + + var ts = jQuery.now(), + // try replacing _= if it is there + ret = s.url.replace( rts, "$1_=" + ts ); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + ifModifiedKey = ifModifiedKey || s.url; + if ( jQuery.lastModified[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); + } + if ( jQuery.etag[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); + } + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout( function(){ + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch (e) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + return jqXHR; + }, + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {} + +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + + var conv, conv2, current, tmp, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(), + prev = dataTypes[ 0 ], + converters = {}, + i = 0; + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + // Convert to each sequential dataType, tolerating list modification + for ( ; (current = dataTypes[++i]); ) { + + // There's only work to do if current dataType is non-auto + if ( current !== "*" ) { + + // Convert response if prev dataType is non-auto and differs from current + if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split(" "); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.splice( i--, 0, current ); + } + + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s["throws"] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + + // Update prev for next iteration + prev = current; + } + } + + return { state: "success", data: response }; +} +var oldCallbacks = [], + rquestion = /\?/, + rjsonp = /(=)\?(?=&|$)|\?\?/, + nonce = jQuery.now(); + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + data = s.data, + url = s.url, + hasCallback = s.jsonp !== false, + replaceInUrl = hasCallback && rjsonp.test( url ), + replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && + !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && + rjsonp.test( data ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + overwritten = window[ callbackName ]; + + // Insert callback into url or form data + if ( replaceInUrl ) { + s.url = url.replace( rjsonp, "$1" + callbackName ); + } else if ( replaceInData ) { + s.data = data.replace( rjsonp, "$1" + callbackName ); + } else if ( hasCallback ) { + s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement( "script" ); + + script.async = "async"; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( head && script.parentNode ) { + head.removeChild( script ); + } + + // Dereference the script + script = undefined; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( 0, 1 ); + } + } + }; + } +}); +var xhrCallbacks, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject ? function() { + // Abort all pending requests + for ( var key in xhrCallbacks ) { + xhrCallbacks[ key ]( 0, 1 ); + } + } : false, + xhrId = 0; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +(function( xhr ) { + jQuery.extend( jQuery.support, { + ajax: !!xhr, + cors: !!xhr && ( "withCredentials" in xhr ) + }); +})( jQuery.ajaxSettings.xhr() ); + +// Create transport if the browser can provide an xhr +if ( jQuery.support.ajax ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( _ ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + + var status, + statusText, + responseHeaders, + responses, + xml; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + responses = {}; + xml = xhr.responseXML; + + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + try { + responses.text = xhr.responseText; + } catch( _ ) { + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback, 0 ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback(0,1); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var end, unit, prevScale, + tween = this.createTween( prop, value ), + parts = rfxnum.exec( value ), + target = tween.cur(), + start = +target || 0, + scale = 1; + + if ( parts ) { + end = +parts[2]; + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" && start ) { + // Iteratively approximate from a nonzero starting point + // Prefer the current property, because this process will be trivial if it uses the same units + // Fallback to end or a simple constant + start = jQuery.css( tween.elem, prop, true ) || end || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + prevScale = scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zeroes from tween.cur() + scale = tween.cur() / target; + + // Stop looping if we've hit the mark or scale is unchanged + } while ( scale !== 1 && scale !== prevScale ); + } + + tween.unit = unit; + tween.start = start; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; + } + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }, 0 ); + return ( fxNow = jQuery.now() ); +} + +function createTweens( animation, props ) { + jQuery.each( props, function( prop, value ) { + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( collection[ index ].call( animation, prop, value ) ) { + + // we're done with this property + return; + } + } + }); +} + +function Animation( elem, properties, options ) { + var result, + index = 0, + tweenerIndex = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + percent = 1 - ( remaining / animation.duration || 0 ), + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end, easing ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + createTweens( animation, props ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + anim: animation, + queue: animation.opts.queue, + elem: elem + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + var index, prop, value, length, dataShow, tween, hooks, oldfire, + anim = this, + style = elem.style, + orig = {}, + handled = [], + hidden = elem.nodeType && isHidden( elem ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.done(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( index in props ) { + value = props[ index ]; + if ( rfxtypes.exec( value ) ) { + delete props[ index ]; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + handled.push( index ); + } + } + + length = handled.length; + if ( length ) { + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery.removeData( elem, "fxshow", true ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( index = 0 ; index < length ; index++ ) { + prop = handled[ index ]; + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing any value as a 4th parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, false, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Remove in 2.0 - this supports IE8's panic based approach +// to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" || + // special check for .toggle( handler, handler, ... ) + ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations resolve immediately + if ( empty ) { + anim.stop( true ); + } + }; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) && !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +var rroot = /^(?:body|html)$/i; + +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var box, docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, top, left, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + if ( (body = doc.body) === elem ) { + return jQuery.offset.bodyOffset( elem ); + } + + docElem = doc.documentElement; + + // Make sure we're not dealing with a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return { top: 0, left: 0 }; + } + + box = elem.getBoundingClientRect(); + win = getWindow( doc ); + clientTop = docElem.clientTop || body.clientTop || 0; + clientLeft = docElem.clientLeft || body.clientLeft || 0; + scrollTop = win.pageYOffset || docElem.scrollTop; + scrollLeft = win.pageXOffset || docElem.scrollLeft; + top = box.top + scrollTop - clientTop; + left = box.left + scrollLeft - clientLeft; + + return { top: top, left: left }; +}; + +jQuery.offset = { + + bodyOffset: function( body ) { + var top = body.offsetTop, + left = body.offsetLeft; + + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[0] ) { + return; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || document.body; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, value, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable ); + }; + }); +}); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + +})( window ); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.3/jquery.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.3/jquery.js new file mode 100755 index 000000000..8c24ffc61 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.3/jquery.js @@ -0,0 +1,9472 @@ +/*! + * jQuery JavaScript Library v1.8.3 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time) + */ +(function( window, undefined ) { +var + // A central reference to the root jQuery(document) + rootjQuery, + + // The deferred used on DOM ready + readyList, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + location = window.location, + navigator = window.navigator, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // Save a reference to some core methods + core_push = Array.prototype.push, + core_slice = Array.prototype.slice, + core_indexOf = Array.prototype.indexOf, + core_toString = Object.prototype.toString, + core_hasOwn = Object.prototype.hasOwnProperty, + core_trim = String.prototype.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, + + // Used for detecting and trimming whitespace + core_rnotwhite = /\S/, + core_rspace = /\s+/, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // The ready event handler and self cleanup method + DOMContentLoaded = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + } else if ( document.readyState === "complete" ) { + // we're here because readyState === "complete" in oldIE + // which is good enough for us to call the dom ready! + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = ( context && context.nodeType ? context.ownerDocument || context : document ); + + // scripts is true for back-compat + selector = jQuery.parseHTML( match[1], doc, true ); + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + this.attr.call( selector, context, true ); + } + + return jQuery.merge( this, selector ); + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.8.3", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + eq: function( i ) { + i = +i; + return i === -1 ? + this.slice( i ) : + this.slice( i, i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ), + "slice", core_slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ core_toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // scripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, scripts ) { + var parsed; + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + scripts = context; + context = 0; + } + context = context || document; + + // Single tag + if ( (parsed = rsingleTag.exec( data )) ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); + return jQuery.merge( [], + (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); + }, + + parseJSON: function( data ) { + if ( !data || typeof data !== "string") { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && core_rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var name, + i = 0, + length = obj.length, + isObj = length === undefined || jQuery.isFunction( obj ); + + if ( args ) { + if ( isObj ) { + for ( name in obj ) { + if ( callback.apply( obj[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( obj[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in obj ) { + if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var type, + ret = results || []; + + if ( arr != null ) { + // The window, strings (and functions) also have 'length' + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + type = jQuery.type( arr ); + + if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { + core_push.call( ret, arr ); + } else { + jQuery.merge( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, + ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, pass ) { + var exec, + bulk = key == null, + i = 0, + length = elems.length; + + // Sets many values + if ( key && typeof key === "object" ) { + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); + } + chainable = 1; + + // Sets one value + } else if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = pass === undefined && jQuery.isFunction( value ); + + if ( bulk ) { + // Bulk operations only iterate when executing function values + if ( exec ) { + exec = fn; + fn = function( elem, key, value ) { + return exec.call( jQuery( elem ), value ); + }; + + // Otherwise they run against the entire set + } else { + fn.call( elems, value ); + fn = null; + } + } + + if ( fn ) { + for (; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + } + + chainable = 1; + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready, 1 ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.split( core_rspace ), function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Control if a given callback is in the list + has: function( fn ) { + return jQuery.inArray( fn, list ) > -1; + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( list && ( !fired || stack ) ) { + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? + function() { + var returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + } : + newDefer[ action ] + ); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] = list.fire + deferred[ tuple[0] ] = list.fire; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function() { + + var support, + all, + a, + select, + opt, + input, + fragment, + eventName, + i, + isSupported, + clickFn, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = "
                              a"; + + // Support tests won't run in some limited or non-browser environments + all = div.getElementsByTagName("*"); + a = div.getElementsByTagName("a")[ 0 ]; + if ( !all || !a || !all.length ) { + return {}; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.5/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form (#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode + boxModel: ( document.compatMode === "CSS1Compat" ), + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + boxSizingReliable: true, + pixelPosition: false + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", clickFn = function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent("onclick"); + div.detachEvent( "onclick", clickFn ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + input.setAttribute( "checked", "checked" ); + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for ( i in { + submit: true, + change: true, + focusin: true + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + // Run tests that need a body at doc ready + jQuery(function() { + var container, div, tds, marginDiv, + divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "
                              t
                              "; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + support.boxSizing = ( div.offsetWidth === 4 ); + support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); + + // NOTE: To any future maintainer, we've window.getComputedStyle + // because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = document.createElement("div"); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = "block"; + div.style.overflow = "visible"; + div.innerHTML = "
                              "; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + container.style.zoom = 1; + } + + // Null elements to avoid leaks in IE + body.removeChild( container ); + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + fragment.removeChild( div ); + all = a = select = opt = input = fragment = div = null; + + return support; +})(); +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + deletedIds: [], + + // Remove at next major release (1.9/2.0) + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, part, attr, name, l, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attr = elem.attributes; + for ( l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( !name.indexOf( "data-" ) ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split( ".", 2 ); + parts[1] = parts[1] ? "." + parts[1] : ""; + part = parts[1] + "!"; + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + data = this.triggerHandler( "getData" + part, [ parts[0] ] ); + + // Try to fetch any internally stored data first + if ( data === undefined && elem ) { + data = jQuery.data( elem, key ); + data = dataAttr( elem, key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } + + parts[1] = value; + this.each(function() { + var self = jQuery( this ); + + self.triggerHandler( "setData" + part, parts ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + part, parts ); + }); + }, null, value, arguments.length > 1, null, false ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery.removeData( elem, type + "queue", true ); + jQuery.removeData( elem, key, true ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, fixSpecified, + rclass = /[\t\r\n]/g, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea|)$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( core_rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var removes, className, elem, c, cl, i, l; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + if ( (value && typeof value === "string") || value === undefined ) { + removes = ( value || "" ).split( core_rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + if ( elem.nodeType === 1 && elem.className ) { + + className = (" " + elem.className + " ").replace( rclass, " " ); + + // loop over each item in the removal list + for ( c = 0, cl = removes.length; c < cl; c++ ) { + // Remove until there is nothing to remove, + while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) { + className = className.replace( " " + removes[ c ] + " " , " " ); + } + } + elem.className = value ? jQuery.trim( className ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( core_rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val, + self = jQuery(this); + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 + attrFn: {}, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, isBool, + i = 0; + + if ( value && elem.nodeType === 1 ) { + + attrNames = value.split( core_rspace ); + + for ( ; i < attrNames.length; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + isBool = rboolean.test( name ); + + // See #9699 for explanation of this approach (setting first, then removal) + // Do not do this for boolean attributes (see #10870) + if ( !isBool ) { + jQuery.attr( elem, name, "" ); + } + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( isBool && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true, + coords: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? + ret.value : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.value = value + "" ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, + rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var t, tns, type, origType, namespaces, origCount, + j, events, special, eventType, handleObj, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, "events", true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, + type = event.type || event, + namespaces = []; + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + for ( old = elem; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old === (elem.ownerDocument || document) ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related, + handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = core_slice.call( arguments ), + run_all = !event.exclusive && !event.namespace, + special = jQuery.event.special[ event.type ] || {}, + handlerQueue = []; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers that should run if there are delegated events + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !(event.button && event.type === "click") ) { + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + + // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.disabled !== true || event.type !== "click" ) { + selMatch = {}; + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) + event.metaKey = !!event.metaKey; + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === "undefined" ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "_submit_attached" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "_submit_attached", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "_change_attached", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { // && selector != null + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ +(function( window, undefined ) { + +var cachedruns, + assertGetIdNotName, + Expr, + getText, + isXML, + contains, + compile, + sortOrder, + hasDuplicate, + outermostContext, + + baseHasDuplicate = true, + strundefined = "undefined", + + expando = ( "sizcache" + Math.random() ).replace( ".", "" ), + + Token = String, + document = window.document, + docElem = document.documentElement, + dirruns = 0, + done = 0, + pop = [].pop, + push = [].push, + slice = [].slice, + // Use a stripped-down indexOf if a native one is unavailable + indexOf = [].indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + // Augment a function for special use by Sizzle + markFunction = function( fn, value ) { + fn[ expando ] = value == null || value; + return fn; + }, + + createCache = function() { + var cache = {}, + keys = []; + + return markFunction(function( key, value ) { + // Only keep the most recent entries + if ( keys.push( key ) > Expr.cacheLength ) { + delete cache[ keys.shift() ]; + } + + // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157) + return (cache[ key + " " ] = value); + }, cache ); + }, + + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + + // Regex + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = "([*^$|!~]?=)", + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments not in parens/brackets, + // then attribute selectors and non-pseudos (denoted by :), + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)", + + // For matchExpr.POS and matchExpr.needsContext + pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), + rpseudo = new RegExp( pseudos ), + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, + + rnot = /^:not/, + rsibling = /[\x20\t\r\n\f]*[+~]/, + rendsWithNot = /:not\($/, + + rheader = /h\d/i, + rinputs = /input|select|textarea|button/i, + + rbackslash = /\\(?!\\)/g, + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "POS": new RegExp( pos, "i" ), + "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + // For use in libraries implementing .is() + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) + }, + + // Support + + // Used for testing something on an element + assert = function( fn ) { + var div = document.createElement("div"); + + try { + return fn( div ); + } catch (e) { + return false; + } finally { + // release memory in IE + div = null; + } + }, + + // Check if getElementsByTagName("*") returns only elements + assertTagNameNoComments = assert(function( div ) { + div.appendChild( document.createComment("") ); + return !div.getElementsByTagName("*").length; + }), + + // Check if getAttribute returns normalized href attributes + assertHrefNotNormalized = assert(function( div ) { + div.innerHTML = ""; + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute("href") === "#"; + }), + + // Check if attributes should be retrieved by attribute nodes + assertAttributes = assert(function( div ) { + div.innerHTML = ""; + var type = typeof div.lastChild.getAttribute("multiple"); + // IE8 returns a string for some attributes even when not present + return type !== "boolean" && type !== "string"; + }), + + // Check if getElementsByClassName can be trusted + assertUsableClassName = assert(function( div ) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = ""; + if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { + return false; + } + + // Safari 3.2 caches class attributes and doesn't catch changes + div.lastChild.className = "e"; + return div.getElementsByClassName("e").length === 2; + }), + + // Check if getElementById returns elements by name + // Check if getElementsByName privileges form controls or returns elements by ID + assertUsableName = assert(function( div ) { + // Inject content + div.id = expando + 0; + div.innerHTML = "
                              "; + docElem.insertBefore( div, docElem.firstChild ); + + // Test + var pass = document.getElementsByName && + // buggy browsers will return fewer than the correct 2 + document.getElementsByName( expando ).length === 2 + + // buggy browsers will return more than the correct 0 + document.getElementsByName( expando + 0 ).length; + assertGetIdNotName = !document.getElementById( expando ); + + // Cleanup + docElem.removeChild( div ); + + return pass; + }); + +// If slice is not available, provide a backup +try { + slice.call( docElem.childNodes, 0 )[0].nodeType; +} catch ( e ) { + slice = function( i ) { + var elem, + results = []; + for ( ; (elem = this[i]); i++ ) { + results.push( elem ); + } + return results; + }; +} + +function Sizzle( selector, context, results, seed ) { + results = results || []; + context = context || document; + var match, elem, xml, m, + nodeType = context.nodeType; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( nodeType !== 1 && nodeType !== 9 ) { + return []; + } + + xml = isXML( context ); + + if ( !xml && !seed ) { + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { + push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); + return results; + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed, xml ); +} + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + return Sizzle( expr, null, null, [ elem ] ).length > 0; +}; + +// Returns a function to use in pseudos for input types +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +// Returns a function to use in pseudos for buttons +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +// Returns a function to use in pseudos for positionals +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + } else { + + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } + return ret; +}; + +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Element contains another +contains = Sizzle.contains = docElem.contains ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); + } : + docElem.compareDocumentPosition ? + function( a, b ) { + return b && !!( a.compareDocumentPosition( b ) & 16 ); + } : + function( a, b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + return false; + }; + +Sizzle.attr = function( elem, name ) { + var val, + xml = isXML( elem ); + + if ( !xml ) { + name = name.toLowerCase(); + } + if ( (val = Expr.attrHandle[ name ]) ) { + return val( elem ); + } + if ( xml || assertAttributes ) { + return elem.getAttribute( name ); + } + val = elem.getAttributeNode( name ); + return val ? + typeof elem[ name ] === "boolean" ? + elem[ name ] ? name : null : + val.specified ? val.value : null : + null; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + // IE6/7 return a modified href + attrHandle: assertHrefNotNormalized ? + {} : + { + "href": function( elem ) { + return elem.getAttribute( "href", 2 ); + }, + "type": function( elem ) { + return elem.getAttribute("type"); + } + }, + + find: { + "ID": assertGetIdNotName ? + function( id, context, xml ) { + if ( typeof context.getElementById !== strundefined && !xml ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + } : + function( id, context, xml ) { + if ( typeof context.getElementById !== strundefined && !xml ) { + var m = context.getElementById( id ); + + return m ? + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? + [m] : + undefined : + []; + } + }, + + "TAG": assertTagNameNoComments ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + var elem, + tmp = [], + i = 0; + + for ( ; (elem = results[i]); i++ ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }, + + "NAME": assertUsableName && function( tag, context ) { + if ( typeof context.getElementsByName !== strundefined ) { + return context.getElementsByName( name ); + } + }, + + "CLASS": assertUsableClassName && function( className, context, xml ) { + if ( typeof context.getElementsByClassName !== strundefined && !xml ) { + return context.getElementsByClassName( className ); + } + } + }, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( rbackslash, "" ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 3 xn-component of xn+y argument ([+-]?\d*n|) + 4 sign of xn-component + 5 x of xn-component + 6 sign of y-component + 7 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1] === "nth" ) { + // nth-child requires argument + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); + match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); + + // other types prohibit arguments + } else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var unquoted, excess; + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + if ( match[3] ) { + match[2] = match[3]; + } else if ( (unquoted = match[4]) ) { + // Only check arguments that contain a pseudo + if ( rpseudo.test(unquoted) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + unquoted = unquoted.slice( 0, excess ); + match[0] = match[0].slice( 0, excess ); + } + match[2] = unquoted; + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + "ID": assertGetIdNotName ? + function( id ) { + id = id.replace( rbackslash, "" ); + return function( elem ) { + return elem.getAttribute("id") === id; + }; + } : + function( id ) { + id = id.replace( rbackslash, "" ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === id; + }; + }, + + "TAG": function( nodeName ) { + if ( nodeName === "*" ) { + return function() { return true; }; + } + nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); + + return function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ expando ][ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem, context ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.substr( result.length - check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, argument, first, last ) { + + if ( type === "nth" ) { + return function( elem ) { + var node, diff, + parent = elem.parentNode; + + if ( first === 1 && last === 0 ) { + return true; + } + + if ( parent ) { + diff = 0; + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + diff++; + if ( elem === node ) { + break; + } + } + } + } + + // Incorporate the offset (or cast to NaN), then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + }; + } + + return function( elem ) { + var node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + /* falls through */ + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + var nodeType; + elem = elem.firstChild; + while ( elem ) { + if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { + return false; + } + elem = elem.nextSibling; + } + return true; + }, + + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "text": function( elem ) { + var type, attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + (type = elem.type) === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); + }, + + // Input types + "radio": createInputPseudo("radio"), + "checkbox": createInputPseudo("checkbox"), + "file": createInputPseudo("file"), + "password": createInputPseudo("password"), + "image": createInputPseudo("image"), + + "submit": createButtonPseudo("submit"), + "reset": createButtonPseudo("reset"), + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "focus": function( elem ) { + var doc = elem.ownerDocument; + return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + "active": function( elem ) { + return elem === elem.ownerDocument.activeElement; + }, + + // Positional types + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + for ( var i = 0; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + for ( var i = 1; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +function siblingCheck( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; +} + +sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? + a.compareDocumentPosition : + a.compareDocumentPosition(b) & 4 + ) ? -1 : 1; + } : + function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + +// Always assume the presence of duplicates if sort doesn't +// pass them to our comparison function (as in Google Chrome). +[0, 0].sort( sortOrder ); +baseHasDuplicate = !hasDuplicate; + +// Document sorting and removing duplicates +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + i = 1, + j = 0; + + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( ; (elem = results[i]); i++ ) { + if ( elem === results[ i - 1 ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ expando ][ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + tokens.push( matched = new Token( match.shift() ) ); + soFar = soFar.slice( matched.length ); + + // Cast descendant combinators to space + matched.type = match[0].replace( rtrim, " " ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + + tokens.push( matched = new Token( match.shift() ) ); + soFar = soFar.slice( matched.length ); + matched.type = type; + matched.matches = match; + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && combinator.dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( checkNonElements || elem.nodeType === 1 ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( !xml ) { + var cache, + dirkey = dirruns + " " + doneName + " ", + cachedkey = dirkey + cachedruns; + while ( (elem = elem[ dir ]) ) { + if ( checkNonElements || elem.nodeType === 1 ) { + if ( (cache = elem[ expando ]) === cachedkey ) { + return elem.sizset; + } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { + if ( elem.sizset ) { + return elem; + } + } else { + elem[ expando ] = cachedkey; + if ( matcher( elem, context, xml ) ) { + elem.sizset = true; + return elem; + } + elem.sizset = false; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( checkNonElements || elem.nodeType === 1 ) { + if ( matcher( elem, context, xml ) ) { + return elem; + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && tokens.join("") + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Nested matchers should use non-integer dirruns + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = superMatcher.el; + } + + // Add elements passing elementMatchers directly to results + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + for ( j = 0; (matcher = elementMatchers[j]); j++ ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++superMatcher.el; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + for ( j = 0; (matcher = setMatchers[j]); j++ ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + superMatcher.el = 0; + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ expando ][ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed, xml ) { + var i, tokens, token, type, find, + match = tokenize( selector ), + j = match.length; + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && !xml && + Expr.relative[ tokens[1].type ] ) { + + context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0]; + if ( !context ) { + return results; + } + + selector = selector.slice( tokens.shift().length ); + } + + // Fetch a seed set for right-to-left matching + for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( rbackslash, "" ), + rsibling.test( tokens[0].type ) && context.parentNode || context, + xml + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && tokens.join(""); + if ( !selector ) { + push.apply( results, slice.call( seed, 0 ) ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + xml, + results, + rsibling.test( selector ) + ); + return results; +} + +if ( document.querySelectorAll ) { + (function() { + var disconnectedMatch, + oldSelect = select, + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + + // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA + // A support test would require too much code (would include document ready) + rbuggyQSA = [ ":focus" ], + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + // A support test would require too much code (would include document ready) + // just skip matchesSelector for :active + rbuggyMatches = [ ":active" ], + matches = docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector; + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explictly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // IE8 - Some boolean attributes are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here (do not put tests after this one) + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Opera 10-12/IE9 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = "

                              "; + if ( div.querySelectorAll("[test^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here (do not put tests after this one) + div.innerHTML = ""; + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push(":enabled", ":disabled"); + } + }); + + // rbuggyQSA always contains :focus, so no need for a length check + rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") ); + + select = function( selector, context, results, seed, xml ) { + // Only use querySelectorAll when not filtering, + // when this is not xml, + // and when no QSA bugs apply + if ( !seed && !xml && !rbuggyQSA.test( selector ) ) { + var groups, i, + old = true, + nid = expando, + newContext = context, + newSelector = context.nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + groups[i].join(""); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, slice.call( newContext.querySelectorAll( + newSelector + ), 0 ) ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + + return oldSelect( selector, context, results, seed, xml ); + }; + + if ( matches ) { + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + try { + matches.call( div, "[test!='']:sizzle" ); + rbuggyMatches.push( "!=", pseudos ); + } catch ( e ) {} + }); + + // rbuggyMatches always contains :active and :focus, so no need for a length check + rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); + + Sizzle.matchesSelector = function( elem, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + // rbuggyMatches always contains :active, so no need for an existence check + if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && !rbuggyQSA.test( expr ) ) { + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, null, null, [ elem ] ).length > 0; + }; + } + })(); +} + +// Deprecated +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Back-compat +function setFilters() {} +Expr.filters = setFilters.prototype = Expr.pseudos; +Expr.setFilters = new setFilters(); + +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +var runtil = /Until$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + isSimple = /^.[^:#\[\.,]*$/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, l, length, n, r, ret, + self = this; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + ret = this.pushStack( "", "find", selector ); + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + rneedsContext.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + cur = this[i]; + + while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + } + cur = cur.parentNode; + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +jQuery.fn.andSelf = jQuery.fn.addBack; + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( this.length > 1 && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /]", "i"), + rcheckableType = /^(?:checkbox|radio)$/, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /\/(java|ecma)script/i, + rcleanScript = /^\s*\s*$/g, + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
                              ", "
                              " ], + thead: [ 1, "", "
                              " ], + tr: [ 2, "", "
                              " ], + td: [ 3, "", "
                              " ], + col: [ 2, "", "
                              " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, +// unless wrapped in a div with non-breaking characters in front of it. +if ( !jQuery.support.htmlSerialize ) { + wrapMap._default = [ 1, "X
                              ", "
                              " ]; +} + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + }, + + append: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 ) { + this.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 ) { + this.insertBefore( elem, this.firstChild ); + } + }); + }, + + before: function() { + if ( !isDisconnected( this[0] ) ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this ); + }); + } + + if ( arguments.length ) { + var set = jQuery.clean( arguments ); + return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); + } + }, + + after: function() { + if ( !isDisconnected( this[0] ) ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + } + + if ( arguments.length ) { + var set = jQuery.clean( arguments ); + return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); + } + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + jQuery.cleanData( [ elem ] ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName( "*" ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function( value ) { + if ( !isDisconnected( this[0] ) ) { + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this), old = self.html(); + self.replaceWith( value.call( this, i, old ) ); + }); + } + + if ( typeof value !== "string" ) { + value = jQuery( value ).detach(); + } + + return this.each(function() { + var next = this.nextSibling, + parent = this.parentNode; + + jQuery( this ).remove(); + + if ( next ) { + jQuery(next).before( value ); + } else { + jQuery(parent).append( value ); + } + }); + } + + return this.length ? + this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : + this; + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, table, callback ) { + + // Flatten any nested arrays + args = [].concat.apply( [], args ); + + var results, first, fragment, iNoClone, + i = 0, + value = args[0], + scripts = [], + l = this.length; + + // We can't cloneNode fragments that contain checked, in WebKit + if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { + return this.each(function() { + jQuery(this).domManip( args, table, callback ); + }); + } + + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + args[0] = value.call( this, i, table ? self.html() : undefined ); + self.domManip( args, table, callback ); + }); + } + + if ( this[0] ) { + results = jQuery.buildFragment( args, this, scripts ); + fragment = results.fragment; + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + table = table && jQuery.nodeName( first, "tr" ); + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + // Fragments from the fragment cache must always be cloned and never used in place. + for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { + callback.call( + table && jQuery.nodeName( this[i], "table" ) ? + findOrAppend( this[i], "tbody" ) : + this[i], + i === iNoClone ? + fragment : + jQuery.clone( fragment, true, true ) + ); + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + + if ( scripts.length ) { + jQuery.each( scripts, function( i, elem ) { + if ( elem.src ) { + if ( jQuery.ajax ) { + jQuery.ajax({ + url: elem.src, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } else { + jQuery.error("no ajax"); + } + } else { + jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } + }); + } + } + + return this; + } +}); + +function findOrAppend( elem, tag ) { + return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function cloneFixAttributes( src, dest ) { + var nodeName; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + // clearAttributes removes the attributes, which we don't want, + // but also removes the attachEvent events, which we *do* want + if ( dest.clearAttributes ) { + dest.clearAttributes(); + } + + // mergeAttributes, in contrast, only merges back on the + // original attributes, not the events + if ( dest.mergeAttributes ) { + dest.mergeAttributes( src ); + } + + nodeName = dest.nodeName.toLowerCase(); + + if ( nodeName === "object" ) { + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + + // IE blanks contents when cloning scripts + } else if ( nodeName === "script" && dest.text !== src.text ) { + dest.text = src.text; + } + + // Event data gets referenced instead of copied if the expando + // gets copied too + dest.removeAttribute( jQuery.expando ); +} + +jQuery.buildFragment = function( args, context, scripts ) { + var fragment, cacheable, cachehit, + first = args[ 0 ]; + + // Set context from what may come in as undefined or a jQuery collection or a node + // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 & + // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception + context = context || document; + context = !context.nodeType && context[0] || context; + context = context.ownerDocument || context; + + // Only cache "small" (1/2 KB) HTML strings that are associated with the main document + // Cloning options loses the selected state, so don't cache them + // IE 6 doesn't like it when you put or elements in a fragment + // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache + // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 + if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && + first.charAt(0) === "<" && !rnocache.test( first ) && + (jQuery.support.checkClone || !rchecked.test( first )) && + (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { + + // Mark cacheable and look for a hit + cacheable = true; + fragment = jQuery.fragments[ first ]; + cachehit = fragment !== undefined; + } + + if ( !fragment ) { + fragment = context.createDocumentFragment(); + jQuery.clean( args, context, fragment, scripts ); + + // Update the cache, but only store false + // unless this is a second parsing of the same content + if ( cacheable ) { + jQuery.fragments[ first ] = cachehit && fragment; + } + } + + return { fragment: fragment, cacheable: cacheable }; +}; + +jQuery.fragments = {}; + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + l = insert.length, + parent = this.length === 1 && this[0].parentNode; + + if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { + insert[ original ]( this[0] ); + return this; + } else { + for ( ; i < l; i++ ) { + elems = ( i > 0 ? this.clone(true) : this ).get(); + jQuery( insert[i] )[ original ]( elems ); + ret = ret.concat( elems ); + } + + return this.pushStack( ret, name, insert.selector ); + } + }; +}); + +function getAll( elem ) { + if ( typeof elem.getElementsByTagName !== "undefined" ) { + return elem.getElementsByTagName( "*" ); + + } else if ( typeof elem.querySelectorAll !== "undefined" ) { + return elem.querySelectorAll( "*" ); + + } else { + return []; + } +} + +// Used in clean, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var srcElements, + destElements, + i, + clone; + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + // IE copies events bound via attachEvent when using cloneNode. + // Calling detachEvent on the clone will also remove the events + // from the original. In order to get around this, we use some + // proprietary methods to clear the events. Thanks to MooTools + // guys for this hotness. + + cloneFixAttributes( elem, clone ); + + // Using Sizzle here is crazy slow, so we use getElementsByTagName instead + srcElements = getAll( elem ); + destElements = getAll( clone ); + + // Weird iteration because IE will replace the length property + // with an element if you are cloning the body and one of the + // elements on the page has a name or id of "length" + for ( i = 0; srcElements[i]; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + cloneFixAttributes( srcElements[i], destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + cloneCopyEvent( elem, clone ); + + if ( deepDataAndEvents ) { + srcElements = getAll( elem ); + destElements = getAll( clone ); + + for ( i = 0; srcElements[i]; ++i ) { + cloneCopyEvent( srcElements[i], destElements[i] ); + } + } + } + + srcElements = destElements = null; + + // Return the cloned set + return clone; + }, + + clean: function( elems, context, fragment, scripts ) { + var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, + safe = context === document && safeFragment, + ret = []; + + // Ensure that context is a document + if ( !context || typeof context.createDocumentFragment === "undefined" ) { + context = document; + } + + // Use the already-created safe fragment if context permits + for ( i = 0; (elem = elems[i]) != null; i++ ) { + if ( typeof elem === "number" ) { + elem += ""; + } + + if ( !elem ) { + continue; + } + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + if ( !rhtml.test( elem ) ) { + elem = context.createTextNode( elem ); + } else { + // Ensure a safe container in which to render the html + safe = safe || createSafeFragment( context ); + div = context.createElement("div"); + safe.appendChild( div ); + + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(rxhtmlTag, "<$1>"); + + // Go to html and back, then peel off extra wrappers + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + depth = wrap[0]; + div.innerHTML = wrap[1] + elem + wrap[2]; + + // Move to the right depth + while ( depth-- ) { + div = div.lastChild; + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + hasBody = rtbody.test(elem); + tbody = tag === "table" && !hasBody ? + div.firstChild && div.firstChild.childNodes : + + // String was a bare or + wrap[1] === "
                              " && !hasBody ? + div.childNodes : + []; + + for ( j = tbody.length - 1; j >= 0 ; --j ) { + if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { + tbody[ j ].parentNode.removeChild( tbody[ j ] ); + } + } + } + + // IE completely kills leading whitespace when innerHTML is used + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); + } + + elem = div.childNodes; + + // Take out of fragment container (we need a fresh div each time) + div.parentNode.removeChild( div ); + } + } + + if ( elem.nodeType ) { + ret.push( elem ); + } else { + jQuery.merge( ret, elem ); + } + } + + // Fix #11356: Clear elements from safeFragment + if ( div ) { + elem = div = safe = null; + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + for ( i = 0; (elem = ret[i]) != null; i++ ) { + if ( jQuery.nodeName( elem, "input" ) ) { + fixDefaultChecked( elem ); + } else if ( typeof elem.getElementsByTagName !== "undefined" ) { + jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); + } + } + } + + // Append elements to a provided document fragment + if ( fragment ) { + // Special handling of each script element + handleScript = function( elem ) { + // Check if we consider it executable + if ( !elem.type || rscriptType.test( elem.type ) ) { + // Detach the script and store it in the scripts array (if provided) or the fragment + // Return truthy to indicate that it has been handled + return scripts ? + scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : + fragment.appendChild( elem ); + } + }; + + for ( i = 0; (elem = ret[i]) != null; i++ ) { + // Check if we're done after handling an executable script + if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { + // Append to fragment and handle embedded scripts + fragment.appendChild( elem ); + if ( typeof elem.getElementsByTagName !== "undefined" ) { + // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration + jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); + + // Splice the scripts into ret after their former ancestor and advance our index beyond them + ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); + i += jsTags.length; + } + } + } + } + + return ret; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var data, id, elem, type, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + jQuery.deletedIds.push( id ); + } + } + } + } + } +}); +// Limit scope pollution from any deprecated API +(function() { + +var matched, browser; + +// Use of jQuery.browser is frowned upon. +// More details: http://api.jquery.com/jQuery.browser +// jQuery.uaMatch maintained for back-compat +jQuery.uaMatch = function( ua ) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || + /(webkit)[ \/]([\w.]+)/.exec( ua ) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || + /(msie) ([\w.]+)/.exec( ua ) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; +}; + +matched = jQuery.uaMatch( navigator.userAgent ); +browser = {}; + +if ( matched.browser ) { + browser[ matched.browser ] = true; + browser.version = matched.version; +} + +// Chrome is Webkit, but Webkit is also Safari. +if ( browser.chrome ) { + browser.webkit = true; +} else if ( browser.webkit ) { + browser.safari = true; +} + +jQuery.browser = browser; + +jQuery.sub = function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; +}; + +})(); +var curCSS, iframe, iframeDoc, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity=([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], + + eventsToggle = jQuery.fn.toggle; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var elem, display, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + values[ index ] = jQuery._data( elem, "olddisplay" ); + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && elem.style.display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + display = curCSS( elem, "display" ); + + if ( !values[ index ] && display !== "none" ) { + jQuery._data( elem, "olddisplay", display ); + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state, fn2 ) { + var bool = typeof state === "boolean"; + + if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { + return eventsToggle.apply( this, arguments ); + } + + return this.each(function() { + if ( bool ? state : isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + + } + } + } + }, + + // Exclude the following css properties to add px + cssNumber: { + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, numeric, extra ) { + var val, num, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( numeric || extra !== undefined ) { + num = parseFloat( val ); + return numeric || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +// NOTE: To any future maintainer, we've window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + curCSS = function( elem, name ) { + var ret, width, minWidth, maxWidth, + computed = window.getComputedStyle( elem, null ), + style = elem.style; + + if ( computed ) { + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + curCSS = function( elem, name ) { + var left, rsLeft, + ret = elem.currentStyle && elem.currentStyle[ name ], + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + elem.runtimeStyle.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + elem.runtimeStyle.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + // we use jQuery.css instead of curCSS here + // because of the reliableMarginRight CSS hook! + val += jQuery.css( elem, extra + cssExpand[ i ], true ); + } + + // From this point on we use curCSS for maximum performance (relevant in animations) + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; + } + } else { + // at this point, extra isn't content, so add padding + val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + valueIsBorderBox = true, + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox + ) + ) + "px"; +} + + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + if ( elemdisplay[ nodeName ] ) { + return elemdisplay[ nodeName ]; + } + + var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), + display = elem.css("display"); + elem.remove(); + + // If the simple way fails, + // get element's real default display by attaching it to a temp iframe + if ( display === "none" || display === "" ) { + // Use the already-created iframe if possible + iframe = document.body.appendChild( + iframe || jQuery.extend( document.createElement("iframe"), { + frameBorder: 0, + width: 0, + height: 0 + }) + ); + + // Create a cacheable copy of the iframe document on first call. + // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML + // document to it; WebKit & Firefox won't allow reusing the iframe document. + if ( !iframeDoc || !iframe.createElement ) { + iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; + iframeDoc.write(""); + iframeDoc.close(); + } + + elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); + + display = curCSS( elem, "display" ); + document.body.removeChild( iframe ); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + + return display; +} + +jQuery.each([ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + // certain elements can have dimension info if we invisibly show them + // however, it must have a current display style that would benefit from this + if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) { + return jQuery.swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + }); + } else { + return getWidthOrHeight( elem, name, extra ); + } + } + }, + + set: function( elem, value, extra ) { + return setPositiveNumber( elem, value, extra ? + augmentWidthOrHeight( + elem, + name, + extra, + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" + ) : 0 + ); + } + }; +}); + +if ( !jQuery.support.opacity ) { + jQuery.cssHooks.opacity = { + get: function( elem, computed ) { + // IE uses filters for opacity + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? + ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : + computed ? "1" : ""; + }, + + set: function( elem, value ) { + var style = elem.style, + currentStyle = elem.currentStyle, + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", + filter = currentStyle && currentStyle.filter || style.filter || ""; + + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 + if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && + style.removeAttribute ) { + + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText + // if "filter:" is present at all, clearType is disabled, we want to avoid this + // style.removeAttribute is IE Only, but so apparently is this code path... + style.removeAttribute( "filter" ); + + // if there there is no filter style applied in a css rule, we are done + if ( currentStyle && !currentStyle.filter ) { + return; + } + } + + // otherwise, set new filter values + style.filter = ralpha.test( filter ) ? + filter.replace( ralpha, opacity ) : + filter + " " + opacity; + } + }; +} + +// These hooks cannot be added until DOM ready because the support test +// for it is not run until after DOM ready +jQuery(function() { + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + return jQuery.swap( elem, { "display": "inline-block" }, function() { + if ( computed ) { + return curCSS( elem, "marginRight" ); + } + }); + } + }; + } + + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 + // getComputedStyle returns percent when specified for top/left/bottom/right + // rather than make the css module depend on the offset module, we just check for it here + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { + jQuery.each( [ "top", "left" ], function( i, prop ) { + jQuery.cssHooks[ prop ] = { + get: function( elem, computed ) { + if ( computed ) { + var ret = curCSS( elem, prop ); + // if curCSS returns percentage, fallback to offset + return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; + } + } + }; + }); + } + +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + +// These hooks are used by animate to expand properties +jQuery.each({ + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i, + + // assumes a single number if not a string + parts = typeof value === "string" ? value.split(" ") : [ value ], + expanded = {}; + + for ( i = 0; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +}); +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, + rselectTextarea = /^(?:select|textarea)/i; + +jQuery.fn.extend({ + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map(function(){ + return this.elements ? jQuery.makeArray( this.elements ) : this; + }) + .filter(function(){ + return this.name && !this.disabled && + ( this.checked || rselectTextarea.test( this.nodeName ) || + rinput.test( this.type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val, i ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +//Serialize an array of form elements or a set of +//key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); +}; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // If array item is non-scalar (array or object), encode its + // numeric index to resolve deserialization ambiguity issues. + // Note that rack (as of 1.0.0) can't currently deserialize + // nested arrays properly, and attempting to do so may cause + // a server error. Possible fixes are to modify rack's + // deserialization algorithm or to provide an option or flag + // to force array serialization to be shallow. + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} +var + // Document location + ajaxLocParts, + ajaxLocation, + + rhash = /#.*$/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rquery = /\?/, + rscript = /)<[^<]*)*<\/script>/gi, + rts = /([?&])_=[^&]*/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = ["*/"] + ["*"]; + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, list, placeBefore, + dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), + i = 0, + length = dataTypes.length; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + for ( ; i < length; i++ ) { + dataType = dataTypes[ i ]; + // We control if we're asked to add before + // any existing element + placeBefore = /^\+/.test( dataType ); + if ( placeBefore ) { + dataType = dataType.substr( 1 ) || "*"; + } + list = structure[ dataType ] = structure[ dataType ] || []; + // then we add to the structure accordingly + list[ placeBefore ? "unshift" : "push" ]( func ); + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, + dataType /* internal */, inspected /* internal */ ) { + + dataType = dataType || options.dataTypes[ 0 ]; + inspected = inspected || {}; + + inspected[ dataType ] = true; + + var selection, + list = structure[ dataType ], + i = 0, + length = list ? list.length : 0, + executeOnly = ( structure === prefilters ); + + for ( ; i < length && ( executeOnly || !selection ); i++ ) { + selection = list[ i ]( options, originalOptions, jqXHR ); + // If we got redirected to another dataType + // we try there if executing only and not done already + if ( typeof selection === "string" ) { + if ( !executeOnly || inspected[ selection ] ) { + selection = undefined; + } else { + options.dataTypes.unshift( selection ); + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, selection, inspected ); + } + } + } + // If we're only executing or nothing was selected + // we try the catchall dataType if not done already + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, "*", inspected ); + } + // unnecessary when only executing (prefilters) + // but it'll be ignored by the caller in that case + return selection; +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + // Don't do a request if no elements are being requested + if ( !this.length ) { + return this; + } + + var selector, type, response, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // Request the remote document + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params, + complete: function( jqXHR, status ) { + if ( callback ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + } + } + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + // See if a selector was specified + self.html( selector ? + + // Create a dummy div to hold the results + jQuery("
                              ") + + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append( responseText.replace( rscript, "" ) ) + + // Locate the specified elements + .find( selector ) : + + // If not, just inject the full result + responseText ); + + }); + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ + jQuery.fn[ o ] = function( f ){ + return this.on( o, f ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + type: method, + url: url, + data: data, + success: callback, + dataType: type + }); + }; +}); + +jQuery.extend({ + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + if ( settings ) { + // Building a settings object + ajaxExtend( target, jQuery.ajaxSettings ); + } else { + // Extending ajaxSettings + settings = target; + target = jQuery.ajaxSettings; + } + ajaxExtend( target, settings ); + return target; + }, + + ajaxSettings: { + url: ajaxLocation, + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: true, + async: true, + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": allTypes + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // List of data converters + // 1) key format is "source_type destination_type" (a single space in-between) + // 2) the catchall symbol "*" can be used for source_type + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + context: true, + url: true + } + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // ifModified key + ifModifiedKey, + // Response headers + responseHeadersString, + responseHeaders, + // transport + transport, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events + // It's the callbackContext if one was provided in the options + // and if it's a DOM node or a jQuery collection + globalEventContext = callbackContext !== s && + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? + jQuery( callbackContext ) : jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + + readyState: 0, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( !state ) { + var lname = name.toLowerCase(); + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match === undefined ? null : match; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + statusText = statusText || strAbort; + if ( transport ) { + transport.abort( statusText ); + } + done( 0, statusText ); + return this; + } + }; + + // Callback for when everything is done + // It is defined here because jslint complains if it is declared + // at the end of the function (which would be more logical and readable) + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ ifModifiedKey ] = modified; + } + modified = jqXHR.getResponseHeader("Etag"); + if ( modified ) { + jQuery.etag[ ifModifiedKey ] = modified; + } + } + + // If not modified + if ( status === 304 ) { + + statusText = "notmodified"; + isSuccess = true; + + // If we have data + } else { + + isSuccess = ajaxConvert( s, response ); + statusText = isSuccess.state; + success = isSuccess.data; + error = isSuccess.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( !statusText || status ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + // Attach deferreds + deferred.promise( jqXHR ); + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + jqXHR.complete = completeDeferred.add; + + // Status-dependent callbacks + jqXHR.statusCode = function( map ) { + if ( map ) { + var tmp; + if ( state < 2 ) { + for ( tmp in map ) { + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; + } + } else { + tmp = map[ jqXHR.status ]; + jqXHR.always( tmp ); + } + } + return this; + }; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // We also use the url parameter if available + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Get ifModifiedKey before adding the anti-cache parameter + ifModifiedKey = s.url; + + // Add anti-cache in url if needed + if ( s.cache === false ) { + + var ts = jQuery.now(), + // try replacing _= if it is there + ret = s.url.replace( rts, "$1_=" + ts ); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + ifModifiedKey = ifModifiedKey || s.url; + if ( jQuery.lastModified[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); + } + if ( jQuery.etag[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); + } + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout( function(){ + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch (e) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + return jqXHR; + }, + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {} + +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + + var conv, conv2, current, tmp, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(), + prev = dataTypes[ 0 ], + converters = {}, + i = 0; + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + // Convert to each sequential dataType, tolerating list modification + for ( ; (current = dataTypes[++i]); ) { + + // There's only work to do if current dataType is non-auto + if ( current !== "*" ) { + + // Convert response if prev dataType is non-auto and differs from current + if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split(" "); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.splice( i--, 0, current ); + } + + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s["throws"] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + + // Update prev for next iteration + prev = current; + } + } + + return { state: "success", data: response }; +} +var oldCallbacks = [], + rquestion = /\?/, + rjsonp = /(=)\?(?=&|$)|\?\?/, + nonce = jQuery.now(); + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + data = s.data, + url = s.url, + hasCallback = s.jsonp !== false, + replaceInUrl = hasCallback && rjsonp.test( url ), + replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && + !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && + rjsonp.test( data ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + overwritten = window[ callbackName ]; + + // Insert callback into url or form data + if ( replaceInUrl ) { + s.url = url.replace( rjsonp, "$1" + callbackName ); + } else if ( replaceInData ) { + s.data = data.replace( rjsonp, "$1" + callbackName ); + } else if ( hasCallback ) { + s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement( "script" ); + + script.async = "async"; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( head && script.parentNode ) { + head.removeChild( script ); + } + + // Dereference the script + script = undefined; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( 0, 1 ); + } + } + }; + } +}); +var xhrCallbacks, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject ? function() { + // Abort all pending requests + for ( var key in xhrCallbacks ) { + xhrCallbacks[ key ]( 0, 1 ); + } + } : false, + xhrId = 0; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +(function( xhr ) { + jQuery.extend( jQuery.support, { + ajax: !!xhr, + cors: !!xhr && ( "withCredentials" in xhr ) + }); +})( jQuery.ajaxSettings.xhr() ); + +// Create transport if the browser can provide an xhr +if ( jQuery.support.ajax ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( _ ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + + var status, + statusText, + responseHeaders, + responses, + xml; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + responses = {}; + xml = xhr.responseXML; + + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + try { + responses.text = xhr.responseText; + } catch( e ) { + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback, 0 ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback(0,1); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var end, unit, + tween = this.createTween( prop, value ), + parts = rfxnum.exec( value ), + target = tween.cur(), + start = +target || 0, + scale = 1, + maxIterations = 20; + + if ( parts ) { + end = +parts[2]; + unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" && start ) { + // Iteratively approximate from a nonzero starting point + // Prefer the current property, because this process will be trivial if it uses the same units + // Fallback to end or a simple constant + start = jQuery.css( tween.elem, prop, true ) || end || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + tween.unit = unit; + tween.start = start; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; + } + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }, 0 ); + return ( fxNow = jQuery.now() ); +} + +function createTweens( animation, props ) { + jQuery.each( props, function( prop, value ) { + var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( collection[ index ].call( animation, prop, value ) ) { + + // we're done with this property + return; + } + } + }); +} + +function Animation( elem, properties, options ) { + var result, + index = 0, + tweenerIndex = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end, easing ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + createTweens( animation, props ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + anim: animation, + queue: animation.opts.queue, + elem: elem + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, + anim = this, + style = elem.style, + orig = {}, + handled = [], + hidden = elem.nodeType && isHidden( elem ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.done(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( index in props ) { + value = props[ index ]; + if ( rfxtypes.exec( value ) ) { + delete props[ index ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + handled.push( index ); + } + } + + length = handled.length; + if ( length ) { + dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery.removeData( elem, "fxshow", true ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( index = 0 ; index < length ; index++ ) { + prop = handled[ index ]; + tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); + orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing any value as a 4th parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, false, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Remove in 2.0 - this supports IE8's panic based approach +// to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" || + // special check for .toggle( handler, handler, ... ) + ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations resolve immediately + if ( empty ) { + anim.stop( true ); + } + }; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) && !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +var rroot = /^(?:body|html)$/i; + +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + if ( (body = doc.body) === elem ) { + return jQuery.offset.bodyOffset( elem ); + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== "undefined" ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + clientTop = docElem.clientTop || body.clientTop || 0; + clientLeft = docElem.clientLeft || body.clientLeft || 0; + scrollTop = win.pageYOffset || docElem.scrollTop; + scrollLeft = win.pageXOffset || docElem.scrollLeft; + return { + top: box.top + scrollTop - clientTop, + left: box.left + scrollLeft - clientLeft + }; +}; + +jQuery.offset = { + + bodyOffset: function( body ) { + var top = body.offsetTop, + left = body.offsetLeft; + + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[0] ) { + return; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || document.body; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, value, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + +})( window ); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.3/jquery.min.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.3/jquery.min.js new file mode 100755 index 000000000..388377952 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/1.8.3/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
                              a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
                              t
                              ",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
                              ",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
                              ",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

                              ",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
                              ","
                              "],thead:[1,"","
                              "],tr:[2,"","
                              "],td:[3,"","
                              "],col:[2,"","
                              "],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
                              ","
                              "]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
                              ").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/2.0.3/jquery.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/2.0.3/jquery.js new file mode 100755 index 000000000..e38e4d209 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/common/widget/ui/jquery/2.0.3/jquery.js @@ -0,0 +1,7014 @@ +/*! + * jQuery JavaScript Library v2.0.3 -sizzle + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-09-13T10:48Z + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // A central reference to the root jQuery(document) + rootjQuery, + + // The deferred used on DOM ready + readyList, + + // Support: IE9 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "2.0.3 -sizzle", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler and self cleanup method + completed = function() { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + jQuery.ready(); + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray, + + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + // Support: Safari <= 5.1 (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + // Support: Firefox <20 + // The try/catch suppresses exceptions thrown when attempting to access + // the "constructor" property of certain host objects, ie. |window.location| + // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 + try { + if ( obj.constructor && + !core_hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + } catch ( e ) { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + + if ( scripts ) { + jQuery( scripts ).remove(); + } + + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: JSON.parse, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE9 + try { + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + globalEval: function( code ) { + var script, + indirect = eval; + + code = jQuery.trim( code ); + + if ( code ) { + // If the code includes a valid, prologue position + // strict mode pragma, execute code by injecting a + // script tag into the document. + if ( code.indexOf("use strict") === 1 ) { + script = document.createElement("script"); + script.text = code; + document.head.appendChild( script ).parentNode.removeChild( script ); + } else { + // Otherwise, avoid the DOM node creation, insertion + // and removal by using an indirect global eval + indirect( code ); + } + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + trim: function( text ) { + return text == null ? "" : core_trim.call( text ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : core_indexOf.call( arr, elem, i ); + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: Date.now, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + } else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/* + * Optional (non-Sizzle) selector module for custom builds. + * + * Note that this DOES NOT SUPPORT many documented jQuery + * features in exchange for its smaller size: + * + * Attribute not equal selector + * Positional selectors (:first; :eq(n); :odd; etc.) + * Type selectors (:input; :checkbox; :button; etc.) + * State-based selectors (:animated; :visible; :hidden; etc.) + * :has(selector) + * :not(complex selector) + * custom selectors via Sizzle extensions + * Leading combinators (e.g., $collection.find("> *")) + * Reliable functionality on XML fragments + * Requiring all parts of a selector to match elements under context + * (e.g., $div.find("div > *") now matches children of $div) + * Matching against non-elements + * Reliable sorting of disconnected nodes + * querySelectorAll bug fixes (e.g., unreliable :focus on WebKit) + * + * If any of these are unacceptable tradeoffs, either use Sizzle or + * customize this stub for the project's specific needs. + */ + +var selector_hasDuplicate, + matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector, + selector_sortOrder = function( a, b ) { + // Flag for duplicate removal + if ( a === b ) { + selector_hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 ) { + + // Choose the first element that is related to our document + if ( a === document || jQuery.contains(document, a) ) { + return -1; + } + if ( b === document || jQuery.contains(document, b) ) { + return 1; + } + + // Maintain original order + return 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + }; + +jQuery.extend({ + find: function( selector, context, results, seed ) { + var elem, nodeType, + i = 0; + + results = results || []; + context = context || document; + + // Same basic safeguard as Sizzle + if ( !selector || typeof selector !== "string" ) { + return results; + } + + // Early return if context is not an element or document + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( seed ) { + while ( (elem = seed[i++]) ) { + if ( jQuery.find.matchesSelector(elem, selector) ) { + results.push( elem ); + } + } + } else { + jQuery.merge( results, context.querySelectorAll(selector) ); + } + + return results; + }, + unique: function( results ) { + var elem, + duplicates = [], + i = 0, + j = 0; + + selector_hasDuplicate = false; + results.sort( selector_sortOrder ); + + if ( selector_hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; + }, + text: function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += jQuery.text( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + return elem.textContent; + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; + }, + contains: function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && adown.contains(bup) ); + }, + isXMLDoc: function( elem ) { + return (elem.ownerDocument || elem).documentElement.nodeName !== "HTML"; + }, + expr: { + attrHandle: {}, + match: { + bool: /^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i, + needsContext: /^[\x20\t\r\n\f]*[>+~]/ + } + } +}); + +jQuery.extend( jQuery.find, { + matches: function( expr, elements ) { + return jQuery.find( expr, null, null, elements ); + }, + matchesSelector: function( elem, expr ) { + return matches.call( elem, expr ); + }, + attr: function( elem, name ) { + return elem.getAttribute( name ); + } +}); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + var input = document.createElement("input"), + fragment = document.createDocumentFragment(), + div = document.createElement("div"), + select = document.createElement("select"), + opt = select.appendChild( document.createElement("option") ); + + // Finish early in limited environments + if ( !input.type ) { + return support; + } + + input.type = "checkbox"; + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere) + support.checkOn = input.value !== ""; + + // Must access the parent to make an option select properly + // Support: IE9, IE10 + support.optSelected = opt.selected; + + // Will be defined later + support.reliableMarginRight = true; + support.boxSizingReliable = true; + support.pixelPosition = false; + + // Make sure checked status is properly cloned + // Support: IE9, IE10 + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Check if an input maintains its value after becoming a radio + // Support: IE9, IE10 + input = document.createElement("input"); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment.appendChild( input ); + + // Support: Safari 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: Firefox, Chrome, Safari + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + support.focusinBubbles = "onfocusin" in window; + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, + // Support: Firefox, Android 2.3 (Prefixed box-sizing versions). + divReset = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box", + body = document.getElementsByTagName("body")[ 0 ]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + // Check box-sizing and margin behavior. + body.appendChild( container ).appendChild( div ); + div.innerHTML = ""; + // Support: Firefox, Android 2.3 (Prefixed box-sizing versions). + div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Support: Android 2.3 + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + body.removeChild( container ); + }); + + return support; +})( {} ); + +/* + Implementation Summary + + 1. Enforce API surface and semantic compatibility with 1.9.x branch + 2. Improve the module's maintainability by reducing the storage + paths to a single mechanism. + 3. Use the same single mechanism to support "private" and "user" data. + 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) + 5. Avoid exposing implementation details on user objects (eg. expando properties) + 6. Provide a clear path for implementation upgrade to WeakMap in 2014 +*/ +var data_user, data_priv, + rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function Data() { + // Support: Android < 4, + // Old WebKit does not have Object.preventExtensions/freeze method, + // return new empty object instead with no [[set]] accessor + Object.defineProperty( this.cache = {}, 0, { + get: function() { + return {}; + } + }); + + this.expando = jQuery.expando + Math.random(); +} + +Data.uid = 1; + +Data.accepts = function( owner ) { + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType ? + owner.nodeType === 1 || owner.nodeType === 9 : true; +}; + +Data.prototype = { + key: function( owner ) { + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return the key for a frozen object. + if ( !Data.accepts( owner ) ) { + return 0; + } + + var descriptor = {}, + // Check if the owner object already has a cache key + unlock = owner[ this.expando ]; + + // If not, create one + if ( !unlock ) { + unlock = Data.uid++; + + // Secure it in a non-enumerable, non-writable property + try { + descriptor[ this.expando ] = { value: unlock }; + Object.defineProperties( owner, descriptor ); + + // Support: Android < 4 + // Fallback to a less secure definition + } catch ( e ) { + descriptor[ this.expando ] = unlock; + jQuery.extend( owner, descriptor ); + } + } + + // Ensure the cache object + if ( !this.cache[ unlock ] ) { + this.cache[ unlock ] = {}; + } + + return unlock; + }, + set: function( owner, data, value ) { + var prop, + // There may be an unlock assigned to this node, + // if there is no entry for this "owner", create one inline + // and set the unlock as though an owner entry had always existed + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + // Handle: [ owner, key, value ] args + if ( typeof data === "string" ) { + cache[ data ] = value; + + // Handle: [ owner, { properties } ] args + } else { + // Fresh assignments by object are shallow copied + if ( jQuery.isEmptyObject( cache ) ) { + jQuery.extend( this.cache[ unlock ], data ); + // Otherwise, copy the properties one-by-one to the cache object + } else { + for ( prop in data ) { + cache[ prop ] = data[ prop ]; + } + } + } + return cache; + }, + get: function( owner, key ) { + // Either a valid cache is found, or will be created. + // New caches will be created and the unlock returned, + // allowing direct access to the newly created + // empty data object. A valid owner object must be provided. + var cache = this.cache[ this.key( owner ) ]; + + return key === undefined ? + cache : cache[ key ]; + }, + access: function( owner, key, value ) { + var stored; + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ((key && typeof key === "string") && value === undefined) ) { + + stored = this.get( owner, key ); + + return stored !== undefined ? + stored : this.get( owner, jQuery.camelCase(key) ); + } + + // [*]When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, name, camel, + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + if ( key === undefined ) { + this.cache[ unlock ] = {}; + + } else { + // Support array or space separated string of keys + if ( jQuery.isArray( key ) ) { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = key.concat( key.map( jQuery.camelCase ) ); + } else { + camel = jQuery.camelCase( key ); + // Try the string as a key before any manipulation + if ( key in cache ) { + name = [ key, camel ]; + } else { + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + name = camel; + name = name in cache ? + [ name ] : ( name.match( core_rnotwhite ) || [] ); + } + } + + i = name.length; + while ( i-- ) { + delete cache[ name[ i ] ]; + } + } + }, + hasData: function( owner ) { + return !jQuery.isEmptyObject( + this.cache[ owner[ this.expando ] ] || {} + ); + }, + discard: function( owner ) { + if ( owner[ this.expando ] ) { + delete this.cache[ owner[ this.expando ] ]; + } + } +}; + +// These may be used throughout the jQuery core codebase +data_user = new Data(); +data_priv = new Data(); + + +jQuery.extend({ + acceptData: Data.accepts, + + hasData: function( elem ) { + return data_user.hasData( elem ) || data_priv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return data_user.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + data_user.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to data_priv methods, these can be deprecated. + _data: function( elem, name, data ) { + return data_priv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + data_priv.remove( elem, name ); + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + elem = this[ 0 ], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = data_user.get( elem ); + + if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[ i ].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + dataAttr( elem, name, data[ name ] ); + } + } + data_priv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + data_user.set( this, key ); + }); + } + + return jQuery.access( this, function( value ) { + var data, + camelKey = jQuery.camelCase( key ); + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + // Attempt to get data from the cache + // with the key as-is + data = data_user.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to get data from the cache + // with the key camelized + data = data_user.get( elem, camelKey ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, camelKey, undefined ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each(function() { + // First, attempt to store a copy or reference of any + // data that might've been store with a camelCased key. + var data = data_user.get( this, camelKey ); + + // For HTML5 data-* attribute interop, we have to + // store property names with dashes in a camelCase form. + // This might not apply to all properties...* + data_user.set( this, camelKey, value ); + + // *... In the case of properties that might _actually_ + // have dashes, we need to also store a copy of that + // unchanged property. + if ( key.indexOf("-") !== -1 && data !== undefined ) { + data_user.set( this, key, value ); + } + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + data_user.remove( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? JSON.parse( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + data_user.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = data_priv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = data_priv.access( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return data_priv.get( elem, key ) || data_priv.access( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + data_priv.remove( elem, [ type + "queue", key ] ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = data_priv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button)$/i; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each(function() { + delete this[ jQuery.propFix[ name ] || name ]; + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + data_priv.set( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // IE6-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + elem[ propName ] = false; + } + + elem.removeAttribute( name ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ? + elem.tabIndex : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + // Temporarily disable this handler to check existence + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + + // Restore handler + jQuery.expr.attrHandle[ name ] = fn; + + return ret; + }; +}); + +// Support: IE9+ +// Selectedness for an option in an optgroup can be inaccurate +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.hasData( elem ) && data_priv.get( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + data_priv.remove( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.disabled !== true || event.type !== "click" ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: Cordova 2.5 (WebKit) (#13255) + // All events should have a target; Cordova deviceready doesn't + if ( !event.target ) { + event.target = document; + } + + // Support: Safari 6.0+, Chrome < 28 + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } +}; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && e.preventDefault ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && e.stopPropagation ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// Support: Chrome 15+ +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// Create "bubbling" focus and blur events +// Support: Firefox, Chrome, Safari +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter(function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = ( rneedsContext.test( selectors ) || typeof selectors !== "string" ) ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return core_indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return core_indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return elem.contentDocument || jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.unique( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; + }, + + sibling: function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( core_indexOf.call( qualifier, elem ) >= 0 ) !== not; + }); +} +var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + manipulation_rcheckableType = /^(?:checkbox|radio)$/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + + // Support: IE 9 + option: [ 1, "" ], + + thead: [ 1, "
                              ", "
                              " ], + col: [ 2, "", "
                              " ], + tr: [ 2, "", "
                              " ], + td: [ 3, "", "
                              " ], + + _default: [ 0, "", "" ] + }; + +// Support: IE 9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); + } + } + } + } + } + } + + return this; + } +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: QtWebKit + // .get() because core_push.apply(_, arraylike) throws + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Support: IE >= 9 + // Fix Cloning issues + if ( !jQuery.support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var elem, tmp, tag, wrap, contains, j, + i = 0, + l = elems.length, + fragment = context.createDocumentFragment(), + nodes = []; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Fixes #12346 + // Support: Webkit, IE + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; + }, + + cleanData: function( elems ) { + var data, elem, events, type, key, j, + special = jQuery.event.special, + i = 0; + + for ( ; (elem = elems[ i ]) !== undefined; i++ ) { + if ( Data.accepts( elem ) ) { + key = elem[ data_priv.expando ]; + + if ( key && (data = data_priv.cache[ key ]) ) { + events = Object.keys( data.events || {} ); + if ( events.length ) { + for ( j = 0; (type = events[j]) !== undefined; j++ ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + if ( data_priv.cache[ key ] ) { + // Discard any remaining `private` data + delete data_priv.cache[ key ]; + } + } + } + // Discard any remaining `user` data + delete data_user.cache[ elem[ data_user.expando ] ]; + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); + +// Support: 1.x compatibility +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute("type"); + } + + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var l = elems.length, + i = 0; + + for ( ; i < l; i++ ) { + data_priv.set( + elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) + ); + } +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( data_priv.hasData( src ) ) { + pdataOld = data_priv.access( src ); + pdataCur = data_priv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( data_user.hasData( src ) ) { + udataOld = data_user.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + data_user.set( dest, udataCur ); + } +} + + +function getAll( context, tag ) { + var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : + context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : + []; + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], ret ) : + ret; +} + +// Support: IE >= 9 +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} +jQuery.fn.extend({ + wrapAll: function( html ) { + var wrap; + + if ( jQuery.isFunction( html ) ) { + return this.each(function( i ) { + jQuery( this ).wrapAll( html.call(this, i) ); + }); + } + + if ( this[ 0 ] ) { + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function( i ) { + jQuery( this ).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function( i ) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var curCSS, iframe, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +function getStyles( elem ) { + return window.getComputedStyle( elem, null ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = data_priv.get( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = data_priv.access( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css(elem, "display") ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": "cssFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifying setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + style[ name ] = value; + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // Support: IE9 + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // Support: Safari 5.1 + // A tribute to the "awesome hack by Dean Edwards" + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; +}; + + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("', + 'js': '#{content}' + }; + that.append = document.write; + + that.render(); + that.bindEvents(); +} + +sideAd.prototype = { + /** + * 发送广告曝光率统计 + */ + bindOuterLog: function(offerLog){ + OUTLOG.conf = $.extend(OUTLOG.conf || {}, {url: offerLog}); + offerLog && OUTLOG.send(); + }, + /** + * 绑定事件 + */ + bindEvents: function(){ + var that = this; + that.mod.on("mousedown",".nav-item",function(){ + UT.send({ + "modId": "bigadbanner", + // "sort": $(this).find("[log-oid]").attr("log-oid"), + "sort": $(this).find("a").attr("href"), + "type": "click" + }); + }); + }, + /** + * 渲染到页面 + */ + render : function(){ + var that = this, + datas = [], + options, + getData = that.collectData(); + + $.when( getData ) + .done( function( data ){ + /*只有第一个广告是直接插入页面,其他广告都是先塞在textarea里*/ + for ( var i=0, len=data.length; i'+ (i ? '' : '') + '', data[i]), + "id": i + 1, + "offerLog": data[i].offerLog + }); + } + + /*原有cycletab的切换原理会导致重复加载iframe或js类型的广告*/ + var options = { + itemSize: that.opt.itemSize ? that.opt.itemSize : 300, + autoDuration: that.opt.autoDuration ? that.opt.autoDuration : 5000, + dir: conf.dir, + useIndex: that.useIndex, + autoScrollDirection: that.opt.autoScrollDirection ? that.opt.autoScrollDirection : "forward", + scrollDuration: that.opt.scrollDuration ? parseInt(that.opt.scrollDuration, 10) : 600, + container: that.mod, + list: that.list, + arrows: that.mod.find(".slide-prev,.slide-next"), + datas: datas, + onSwitch: that.bindOuterLog + }; + + /* 设置循环轮播效果 */ + new Slide(options).init(); + + if(!supportsCSS3) { + that.mod.addClass('js-slide-on'); + } + + /*预留处理js类型,需要暂时重写document.write*/ + document.write = that.append; + } ); + }, + /** + * 把传入的数组的元素顺序随机打散 + */ + shuffle: function(o){ + for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); + return o; + }, + /** + * 是否有api类型广告 + */ + getSpecialType: function(){ + var that = this; + that.apiIndex = -1; + $.each(that.opt.ad_group, function(i, v){ + if(v.type == "api"){ + that.apiIndex = i; + }else if(v.type == "iframe"){ + that.hasIframe = true; + } + }); + }, + /** + * 将从api和PM配置的数据收集在一起 + */ + collectData : function(){ + var that = this, + deferred = $.Deferred(), + i, getApiAdGroup; + that.getSpecialType(); + // 如果有api,从api获取数据,并在获取到数据之后同获取到的PM配置的数据合并 + if( ~that.apiIndex ){ + getApiAdGroup = that.formatApiData(); + $.when( getApiAdGroup ) + .done( function( data ){ + // 将api数据和PM配置数据整合在一起传递给监控函数处理 + deferred.resolve( that.getStaticData(data) ); + } ) + .fail( function(){ + deferred.reject(); + } ); + }else{ + // 如果没有api,直接拿PM配置的数据 + deferred.resolve( that.getStaticData() ); + } + return deferred.promise(); + }, + /** + * 整合api和PM配置的数据 + */ + getStaticData : function(apiData){ + var that = this, + adGroup = that.opt.ad_group, + len = adGroup.length, + i, + res = []; + for( i=0; i 1)) { + if(~that.apiIndex) { + if(!that.useIndex) { + res = that.shuffle(res); + } else { + res = [res[0]].concat(that.shuffle(res.slice(1))); + } + } + } + return res; + }, + /** + * 将从api中获取的数据格式化为tpl中需要的数据格式(字段名称替换) + **/ + formatApiData : function(){ + var that = this, + deferred = $.Deferred(), + apiConf = that.opt.ad_group[that.apiIndex], + getDataFromApi = that.getDataFromApi(); + + $.when( getDataFromApi ) + .done( function( data ){ + var len = data.length, + i; + for( var i=0; i apiMaxNum ){ + d.length = apiMaxNum + } + deferred.resolve( d ); + } ) + .fail( function(){ + deferred.reject(); + } ); + return deferred.promise(); + } +}; +var Slide = function(opt){ + var that = this; + that.opt = opt; + that.datas = opt.datas; + that.max = that.datas.length; // 临界值 + that.mod = opt.container; + that.list = opt.list; + that.arrows = opt.arrows; + that.ele = {}; + that.befObj = null; + that.curObj = null; + that.useIndex = opt.useIndex; + if(that.max > 1){ + that.canSlide = true; //当前是否可以滑动(防止用户过度频繁操作) + that.counter = 0; // 记录广告序号 + that.step = opt.itemSize; // 切换步长 + that.autoScrollDirection = opt.autoScrollDirection; + that.dir = opt.dir; // 下标 + that.STYLE_KEY = "left"; + that.animateStyle = {}; + that.resetStyle = {}; + } + +}; +Slide.prototype = { + constructor: Slide, + init: function(){ + var that = this; + that.render(); + if(that.max > 1){ + that.autoScroll(); + that.bindEvents(); + } + }, + render: function(){ + var that = this, + html = "", + max = that.max, + datas = that.datas; + + /*生成datas & html*/ + /*if(max > 1){ + datas.push(datas[0]);// 为了循环播放尾部要再加上第一个 + datas.unshift(datas[max-1]);// 为了循环播放头部要再加上最后一个 + }*/ + $.each(datas, function(index, item){ + if(that.useIndex && ( index === 0 )) { + + } else { + html += datas[index].content; + } + }); + + /*插入并设置总宽度*/ + that.list.append(html); + + that.ele = that.list.children(); + + that.opt.onSwitch && that.opt.onSwitch.call(that, that.datas[that.counter||0].offerLog); + if(max > 1){ + /*that.list + .css({ + "width": that.step*(that.max+2), + "left": -that.step*that.counter + });*/ + }else{ + that.arrows.hide(); + } + }, + lazyLoadAd: function(){ + var that = this, + curItem = that.curObj, + // 如果有textarea,说明还没有加载过,把内容从textarea中取出插入页面,从而实现动态加载 + curTextarea = curItem.find("textarea"); + curTextarea.length && curItem.html(curTextarea.text()); + }, + animateShow: function() { + var that = this; + + if(supportsCSS3) { + that.befObj.css({"z-index": "1"}); + that.curObj.css({"z-index": "10", "display": "block", "opacity": "1"}); + setTimeout(function() { + that.befObj.css({"opacity": "0", "z-index": "0"}); // hide before element + that.canSlide = true; + }, that.opt.scrollDuration + 50); + } else { + that.curObj.css({"z-index": "10", "display": "none"}) + .fadeIn(that.opt.scrollDuration, function() { + $(this).css("z-index", "0"); + that.befObj.hide(); // hide before element + that.canSlide = true; + }); + } + }, + scrollNext: function(){ + var that = this; + + that.canSlide = false; + that.befObj = that.ele.eq(that.counter); + that.counter++; + if(that.counter >= that.max) { + that.counter = 0; + } + that.curObj = that.ele.eq(that.counter); + // 延迟加载 + that.lazyLoadAd(); + // 动画滑动效果 + /*that.animateStyle[that.STYLE_KEY] = -that.step*that.counter; + that.resetStyle[that.STYLE_KEY] = -that.step*1;*/ + + that.animateShow(); + + /*that.list.animate(that.animateStyle, that.opt.scrollDuration, function(){ + if(that.autoScrollDirection == "forward"){ + // 特殊处理从最后一张向第一张切的情况,动画过程中看到的是排在最后一个广告后面的第一个广告的克隆,广告结束时刻直接切回第一张位置 + if(that.counter == that.max+1){ + that.counter = 1; + that.list.css(that.resetStyle); + } + } + that.canSlide = true; + });*/ + that.opt.onSwitch && that.opt.onSwitch.call(that, that.datas[that.counter].offerLog); + }, + scrollPrev: function(){ + var that = this; + + that.canSlide = false; + that.befObj = that.ele.eq(that.counter); + that.counter--; + if(that.counter < 0) { + that.counter = that.max-1; + } + that.curObj = that.ele.eq(that.counter); + + // 延迟加载 + that.lazyLoadAd(); + + that.animateShow(); + + /*// 动画滑动效果 + that.animateStyle[that.STYLE_KEY] = -that.step*that.counter; + that.resetStyle[that.STYLE_KEY] = -that.step*that.max; + + that.list.animate(that.animateStyle, that.opt.scrollDuration, function(){ + if(that.autoScrollDirection == "forward"){ + // 特殊处理从第一张向最后一张切的情况,动画过程中看到的是排在第一个广告前面的最后一个广告的克隆,广告结束时刻直接切回最后一张位置 + if(that.counter == 0){ + that.counter = that.max; + that.lazyLoadAd(); + that.list.css(that.resetStyle); + } + } + that.canSlide = true; + });*/ + that.opt.onSwitch && that.opt.onSwitch.call(that, that.datas[that.counter].offerLog); + }, + /*设置循环轮播*/ + autoScroll: function(){ + var that = this; + that.timer = setInterval(function(){ + that.scrollNext(); + }, that.opt.autoDuration); + }, + bindEvents: function(){ + var that = this; + /*设置mouseenter时停止动画,mouseleave时恢复动画*/ + that.mod.on("mouseenter", function(){ + clearInterval(that.timer); + }).on("mouseleave", function(){ + that.autoScroll(); + }).on("click", ".slide-next",function(e){ + that.canSlide && that.scrollNext(); + e.preventDefault(); + }).on("click", ".slide-prev",function(e){ + that.canSlide && that.scrollPrev(); + e.preventDefault(); + }); + } +}; + +/* 发送广告曝光率统计 */ +var OUTLOG = { + send: function(f) { + var i = this.conf, + b = i && i.url || this.url + if(b){ + f = f || {}; + var a = f.r = +new Date(), + l = window, + g = encodeURIComponent, + e = l["OUTLOG" + a] = new Image(), + c = i && i.data, + j, h = []; + if (c) { + for (var d in c) { + c[d] !== j && (f[d] = c[d]) + } + } + for (j in f) { + h.push(g(j) + "=" + g(f[j])) + } + e.onload = e.onerror = function() { + l["OUTLOG" + a] = null + }; + e.src = b + "?" + h.join("&"); + e = h = null; + } + } +}; +module.exports = sideAd; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/big-ad-switch-common.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/big-ad-switch-common.css new file mode 100755 index 000000000..252a661e9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/big-ad-switch-common.css @@ -0,0 +1,91 @@ +/*.mod-big-ad-switch { + width: 100%; + height: 250px; + overflow: hidden; + position: relative; +}*/ +.mod-big-ad-switch a { + display: block; +} +.mod-big-ad-switch img { + display: block; + width: 300px; + height: 250px; +} +/*.mod-big-ad-switch .nav-item-list { + position: relative; + float: left; + height: 100%; + z-index: 1; +}*/ +/*.mod-big-ad-switch .nav-item { + float: left; +}*/ +/* loading */ +.mod-big-ad-switch .ui-o{ + width: 300px; + height: 250px; + transition: opacity linear 0.6s; + -webkit-transition: opacity linear 0.6s; + -moz-transition: opacity linear 0.6s; + -o-transition: opacity linear 0.6s; + -ms-transition: opacity linear 0.6s; + -khtml-transition: opacity linear 0.6s; + opacity: 0; + background-color: #ffffff; +} +.js-slide-on .ui-o { + opacity: 1; +} +/* arrow */ +.mod-big-ad-switch .slide-prev, +.mod-big-ad-switch .slide-next{ + position: absolute; + width: 20px; + height: 30px; + background: blue; + top: 50%; + margin-top: -15px; + background-color: #000; + font-size: 24px; + opacity: .4; + filter: alpha(opacity=40); + color: #CCC; + line-height: 30px; + text-align: center; + font-family: arial; + z-index: 1; + visibility: visible !important; +} +.mod-big-ad-switch .slide-prev{ + left: 0; + -moz-border-top-right-radius: 12px; + -moz-border-bottom-right-radius: 12px; + -webkit-border-top-right-radius: 12px; + -webkit-border-bottom-right-radius: 12px; + border-top-right-radius: 12px; + border-bottom-right-radius: 12px; +} +.mod-big-ad-switch .slide-next{ + right: 0; + -moz-border-top-left-radius: 12px; + -moz-border-bottom-left-radius: 12px; + -webkit-border-top-left-radius: 12px; + -webkit-border-bottom-left-radius: 12px; + border-top-left-radius: 12px; + border-bottom-left-radius: 12px; +} +.mod-big-ad-switch .slide-prev:hover, +.mod-big-ad-switch .slide-next:hover{ + color: #fff; + cursor: pointer; +} + +/* 显示模块 */ +.side-mod-preload-big-ad-switch{ + border:0!important; + background: transparent!important; +} +.side-mod-preload-big-ad-switch > *{ + visibility: visible!important; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/big-ad-switch.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/big-ad-switch.tpl new file mode 100755 index 000000000..7a48ed89c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/big-ad-switch.tpl @@ -0,0 +1,66 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%require name="home:widget/big-ad-switch/<%$head.dir%>/<%$head.dir%>.css"%> + +<%if $body.<%$mod%>.random == "1" && !empty($body.<%$mod%>.ad_group)%> + <%if shuffle($body.<%$mod%>.ad_group)%><%/if%> +<%/if%> +<%if !empty($body.<%$mod%>.ad_group)%> + <%$stData = $body.<%$mod%>.ad_group[0]%> +<%/if%> +<%assign var=useIndex value='0'%> + +
                              + + <%if $body.<%$mod%>.hasCtrl == "1"%> + + + <%/if%> +
                              + +<%script%> + conf = conf || {}; + conf["<%$mod%>_pass"] = <%json_encode( $body.<%$mod%> )%>; + conf["<%$mod%>_pass"].id = "<%$mod%>_pass"; + require.async(["common:widget/ui/jquery/jquery.js", "home:widget/big-ad-switch/big-ad-switch-async.js"], function($, sideAd) { + new sideAd( "<%$mod%>_pass", "<%$useIndex%>" ); + }); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/ltr/ltr.css new file mode 100755 index 000000000..153cc7acf --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/ltr/ltr.css @@ -0,0 +1,11 @@ +@import url('/widget/big-ad-switch/big-ad-switch-common.css?__inline'); + +/* +广告模块样式 +*/ +.mod-big-ad-switch .slide-prev{ + +} +.mod-big-ad-switch .slide-next{ + +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/rtl/rtl.css new file mode 100755 index 000000000..a59cc89c0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-ad-switch/rtl/rtl.css @@ -0,0 +1,11 @@ +@import url('/widget/big-ad-switch/big-ad-switch-common.css?__inline'); + +/* +广告模块样式 +*/ +.mod-big-ad-switch .slide-prev{ + direction: ltr; +} +.mod-big-ad-switch .slide-next{ + direction: ltr; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-side-ad/big-side-ad.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-side-ad/big-side-ad.tpl new file mode 100755 index 000000000..6f1882672 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/big-side-ad/big-side-ad.tpl @@ -0,0 +1,55 @@ +<%*侧边栏静态按概率随机展现大广告*%> + +
                              + <%assign var="ratioTotal" value="0"%> + <%foreach $body.$mod_name.ad_group as $item%> + <%$ratioTotal = $ratioTotal + $item.ratio%> + <%/foreach%> + <%*生成随机的命中index*%> + <%assign var="randomId" value="<%rand(1,$ratioTotal)%>"%> + <%*已被占用的index最大值*%> + <%assign var="startId" value="0"%> + + <%foreach $body.$mod_name.ad_group as $item%> + + <%*单个广告的占比,取值范围[0,10]*%> + <%assign var="ratio" value="<%$item.ratio%>"%> + + <%*iframe类型广告:接收iframe的src*%> + <%if $item.type == "iframe"%> + <%section name="iframeL" loop=$ratio%> + <%if $randomId == $smarty.section.iframeL.index+$startId+1%> + + <%/if%> + <%/section%> + <%*匹配后修改已被占用的index最大值*%> + <%$startId = $startId + $ratio%> + + <%*图片类型广告:接收图片src和对应url*%> + <%elseif $item.type == "image"%> + <%section name="imgL" loop=$ratio%> + <%if $randomId == $smarty.section.imgL.index+$startId+1%> + + + + <%/if%> + <%/section%> + <%*匹配后修改已被占用的index最大值*%> + <%$startId = $startId + $ratio%> + + <%*js类型广告:接收一段html或js代码*%> + <%elseif $item.type == "js"%> + <%section name="adL" loop=$ratio%> + <%if $randomId == $smarty.section.adL.index+$startId+1%> + <%$item.content%> + <%/if%> + <%/section%> + <%*匹配后修改已被占用的index最大值*%> + <%$startId = $startId + $ratio%> + <%/if%> + + <%/foreach%> + +
                              diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bigrender-bigpipe/bigrender-bigpipe.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bigrender-bigpipe/bigrender-bigpipe.tpl new file mode 100755 index 000000000..107efc6d9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bigrender-bigpipe/bigrender-bigpipe.tpl @@ -0,0 +1,12 @@ +<%*执行bigrender *%> +<%script%> + require.async(["common:widget/ui/jquery/jquery.js", + "common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js" + ], function($){ + $(".g_fis_bigrender,.g-area-lazyload").lazyload({ + skipInvisible:false, + autoFireEvent: null, + threshold: $(window).height() + }); + }) +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/bottom-book-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/bottom-book-async.js new file mode 100755 index 000000000..31e23c1c0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/bottom-book-async.js @@ -0,0 +1,120 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var cycletabs = require('common:widget/ui/cycletabs/cycletabs.js'); +var helper = require("common:widget/ui/helper/helper.js"); + +var $glo = $(".mod-bottom-book"), + _con = conf.bottomBook, + _buy = _con.buy, + _data = _con.list, + _tpl = '
                              #{num}
                              #{title}
                              #{juan}
                              #{money}
                              #{buy}
                              ', + _tmp = "", + k = 1; + +$glo.find(".btm-hd").css("visibility", "visible"); + +var arrayList = []; + +for (var i = 0, j = _data.length; i < j; i++) { + if (i !== 0 && (i % 5 === 0)) { + arrayList.push({ + content: _tmp, + id: k++ + }); + _tmp = ""; + } + _data[i].imgUrl = _data[i].imgUrl || ""; + if (i % 5 === 4 || i === j - 1) { + _data[i].other = "btm-no-border"; + } else { + _data[i].other = ""; + } + _data[i].buy = _buy; + _data[i].num = i + 1; + _tmp += helper.replaceTpl(_tpl, _data[i]); +} +if (_tmp != "") { + arrayList.push({ + content: _tmp, + id: k + }); + _tmp = ""; +} + +function initSlide(con, data, size, wrap, $glo) { + //调用slide组件 + var options = { + offset: 0, + navSize: 1, + itemSize: size, + scrollDuration: parseInt(con.scrollDuration, 10) || 500, + quickSwitch: true, + dir: conf.dir, + containerId: wrap, + data: data, + autoScrollDirection: conf.dir == "ltr" ? "forward" : "backward", + autoScroll: con.autoScroll === "1" ? true : false + }; + var skinSlide = new cycletabs.NavUI(); + skinSlide.init(options); + //项数不到一屏时,隐藏控制Handler + if (data.length <= 1) { + $(".ctrl, .switch", $glo).hide(); + } +} + +var bottomBook = function() { + initSlide(_con, arrayList, 179 * 5 + 4, ".btm-wrap", $glo); + $glo.on("click", ".btm-logo", function() { + UT.send({ + modId: "bottom-book", + type: "click", + position: "header", + sort: "logo" + }); + }).on("click", ".btm-tle-btn2 a", function() { + UT.send({ + modId: "bottom-book", + type: "click", + position: "header", + sort: "search" + }); + }).on("click", ".btm-tle-btn1 a", function() { + UT.send({ + modId: "bottom-book", + type: "click", + position: "header", + sort: "check" + }); + }).on("click", ".btm-btn", function() { + UT.send({ + modId: "bottom-book", + type: "click", + position: "content", + sort: "button" + }); + }).on("click", ".next", function() { + UT.send({ + modId: "bottom-book", + type: "click", + position: "control", + sort: "next" + }); + }).on("click", ".prev", function() { + UT.send({ + modId: "bottom-book", + type: "click", + position: "control", + sort: "prev" + }); + }).on("click", ".btm-fram a", function() { + UT.send({ + modId: "bottom-book", + type: "click", + position: "content", + sort: "img" + }); + }); +}; + +module.exports = bottomBook; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/bottom-book.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/bottom-book.tpl new file mode 100755 index 000000000..91c369bc0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/bottom-book.tpl @@ -0,0 +1,34 @@ +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> +<%require name="home:widget/bottom-book/ltr/ltr.css"%> +<%else%> +<%require name="home:widget/bottom-book/rtl/rtl.css"%> +<%/if%> +
                              + +
                              +
                              +
                              +
                              +<%script%> + conf.bottomBook = {}; + conf.bottomBook.buy = '<%$body.bottomBook.buyBook%>'; + conf.bottomBook.scrollDuration = '<%$body.bottomBook.scrollDuration%>'; + conf.bottomBook.autoScroll = '<%$body.bottomBook.autoScroll%>'; + conf.bottomBook.list = <%json_encode($body.bottomBook.list)%>; + require.async("home:widget/bottom-book/bottom-book-async.js", function (bottomBook) { + bottomBook(); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/book.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/book.png new file mode 100755 index 000000000..b302ef624 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/book.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/frame.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/frame.png new file mode 100755 index 000000000..6c9e748d7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/frame.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-next.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-next.png new file mode 100755 index 000000000..d6395551f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-next.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-next_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-next_hover.png new file mode 100755 index 000000000..1c526bd38 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-next_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-pre.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-pre.png new file mode 100755 index 000000000..dc67d6148 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-pre.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-pre_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-pre_hover.png new file mode 100755 index 000000000..a480ef456 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/i-image-pre_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/juan.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/juan.png new file mode 100755 index 000000000..6671eb7d5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/juan.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/money.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/money.png new file mode 100755 index 000000000..3e305e6af Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/money.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/num-hl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/num-hl.png new file mode 100755 index 000000000..a7c08c797 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/num-hl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/num-nor.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/num-nor.png new file mode 100755 index 000000000..ee4ee2c82 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/img/num-nor.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/ltr/ltr.css new file mode 100755 index 000000000..36bd63a65 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/ltr/ltr.css @@ -0,0 +1,225 @@ +.mod-bottom-book { + height: 365px; + width: 100%; + /* padding: 15px 19px; + */ + border: 1px solid #E3E5E6; + background-color: #ffffff; + margin-top: 10px; +} +.btm-bk .btm-hd { + margin-top: 15px; + padding-bottom: 13px; + margin-left: 19px; + margin-right: 20px; + border-bottom: 1px solid #E3E5E6; + overflow: hidden; +} +.btm-bk .btm-logo { + float: left; +} +.btm-bk .btm-extra { + float: right; +} +.btm-bk .btm-tle-btn { + float: left; + height: 32px; + line-height: 32px; + border: 1px solid #03A169; + border-radius: 2px; +} +.btm-bk .btm-tle-btn a { + color: #ffffff; + font-size: 16px; + display: block; + font-weight: bold; + padding-right: 25px; + padding-left: 18px; + background-color: #01B273; + border-top: 1px solid #2ABE8A; + max-width: 280px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.btm-bk .btm-tle-btn:hover { + border-color: #03AC70; +} +.btm-bk .btm-tle-btn a:hover { + background-color: #01BD7A; + border-color: #2AC88F; +} +.btm-bk .btm-tle-btn2 { + float: right; + margin-left: 10px; +} +.btm-bk .btm-tle-btn2 a { + padding-left: 28px; + padding-right: 28px; +} +.btm-bk .btm-lst { + float: left; + height: 261px; + width: 179px; + padding-top: 2px; + border-right: 1px dotted #E3E5E6; + position: relative; +} +.btm-bk .btm-no-border { + border-right-width: 0; +} +.btm-bk .btm-lst .btm-fram { + width: 81px; + height: 114px; + background: url(../img/frame.png?__sprite) no-repeat; + margin: 0 auto; +} +.btm-bk .btm-lst img { + width: 75px; + height: 108px; + border: 1px solid #C7C7C7; + position: relative; + left: -2px; +} +.btm-bk .ui-nav { + text-align: center; +} +.btm-bk .wrap { + margin: 0 auto; + overflow: hidden; + height: 263px; +} +.btm-bk .nav-item { + float: left; +} +.btm-bk .nav-item-list { + position: relative; +} +.btm-bk .btm-num { + display: block; + line-height: 24px; + text-indent: 1px; + position: absolute; + top: 0px; + left: 18px; + width: 23px; + height: 33px; + text-align: center; + font-size: 14px; + font-weight: bold; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: #ffffff; + background: url(../img/num-nor.png?__sprite) no-repeat; +} +.btm-bk .btm-hl { + background: url(../img/num-hl.png?__sprite) no-repeat; +} +.btm-bk .btm-tle { + color: #2e2e2e; + font-size: 15px; + font-weight: bold; + line-height: 36px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.btm-bk .btm-juan { + margin-top: 5px; + margin-bottom: 5px; +} +.btm-bk .btm-juan, +.btm-bk .btm-money { + text-align: left; + padding-left: 34px; + height: 18px; + line-height: 18px; + color: #848484; + font-size: 12px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.btm-bk .btm-juan .i-juan, +.btm-bk .btm-money .i-money { + width: 18px; + height: 18px; + float: left; + margin-right: 8px; +} +.btm-bk .btm-juan .i-juan { + background: url(../img/juan.png?__sprite) no-repeat; +} +.btm-bk .btm-money .i-money { + background: url(../img/money.png?__sprite) no-repeat; +} +.btm-bk .btm-btn { + display: inline-block; + margin: 22px auto 0; + height: 32px; + line-height: 32px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding-left: 14px; + padding-right: 22px; + border: 1px solid #D4D4D4; + background-color: #F7F7F7; + background-image: -moz-linear-gradient(top, #FFFFFF, #F2F2F2); + background-image: -webkit-linear-gradient(top, #FFFFFF, #F2F2F2); + background-image: -ms-linear-gradient(top, #FFFFFF, #F2F2F2); + background-image: -o-linear-gradient(top, #FFFFFF, #F2F2F2); + background-image: linear-gradient(top, #FFFFFF, #F2F2F2); + font-size: 14px; + color: #696969; + max-width: 142px; +} +.btm-bk .btm-btn:hover { + border-color: #E4E3E3; + background-color: #FCFCFC; + background-image: -moz-linear-gradient(top, #FFFFFF, #F9F9F9); + background-image: -webkit-linear-gradient(top, #FFFFFF, #F9F9F9); + background-image: -ms-linear-gradient(top, #FFFFFF, #F9F9F9); + background-image: -o-linear-gradient(top, #FFFFFF, #F9F9F9); + background-image: linear-gradient(top, #FFFFFF, #F9F9F9); + font-size: 14px; + color: #696969; + max-width: 142px; +} +.btm-bk .btm-btn .i-bk { + float: left; + width: 18px; + height: 18px; + margin-right: 12px; + margin-top: 8px; + background: url(../img/book.png?__sprite) no-repeat; +} +.btm-bk .btm-bd { + padding-top: 20px; + position: relative; +} +.btm-bk .prev, .btm-bk .next { + position: absolute; + height: 32px; + width: 15px; + top: 116px; + cursor: pointer; +} +.btm-bk .prev span, .btm-bk .next span { + display: none; +} +.btm-bk .prev { + left: 9px; + background: url(../img/i-image-pre.png?__sprite) no-repeat; +} +.btm-bk .prev:hover { + background: url(../img/i-image-pre_hover.png?__sprite) no-repeat; +} +.btm-bk .next { + right: 13px; + background: url(../img/i-image-next.png?__sprite) no-repeat; +} +.btm-bk .next:hover { + background: url(../img/i-image-next_hover.png?__sprite) no-repeat; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-book/rtl/rtl.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/bottom-ecommerce-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/bottom-ecommerce-async.js new file mode 100755 index 000000000..607dde19d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/bottom-ecommerce-async.js @@ -0,0 +1,191 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var cycletabs = require('common:widget/ui/cycletabs/cycletabs.js'); +var helper = require("common:widget/ui/helper/helper.js"); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +require('common:widget/ui/jquery/widget/jquery.placeholder/jquery.placeholder.js'); + +var bottomEcommerce = function(){ + var goodslistUlTpl = '
                                ', + goodslistLiTpl = '
                              • ' + + '' + + '' + + '#{title}' + + '#{subtitle}' + + '#{price}' + + '' + +'
                              • ', + _conf = conf.bottomEcommerce.list, + duration = conf.bottomEcommerce.duration, + + init = function(){ + conf.dir == "ltr" ? switchTab(0) : switchTab( _conf.length - 1 ); + bindEvent(); + }, + //获取数据 + getData = function( index ){ + index = index || 0; + var bconf = _conf[index], + params = encodeURI("?act=contents&app="+bconf.app+"&country="+conf.country+"&category="+bconf.category+"&num="+bconf.num); + + $.ajax({ + url:conf.apiUrlPrefix+params, + dataType: "jsonp", + async:false, + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + cache: false, + + success:function(result){ + result = result.content.data.contents[bconf.category]; + renderGoodsList( result,index ); + }//, + // error:function(){ + + // } + }); + }, + //生成一个商品列表 + renderGoodsList = function( data,index ){ + var len = data.length, + content = "", + el = $(".e-goodslist-"+_conf[index].id), + mark = 5, + size = parseInt(len / mark,10), + temp = [], + cycData = []; + + size = len % mark == 0 ? size : (size + 1); + for(var i = 0;i < size; i++ ){ + temp.push(data.slice(mark * i,mark * i + mark)); + } + + for(var j = 0;j < temp.length;j++){ + content = ""; + for(var n = 0; n < temp[j].length; n++){ + var result = temp[j][n], + pr = $.trim(result.price.replace(/a partir de/, "")); + + if( conf.dir == "rtl" ){ + pr = pr.replace(/(.+?)([\d,]+)$/,function(all,des,price){ return ( ""+price+" " + des);}); + + } + var goodslistLi = helper.replaceTpl(goodslistLiTpl,{ + "title":result.title, + "link":result.link, + "subtitle":_conf[index].subtitle, + "imageUrl":result.img, + "price": pr + }); + + content += goodslistLi; + } + content = goodslistUlTpl+content+"
                              "; + cycData.push({"content" : content,"id" : j+1}); + } + if(cycData.length > 1){ + var options = { + offset: 0, + navSize: 1, + itemSize:958, + autoScroll: true, + dir:conf.dir, + autoScrollDirection:"forward", + autoDuration: duration || 5000, + scrollDuration: 400, + containerId: el, + data: cycData, + defaultId: 1 + }; + + cyc = new cycletabs.NavUI(); + cyc.init(options); + el.find(".e-goodslist-ul").width(958); + } else { + el.html( content ); + } + + el.attr("hasloaded","true"); + }, + //切换tab + switchTab = function( index ){ + var el = $(".e-goodslist-"+_conf[index].id); + + $(".e-goodslist-con").hide(); + el.show(); + !el.attr("hasloaded") && getData( index ); + switchForm( index ); + changeTabStyle( index ); + }, + //生成对应的供应商搜索框 + switchForm = function( index ){ + index = index || 0; + var form = $(".seller-form"), + param = "", + hideInput = '', + inputs = "", + data = _conf[index]; + + //搜索参数 + data.param && ( param = JSON.parse( data.param ) ); + + form.attr("action",_conf[index].action); + form.find(".seller-inputtext").attr("name",data.key); + + //供应商图标和名称 + $(".seller-title").text(data.sellerName); + $(".seller-link").attr("href",_conf[index].sellerUrl).find(".seller-img").attr("src",data.sellerIcon); + + //搜索参数 + form.find(".form-params").empty(); + if(param){ + for(var ob in param){ + inputs = inputs + helper.replaceTpl(hideInput,{"value":param[ob],"name":ob}); + }; + form.find(".form-params").append(inputs); + } + + $(".seller-inputtext").placeholder($(".seller-inputtext").attr("pl"),{ hideOnFocus:true,customClass: "seller-placeholder",customCss: {'color': '#CDCDC1'} }); + + }, + //生成tab的选中样式 + changeTabStyle = function( index ){ + index = index || 0; + var $this = $(".e-sellerstab").eq(index); + + $(".border-bottom").hide(); + $(".e-sellerstab").removeClass("e-sellerstab_click"); + $(".tab-arrow").hide(); + + $this.addClass("e-sellerstab_click"); + $this.find(".border-bottom").show(); + $this.find(".tab-arrow").show(); + }, + //绑定事件 + bindEvent = function(){ + $(".mod-bottom-ecommerce") + //tab切换 + .on("click",".e-sellerstab",function(){ + switchTab( $(this).index() ); + UT.send({ + modId:"bottom-ecommerce", + ac:"b", + type:"click", + position:"tabs" + }); + }) + //表单提交 + .on("submit",".seller-form",function(){ + UT.send({ + modId:"bottom-ecommerce", + type:"click", + position:"search" + }); + }); + }; + + init(); +}; + +module.exports = bottomEcommerce; + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/bottom-ecommerce.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/bottom-ecommerce.tpl new file mode 100755 index 000000000..426d1f90e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/bottom-ecommerce.tpl @@ -0,0 +1,47 @@ +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/bottom-ecommerce/ltr/ltr.css"%> <%else%> <%require name="home:widget/bottom-ecommerce/rtl/rtl.css"%> <%/if%> + + +
                              +
                              + <%foreach $body.bottomEcommerce.tabList as $value%> +
                              + <%/foreach%> +
                              +
                              + <%foreach $body.bottomEcommerce.tabList as $value%> + + + <%$value.name%> + + + + + + + <%/foreach%> +
                              +
                              + +<%script%> + conf.bottomEcommerce = { + list : <%json_encode($body.bottomEcommerce.tabList)%>, + duration:"<%$body.bottomEcommerce.autoDuration%>" + }; + require.async("home:widget/bottom-ecommerce/bottom-ecommerce-async.js", function (bottomEcommerce) { + bottomEcommerce(); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-next.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-next.png new file mode 100755 index 000000000..d6395551f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-next.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-next_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-next_hover.png new file mode 100755 index 000000000..1c526bd38 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-next_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-pre.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-pre.png new file mode 100755 index 000000000..dc67d6148 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-pre.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-pre_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-pre_hover.png new file mode 100755 index 000000000..a480ef456 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-image-pre_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-search.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-search.png new file mode 100755 index 000000000..ce0e5160b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/img/i-search.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/ltr/ltr.css new file mode 100755 index 000000000..3b0355887 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/ltr/ltr.css @@ -0,0 +1,359 @@ +.mod-bottom-ecommerce{ + position: relative; + background-color: white; + border: 1px solid #e3e5e6; +} +.mod-bottom-ecommerce .frame{ + position: relative; + display: inline-block; + height: 84%; + overflow: hidden; +} +.mod-bottom-ecommerce .frame-right{ + width: 100%; +} +.mod-bottom-ecommerce .e-icons .e-icons-ul{ + width: 100%; + height: 100%; + padding-left: 14px; + padding-top: 15px; + float: left; + margin-bottom: 20px; +} +.mod-bottom-ecommerce .e-icons-ul .e-icons-li{ + float:left; + display: inline-block; + width: 99px; + height: 55px; +} +.mod-bottom-ecommerce .e-icons .left{ + border-bottom: 1px dashed #e3e5e6; + border-right: 1px dashed #e3e5e6; +} +.mod-bottom-ecommerce .e-icons .right{ + border-bottom: 1px dashed #e3e5e6; +} + + +.mod-bottom-ecommerce .e-icons-li .e-icons-link{ + display: inline-block; + width: 99%; + height: 100%; +} +.mod-bottom-ecommerce .e-icons-li .e-icons-link:hover{ + background-color: #f3f3f3; +} +.mod-bottom-ecommerce .e-icons-link .e-icons-img{ + width: 85px; + height: 28px; + margin: 15px auto; + display: block; +} +.mod-bottom-ecommerce .e-hotwords .e-hotwords-ul{ + float: left; + width: 100%; + padding-left: 40px; +} +.mod-bottom-ecommerce .e-hotwords-ul li{ + margin-bottom: 10px; + list-style:square; + color: #a7a7a7; + +} +.mod-bottom-ecommerce .e-hotwords-ul li a{ + color: #595959; + font-size: 13px; +} +.mod-bottom-ecommerce .e-hotwords-ul li a:hover{ + text-decoration: underline; + color: #01b273; +} +.mod-bottom-ecommerce .e-searchbox{ + width: 98%; + height: 62px; + line-height: 62px; + background-color: white; + border-bottom:1px solid #E3E5E6; + margin: 0 auto; +} +.mod-bottom-ecommerce .e-searchbox .e-seller{ + height: 100%; + margin-left: 19px; + display: inline-block; + font-size: 25px; + font-color: #595959; +} +.mod-bottom-ecommerce .e-seller .seller-img{ + margin-left: 20px; + width: 67px; + height: 25px; + cursor: pointer; +} +.mod-bottom-ecommerce .seller-title{ + cursor: default; + color: #595959; +} +.mod-bottom-ecommerce .e-searchbox .seller-form{ + display: inline-block; + float: right; + height: 100%; + margin-right: 2px; + width: 40%; + white-space: nowrap; + position: relative; +} +.mod-bottom-ecommerce .seller-form .seller-input{ + width: 100%; + height: 31px; + line-height: 31px; + border: 1px solid #E3E5E6; + display: inline-block; + vertical-align: middle; + background-color: white; + border-radius: 2px; + position: relative; +} +.mod-bottom-ecommerce .seller-form .seller-submit{ + position: absolute; + z-index: 1; + right: 0px; + top: 17px; +} +.mod-bottom-ecommerce .seller-input .seller-inputtext{ + width: 266px; + border: 0 none; + position: absolute; + top: 8px; + left: 30px; +} +.mod-bottom-ecommerce .seller-input .seller-inputtext::-ms-clear{display: none;} +.mod-bottom-ecommerce .seller-input .seller-submit{ + border-top-left-radius: 0; + border-bottom-left-radius: 0; + float: right; + padding: 1px 10px 0 10px; +} +.mod-bottom-ecommerce .seller-input .seller-submit:hover{ + background-image:none; +} +.mod-bottom-ecommerce .seller-input .seller-tip{ + height: 32px; + line-height: 32px; + color: #CDCDC1; + position: absolute; + display: block; + top: 0; + left: 30px; +} +.mod-bottom-ecommerce .seller-input .i-search{ + position: absolute; + left: 3px; + top: 7px; + display: inline-block; + width: 23px; + height: 19px; + background: url(../img/i-search.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .frame-right .e-goodslist{ + width: 100%; + height: 291px; + position: relative; +} +.mod-bottom-ecommerce .e-goodslist .e-goodslist-con{ + margin:0 auto; + overflow: hidden; + height: 100%; + display: none; +} +.mod-bottom-ecommerce .e-goodslist .e-goodslist-con:first-child{ + display: block; +} +.mod-bottom-ecommerce .e-goodslist-con .e-goodslist-ul{ + height: 264px; + width: 100%; + padding-top:30px; + margin: 0 auto; +} +.mod-bottom-ecommerce .e-goodslist-ul .e-goodslist-li{ + height: 90%; + float: left; + width: 20%; + border-left:1px dashed #E3E5E6; + margin-left: -1px; +} +.mod-bottom-ecommerce .e-goodslist-ul .e-goodslist-li:first-child{ + border-left:0 none; +} +.mod-bottom-ecommerce .e-goodslist-li .e-links{ + display: block; + height: 90%; + width: 99%; + overflow: hidden; + position: relative; + padding-top: 23px; +} + +.mod-bottom-ecommerce .e-links .e-imgs{ + display: block; + height: 100px; + width: 100px; + margin: 0 auto; +} +.mod-bottom-ecommerce .e-links .e-imgs_hover{ + border: 1px solid #eaeaea; + margin-top: -1px; + margin-bottom: -1px; +} +.mod-bottom-ecommerce .e-links span{ + display: block; + text-align: left; + margin-left: 35px; +} +.mod-bottom-ecommerce .e-links .e-title{ + font-size: 16px; + color: #595959; + margin-top:10px; + margin-right: 15px; + height:38px; + overflow: hidden; +} +.mod-bottom-ecommerce .e-title:hover,.mod-bottom-ecommerce .e-price:hover{ + text-decoration: underline; +} + +.mod-bottom-ecommerce .e-links .e-subtitle{ + font-size: 12px; + color: #a6a6a6; + margin-top: 10px; +} +.mod-bottom-ecommerce .e-links .e-price{ + font-size: 20px; + color: #00a067; + margin-top: 5px; +} +.mod-bottom-ecommerce .frame-right .e-sellers{ + width: 100%; + height: 36px; + line-height: 34px; +} +.mod-bottom-ecommerce .e-sellers .e-sellerstab{ + float: left; + height: 100%; + text-align: center; + display: inline-block; + background-color: #fafafa; + border-top: 1px solid #e3e5e6; + border-left: 1px solid #e3e5e6; + padding-top: 1px; + margin-left: -1px; + position: relative; + background-image:-ms-linear-gradient(-180deg, #ffffff 0%, #f3f3f3 100%); + background-image:linear-gradient(-180deg, #ffffff 0%, #f3f3f3 100%); + color: #848484; + font-weight: 700; +} +.mod-bottom-ecommerce .e-sellers .e-sellerstab:hover{ + cursor: pointer; + background-image:-ms-linear-gradient(-180deg, #f7f7f7 0%, #fefefe 100%); + background-image:linear-gradient(-180deg, #ffffff 0%, #fafafa 100%); +} +.mod-bottom-ecommerce .e-sellers .e-sellerstab_click{ + cursor: pointer; + background-image:-ms-linear-gradient(-180deg, #f7f7f7 0%, #fefefe 100%); + background-image:linear-gradient(-180deg, #f7f7f7 0%, #fefefe 100%); +} +.mod-bottom-ecommerce .e-sellerstab .border-right{ + height:34px; + position:absolute; + width:1px; + background:white; + left:0; +} +.mod-bottom-ecommerce .e-sellerstab .border-bottom{ + height:2px; + position:absolute; + width:100%; + background:#01b273; + left:0; + bottom: 0; + display: none; +} +.mod-bottom-ecommerce .e-sellerstab .tab-arrow{ + display: none; +} +.mod-bottom-ecommerce .e-sellerstab .ui-bubble_out,.mod-bottom-ecommerce .e-sellerstab .ui-bubble_in{ + top: -2px; + left: 47%; + border-width: 7px; +} +.mod-bottom-ecommerce .e-sellerstab .ui-bubble_out{ + top: -1px; + border-top-color:#E3E5E6; +} +.mod-bottom-ecommerce .e-sellerstab .ui-bubble_in{ + border-top-color:white; +} +.mod-bottom-ecommerce .ctrl{ + font-size: 0; +} +.mod-bottom-ecommerce .ctrl p{ + position: absolute; + display: inline-block; + width: 15px; + height: 32px; + top: 113px; +} +.mod-bottom-ecommerce .ctrl .prev{ + left: 6px; + +} +.mod-bottom-ecommerce .ctrl .next{ + right: 6px; +} +.mod-bottom-ecommerce .ctrl span{ + display: block; + width: 100%; + height: 100%; + cursor: pointer; +} +.mod-bottom-ecommerce .arrow-prev{ + background: url(../img/i-image-pre.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .arrow-next{ + background: url(../img/i-image-next.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .arrow-prev:hover{ + background: url(../img/i-image-pre_hover.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .arrow-next:hover{ + background: url(../img/i-image-next_hover.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .nav-item-list{ + position: relative; +} +.mod-bottom-ecommerce .nav-item{ + float: left +} +.mod-bottom-ecommerce .wrap{ + overflow: hidden; + margin-left: 30px; +} +.mod-bottom-ecommerce .none{ + display: none !important; +} + + + + + + + + + + + + + + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/rtl/rtl.css new file mode 100755 index 000000000..5628fd1a5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-ecommerce/rtl/rtl.css @@ -0,0 +1,342 @@ +.mod-bottom-ecommerce{ + position: relative; + background-color: white; + border: 1px solid #e3e5e6; + margin-bottom: 10px; +} +.mod-bottom-ecommerce .frame{ + position: relative; + display: inline-block; + height: 84%; + overflow: hidden; +} +.mod-bottom-ecommerce .frame-right{ + width: 100%; +} +.mod-bottom-ecommerce .e-icons .e-icons-ul{ + width: 100%; + height: 100%; + padding-left: 14px; + padding-top: 15px; + float: right; + margin-bottom: 20px; +} +.mod-bottom-ecommerce .e-icons-ul .e-icons-li{ + float:right; + display: inline-block; + width: 99px; + height: 55px; +} +.mod-bottom-ecommerce .e-icons .left{ + border-bottom: 1px dashed #e3e5e6; + border-right: 1px dashed #e3e5e6; +} +.mod-bottom-ecommerce .e-icons .right{ + border-bottom: 1px dashed #e3e5e6; +} + + +.mod-bottom-ecommerce .e-icons-li .e-icons-link{ + display: inline-block; + width: 99%; + height: 100%; +} +.mod-bottom-ecommerce .e-icons-li .e-icons-link:hover{ + background-color: #f3f3f3; +} +.mod-bottom-ecommerce .e-icons-link .e-icons-img{ + width: 85px; + height: 28px; + margin: 15px auto; + display: block; +} +.mod-bottom-ecommerce .e-hotwords .e-hotwords-ul{ + float: right; + width: 100%; + padding-left: 40px; +} +.mod-bottom-ecommerce .e-hotwords-ul li{ + margin-bottom: 10px; + list-style:square; + color: #a7a7a7; + +} +.mod-bottom-ecommerce .e-hotwords-ul li a{ + color: #595959; + font-size: 13px; +} +.mod-bottom-ecommerce .e-hotwords-ul li a:hover{ + text-decoration: underline; + color: #01b273; +} +.mod-bottom-ecommerce .e-searchbox{ + width: 98%; + height: 62px; + line-height: 62px; + background-color: white; + border-bottom:1px solid #E3E5E6; + margin: 0 auto; +} +.mod-bottom-ecommerce .e-searchbox .e-seller{ + height: 100%; + margin-right: 19px; + display: inline-block; + font-size: 25px; + font-color: #595959; +} +.mod-bottom-ecommerce .e-seller .seller-img{ + margin-right: 20px; + width: 67px; + height: 25px; + cursor: pointer; +} +.mod-bottom-ecommerce .seller-title{ + cursor: default; + color: #595959; +} +.mod-bottom-ecommerce .e-searchbox .seller-form{ + display: inline-block; + float: left; + height: 100%; + margin-left: 2px; + width: 40%; +} +.mod-bottom-ecommerce .seller-form .seller-input{ + width: 100%; + height: 31px; + line-height: 31px; + border: 1px solid #E3E5E6; + display: inline-block; + vertical-align: middle; + background-color: white; + border-radius: 2px; + position: relative; +} +.mod-bottom-ecommerce .seller-input .seller-inputtext{ + width: 266px; + border: 0 none; + position: absolute; + top: 8px; + right: 30px; +} +.mod-bottom-ecommerce .seller-input .seller-inputtext::-ms-clear{display: none;} +.mod-bottom-ecommerce .seller-input .seller-submit{ + border-top-right-radius: 0; + border-bottom-right-radius: 0; + float: left; + padding: 1px 10px 0 10px; +} +.mod-bottom-ecommerce .seller-input .seller-submit:hover{ + background-image:none; +} +.mod-bottom-ecommerce .seller-input .seller-tip{ + height: 32px; + line-height: 32px; + color: #CDCDC1; + position: absolute; + display: block; + top: 0; + left: 30px; +} +.mod-bottom-ecommerce .seller-input .i-search{ + position: absolute; + right: 3px; + top: 7px; + display: inline-block; + width: 23px; + height: 19px; + background: url(../img/i-search.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .frame-right .e-goodslist{ + width: 100%; + height: 291px; + position: relative; +} +.mod-bottom-ecommerce .e-goodslist .e-goodslist-con{ + margin:0 auto; + overflow: hidden; + height: 100%; + display: none; +} +.mod-bottom-ecommerce .e-goodslist .e-goodslist-con:first-child{ + display: block; +} +.mod-bottom-ecommerce .e-goodslist-con .e-goodslist-ul{ + height: 264px; + width: 100%; + padding-top:30px; +} +.mod-bottom-ecommerce .e-goodslist-ul .e-goodslist-li{ + height: 90%; + float: right; + width: 20%; + border-right:1px dashed #E3E5E6; + margin-left: -1px; +} +.mod-bottom-ecommerce .e-goodslist-ul .e-goodslist-li:first-child{ + border-right:0 none; +} +.mod-bottom-ecommerce .e-goodslist-li .e-links{ + display: block; + height: 90%; + width: 99%; + overflow: hidden; + position: relative; + padding-top: 23px; +} + +.mod-bottom-ecommerce .e-links .e-imgs{ + display: block; + height: 100px; + width: 100px; + margin: 0 auto; +} +.mod-bottom-ecommerce .e-links .e-imgs_hover{ + border: 1px solid #eaeaea; + margin-top: -1px; + margin-bottom: -1px; +} +.mod-bottom-ecommerce .e-links span{ + display: block; + text-align: right; + margin-right: 35px; +} +.mod-bottom-ecommerce .e-links .e-title{ + font-size: 16px; + color: #595959; + margin-top:10px; + margin-left: 15px; + height:38px; + overflow: hidden; +} +.mod-bottom-ecommerce .e-title:hover,.mod-bottom-ecommerce .e-price:hover{ + text-decoration: underline; +} + +.mod-bottom-ecommerce .e-links .e-subtitle{ + font-size: 12px; + color: #a6a6a6; + margin-top: 10px; +} +.mod-bottom-ecommerce .e-links .e-price{ + font-size: 20px; + color: #00a067; + margin-top: 5px; +} +.mod-bottom-ecommerce .frame-right .e-sellers{ + width: 100%; + height: 36px; + line-height: 34px; +} +.mod-bottom-ecommerce .e-sellers .e-sellerstab{ + float: left; + height: 100%; + text-align: center; + display: inline-block; + background-color: #fafafa; + border-top: 1px solid #e3e5e6; + border-left: 1px solid #e3e5e6; + padding-top: 1px; + margin-left: -1px; + position: relative; + background-image:-ms-linear-gradient(-180deg, #ffffff 0%, #f3f3f3 100%); + background-image:linear-gradient(-180deg, #ffffff 0%, #f3f3f3 100%); + color: #848484; + font-weight: 700; +} +.mod-bottom-ecommerce .e-sellers .e-sellerstab:hover{ + cursor: pointer; + background-image:-ms-linear-gradient(-180deg, #f7f7f7 0%, #fefefe 100%); + background-image:linear-gradient(-180deg, #ffffff 0%, #fafafa 100%); +} +.mod-bottom-ecommerce .e-sellers .e-sellerstab_click{ + cursor: pointer; + background-image:-ms-linear-gradient(-180deg, #f7f7f7 0%, #fefefe 100%); + background-image:linear-gradient(-180deg, #f7f7f7 0%, #fefefe 100%); +} +.mod-bottom-ecommerce .e-sellerstab .border-right{ + height:34px; + position:absolute; + width:1px; + background:white; + left:0; +} +.mod-bottom-ecommerce .e-sellerstab .border-bottom{ + height:2px; + position:absolute; + width:100%; + background:#01b273; + left:0; + bottom: 0; + display: none; +} +.mod-bottom-ecommerce .e-sellerstab .tab-arrow{ + display: none; +} +.mod-bottom-ecommerce .e-sellerstab .ui-bubble_out,.mod-bottom-ecommerce .e-sellerstab .ui-bubble_in{ + top: -2px; + left: 47%; + border-width: 7px; +} +.mod-bottom-ecommerce .e-sellerstab .ui-bubble_out{ + top: -1px; + border-top-color:#E3E5E6; +} +.mod-bottom-ecommerce .e-sellerstab .ui-bubble_in{ + border-top-color:white; +} +.mod-bottom-ecommerce .seller-placeholder{ + right: 30px; +} +.mod-bottom-ecommerce .e-price span{ + display: inline; + margin-right: 0; +} +.mod-bottom-ecommerce .ctrl{ + font-size: 0; +} +.mod-bottom-ecommerce .ctrl p{ + position: absolute; + display: inline-block; + width: 15px; + height: 32px; + top: 113px; +} +.mod-bottom-ecommerce .ctrl .prev{ + left: 6px; + +} +.mod-bottom-ecommerce .ctrl .next{ + right: 6px; +} +.mod-bottom-ecommerce .ctrl span{ + display: block; + width: 100%; + height: 100%; + cursor: pointer; +} +.mod-bottom-ecommerce .arrow-prev{ + background: url(../img/i-image-pre.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .arrow-next{ + background: url(../img/i-image-next.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .arrow-prev:hover{ + background: url(../img/i-image-pre_hover.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .arrow-next:hover{ + background: url(../img/i-image-next_hover.png?__sprite) no-repeat; +} +.mod-bottom-ecommerce .nav-item-list{ + position: relative; +} +.mod-bottom-ecommerce .nav-item{ + float: right; +} +.mod-bottom-ecommerce .wrap{ + overflow: hidden; + margin-right: 30px; +} +.mod-bottom-ecommerce .none{ + display: none !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/bottom-vote-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/bottom-vote-async.js new file mode 100755 index 000000000..d425ce2b9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/bottom-vote-async.js @@ -0,0 +1,257 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var message = require('common:widget/ui/message/src/message.js'); +var bottomVote = {}; + +bottomVote.hasRequiredData = false; +bottomVote.init = function(){ + var that = this; + + that._conf = conf.bottomVote; + that.timer = null; + that.defaultSelected(); + that.renderResultPage(); + that.bindEvents(); + that.utPosition = that._conf.category; + +}; +bottomVote.defaultSelected = function(){ + $(".voteRadio").each(function(){ + if( !$(this).hasClass("disabled") ){ + $(this).addClass("voteRadio-check"); + return false; + } + }); +}; +bottomVote.bindEvents = function(){ + var that = this; + + $(".voteRadio").on("mouseenter",function(){ + if( $(this).hasClass("disabled") ){ + return; + } + + $(this).addClass("voteRadio-hover"); + }).on("mouseleave",function(){ + if( $(this).hasClass("disabled") ){ + return; + } + + $(this).removeClass("voteRadio-hover"); + }).on("click",function(){ + if( $(this).hasClass("disabled") ){ + return; + } + + $(".voteRadio").removeClass("voteRadio-check"); + $(this).addClass("voteRadio-check"); + UT.send({ + type:"click", + ac:"b", + position:"bottom"+that.utPosition, + modId:"bottom", + sort:"voteRadio" + }); + }); + + //不投票,查看结果 + $(".voteTitle .voteTitle-check").on("click",function(e){ + e.preventDefault(); + that.switchPage("go"); + that.requireData(); + that.timer && clearTimeout(that.timer); + UT.send({ + type:"click", + ac:"b", + position:"bottom"+that.utPosition, + modId:"bottom", + sort:"check" + }); + }); + //投票 + $(".voteBtnContatiner button").on("click",function(){ + var index = parseInt($(".voteRadio-check").attr("index"),10), + voteItem = $(".voteItem"); + + that.timer && clearTimeout(that.timer); + that.switchPage("go"); + + voteItem.removeClass("seleced"); + + UT.send({ + type:"click", + ac:"b", + position:"bottom"+that.utPosition, + modId:"bottom", + sort:"vote" + }); + that.requireData(index+1); + + }); + //回到投票页 + $(".backToVote").on("click",function(e){ + e.preventDefault(); + that.switchPage("back"); + UT.send({ + type:"click", + ac:"b", + position:"bottom"+that.utPosition, + modId:"bottom", + sort:"back" + }); + + }); + // 在屏幕尺寸变化时做相应的改变 + message.on("module.flow.switch",function(width){ + that.flowRender(); + }); +}; +bottomVote.votePercentAnimate = function(){ + $(".votePercent").each(function(){ + var thisobj = $(this); + thisobj.animate({height:thisobj.attr("per")}); + }); +}; +bottomVote.switchPage = function(d){ + var dir = $("html").attr("dir"), + dis = conf.curLayout == 1020 ? "-1020px" : "-960px"; + dis = d === "go"?dis:"15px"; + if(dir === "ltr"){ + if( d === "go" ){ + $(".votePage").animate({marginLeft: dis}, "slow",function(){ + $(this).hide(); + }); + } else { + $(".votePage").show().animate({marginLeft: dis}, "slow"); + } + + } + else{ + if( d === "go" ){ + $(".votePage").animate({marginRight: dis}, "slow",function(){ + $(this).hide(); + }); + } else { + $(".votePage").show().animate({marginRight: dis}, "slow"); + } + } +}; +bottomVote.renderResultPage = function(){ + var that = this, + tpl = '
                            • ' + + '0%' + + '' + + '' + + '
                            • ', + dom = "", + _conf = this._conf; + that.len = Math.min(_conf.list.length,Math.min(_conf.resultNum,12)); + + for( var i = 0 ;i < that.len ;i++ ){ + dom = dom + tpl; + } + $(".resultList","#bottomVote").append( dom ); + that.flowRender(); +}; +bottomVote.flowRender = function(){ + var that = this, + width = conf.curLayout == 1020 ? 992 : 935, + margin = (width-that.len*72) / (that.len-1), + dir = conf.dir == "ltr" ? "marginRight" : "marginLeft"; + $("#bottomVote").find(".voteItem").slice(0,that.len-1).css(dir,margin+"px"); +}; +bottomVote.formatResult = function( data ){ + if( this._conf.isSort ){ + for(var i = data.length-1;i > 0;i--){ + for(var j = 0;j < i;j++){ + if(data[j].n < data[j+1].n){ + var temp = data[j+1]; + data[j+1] = data[j]; + data[j] = temp; + } + } + } + } + + for(var n = 0;n < data.length;n++ ){ + data[n]["name"] = $("#bottomVote").find(".vote-title").eq(data[n].id-1).text(); + data[n]["r"] = this._conf.isSort ? n + 1 : data[n]["r"] ; + } + return data; +}; +bottomVote.itemSelected = function(){ + var index = parseInt($(".voteRadio-check").attr("index"),10), + voteItem = $(".voteItem"), + selectedItem = null, + that = this; + + if( that._conf.isSort ) { + voteItem.each(function(){ + var $this = $(this), + id = $this.attr("index"); + + if( index + 1 == parseInt(id,10) ){ + $this.addClass("seleced"); + selectedItem = $this; + return false; + } + }); + } else { + selectedItem = voteItem.eq(index); + selectedItem.addClass("seleced"); + } + + that.timer = setTimeout(function(){ + selectedItem && selectedItem.removeClass("seleced"); + },3000); + +}; + +bottomVote.requireData = function(id){ + var that = this, + params = "?app=vote&country="+conf.country+"&vote_id="+conf.bottomVote.vid+"&vnum="+conf.bottomVote.list.length, + _conf = that._conf, + rank = _conf.rank ? parseInt(_conf.rank,10) : 3; + + id = id || ""; + params = id ? params+"&id="+id+"&act=castVote":params+"&act=getVote"; + $(".i-rank").addClass("i-hide"); + + $.ajax({ + url:conf.apiUrlPrefix+params, + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + cache: false, + + success:function(result){ + $(".votePercent").height(0); + result = that.formatResult(result.content.data); + $(".voteItem").each(function(i){ + var $this = $(this); + + $this.attr("index",result[i].id); + $this.find(".votePercentNum").text(result[i].n); + $this.find(".votePercent").attr("per",result[i].p); + $this.find(".votePercentName").find("span").text(result[i].name); + $this.find(".i-hide").text(result[i].r); + if( !_conf.isSort ){ + result[i].r == 1 && $this.find(".i-hide").removeClass("i-hide"); + } else { + (i < rank ) && $this.find(".i-hide").removeClass("i-hide"); + } + + }); + id && that.itemSelected(); + setTimeout(function(){that.votePercentAnimate();},500); + that.hasRequiredData = true; + }, + error:function(){ + + } + }); + +}; + +module.exports = bottomVote; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/bottom-vote.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/bottom-vote.tpl new file mode 100755 index 000000000..b70e3db51 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/bottom-vote.tpl @@ -0,0 +1,42 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/bottom-vote/ltr/ltr.css"%> <%else%> <%require name="home:widget/bottom-vote/rtl/rtl.css"%> <%/if%> +
                              +
                              + +
                              +
                              + <%$body.bottomVote.title%> + <%$body.bottomVote.check%> +
                              +
                              + <%foreach $body.bottomVoteList as $bottomVoteValue%> + + + + <%$bottomVoteValue.voteName%> + + <%/foreach%> +
                              + +
                              +
                              +
                              +
                              + +
                              +
                                +
                              + <%$body.bottomVote.back%> +
                              +
                              + +<%script%> + conf.bottomVote = { vid:"<%$body.bottomVote.vid%>",list:<%json_encode($body.bottomVoteList)%>,resultNum:"<%$body.bottomVote.resultNum%>",isSort:"<%$body.bottomVote.isSort%>",rank:"<%$body.bottomVote.rank%>",category:"<%$body.bottomVote.category%>" }; + require.async('home:widget/bottom-vote/bottom-vote-async.js',function(bottomVote){ + bottomVote.init(); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..287ba0d0b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/flow/ltr/ltr.flow.css @@ -0,0 +1,7 @@ +.w1020 .mod-bottom-vote .votePage, +.w1020 .mod-bottom-vote .resultPage{ + width: 1005px; +} +.w1020 .mod-bottom-vote .voteItem{ + margin-right: 11px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/flow/rtl/rtl.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/flow/rtl/rtl.flow.css new file mode 100755 index 000000000..999334aff --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/flow/rtl/rtl.flow.css @@ -0,0 +1,7 @@ +.w1020 .mod-bottom-vote .votePage, +.w1020 .mod-bottom-vote .resultPage{ + width: 1005px; +} +.w1020 .mod-bottom-vote .voteItem{ + margin-left: 11px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-angel.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-angel.png new file mode 100755 index 000000000..53a9eefc0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-angel.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-dead.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-dead.png new file mode 100755 index 000000000..86a8e8d16 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-dead.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-leader.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-leader.png new file mode 100755 index 000000000..723a790e7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-leader.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-normal.png new file mode 100755 index 000000000..cd8471a00 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/br-vote-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-checkd.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-checkd.png new file mode 100755 index 000000000..19b754c76 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-checkd.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-hover.png new file mode 100755 index 000000000..5594e77a1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-normal.png new file mode 100755 index 000000000..a0e22223d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-radio-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-voteResult.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-voteResult.png new file mode 100755 index 000000000..cceb9d80c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-voteResult.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-voteResult2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-voteResult2.png new file mode 100755 index 000000000..54445b83e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/img/i-voteResult2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/ltr/ltr.css new file mode 100755 index 000000000..beea6752e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/ltr/ltr.css @@ -0,0 +1,169 @@ +.mod-bottom-vote{ + padding-top: 15px; + padding-bottom: 10px; + height: auto; + width: 210%; + float: left; +} +.mod-bottom-vote .votePage,.mod-bottom-vote .resultPage{ + width: 941px; + height: 100%; + float: left; + margin-left: 15px; + display: inline-block; +} +.mod-bottom-vote .resultPage{ + width: 960px; + height: 95px; + position: relative; + margin-top:-5px; +} +.mod-bottom-vote .voteReview,.mod-bottom-vote .voteVote{ + position: relative; + display: inline-block; + float: left; +} +.mod-bottom-vote .voteReview a, .mod-bottom-vote .voteReview img{ + width: 161px; + height: 79px; + display: block; +} +.mod-bottom-vote .voteVote{ + width: 711px; + padding: 0 30px; +} +.mod-bottom-vote .voteTitle{ + width: 100%; + height: 20px; + line-height: 20px; + font-size: 14px; + margin-bottom: 10px; +} +.mod-bottom-vote .voteTitle .voteTitle-check{ + float: right; + color: #00b075; + font-size: 13px; + cursor: pointer; +} +.mod-bottom-vote .votes{ + display: inline-block; + width: 105px; + height: 24px; + line-height: 24px; + overflow: hidden; + cursor: default; +} + +.mod-bottom-vote .bottomvoteIcon{ + display: inline-block; + height: 16px; + width: 16px; +} +.mod-bottom-vote .voteRadio{ + width: 12px; + height: 12px; + display: inline-block; + background: url(../img/i-radio-normal.png?__sprite) no-repeat; + cursor: pointer; + margin-bottom: -1px; + margin-right: 3px; +} +.mod-bottom-vote .voteRadio-hover{ + background: url(../img/i-radio-hover.png?__sprite) no-repeat; +} +.mod-bottom-vote .voteRadio-check{ + background: url(../img/i-radio-checkd.png?__sprite) no-repeat; +} +.mod-bottom-vote .voteBtnContatiner{ + position: absolute; + right: 30px; + top:32px; + top:34px\9; + width: 58px; + height: 43px; + background-color: #1db77e; +} +.mod-bottom-vote .voteBtnContatiner button{ + width: 100%; + height: 100%; + background: none; + border: 0 none; + color: white; +} + +.mod-bottom-vote .voteItem{ + width: 72px; + float: left; + cursor: default; +} +.mod-bottom-vote .voteItem.seleced{ + border:1px solid #65ad94; + margin-right: 6px; + margin-left: -1px; + margin-top: -1px; +} +.mod-bottom-vote .votePercentNum,.mod-bottom-vote .votePercentImage,.mod-bottom-vote .votePercentName{ + display: block; + text-align: center; +} +.mod-bottom-vote .votePercentImage{ + height: 56px; + width: 10px; + margin: 1px auto 2px auto; + border: 1px solid #d7d9d9; + background-color: #e3e6e6; + position: relative; +} +.mod-bottom-vote .votePercent{ + display: inline-block; + width: 100%; + border-left: 1px solid #65ad94; + border-right: 1px solid #65ad94; + border-bottom: 1px solid #65ad94; + background-color: #6dbca1; + height: 0%; + position: absolute; + bottom: -1px; + left: -1px; +} +.mod-bottom-vote .votePercentName{ + display: inline-block; + width: 100%; + height: 15px; + line-height: 15px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.mod-bottom-vote .votePercentName i{ + display: inline-block; + width: 14px; + height: 15px; + background: url(../img/i-voteResult.png?__sprite) no-repeat; + padding-right: 1px; + color: white; + font: 400 10px/17px Tahoma; + text-align: center; +} +.mod-bottom-vote i.i-hide{display: none;} +.mod-bottom-vote span.backToVote{ + position: absolute; + color: #00b075; + right: 30px; + top:-35px; + font: 13px Tahoma; + cursor: pointer; +} + +.mod-bottom-vote .size30 .votes{ + height: 34px; + line-height: 34px; + width: 160px; +} +.mod-bottom-vote .size30 .votes img{ + width: 30px; + height: 30px; +} +.mod-bottom-vote .size30 .voteReview img{ + height: 125px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/rtl/rtl.css new file mode 100755 index 000000000..50dcf3393 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom-vote/rtl/rtl.css @@ -0,0 +1,168 @@ +.mod-bottom-vote{ + padding-top: 15px; + padding-bottom: 10px; + height: auto; + width: 210%; +} +.mod-bottom-vote .votePage,.mod-bottom-vote .resultPage{ + width: 941px; + height: 100%; + float: right; + margin-right: 15px; + display: inline-block; +} +.mod-bottom-vote .resultPage{ + width: 960px; + height: 95px; + position: relative; + margin-top:-5px; + margin-left: 0; + margin-right: 15px; +} +.mod-bottom-vote .voteReview,.mod-bottom-vote .voteVote{ + position: relative; + display: inline-block; + float: right; +} +.mod-bottom-vote .voteReview a,.mod-bottom-vote .voteReview img{ + width: 161px; + height: 79px; + display: block; +} +.mod-bottom-vote .voteVote{ + width: 711px; + padding: 0 30px; +} +.mod-bottom-vote .voteTitle{ + width: 100%; + height: 20px; + line-height: 20px; + font-size: 14px; + margin-bottom: 10px; +} +.mod-bottom-vote .voteTitle .voteTitle-check{ + float: left; + color: #00b075; + font-size: 13px; + cursor: pointer; +} +.mod-bottom-vote .votes{ + display: inline-block; + width: 105px; + height: 24px; + line-height: 24px; + overflow: hidden; + cursor: default; +} +.mod-bottom-vote .bottomvoteIcon{ + display: inline-block; + height: 16px; + width: 16px; +} +.mod-bottom-vote .voteRadio{ + width: 12px; + height: 12px; + display: inline-block; + background: url(../img/i-radio-normal.png?__sprite) no-repeat; + cursor: pointer; + margin-bottom: -1px; + margin-right: 3px; +} +.mod-bottom-vote .voteRadio-hover{ + background: url(../img/i-radio-hover.png?__sprite) no-repeat; +} +.mod-bottom-vote .voteRadio-check{ + background: url(../img/i-radio-checkd.png?__sprite) no-repeat; +} +.mod-bottom-vote .voteBtnContatiner{ + position: absolute; + left: 30px; + top:32px; + top:34px\9; + width: 58px; + height: 43px; + background-color: #1db77e; +} +.mod-bottom-vote .voteBtnContatiner button{ + width: 100%; + height: 100%; + background: none; + border: 0 none; + color: white; +} + +.mod-bottom-vote .voteItem{ + width: 72px; + float: right; + cursor: default; +} +.mod-bottom-vote .voteItem.seleced{ + border:1px solid #65ad94; + margin-left: 6px; + margin-right: -1px; + margin-top: -1px; +} +.mod-bottom-vote .votePercentNum,.votePercentImage,.votePercentName{ + display: block; + text-align: center; +} +.mod-bottom-vote .votePercentImage{ + height: 56px; + width: 10px; + margin: 1px auto 2px auto; + border: 1px solid #d7d9d9; + background-color: #e3e6e6; + position: relative; +} +.mod-bottom-vote .votePercent{ + display: inline-block; + width: 100%; + border-left: 1px solid #65ad94; + border-right: 1px solid #65ad94; + border-bottom: 1px solid #65ad94; + background-color: #6dbca1; + height: 0%; + position: absolute; + bottom: -1px; + right: -1px; +} +.mod-bottom-vote .votePercentName{ + display: inline-block; + width: 100%; + height: 15px; + line-height: 15px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.mod-bottom-vote .votePercentName i{ + display: inline-block; + width: 14px; + height: 15px; + background: url(../img/i-voteResult.png?__sprite) no-repeat; + padding-left: 1px; + color: white; + font: 400 10px/17px Tahoma; + text-align: center; +} +.mod-bottom-vote i.i-hide{display: none;} +.mod-bottom-vote span.backToVote{ + position: absolute; + color: #00b075; + left: 30px; + top:-35px; + font: 13px Tahoma; + cursor: pointer; +} +.mod-bottom-vote .size30 .votes{ + height: 34px; + line-height: 34px; + width: 160px; +} +.mod-bottom-vote .size30 .votes img{ + width: 30px; + height: 30px; +} +.mod-bottom-vote .size30 .voteReview img{ + height: 125px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/bottom-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/bottom-async.js new file mode 100755 index 000000000..9f29aeef7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/bottom-async.js @@ -0,0 +1,51 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); + + +!function(){ + var tabContainer = $("#bottomTabs"), + tabsDom = tabContainer.find(".bottomTabs"), + length = tabsDom.length, + + init = function(){ + + $(".bottomContentItem:first").addClass("cur"); + bindEvents(); + + if(length === 1){ + tabsDom.addClass("title"); + return; + } + else{ + tabsDom.eq(0).addClass("cur"); + } + + }, + switchTab = function(tab){ + var $this = tab, + tabid = $this.attr("tabid"); + + $(".bottomContentItem").removeClass("cur"); + tabsDom.removeClass("cur"); + + $this.addClass("cur"); + $("#"+tabid).addClass("cur"); + $this.attr("mle") == "bottomImage" && Gl.bottomImage && Gl.bottomImage.init(tabid); + }, + bindEvents = function(){ + tabsDom.on("click",function(e){ + e.preventDefault(); + if(length !== 1 ){ + UT.send({ + type:"click", + position:"tabs", + sort:$(this).attr("tabid"), + modId:"bottom" + }); + switchTab($(this)); + } + }); + }; + + init(); +}(); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/bottom.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/bottom.tpl new file mode 100755 index 000000000..cf691186b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/bottom.tpl @@ -0,0 +1,42 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/bottom/ltr/ltr.css"%> <%else%> <%require name="home:widget/bottom/rtl/rtl.css"%> <%/if%> + +
                              + <%foreach $body.bottomTabs as $tabsValue%> + <%$tabsValue.title%> + + <%/foreach%> + +
                              +
                              + <%if !empty($body.bottomContent)%> + <%$bottomContent=explode(",",$body.bottomContent)%> + <%foreach $bottomContent as $mod%> + <%widget name="home:widget/`$mod`/`$mod`.tpl"%> + <%/foreach%> + <%/if%> + + +
                              + + + + <%script%> + + require.async('home:widget/bottom/bottom-async.js'); + <%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/img/dt-title-bg-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/img/dt-title-bg-rtl.png new file mode 100755 index 000000000..d3125680c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/img/dt-title-bg-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/img/dt-title-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/img/dt-title-bg.png new file mode 100755 index 000000000..ddfa97615 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/img/dt-title-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/ltr/ltr.css new file mode 100755 index 000000000..478f0ce78 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/ltr/ltr.css @@ -0,0 +1,104 @@ +.toolbar-v{ background: #F5F7F7; overflow: hidden;*position: relative;} +.toolbar-v a{ _display: inline; zoom: 1;} + +.toolbar-v .box-bot{ + line-height: 20px; + padding-bottom: 0; + height: 20px; + overflow: hidden; + margin-bottom: 18px; +} +#bottomTabs{ + position: relative; + width: 97%; + height: 38px; + border-bottom:1px solid #eceeee; + margin-left: 15px; +} +#bottomTabs a{ + display: inline-block; + width: 152px; + height: 38px; + line-height: 38px; + text-align: center; + vertical-align: middle; + font-size: 13px; + position: relative; + color:#686969; + font-weight: 600; +} +#bottomTabs a.title{ + cursor: default; + text-align: left; +} + +#bottomContent{ + position: relative; + width: 100%; + height: auto; + border-bottom:1px solid #eceeee; + float: left; +} +#bottomContent div.cur{ + display: block; +} +#bottomLinks{ + padding-top: 18px; + padding-left: 15px; + float: left; +} +.bottom_links-dd{ + display: inline-block; + width: 130px; + height: 19px; + line-height: 19px; + font-size: 13px; + font-weight: 600; + *float: left; + +} +.bottom_links-dd a{ + overflow: hidden; + white-space: nowrap; + text-overflow:ellipsis; + vertical-align: middle; + display: inline-block; + color:#595959; +} +.bottom_links-dd a:hover{ + background-color: #a7a7a7; + color: white; +} +.box-bot{ + padding-bottom: 18px; + *padding-bottom: 38px; +} + + +.bottomTabs .triangle{ + position: absolute; + bottom: 0; + border-color: transparent transparent #43c196 transparent; + border-style: dashed dashed solid dashed; + left: 70px; + display: none; +} +#bottomTabs a.cur{ + border-bottom: 2px solid #00b075; + margin-top: -2px; + padding-top: 2px; +} +a.cur .triangle{ + display: block; + +} +.bottomContentItem{ + display: none; +} +.toolbar-v .toolbar_menu{background: url(../img/dt-title-bg.png?__sprite) no-repeat;width: 114px;height: 19px; *float: left;} +.toolbar-v .toolbar_menu, +.toolbar-v .toolbar_menu a{ cursor: pointer; display:inline-block; padding-left: 3px;text-decoration: none;color: white;font-weight: 600;} + + + +.toolbar-v dd em{ float: right; color: #00b075; margin-right: 5px; font-size: 12px;} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/rtl/rtl.css new file mode 100755 index 000000000..1231af6e0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottom/rtl/rtl.css @@ -0,0 +1,99 @@ +.toolbar-v{ background: #F5F7F7; overflow: hidden;*position: relative;} +.toolbar-v a{ _display: inline; zoom: 1;} + +.toolbar-v .box-bot{ + line-height: 20px; + padding-bottom: 0; + height: 20px; + overflow: hidden; + margin-bottom: 18px; +} +#bottomTabs{ + position: relative; + width: 97%; + height: 38px; + border-bottom:1px solid #eceeee; + margin-right: 15px; +} +#bottomTabs a{ + display: inline-block; + width: 152px; + height: 38px; + line-height: 38px; + text-align: center; + vertical-align: middle; + font-size: 13px; + position: relative; + color:#686969; + font-weight: 600; +} +#bottomTabs a.title{ + cursor: default; + text-align: right; +} + +#bottomContent{ + position: relative; + width: 100%; + height: auto; + border-bottom:1px solid #eceeee; + float: right; +} +#bottomContent div.cur{ + display: block; +} +#bottomLinks{ + padding-top: 18px; + padding-right: 15px; + float: right; +} +.bottom_links-dd{ + display: inline-block; + width: 130px; + height: 19px; + line-height: 19px; + font-size: 13px; + font-weight: 600; + *float: right; +} +.bottom_links-dd a{ + overflow: hidden; + white-space: nowrap; + text-overflow:ellipsis; + vertical-align: middle; + display: inline-block; + color:#595959; + +} +.bottom_links-dd a:hover{ + background-color: #a7a7a7; + color: white; +} +.box-bot{ + padding-bottom: 18px; + *padding-bottom: 38px; +} + + +.bottomTabs .triangle{ + position: absolute; + bottom: 0; + border-color: transparent transparent #43c196 transparent; + border-style: dashed dashed solid dashed; + right: 70px; + display: none; +} +#bottomTabs a.cur{ + border-bottom: 2px solid #00b075; + padding-top: 2px; +} +a.cur .triangle{ + display: block; + +} +.bottomContentItem{ + display: none; +} +.toolbar-v .toolbar_menu{background: url(../img/dt-title-bg-rtl.png?__sprite) no-repeat;width: 114px;height: 19px;*float: right; } +.toolbar-v .toolbar_menu, +.toolbar-v .toolbar_menu a{ cursor: pointer; display:inline-block; padding-right: 3px;text-decoration: none;color: white;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/bottomImage-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/bottomImage-async.js new file mode 100755 index 000000000..f40d6761a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/bottomImage-async.js @@ -0,0 +1,162 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var helper = require("common:widget/ui/helper/helper.js"); +Gl.bottomImage = {}; + + +Gl.bottomImage.init = function( item ){ + var that = this; + that.divItem = $("#"+item); + that.requireData(); + +}; +Gl.bottomImage.switchImage = function(){ + var container = this.divItem; + var dir = $("html").attr("dir"); + var index = 0, + nums = parseInt(container.attr("nums"),10), + length = parseInt(nums/6), + pre = container.find(".bottomImagePre"), + next = container.find(".bottomImageNext"), + ul = container.find(".ul-list"), + isAnimated = true; + + length = nums%6 === 0?length-1:length; + ul.append( ul.find(".ul-list-li:first").clone() ); + container.find(".imageSwitch").on("click",function(){ + if( index == length+1 ) return; + var distance; + if( $(this).hasClass("bottomImagePre")){ + if( index == 0){ + ul.css({marginLeft:-926 * (length+1)+"px"}); + index = length + 1; + } + index--; + } else { + index++; + } + distance = -index * 926; + ul.stop().animate({marginLeft:distance+"px"},700,function(){ + isAnimated = false; + if( index == length+1 ){ + ul.css({marginLeft:0}); + index = 0; + } + isAnimated = true; + }); + UT.send({ + type:"click", + ac:"b", + position:"bottomImage", + modId:"bottom", + sort:"switchImage" + }); + + }); + +}; +Gl.bottomImage.requireData = function(){ + var that = this, + container = that.divItem, + data = container.attr("imageData"), + nums = container.attr("nums"), + type = container.attr("image-type"), + li = ""; + + + data.length && $.ajax({ + dataType:"jsonp", + url:data, + jsonp: "jsonp", + cache: false, + success:function(result){ + var ulNums = nums/6, + ultpl = '
                                ', + litpl = "", + ulList = container.find(".ul-list"), + imgUrl = "", + link = "", + title = "", + resultData = [], + i = 0; + + //图片二级页 + if( type == "image" ){ + for( i;i < result.data.length;i++ ){ + resultData.push({ link:"",src:"",title:""}); + resultData[i].link = result.data[i].from_url; + resultData[i].src = result.data[i].img_url; + } + litpl = '
                              • ' + +' ' + +' ' + +' ' + +'
                              • '; + //视频二级页 + } else if( type == "movie" ){ + for( i;i < result.list.length;i++ ){ + resultData.push({ link:"",src:"",title:""}); + resultData[i].link = "/movie/play?id="+result.list[i].id+"&from=hao123_undertab_video_"+conf.country; + resultData[i].src = result.list[i].internal_picture; + resultData[i].title = result.list[i].title; + } + litpl = '
                              • ' + +' ' + +' ' + +' ' + +' #{title}' + +' ' + +' ' + +'
                              • '; + //游戏二级页 + } else if( type == "game" ){ + for( i;i < result.data.length;i++ ){ + resultData.push({ link:"",src:""}); + resultData[i].link = result.data[i].url+"&from=hao123_bottom1_content_"+conf.country; + resultData[i].src = result.data[i].picture; + } + litpl = '
                              • ' + +' ' + +' ' + +' ' + +'
                              • '; + } + + + ulNums = nums%6 === 0 ? ulNums: ulNums+1; + ulList.width( 926*(ulNums+1) ); + container.find(".loadMessage").hide(); + for(var j=0;j'+helper.replaceTpl(ultpl,{"index":j})+''); + } + container.find(".bottom-image-ul").each(function(){ + var $this = $(this), + index = $this.attr("ul-index"); + for(var i=0;i +<%if $head.dir=='ltr'%> <%require name="home:widget/bottomImage/ltr/ltr.css"%> <%else%> <%require name="home:widget/bottomImage/rtl/rtl.css"%> <%/if%> + + <%foreach $body.bottomImage as $value%> +
                                + + +
                                + <%$value.load%> +
                                  +
                                  + +
                                  + <%/foreach%> + + + +<%script%> + require.async(['common:widget/ui/jquery/jquery.js','home:widget/bottomImage/bottomImage-async.js'],function($,bottomImage){ + Gl.bottomImage.init($(".imageSort:first").attr("id")); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..8fe41ca47 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/flow/ltr/ltr.flow.css @@ -0,0 +1,3 @@ +.w1020 .imageContainer{ + margin: 0 58px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/flow/rtl/rtl.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/flow/rtl/rtl.flow.css new file mode 100755 index 000000000..bef443b42 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/flow/rtl/rtl.flow.css @@ -0,0 +1,3 @@ +.w1020 .imageContainer{ + margin: 0 48px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-image-next.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-image-next.png new file mode 100755 index 000000000..fcb3426f5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-image-next.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-image-pre.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-image-pre.png new file mode 100755 index 000000000..481ed147c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-image-pre.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-play-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-play-hover.png new file mode 100755 index 000000000..173529124 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-play-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-play.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-play.png new file mode 100755 index 000000000..0e9f4a033 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/img/i-play.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/ltr/ltr.css new file mode 100755 index 000000000..3fbbf8cf2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/ltr/ltr.css @@ -0,0 +1,96 @@ +.imageSort{ + width: 100%; + height: 95px; + position: relative; + margin-left: 15px; + padding-top: 15px; +} +.bottomImagePre,.bottomImageNext{ + position: absolute; + display: inline-block; + height: 33px; + width: 15px; + top:40px; + cursor: pointer; + z-index: 1; +} +.bottomImagePre{ + left: 0; + background: url(../img/i-image-pre.png?__sprite) no-repeat; +} +.bottomImageNext{ + right: 37px; + background: url(../img/i-image-next.png?__sprite) no-repeat; +} +.imageContainer{ + position: relative; + width: 876px; + margin: 0 28px; + height: 81px; + overflow: hidden; +} +.imageContainer .ul-list{ + height: 100%; +} +.ul-list .ul-list-li{ + height: 100%; + width: 876px; + margin-right: 50px; + float: left; +} +.imageContainer .bottom-image-ul{ + height: 100%; + width: 100%; +} +.bottom-image-ul .bottomImageItem{ + float: left; + display: inline-block; + width: 136px; + height: 79px; + margin-right: 10px; + overflow: hidden; +} + +.bottomImageItem a,.bottomImageItem img{ + display: block; + width: 100%; + height: 100%; + position: relative; +} +.bottomImageItem a .image-title{ + position: absolute; + display: inline-block; + height: 19px; + line-height: 19px; + width: 100%; + background-color: #113414; + opacity: 0.6; + filter:alpha(opacity=60); + bottom: 0; + transition: height 0.3s; + color: white; + padding-left: 2px; + font-weight: 900; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.bottomImageItem a .i-play{ + position: absolute; + display: inline-block; + height: 33px; + width: 33px; + bottom: 30%; + left: 40%; + background: url(../img/i-play.png?__sprite) no-repeat; +} +.bottomImageItem a .i-play_hover{ + background: url(../img/i-play-hover.png?__sprite) no-repeat; +} +.loadMessage{ + position: absolute; + font-size: 22px; + text-align: center; + left: 350px; + top:25px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/rtl/rtl.css new file mode 100755 index 000000000..6336de3f1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottomImage/rtl/rtl.css @@ -0,0 +1,97 @@ +.imageSort{ + width: 100%; + height: 95px; + position: relative; + margin-right: 15px; + padding-top: 15px; +} +.bottomImagePre,.bottomImageNext{ + position: absolute; + display: inline-block; + height: 33px; + width: 15px; + top:40px; + cursor: pointer; + z-index: 1; +} +.bottomImagePre{ + left: 37px; + background: url(../img/i-image-pre.png?__sprite) no-repeat; +} +.bottomImageNext{ + right: 0; + background: url(../img/i-image-next.png?__sprite) no-repeat; +} +.imageContainer{ + position: relative; + width: 876px; + margin: 0 18px; + height: 81px; + overflow: hidden; +} +.imageContainer .ul-list{ + height: 100%; + float: left; +} +.ul-list .ul-list-li{ + height: 100%; + width: 876px; + margin-right: 50px; + float: left; +} +.imageContainer .bottom-image-ul{ + height: 100%; + width: 100%; +} +.bottom-image-ul .bottomImageItem{ + float: right; + display: inline-block; + width: 136px; + height: 79px; + margin-right: 10px; + overflow: hidden; +} +.bottomImageItem a,.bottomImageItem img{ + display: block; + width: 100%; + height: 100%; + position: relative; +} +.bottomImageItem a .image-title{ + position: absolute; + display: inline-block; + height: 19px; + line-height: 19px; + width: 100%; + background-color: #113414; + opacity: 0.6; + filter:alpha(opacity=60); + bottom: 0; + transition: height 0.3s; + color: white; + padding-right: 2px; + font-weight: 900; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +.bottomImageItem a .i-play{ + position: absolute; + display: inline-block; + height: 33px; + width: 33px; + bottom: 30%; + left: 40%; + background: url(../img/i-play.png?__sprite) no-repeat; +} +.bottomImageItem a .i-play_hover{ + background: url(../img/i-play-hover.png?__sprite) no-repeat; +} +.loadMessage{ + position: absolute; + font-size: 22px; + text-align: center; + left: 350px; + top:25px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/bottombar-c.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/bottombar-c.css new file mode 100755 index 000000000..af075879e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/bottombar-c.css @@ -0,0 +1,68 @@ +/* yj 20130328 */ + +/** 【Line2~22】已不再用,可以去掉 **/ +/*.heatsite{ height:275px; overflow: hidden;}*/ +/*.heatsite span{ margin-left: -3px!important; margin-right: -7px !important;}*/ +/*.heatsite-list{ float: left; height:280px; width: 128px; padding-right: 3px; letter-spacing:0; word-spacing:0; text-align:left; overflow: hidden; border-right: 1px solid #F3F3F3; margin-right: 5px;}*/ + +/*.heatsite-list li{ margin-top: 4px;}*/ +/*.heatsite-list a {*/ + /*display: block;*/ + /*overflow: hidden;*/ + /*line-height: 31px;*/ + /*height: 31px;*/ + /*width: 100%;*/ + /*text-indent: 8px;*/ + /*margin-left: 4px !important;*/ + /*white-space:nowrap; width: 100px; overflow: hidden;*/ + + /*padding-left: 28px;*/ + /*background-repeat: no-repeat;*/ + /*background-position: 3px 5px !important;*/ + /*background-image: url(http://th.hao123.com/resource/th/icon/dailynews-little.png);*/ +/*}*/ +/*.heatsite-list a:hover{ background-color: #e8eaeb;}*/ + + + +.toolbar-v{ background: #F5F7F7; height: 280px; overflow: hidden;} +.toolbar-v a{ _display: inline; zoom: 1;} + +.toolbar-v .box-bot{ + padding: 0; + line-height: 28px; +} +.toolbar-v .box-bot a{ display: block; padding: 5px 0; height: 23px; overflow: hidden;} +.toolbar-v .img{ position: relative; margin-bottom: 5px; padding-left: 0;} +.toolbar-v .img a{ height: auto; padding: 0;} +.toolbar-v .img a:hover{ background: none;} +.toolbar-v .img .i-toolbar{ position: absolute; left: 6px; top: -5px;} +.toolbar-v img{ margin-left: 8px; border: none;} +.toolbar-v .i-toolbar{ + width: 16px; + height: 16px; + display: inline-block; + margin: 3px 3px; + margin-left: 0; + *margin-top: 0; + float: left; +} +.toolbar-v .toolbar_menu, +.toolbar-v .toolbar_menu a{ cursor: pointer; display:inline-block; padding-left: 3px;} +.toolbar-v .toolbar_menu a:hover{ text-decoration: underline; color: #00B075; background:none;} +.toolbar-v dd{ padding-left: 5px;} + +.i-toolbar{ background: url(./img/i-lastnum-bg.png?__sprite) no-repeat; text-align: center; text-indent: -2px; color: #fff; overflow: hidden; -webkit-text-size-adjust: none; font: normal 10px/17px Tahoma;} +.i-toolbar-0, +.i-toolbar-1, +.i-toolbar-2{ background: url(./img/i-topnum-bg.png?__sprite) no-repeat;} +.toolbar-v dd em{ float: right; color: #00b075; margin-right: 5px; font-size: 12px;} + +.toolbar-v-rtl .i-toolbar{ float: right; text-indent: 2px; margin: 3px 0; margin-left: 5px;} +.toolbar-v-rtl dd { padding-left: 0; padding-right: 5px;} + +.toolbar-v-rtl .img .i-toolbar { left: auto; right: 3px;} +.toolbar-v-rtl .toolbar_menu { padding-right: 5px;} +.toolbar-v-rtl dd em { float: left;} + +.toolbar-v .toolbar_menu a{padding-bottom:10px;padding-top:10px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/bottombar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/bottombar.tpl new file mode 100755 index 000000000..6aadb9841 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/bottombar.tpl @@ -0,0 +1,34 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/bottombar/ltr/ltr.css"%> <%else%> <%require name="home:widget/bottombar/rtl/rtl.css"%> <%/if%> + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/img/i-lastnum-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/img/i-lastnum-bg.png new file mode 100755 index 000000000..d412460fc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/img/i-lastnum-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/img/i-topnum-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/img/i-topnum-bg.png new file mode 100755 index 000000000..54445b83e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/img/i-topnum-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/ltr/ltr.css new file mode 100755 index 000000000..741882dab --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/ltr/ltr.css @@ -0,0 +1,45 @@ +@import url('/widget/bottombar/bottombar-c.css?__inline'); + +/** +底部分类导航区样式,需要和/common/css/heatsite.css合并(heatsite.css中【Line2~22】已不再用,可以去掉) +*/ + +/*bottom*/ +.box-bot .t { + /*_padding-top: 6px; + font-family: Arial;*/ + font-size: 14px; + font-weight:600; +} +.box-bot .t a {color:#5a5a5a;} +.box-bot { + /*font-size: 12px;*/ + padding: 8px; + line-height:30px;/*letter-spacing:-.3em; *letter-spacing:normal; word-spacing:-.3em;*/ + background:#F5F7F7; +} +.box-bot_inner { + /* overflow:hidden; + height: 32px; + width: 938px;*/ +} +.box-bot li { + /*float:left;*/ + display:inline; + overflow:hidden; + padding-right:10px; +} +.box-bot a{ vertical-align:baseline; height: 22px; line-height: 22px; display: inline-block; *display:inline; + *zoom:1; padding: 0 7px;color: #595959;} +.box-bot a:hover{ background-color:#e8eaeb; border-radius:2px; } +/* +.box-bot span{ display:inline-block;*display:inline;zoom:1;vertical-align:top; width:67px; overflow:hidden; overflow:hidden; letter-spacing:normal; word-spacing:normal; margin-right:18px;} +*/ +.box-bot .m { + padding-right:0; + float:right; +} +.box-bot .m a { + color:#919191; +} +.box-bot .m i{display: inline-block; *display:inline; vertical-align: 1px; padding-left:5px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/rtl/rtl.css new file mode 100755 index 000000000..bb04e2183 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bottombar/rtl/rtl.css @@ -0,0 +1,45 @@ +@import url('/widget/bottombar/bottombar-c.css?__inline'); + +/** +底部分类导航区样式,需要和/common/css/heatsite.css合并(heatsite.css中【Line2~22】已不再用,可以去掉) +*/ + +/*bottom*/ +.box-bot .t { + /*_padding-top: 6px;*/ + font-size: 14px; + font-weight:600; +} +.box-bot .t a {color:#5a5a5a;} +.box-bot { + /*font-size: 12px;*/ + padding: 8px; + line-height:30px;/*letter-spacing:-.3em; *letter-spacing:normal; word-spacing:-.3em;*/ + background:#F5F7F7; +} +.box-bot_inner { + /* overflow:hidden; + height: 32px; + width: 938px;*/ +} +.box-bot li { + /*float:left;*/ + display:inline; + overflow:hidden; + padding-left:10px; + *padding-left: 8px; +} +.box-bot a{ vertical-align:baseline; height: 22px; line-height: 22px; display: inline-block; *display:inline; + *zoom:1; padding: 0 7px;color: #595959;} +.box-bot a:hover{ background-color:#e8eaeb; border-radius:2px; } +/* +.box-bot span{ display:inline-block;*display:inline;zoom:1;vertical-align:top; width:67px; overflow:hidden; overflow:hidden; letter-spacing:normal; word-spacing:normal; margin-right:18px;} +*/ +.box-bot .m { + padding-left:0; + float:left; +} +.box-bot .m a { + color:#919191; +} +.box-bot .m i{display: inline-block; *display:inline; vertical-align: 1px; padding-left:5px;} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/br-bottom-vote-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/br-bottom-vote-async.js new file mode 100755 index 000000000..ef8ae07ef --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/br-bottom-vote-async.js @@ -0,0 +1,218 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); + +var brBottomVote = {}; + +brBottomVote.hasRequiredData = false; +brBottomVote.init = function(){ + var that = this; + that.timer = null; + that.defaultSelected(); + that.renderResult(); + that.bindEvents(); + + +}; +brBottomVote.defaultSelected = function(){ + $(".voteRadio").each(function(){ + if( !$(this).parent().hasClass("playerdead") ){ + $(this).addClass("voteRadio-check"); + return false; + } + }); +}; +brBottomVote.bindEvents = function(){ + var that = this; + + $(".votes").on("mouseenter",function(){ + if( $(this).hasClass("playerdead") ){ + return; + } + + $(this).find(".voteRadio").addClass("voteRadio-hover"); + }); + $(".votes").on("mouseleave",function(){ + if( $(this).hasClass("playerdead") ){ + return; + } + + $(this).find(".voteRadio").removeClass("voteRadio-hover"); + }); + $(".votes").on("click",function(){ + if( $(this).hasClass("playerdead") ){ + return; + } + + $(".voteRadio").removeClass("voteRadio-check"); + $(this).find(".voteRadio").addClass("voteRadio-check"); + UT.send({ + type:"click", + ac:"b", + position:"voteRadio", + modId:"bottom-vote" + }); + }); + + //不投票,查看结果 + $(".voteTitle .voteTitle-check").on("click",function(e){ + e.preventDefault(); + that.switchPage("go"); + that.requireData(); + that.timer && clearTimeout(that.timer); + UT.send({ + type:"click", + ac:"b", + position:"check", + modId:"bottom-vote" + }); + }); + //投票 + $(".voteBtnContatiner button").on("click",function(){ + var index = parseInt($(".voteRadio-check").attr("index"),10); + that.timer && clearTimeout(that.timer); + that.switchPage("go"); + $(".voteItem").removeClass("seleced"); + UT.send({ + type:"click", + ac:"b", + position:"vote", + modId:"bottom-vote" + }); + that.requireData(index); + + }); + //回到投票页 + $(".backToVote").on("click",function(e){ + e.preventDefault(); + that.switchPage("back"); + UT.send({ + type:"click", + ac:"b", + position:"back", + modId:"bottom-vote" + }); + + }); + +}; +brBottomVote.votePercentAnimate = function(){ + $(".votePercent").each(function(){ + var thisobj = $(this); + thisobj.animate({height:thisobj.attr("per")}); + }); +}; +brBottomVote.switchPage = function(d){ + var dir = $("html").attr("dir"), + dis = conf.layout1020 ? "-1020px" : "-960px"; + + dis = d === "go"?dis:"15px"; + if(dir === "ltr"){ + if( d === "go" ){ + $(".votePage").animate({marginLeft: dis}, "slow",function(){ + $(this).hide(); + }); + } else { + $(".votePage").show().animate({marginLeft: dis}, "slow"); + } + + } + else{ + if( d === "go" ){ + $(".votePage").animate({marginRight: dis}, "slow",function(){ + $(this).hide(); + }); + } else { + $(".votePage").show().animate({marginRight: dis}, "slow"); + } + } +}; +brBottomVote.itemSelected = function(){ + var index = parseInt($(".voteRadio-check").attr("index"),10), + voteItem = $(".voteItem"), + selectedItem = null, + that = this; + + voteItem.each(function(){ + var $this = $(this), + id = $this.attr("playerid"); + + if( index == parseInt(id,10) ){ + $this.addClass("seleced"); + selectedItem = $this; + return false; + } + }); + that.timer = setTimeout(function(){ + selectedItem && selectedItem.removeClass("seleced"); + },3000); + +}; +brBottomVote.requireData = function(id){ + var that = this, + params = "?app=vote&country="+conf.country+"&vote_id="+conf.brBottomVote.vid+"&vnum="+conf.brBottomVote.list.length; + id = id || ""; + params = id ? params+"&id="+id+"&act=castVote":params+"&act=getVote"; + //$(".i-rank").addClass("i-hide"); + + $.ajax({ + url:conf.apiUrlPrefix+params, + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + cache: false, + + success:function(result){ + $(".votePercent").height(0); + result = that.sortResult(result.content.data); + $(".voteItem").each(function(i){ + var $this = $(this); + $this.attr("playerid",result[i].id); + $this.find(".votePercentNum").text(result[i].n); + $this.find(".votePercent").attr("per",result[i].p); + $this.find(".votePercentName").find("span").text(result[i].name); + $this.find(".i-hide").text(i+1); + ( i < 3 ) && $this.find(".i-hide").addClass("i-rank"); + }); + id && that.itemSelected(); + setTimeout(function(){that.votePercentAnimate();},500); + that.hasRequiredData = true; + }, + error:function(){ + + } + }); + +}; + +brBottomVote.renderResult = function(){ + var tpl = '
                                • ' + + '0%' + + '' + + '' + + '
                                • ', + dom = ""; + + for( var i = 0 ;i < 10 ;i++ ){ + dom = dom + tpl; + } + $(".resultList",".mod-br-bottom-vote").append( dom ); +}; + +brBottomVote.sortResult = function( data ){ + for(var i = data.length-1;i > 0;i--){ + for(var j = 0;j < i;j++){ + if(data[j].n < data[j+1].n){ + var temp = data[j+1]; + data[j+1] = data[j]; + data[j] = temp; + } + } + } + for(var n = 0;n < data.length;n++ ){ + data[n]["name"] = $(".votes").eq(data[n].id-1).find("span").text(); + } + return data; +}; + +module.exports = brBottomVote; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/br-bottom-vote.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/br-bottom-vote.tpl new file mode 100755 index 000000000..b67cc7d54 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/br-bottom-vote.tpl @@ -0,0 +1,42 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/br-bottom-vote/ltr/ltr.css"%> <%else%> <%require name="home:widget/br-bottom-vote/rtl/rtl.css"%> <%/if%> +
                                  +
                                  + +
                                  +
                                  + <%$body.brBottomVote.title%> + <%$body.brBottomVote.check%> +
                                  +
                                  + <%foreach $body.brBottomVoteList as $bottomVoteValue%> + + + + <%$bottomVoteValue.playerName%> + + <%/foreach%> +
                                  + +
                                  +
                                  +
                                  +
                                  + +
                                  +
                                    +
                                  + <%$body.brBottomVote.back%> +
                                  +
                                  + +<%script%> + conf.brBottomVote = { vid:"<%$body.brBottomVote.vid%>",list:<%json_encode($body.brBottomVoteList)%> }; + require.async('home:widget/br-bottom-vote/br-bottom-vote-async.js',function(brBottomVote){ + brBottomVote.init(); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..996b8c692 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/flow/ltr/ltr.flow.css @@ -0,0 +1,7 @@ +.w1020 .mod-br-bottom-vote .votePage, +.w1020 .mod-br-bottom-vote .resultPage{ + width: 1005px; +} +.w1020 .mod-br-bottom-vote .voteItem{ + margin-right: 11px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/flow/rtl/rtl.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/flow/rtl/rtl.flow.css new file mode 100755 index 000000000..a55398f7a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/flow/rtl/rtl.flow.css @@ -0,0 +1,7 @@ +.w1020 .mod-br-bottom-vote .votePage, +.w1020 .mod-br-bottom-vote .resultPage{ + width: 1005px; +} +.w1020 .mod-br-bottom-vote .voteItem{ + margin-left: 11px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-angel.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-angel.png new file mode 100755 index 000000000..53a9eefc0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-angel.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-dead.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-dead.png new file mode 100755 index 000000000..86a8e8d16 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-dead.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-leader.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-leader.png new file mode 100755 index 000000000..723a790e7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-leader.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-normal.png new file mode 100755 index 000000000..cd8471a00 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/br-vote-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-checkd.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-checkd.png new file mode 100755 index 000000000..19b754c76 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-checkd.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-hover.png new file mode 100755 index 000000000..5594e77a1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-normal.png new file mode 100755 index 000000000..a0e22223d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-radio-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-voteResult.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-voteResult.png new file mode 100755 index 000000000..cceb9d80c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-voteResult.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-voteResult2.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-voteResult2.png new file mode 100755 index 000000000..54445b83e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/img/i-voteResult2.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/ltr/ltr.css new file mode 100755 index 000000000..ccb227a78 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/ltr/ltr.css @@ -0,0 +1,174 @@ +.mod-br-bottom-vote{ + padding-top: 15px; + padding-bottom: 10px; + height: auto; + width: 210%; + float: left; +} +.mod-br-bottom-vote .votePage,.mod-br-bottom-vote .resultPage{ + width: 941px; + height: 100%; + float: left; + margin-left: 15px; + display: inline-block; +} +.mod-br-bottom-vote .resultPage{ + width: 960px; + position: relative; + margin-top:-5px; +} +.mod-br-bottom-vote .voteReview,.voteVote{ + position: relative; + display: inline-block; + float: left; +} +.mod-br-bottom-vote .voteReview a, .voteReview img{ + width: 161px; + height: 90px; + display: block; +} +.mod-br-bottom-vote .voteVote{ + width: 766px; + padding-left: 14px; +} +.mod-br-bottom-vote .voteTitle{ + width: 755px; + height: 20px; + line-height: 20px; + font-size: 14px; + margin-bottom: 10px; +} +.mod-br-bottom-vote .voteTitle-title{ + text-shadow: 0px 0 0 #686969; +} +.mod-br-bottom-vote .voteTitle .voteTitle-check{ + float: right; + color: #00b075; + font-size: 14px; + cursor: pointer; +} +.mod-br-bottom-vote .votes{ + display: inline-block; + width: 106px; + height: 24px; + line-height: 24px; + overflow: hidden; + cursor: pointer; +} + +.mod-br-bottom-vote .bottomVoteIcon{ + display: inline-block; + height: 16px; + width: 16px; + margin-bottom: -3px; +} +.mod-br-bottom-vote .voteRadio{ + width: 12px; + height: 12px; + display: inline-block; + background: url(../img/i-radio-normal.png?__sprite) no-repeat; + cursor: pointer; + margin-bottom: -1px; + margin-right: 3px; +} +.mod-br-bottom-vote .voteRadio-hover{ + background: url(../img/i-radio-hover.png?__sprite) no-repeat; +} +.mod-br-bottom-vote .voteRadio-check{ + background: url(../img/i-radio-checkd.png?__sprite) no-repeat; +} +.mod-br-bottom-vote .voteBtnContatiner{ + position: absolute; + right: 85px; + top:-3px; + width: 63px; + height: 22px; + background-color: #1db77e; + border: 1px solid #169c64; + border-radius: 2px; +} +.mod-br-bottom-vote .voteBtnContatiner button{ + width: 100%; + height: 100%; + background: none; + border: 0 none; + color: white; + font-size: 13px; +} + +.mod-br-bottom-vote .voteItem{ + width: 88px; + float: left; + margin-right: 7px; + cursor: default; +} +.mod-br-bottom-vote .voteItem.seleced{ + border:1px solid #65ad94; + margin-right: 6px; + margin-left: -1px; + margin-top: -1px; +} +.mod-br-bottom-vote .votePercentNum,.mod-br-bottom-vote .votePercentImage,.mod-br-bottom-vote .votePercentName{ + display: block; + text-align: center; +} +.mod-br-bottom-vote .votePercentImage{ + height: 56px; + width: 10px; + margin: 1px auto 2px auto; + border: 1px solid #d7d9d9; + background-color: #e3e6e6; + position: relative; +} +.mod-br-bottom-vote .votePercent{ + display: inline-block; + width: 100%; + border-left: 1px solid #65ad94; + border-right: 1px solid #65ad94; + border-bottom: 1px solid #65ad94; + background-color: #6dbca1; + height: 0%; + position: absolute; + bottom: -1px; + left: -1px; +} +.mod-br-bottom-vote .votePercentName{ + display: inline-block; + width: 100%; + height: 15px; + line-height: 15px; +} +.mod-br-bottom-vote .votePercentName .i-rank-green{ + display: inline-block; + width: 14px; + height: 15px; + background: url(../img/i-voteResult2.png?__sprite) no-repeat; + padding-right: 1px; + color: white; + font: 400 10px/17px Tahoma; + text-align: center; +} +.mod-br-bottom-vote .votePercentName .i-rank{ + background: url(../img/i-voteResult.png?__sprite) no-repeat; +} +.mod-br-bottom-vote i.i-hide{display: none;} +.mod-br-bottom-vote span.backToVote{ + position: absolute; + color: #00b075; + right: 30px; + top:-35px; + font: 13px Tahoma; + cursor: pointer; +} +.mod-br-bottom-vote .normal{ + background: url(../img/br-vote-normal.png?__sprite) no-repeat; +} +.mod-br-bottom-vote .leader{ + background: url(../img/br-vote-leader.png?__sprite) no-repeat; +} +.mod-br-bottom-vote .dead{ + background: url(../img/br-vote-dead.png?__sprite) no-repeat; +} +.mod-br-bottom-vote .angel{ + background: url(../img/br-vote-angel.png?__sprite) no-repeat; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/rtl/rtl.css new file mode 100755 index 000000000..c30bfd64d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-bottom-vote/rtl/rtl.css @@ -0,0 +1,154 @@ +.mod-br-bottom-vote{ + padding-top: 15px; + height: 110px; + width: 210%; +} +.mod-br-bottom-vote .votePage,.mod-br-bottom-vote .resultPage{ + width: 941px; + height: 100%; + float: right; + margin-right: 15px; + display: inline-block; +} +.mod-br-bottom-vote .resultPage{ + width: 960px; + position: relative; + margin-top:-5px; + margin-right: 0; + margin-left: 15px; +} +.mod-br-bottom-vote .astroReview,.mod-br-bottom-vote .astroVote{ + position: relative; + display: inline-block; + float: right; +} +.mod-br-bottom-vote .astroReview a,.mod-br-bottom-vote .astroReview img{ + width: 161px; + height: 79px; + display: block; +} +.mod-br-bottom-vote .astroVote{ + width: 711px; + padding: 0 30px; +} +.mod-br-bottom-vote .astroTitle{ + width: 100%; + height: 20px; + line-height: 20px; + font-size: 14px; + margin-bottom: 10px; +} +.mod-br-bottom-vote .astroTitle .astroTitle-check{ + float: left; + color: #00b075; + font-size: 13px; + cursor: pointer; +} +.mod-br-bottom-vote .astros{ + display: inline-block; + width: 105px; + height: 24px; + line-height: 24px; + overflow: hidden; + cursor: default; +} +.mod-br-bottom-vote .bottomAstroIcon{ + display: inline-block; + height: 16px; + width: 16px; + margin-bottom: -3px; +} + +.mod-br-bottom-vote .astroRadio{ + width: 12px; + height: 12px; + display: inline-block; + background: url(../img/i-radio-normal.png?__sprite) no-repeat; + cursor: pointer; + margin-bottom: -1px; + margin-right: 3px; +} +.mod-br-bottom-vote .astroRadio-hover{ + background: url(../img/i-radio-hover.png?__sprite) no-repeat; +} +.mod-br-bottom-vote .astroRadio-check{ + background: url(../img/i-radio-checkd.png?__sprite) no-repeat; +} +.mod-br-bottom-vote .voteBtnContatiner{ + position: absolute; + left: 30px; + top:32px; + top:34px\9; + width: 58px; + height: 43px; + background-color: #1db77e; +} +.mod-br-bottom-vote .voteBtnContatiner button{ + width: 100%; + height: 100%; + background: none; + border: 0 none; + color: white; +} + +.mod-br-bottom-vote .astroItem{ + width: 72px; + float: right; + margin-right: 7px; + cursor: default; +} +.mod-br-bottom-vote .astroItem.seleced{ + border:1px solid #65ad94; + margin-right: 6px; + margin-left: -1px; + margin-top: -1px; +} +.mod-br-bottom-vote .astroPercentNum,.mod-br-bottom-vote .astroPercentImage,.mod-br-bottom-vote .astroPercentName{ + display: block; + text-align: center; +} +.mod-br-bottom-vote .astroPercentImage{ + height: 56px; + width: 10px; + margin: 1px auto 2px auto; + border: 1px solid #d7d9d9; + background-color: #e3e6e6; + position: relative; +} +.mod-br-bottom-vote .astroPercent{ + display: inline-block; + width: 100%; + border-left: 1px solid #65ad94; + border-right: 1px solid #65ad94; + border-bottom: 1px solid #65ad94; + background-color: #6dbca1; + height: 0%; + position: absolute; + bottom: -1px; + right: -1px; +} +.mod-br-bottom-vote .astroPercentName{ + display: inline-block; + width: 100%; + height: 15px; + line-height: 15px; +} +.mod-br-bottom-vote .astroPercentName i{ + display: inline-block; + width: 14px; + height: 15px; + background: url(../img/i-astroResult.png?__sprite) no-repeat; + padding-left: 1px; + color: white; + font: 400 10px/17px Tahoma; + text-align: center; +} +.mod-br-bottom-vote i.i-hide{display: none;} +.mod-br-bottom-vote span.backToVote{ + position: absolute; + color: #00b075; + left: 30px; + top:-35px; + font: 13px Tahoma; + cursor: pointer; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-music-player/br-music-player-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-music-player/br-music-player-async.js new file mode 100755 index 000000000..2a265f1be --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-music-player/br-music-player-async.js @@ -0,0 +1,3 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); + +$('#musicPlayer').html(''); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-music-player/br-music-player.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-music-player/br-music-player.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-music-player/br-music-player.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-music-player/br-music-player.tpl new file mode 100755 index 000000000..1507a54a1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/br-music-player/br-music-player.tpl @@ -0,0 +1,4 @@ +
                                  +<%script%> + require.async('home:widget/br-music-player/br-music-player-async.js'); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/bus.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/bus.tpl new file mode 100755 index 000000000..0fe83d805 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/bus.tpl @@ -0,0 +1,164 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/bus/ltr/ltr.css"%> <%else%> <%require name="home:widget/bus/rtl/rtl.css"%> <%/if%> +
                                  +
                                  + +
                                  +

                                  + <%$body.bus.from%>: <%$body.bus.note1%> + +

                                  +

                                  + <%$body.bus.to%>: <%$body.bus.note2%> +

                                  +

                                  + <%$body.bus.transfer%>:  + + + + + + + + +

                                  +
                                  + +
                                  +
                                  +

                                  + + +

                                  + +

                                  + + : + + + + +

                                  +

                                  + <%$body.bus.order%>: + + +

                                  +

                                  + +

                                  +
                                  + +
                                  + <%$body.bus.text%> +
                                  +
                                  + <%script%> + require.async("common:widget/ui/jquery/jquery.js", function ($) { + $(window).one("e_go.bus", function () { + require.async(['home:widget/ui/bus/bus.js'],function(bus){ + bus(); + }); + }); + if(!$("#sideMagicBox #sideBus").length){ + $(window).trigger("e_go.bus"); + } + }); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..6ccaf4ae4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/flow/ltr/ltr.flow.css @@ -0,0 +1,37 @@ +/* For 1020px layout */ +.flow-on .bus-info { + margin: 0px 15px; + padding-top: 14px; +} +.flow-on .bus-info-detail { + margin: 0px 0px 14px; +} +.flow-on .bus-info-detail input[type=text] { + width: 176px; +} +.flow-on .bus-info-r { + margin-top: -104px; + margin-left: 240px; +} +.flow-on .bus-submit { + margin-left: 25px; + margin-bottom: 1px; + top: 1px; +} +.flow-on .bus-info-selet { + margin: 0 0 8px 55px; +} +.flow-on .bus-info-mesaage { + float: left; + line-height: 23px; +} +.flow-on #bus-method { + margin: 8px 0 0 0; +} +.flow-on .order-bus { + margin-right: 1px; +} +.flow-on #sidetoolbarContainer .bus-info { + margin-top: 0px; + padding-top: 14px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/img/exchange.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/img/exchange.png new file mode 100755 index 000000000..2f0374876 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/img/exchange.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/ltr/ltr.css new file mode 100755 index 000000000..cfad8e874 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/bus/ltr/ltr.css @@ -0,0 +1,141 @@ +.mod-bus { + background:#f3f5f6; + margin:0 auto; + color:#5a5a5a; +} +.bus-info { + margin-left:8px; + padding-top:10px; +} +.bus-info-detail { + margin-top: 13px; + position:relative; + +} +.bus-submit { + height:30px; + width:220px; + background:#5DB285; + cursor: pointer; + margin-bottom: 23px; + color: white; + border: 0; + border-radius: 5px; + font-size: 17px; + font-weight: bold; + position: relative; + top: 3px; +} +.charts_more { + display: block; + background: #f2f2f2; + height: 23px; + line-height: 23px; + text-align: right; + color: #00b075; + border-top: 1px solid #E3E5E6; + padding-right: 20px; + position: relative; +} +.bus-info-mesaage { + font-size: 15px; +} +#ym { + width: 106px; + margin-right: 18px; +} +#d { + width: 71px; +} +#m1 { + margin-left: 5px; + margin-right: 5px; +} +#m2 { + margin-right: 7px; +} +.bus-info-r { + position: absolute; + margin-right: 11px; + margin-top: -88px; + width: 25px; + height: 45px; + margin-left: 192px; +} +.bus-info-r i{ + cursor: pointer; +} +.bus-info-b { + position: relative; + top: 2px; +} +/*.radio-type { + position: relative; + top: 4px; + margin-right: 3px; +}*/ +.order-bus { + margin-right: 12px; +} +.from-position { + border: 1px solid #D9D9D9; + border-radius: 3px; + padding-left: 2px; + height:21px; +} +.to-position { + border: 1px solid #D9D9D9; + border-radius: 3px; + padding-left: 2px; + height:21px; +} +.via-position { + border: 1px solid #D9D9D9; + border-radius: 3px; + padding-left: 2px; + height: 21px; +} +.bus-note-info { + color: #BCBCBC; + cursor: text; + left: 55px; + top:5px; + position: absolute; +} +#mod-side-bus .charts_more { + color: #00b075; +} +.color_red { + border:1px solid red; +} +.color_gray { + border:1px solid #ccc; +} +.subBtn_color{ + background:-webkit-gradient(linear, 0 0, 0 100%, from(#51A274), to(#65B38D)); + background:-moz-linear-gradient(top, #51A274,#65B38D) +} +.bus-info-detail select { + height: 21px; +} +.bus-info-detail > select { + margin-right: 5px; +} +#bus-method { + margin-left: 12px; +} +.exchange { + background-image: url(../img/exchange.png?__sprite); + display: block; + width: 25px; + height: 45px; +} + + +/*显示模块*/ +.side-mod-preload-bus{ + +} +.side-mod-preload-bus > *{ + visibility: visible!important; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/charts.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/charts.tpl new file mode 100755 index 000000000..086728867 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/charts.tpl @@ -0,0 +1,79 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/charts/ltr/ltr.css"%> <%else%> <%require name="home:widget/charts/rtl/rtl.css"%> <%/if%> + + + +<%assign var="chartsOrder" value=","|explode:$body.charts.chartsOrder%> +
                                  + + + <%foreach $chartsOrder as $cmod%> + + <%/foreach%> +
                                  + <%script%> + <%if !empty($body.charts)%> + // 榜单模块 + + conf.charts = { + isLoop: <%$body.charts.loopOpts.open|default:0%>, + loopSpeed: <%$body.charts.loopOpts.speed|default:5000%> + }; + + <%if !empty($body.charts.notUseApi)%> + <%assign var="chartsNotUseApi" value=","|explode:$body.charts.notUseApi%> + <%foreach $chartsNotUseApi as $modNotUseApi%> + conf.charts["<%$modNotUseApi%>Data"] = <%json_encode($body["<%$modNotUseApi%>"].items)%>; + conf.charts["<%$modNotUseApi%>Config"] = <%json_encode($body["<%$modNotUseApi%>"].config)%>; + <%/foreach%> + <%/if%> + + require.async(["common:widget/ui/jquery/jquery.js", "common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"], function($) { + + $(window).one("e_go.charts", function (e , item) { + require.async(['home:widget/ui/charts/charts.js'],function(sideCharts){ + sideCharts(item); + }); + }); + if(!$("#sideMagicBox #sideCharts").length){ + $(window).trigger("e_go.charts"); + $(window).on("locate.charts" , function(e , item){ + //按照原有设计,此处应该在调用后解绑,但是由于jquery不支持多级名空间, + //所以。。。。只能如此了,但是此处的绑定仅是处理charts模块尚未初始化的情况 + if( $('.charts_menu').length === 0 ){ + $(window).trigger("e_go.charts" , item); + } + }); + } + }); + <%/if%> + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/charts.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/charts.flow.css new file mode 100755 index 000000000..a7eb97b97 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/charts.flow.css @@ -0,0 +1,62 @@ +/* For 300px layout */ +.flow-on .mod-charts .chartslist{ + padding:20px 13px 10px; + height:280px; +} +.flow-on .charts-imgitem{ + width:130px; + margin-bottom:10px; +} +.flow-on .charts-mask{ + width:130px; +} +.flow-on .charts-mode1 .charts-imgitem img{ + height:98px; +} +.flow-on .charts-mode1 .charts-mask{ + height:98px; +} +.flow-on .charts-mode2 .charts-imgitem img{ + height:130px; +} +.flow-on .charts-mode2 a:hover .charts-mask{ + height:130px; +} +.flow-on .charts-mode2 .charts-name { + width: 110px; +} +.flow-on .charts-mode3 .charts-imgitem img{ + height: 156px; +} +.flow-on .charts-mode3 a:hover .charts-mask{ + height:156px; +} +.flow-on .charts_error{ + top:140px; +} + +.flow-on .charts-mode4 .chartslist{ + height:200px; +} +.flow-on .charts-mode4 .container a img{ + width: 270px; + height: 184px; +} +/*bg icon for music chart*/ +.flow-on .charts-music .icon-bg{ + background: #f5f7f7 url(../img/charts-music-bg.png?__sprite) no-repeat; + width: 65px; + height: 65px; + position: absolute; + bottom: 15px; +} +.flow-on .charts-music ul{ + position: relative; +} +.flow-on .charts-song, +.flow-on .charts-singer{ + width: 195px; +} +.flow-on .charts-item{ + padding-bottom: 16px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..105d60386 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/ltr/ltr.flow.css @@ -0,0 +1,9 @@ +/* For 300px layout */ +@import url('/widget/charts/flow/charts.flow.css?__inline'); +.flow-on .charts-imgitem{ + margin-right:10px; +} +/*bg icon for music chart*/ +.flow-on .charts-music .icon-bg{ + right: 15px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/rtl/rtl.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/rtl/rtl.flow.css new file mode 100755 index 000000000..30418ab85 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/flow/rtl/rtl.flow.css @@ -0,0 +1,16 @@ +/* For 300px layout */ +@import url('/widget/charts/flow/charts.flow.css?__inline'); +.flow-on .charts-imgitem{ + margin-left:10px; +} +/*bg icon for music chart*/ +.flow-on .charts-music .icon-bg{ + left: 15px; + /*overturn image for rtl*/ + -moz-transform: scaleX(-1); + -o-transform: scaleX(-1); + -webkit-transform: scaleX(-1); + transform: scaleX(-1); + filter: FlipH; + -ms-filter: "FlipH"; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/i-charts_24.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/i-charts_24.png new file mode 100755 index 000000000..dd69116cd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/i-charts_24.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/i-charts_24.psd b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/i-charts_24.psd new file mode 100755 index 000000000..5b05a70b1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/i-charts_24.psd differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/btn-normal-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/btn-normal-bg.png new file mode 100755 index 000000000..bda10145b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/btn-normal-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-music-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-music-bg.png new file mode 100755 index 000000000..486d41fdb Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-music-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-order-bg-grey.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-order-bg-grey.png new file mode 100755 index 000000000..d412460fc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-order-bg-grey.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-order-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-order-bg.png new file mode 100755 index 000000000..54445b83e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/charts-order-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/selected-btn-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/selected-btn-bg.png new file mode 100755 index 000000000..bda10145b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/selected-btn-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/tab-normal-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/tab-normal-bg.png new file mode 100755 index 000000000..bda10145b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/img/tab-normal-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/ltr/ltr.css new file mode 100755 index 000000000..fd1816cc3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/ltr/ltr.css @@ -0,0 +1,169 @@ +/** +榜单模块样式 +*/ + +/*charts*/ +.mod-charts{/*height:303px;*/background:#f5f7f7;} +.mod-charts .mod-side{ + padding-bottom:3px; + /*padding-right:10px; + background:#f5f7f7;*/ + border:1px solid #fff; + border-bottom:0; + *padding-bottom:14px;/*IE<=7容器触发hasLayout导致其浮动子元素margin-bottom消失http://www.w3help.org/zh-cn/causes/RB1005*/ +} + +.charts-item{overflow:hidden;padding-bottom:6px;line-height:0;} +.charts_menu{border-left:1px solid #fff;border-right:1px solid #fff;/*for indivisible width percentage*/background:url(../img/tab-normal-bg.png?__sprite) repeat-x;} +.charts_menu li{/*display:inline-block;*/float:left;position:relative;} +.mod-charts .icon-new_red{position:absolute;right:0px;top:-5px;} +.charts_menu a{display:block;line-height:30px;background:url(../img/tab-normal-bg.png?__sprite) repeat-x;text-align:center;border:1px solid #edeff0;border-top-color:#fff;border-left:0;} +.charts_menu .cur{background:#f5f7f7;border-bottom-color:#f5f7f7;font-weight:600;color:#00b075;cursor:default;} +.charts_menu .last{border-right:0;} +.charts_menu a:hover{border-right-color:#e6e8e9;border-bottom-color:#e3e5e5;-moz-box-shadow:0px 2px 0px 0px rgba(227, 229, 229, 0.1);-webkit-box-shadow:0px 2px 0px 0px rgba(227, 229, 229, 0.1);box-shadow:0px 2px 0px 0px rgba(227, 229, 229, 0.1);font-weight:600;color:#00b075;} +.charts_menu .cur:hover{border-right-color:#edeff0;border-bottom-color:#f5f7f7;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;} +.charts_content{display:none;/*height:269px;*/position:relative;} +.charts_more{display:block;background:#f2f2f2;height:23px;line-height:23px;text-align:right;color:#00b075;border-top:1px solid #E3E5E6;padding-right:20px;position:relative;} +.charts_more:hover{background:#ebebeb;} +.charts_more .arrow_r{color:#3dc094;right:10px;top:-1px;padding-left:5px;font-size:20px;} +.charts-order{float:left;background:url(../img/charts-order-bg.png?__sprite) no-repeat;width:15px;height:15px;padding-top:3px;text-align:center;color:#fff;font-family:Tahoma;font-size:10px;margin:4px 9px 0 0;line-height:1;_display:inline;} +.charts-pic{float:left;display:block;width:33px;border:1px solid #F5F7F7;/*height:35px;*/margin:4px 9px 0 0;_display:inline;max-height: 33px;} +.charts-pic:hover{/*width:33px;height:33px;*/overflow:hidden;border:1px solid #3dc094;zoom:1;z-index:1;position:relative;} +.charts-pic img{display:block;width:100%;/*height:35px;*/} +.charts-pic:hover img{/*position:relative;top:-1px;left:-1px;z-index:0;*/} +.charts-order_grey{background:url(../img/charts-order-bg-grey.png?__sprite) no-repeat} +.charts-song,.charts-singer{overflow:hidden;zoom:1;display:inline-block;line-height:20px;width:135px;_width:133px;text-overflow:ellipsis;white-space:nowrap;/*word-wrap:break-word;*/_margin-left:-3px;} +.charts-song_l,.charts-singer_l{width:189px;} +.mod-charts .charts-singer{color:#999;} +.charts-song:hover,.charts-singer:hover{color:#00b075;} +.mod-charts .chartslist{position:relative;padding:15px 1px 0 10px;border-top:0;height:232px;overflow:hidden;zoom:1;font-size:0;} +.mod-charts .chartslist li{font-size:12px;} +.charts-music .chartslist{padding-top:10px;padding-bottom:15px;} +.charts-imgitem{display:inline-block;zoom:1;*display:inline;width:100px;position:relative;margin-bottom:16px;margin-right:8px;} +.charts-imgitem a{display:block;} +.charts-imgitem a:hover{color:#00b075;cursor:pointer;} + +.charts-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%;display:block;line-height:25px;} +.charts-imgitem img{display:block;width:100%;_vertical-align:top;} +.charts-mask{background:rgb(34,26,18);background:rgba(0,0,0,0.6);position:absolute;left:0;width:100px;} +.charts-imgitem .icon{background-image:url(../i-charts_24.png);_background-image:url(../../img/i-news_item.png);background-repeat:no-repeat;display:inline-block;} +.charts-mode1 .charts-mask{height:75px;top:0;visibility:hidden;} +.charts-mode1 .icon{background-position:0 0;_background-position:0 -187px;width:25px;height:25px;position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;} +.charts-mode1 .charts-game .icon{background-position:0 -27px;_background-position:-26px -187px;} +.charts-mode1 .charts-imgitem img{height:75px;} +.charts-mode1 a{_zoom:1;/*hack for charts-name disappear bug when hovering in ie6*/} +.charts-mode1 a:hover .charts-mask{visibility:visible;} +.charts-mode2 .charts-imgitem img{height:100px;} +.charts-mode2 .charts-mask,.charts-mode3 .charts-mask{height:25px;bottom:0;} +.charts-mode2 a:hover,.charts-mode3 a:hover{text-decoration:none;} +.charts-mode2 a:hover .charts-mask{height:100px;} +.charts-mode2 .charts-name{text-align:center;position:absolute;bottom:0;left:0;color:#fff;width:80px;padding:0 10px;} +.charts-mode2 a:hover .charts-name{text-align:left;bottom:auto;white-space:normal;top:5px;line-height:18px;max-height:70px;_height:70px;} +.charts-mode2 a:hover .icon{background-position:-27px 0;_background-position:-34px -168px;width:16px;height:16px;position:absolute;bottom:5px;right:5px;} +.charts-mode2 .charts-game a:hover .icon{background-position:-27px -27px;_background-position:-17px -168px;} +.charts-mode3 .chartslist{padding: 0 13px!important;margin:20px 0 10px!important;} +.charts-mode3 .charts-imgitem img{height:120px;} +.charts-mode3 a:hover .charts-mask{height:120px;} +.charts-mode3 .charts-name{text-align:center;position:absolute;bottom:0;left:0;color:#fff;width:70px;padding:0 10px;} +.charts-mode3 a:hover .charts-name{text-align:left;bottom:auto;white-space:normal;top:5px;line-height:18px;max-height:90px;_height:90px;} +.charts-mode3 a:hover .icon{background-position:-26px -53px;_background-position:-51px -168px;width:17px;height:17px;position:absolute;bottom:10px;right:10px;} +.charts-image .charts-mask{display:none;} +.charts_error{display:none;position:absolute;left:0;top:100px;width:100%;text-align:center;} +.charts_error:hover{color:#00b075;} +.ellipsis{display:none;position:absolute;bottom:5px;right:25px;width:12px;color:#fff;} +.mod-charts .top-arrow{right:2px;} +.mod-charts .bottom-arrow{bottom:22px;right:2px;} + +/**购物模块修改为单屏显示一个物品**/ +.charts-mode4 .chartslist{ + padding: 10px 8px 0 8px; + height: 165px; +} +.charts-mode4 .chartslist:hover .ui-nav .ctrl p{ + display: block; +} +.charts-mode4 .container a{ + display: block; +} +.charts-mode4 .container a img{ + width: 220px; + height: 150px; +} +.charts-mode4 .ui-nav{ + position: relative; +} +.charts-mode4 .ui-nav .ctrl p{ + display: none; + position: absolute; + top: 50px; + z-index: 2; +} +.charts-mode4 .ui-nav .prev{ + left: -10px; +} +.charts-mode4 .ui-nav .prev span{ + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.charts-mode4 .ui-nav .prev:hover span{ + background-color: #00c584; +} +.charts-mode4 .ui-nav .next{ + right: -10px; +} +.charts-mode4 .ui-nav .next span{ + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.charts-mode4 .ui-nav .next:hover span{ + background-color: #00c584; +} +.charts-mode4 .ui-nav .ctrl p span{ + display: block; + width: 32px; + height: 48px; + cursor: pointer; + line-height: 48px; + background-color: #999; + color: #fff; + font-size: 40px; + text-align: center; + opacity: 0.6 +} +.charts-mode4 .ui-nav .nav-item-list{ + position: relative; +} +.charts-mode4 .ui-nav .nav-item{ + float: left; +} +.charts-mode4 .container a{ + position: relative; +} +.charts-mode4 .container a .layer{ + display: block; + width: 100%; + height: 25px; + position: absolute; + bottom: 0px; + opacity: 0.6; + background-color: #000; + filter:alpha(opacity=60); +} +.charts-mode4 .container a:hover p{ + color: #3dc094; +} +.charts-mode4 .container a p{ + position: absolute; + bottom: 5px; + left: 10px; + color: #fff; +} + +/*显示模块*/ +.side-mod-preload-charts{ + border:0!important; + background: transparent!important; +} +.side-mod-preload-charts > *{ + visibility: visible!important; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/rtl/rtl.css new file mode 100755 index 000000000..0cf40097e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/charts/rtl/rtl.css @@ -0,0 +1,84 @@ +/** +榜单模块样式 +*/ + +/*charts*/ +.mod-charts{/*height:303px;*/background:#f5f7f7;} +.mod-charts .mod-side{ + padding-bottom:3px; + /*padding-right:10px; + background:#f5f7f7;*/ + border:1px solid #fff; + border-bottom:0; + *padding-bottom:14px;/*IE<=7容器触发hasLayout导致其浮动子元素margin-bottom消失http://www.w3help.org/zh-cn/causes/RB1005*/ +} +.charts-item{overflow:hidden;padding-bottom:6px;line-height:0;} +.charts_menu{border-left:1px solid #fff;border-right:1px solid #fff;/*for indivisible width percentage*/background:url(../img/tab-normal-bg.png?__sprite) repeat-x;} +.charts_menu li{/*display:inline-block;*/float:right;position:relative;} +.mod-charts .icon-new_red{position:absolute;left:0px;top:-5px;} +.charts_menu a{display:block;line-height:30px;background:url(../img/tab-normal-bg.png?__sprite) repeat-x;text-align:center;border:1px solid #edeff0;border-top-color:#fff;border-right:0;} +.charts_menu .cur{background:#f5f7f7;border-bottom-color:#f5f7f7;font-weight:600;color:#00b075;cursor:default;} +.charts_menu .last{border-left:0;} +.charts_menu a:hover{border-right-color:#e6e8e9;border-bottom-color:#e3e5e5;-moz-box-shadow:0px 2px 0px 0px rgba(227, 229, 229, 0.1);-webkit-box-shadow:0px 2px 0px 0px rgba(227, 229, 229, 0.1);box-shadow:0px 2px 0px 0px rgba(227, 229, 229, 0.1);font-weight:600;color:#00b075;} +.charts_menu .cur:hover{border-right-color:#edeff0;border-bottom-color:#f5f7f7;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;} +.charts_content{display:none;/*height:269px;*/position:relative;} +.charts_more{display:block;background:#f2f2f2;height:23px;line-height:23px;text-align:left;color:#00b075;border-top:1px solid #E3E5E6;padding-left:20px;position:relative;} +.charts_more:hover{background:#ebebeb;} +.charts_more .arrow_r{color:#3dc094;left:10px;top:-1px;padding-right:5px;font-size:20px;} +.charts-order{float:right;background:url(../img/charts-order-bg.png?__sprite) no-repeat;width:15px;height:15px;padding-top:3px;text-align:center;color:#fff;font-family:Tahoma;font-size:10px;margin:4px 0 0 9px;line-height:1;_display:inline;} +.charts-pic{float:right;display:block;width:33px;border:1px solid #F5F7F7;/*height:35px;*/margin:4px 0 0 9px;_display:inline;max-height: 33px;} +.charts-pic:hover{/*width:33px;height:33px;*/overflow:hidden;border:1px solid #3dc094;zoom:1;z-index:1;position:relative;} +.charts-pic img{display:block;width:100%;/*height:35px;*/} +.charts-pic:hover img{/*position:relative;top:-1px;right:-1px;z-index:0;*/} +.charts-order_grey{background:url(../img/charts-order-bg-grey.png?__sprite) no-repeat;} +.charts-song,.charts-singer{overflow:hidden;zoom:1;display:inline-block;line-height:20px;width:135px;_width:133px;text-overflow:ellipsis;white-space:nowrap;/*word-wrap:break-word;*/_margin-right:-3px;} +.charts-song_l,.charts-singer_l{width:189px;} +.mod-charts .charts-singer{color:#999;} +.charts-song:hover,.charts-singer:hover{color:#00b075;} +.mod-charts .chartslist{position:relative;padding:15px 10px 0 1px;border-top:0;height:232px;overflow:hidden;zoom:1;font-size:0;} +.mod-charts .chartslist li{font-size:12px;} +.charts-music .chartslist{padding-top:10px;padding-bottom:15px;} + +.charts-imgitem{display:inline-block;zoom:1;*display:inline;width:100px;position:relative;margin-bottom:16px;margin-left:8px;overflow:hidden;} +.charts-imgitem a{display:block;} +.charts-imgitem a:hover{color:#00b075;cursor:pointer;} + +.charts-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%;display:block;line-height:25px;} +.charts-imgitem img{display:block;width:100%;_vertical-align:top;} +.charts-mask{background:rgb(34,26,18);background:rgba(0,0,0,0.6);position:absolute;left:0;width:100px;} +.charts-imgitem .icon{background-image:url(../i-charts_24.png);_background-image:url(../../img/i-news_item.png);background-repeat:no-repeat;display:inline-block;} +.charts-mode1 .charts-mask{height:75px;top:0;visibility:hidden;} +.charts-mode1 .icon{background-position:0 0;_background-position:0 -187px;width:25px;height:25px;position:absolute;top:50%;right:50%;margin-top:-12px;margin-right:-12px;} +.charts-mode1 .charts-game .icon{background-position:0 -27px;_background-position:-26px -187px;} +.charts-mode1 .charts-imgitem img{height:75px;} +.charts-mode1 a{_zoom:1;/*hack for charts-name disappear bug when hovering in ie6*/} +.charts-mode1 a:hover .charts-mask{visibility:visible;} +.charts-mode2 .charts-imgitem img{height:100px;} +.charts-mode2 .charts-mask,.charts-mode3 .charts-mask{height:25px;bottom:0;} +.charts-mode2 a:hover,.charts-mode3 a:hover{text-decoration:none;} +.charts-mode2 a:hover .charts-mask{height:100px;} +.charts-mode2 .charts-name{text-align:center;position:absolute;bottom:0;right:0;color:#fff;width:80px;padding:0 10px;} +.charts-mode2 a:hover .charts-name{text-align:right;bottom:auto;white-space:normal;top:5px;line-height:18px;max-height:70px;_height:70px;} +.charts-mode2 a:hover .icon{background-position:-27px 0;_background-position:-34px -168px;width:16px;height:16px;position:absolute;bottom:5px;left:5px;} +.charts-mode2 .charts-game a:hover .icon{background-position:-27px -27px;_background-position:-17px -168px;} +.charts-mode3 .chartslist{padding: 0 13px!important;margin:20px 0 10px!important;} +.charts-mode3 .charts-imgitem img{height:120px;} +.charts-mode3 a:hover .charts-mask{height:120px;} +.charts-mode3 .charts-name{text-align:center;position:absolute;bottom:0;right:0;color:#fff;width:70px;padding:0 10px;} +.charts-mode3 a:hover .charts-name{text-align:right;bottom:auto;white-space:normal;top:5px;line-height:18px;max-height:90px;_height:90px;} +.charts-mode3 a:hover .icon{background-position:-26px -53px;_background-position:-51px -168px;width:17px;height:17px;position:absolute;bottom:10px;left:10px;} +.charts-image .charts-mask{display:none;} +.charts_error{display:none;position:absolute;left:0;top:100px;width:100%;text-align:center;} +.charts_error:hover{color:#00b075;} + +.mod-charts .top-arrow{left:2px;} +.mod-charts .bottom-arrow{bottom:22px;left:2px;} + +/*显示模块*/ +.side-mod-preload-charts{ + border:0!important; + background: transparent!important; +} +.side-mod-preload-charts > *{ + visibility: visible!important; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/common/common.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/common/common.css new file mode 100755 index 000000000..788b973df --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/common/common.css @@ -0,0 +1 @@ +/*@require home:widget/hot-site/game-history/game-history.css*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/css-module-base.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/css-module-base.tpl new file mode 100755 index 000000000..b835904f2 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/css-module-base.tpl @@ -0,0 +1,6 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/css-module-base/ltr/ltr.css"%> <%else%> <%require name="home:widget/css-module-base/rtl/rtl.css"%> <%/if%> + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/ltr/ltr.css new file mode 100755 index 000000000..9c5899aec --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/ltr/ltr.css @@ -0,0 +1,2 @@ +/*@require home:widget/ui/mod-frame/mod-frame.css*/ +/*@require home:widget/ui/side-mod-frame/ltr/ltr.css*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/rtl/rtl.css new file mode 100755 index 000000000..db00bb132 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/css-module-base/rtl/rtl.css @@ -0,0 +1,2 @@ +/*@require home:widget/ui/mod-frame/mod-frame.css*/ +/*@require home:widget/ui/side-mod-frame/rtl/rtl.css*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-apps.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-apps.js new file mode 100755 index 000000000..c5a81d9b5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-apps.js @@ -0,0 +1,572 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var lazyload = require("common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"); +var T = require("common:widget/ui/time/time.js"); +var $cookie = require('common:widget/ui/jquery/jquery.cookie.js'); +var Drap = require("common:widget/ui/drap/drap.js"); + +var sidebarApps = function (data) { + var that = this; + + //sidebar上可以展现的全集 + that.appList = data; + + that.sidebar = $(".mod-custom-sidebar"); + that.appsWrap = that.sidebar.find(".apps-wrap"); +} + +/** + *初始化app列表 +*/ + +sidebarApps.prototype.init = function () { + this.index = 1; + this.groupApps(); + this.addNewApps(this.all[0]); + this.retContainer(true); + this.isSwitch(); + this.renderApplistIcon(); + this.bindEvents(); + +}; + +/** + *对app进行预分组处理 +*/ +sidebarApps.prototype.groupApps = function () { + var that = this, + temp = [], + all = [], + limit = that.getAppLimit(), + pages = 1; + + for ( key in that.appList ) { + var app = that.appList[key]; + app && key != "sidebarApplist" && temp.push(that.appList[key]); + } + pages = parseInt(temp.length / limit,10) + (temp.length % limit == 0 ? 0 : 1); + + for(var i = 0;i < pages; i++ ){ + all.push(temp.slice(limit * i,limit * i + limit)); + } + + that.pages = pages; + that.all = all; + that.temp = temp; + that.length = temp.length; +}; + +/** + *对数据进行重新分组处理 +*/ +sidebarApps.prototype.regroupApps = function () { + var that = this, + limit = that.getAppLimit(), + all = [], + result = []; + + for(var i = 0;i < that.pages; i++ ){ + all.push(that.temp.slice(limit * i,limit * i + limit)); + } + for( var j = 0;j < that.temp.length;j++ ){ + result.push(that.temp[j].id); + } + + window.localStorage && (window.localStorage.customSidebar = result.join(",")); + +}; + +/** + *生成app定制模块的icon +*/ + +sidebarApps.prototype.renderApplistIcon = function () { + var arrow = conf.dir == "ltr" ? "ui-arrow-l" : "ui-arrow-r", + tpl = '
                                  ' + + '' + + '' + +'
                                  '; + + this.sidebar.find(".app-content").after(tpl); +}; + +/** + *生成app列表 +*/ + +sidebarApps.prototype.renderApps = function (list) { + var dom = "", + that = this, + arrow = conf.dir == "ltr" ? "ui-arrow-l" : "ui-arrow-r", + appsTpl = '
                                • ' + + '' + + '#{hoverTip}' + + '' + + '
                                • '; + + for ( var i = 0;i < list.length;i++ ) { + var widget = list[i].widget[0], + del = list[i].noDelete ? "" : "delete-app"; + + dom = dom + helper.replaceTpl( appsTpl,{"src" : list[i].src,"hoverTip" : list[i].hoverWord,"id" : list[i].id,"class":del} ); + }; + + return dom; +}; + +/** + *新增新的app列表 +*/ +sidebarApps.prototype.addNewApps = function (list) { + var apps = this.renderApps(list), + ulTpl = '
                                    '+ apps +'
                                  '; + + this.appsWrap.append(ulTpl); + +} + +/** + *根据浏览器的窗口大小调整app列表的位置 +*/ + +sidebarApps.prototype.getTop = function () { + + var top = $(window).outerHeight() / 2 - (this.all[0].length + 2) * 60 / 2 ; + return top; +} + +/** + *获取一屏app的数量 +*/ + +sidebarApps.prototype.getAppLimit = function () { + var height = window.outerHeight, + limit = 0; + + if( height >= 1024 ){ + limit = 11; + } else if( height >= 900 && height < 1024 ){ + limit = 7; + } else if ( height >= 768 && height < 900 ){ + limit = 7; + } else { + limit = 7; + } + + return limit; +}; + + +/** + *重新排列app外框的位置 +*/ + +sidebarApps.prototype.retContainer = function (inanimate) { + var that = this; + inanimate ? that.appsWrap.css({"top":that.getTop()+"px"}) : + that.appsWrap.animate({"top":that.getTop()+"px"},500); +}; + +/** + *是否可以切屏 +*/ +sidebarApps.prototype.isSwitch = function () { + var that = this, + switchBtn = that.sidebar.find(".app-switch"); + + that.length > that.getAppLimit() ? switchBtn.addClass("show") : switchBtn.removeClass("show"); +}; + +/** + *删除app +*/ +sidebarApps.prototype.deleteApps = function () { + var that = this, + index = this.index - 1, + ul = that.appsWrap.find(".applist"), + current = ul.eq( index ), + prev = ul.eq( index - 1 ), + next = ul.eq( index + 1 ), + currentData = that.all[index], + nextData = that.all[index+1], + limit = that.getAppLimit(), + data = []; + + //如果当前分页的数据不为空,用后面的数据补齐 + if( currentData ){ + if( next.length ){ + current.append(next.find("li:first")); + current.nextAll().remove(); + + } else { + if( nextData ){ + data.push(currentData[limit-1]); + } else { + currentData.length == limit && data.push(currentData[limit-1]); + + } + data && current.append(that.renderApps(data)); + } + //如果为空,则翻到上一屏 + } else { + current.remove(); + prev.show(); + this.index = index; + + } + ul.find(".delete-app").show(); + //that.retContainer(); + that.isSwitch(); + +}; + +/** + *添加一个app +*/ +sidebarApps.prototype.addApp = function (id,data) { + var that = this, + ul = that.appsWrap.find(".applist"), + index = that.index - 1, + current = ul.eq( index ), + limit = that.getAppLimit(), + app = $(that.renderApps(data)); + + current.prepend(app.fadeIn()); + current.nextAll().remove(); + this.all[index].length == limit && current.find("li:last").remove(); + conf.customSidebar.status.inProcess && ul.find(".delete-app").show(); + that.temp.unshift(data[0]); + that.getApps(that.temp); + that.sidebar.trigger("addNewContent",[id,data]); +}; + +/** + *app切屏 +*/ + +sidebarApps.prototype.switchApps = function () { + var that = this, + ul = that.appsWrap.find(".applist"), + index = that.index == that.pages ? 1 : (that.index + 1), + next = ul.eq(index - 1), + data = that.all[index-1], + status = conf.customSidebar.status; + + ul.hide(); + next.length ? next.show() : that.addNewApps(data); + status.inProcess && that.appsWrap.find(".delete-app").show(); + that.index = index; + status.bubbleExsit && that.sidebar.trigger("terminateBubble"); +} + +/** + *app数据查询 +*/ +sidebarApps.prototype.getApps = function (array) { + var temp = [], + that = this; + + for( var i = 0;i < array.length;i++ ){ + temp.push(array[i].id); + } + hao123.getJSON({ + url: hao123.host + "/applistapi?", + params: { + callback: "appList", + country: hao123.country, + module: hao123.appModule, + appids: temp.join(",") + }, + callbackFuncName: "callback", + callback: function (result) { + that.appList = result.sidebar.list; + that.groupApps(); + that.isSwitch(); + that.retContainer(); + window.localStorage && (window.localStorage.customSidebar = temp.join(",")); + } + }); +}; + +/** + *启动app拖拽 +*/ + +sidebarApps.prototype.enableDrag = function () { + var dragConfig = { + circlimit:true, + direct:"y" + }, + el = $(".app-icons-wrap"), + status = conf.customSidebar.status; + + //初始化 拖拽 + status.inDrag = el.drag(dragConfig); + el.parent().height(el.parent().height()); + el.each(function(){ + var $this = $(this), + top = $this.position().top; + $this.css({"top":top}).data("top",top); + }); + + el.css({"position":"absolute"}); + this.handleDrag(true); +}; + +/** + *停止app拖拽 +*/ + +sidebarApps.prototype.disableDrag = function () { + var status = conf.customSidebar.status, + el = status.inDrag; + + if( el.length ){ + el.each(function(){ + $(this).data("data-drag-obj").unable() + $(this).css({"position":"relative","top":"0","cursor":"pointer"}); + }); + el.parent().height("auto"); + this.handleDrag(false); + } +}; + +/** + 拖拽排序 +*/ + +sidebarApps.prototype.handleDrag = function (status) { + var $status = conf.customSidebar.status + el = $status.inDrag, + that = this, + group = that.index - 1, + swt = null, + limit = that.getAppLimit(); + + if( !status ){ + el.length && el.off(".appdrag"); + $status.inDrag = ""; + return; + } + + el.on("mousemove.appdrag",function(){ + var $this = $(this), + top = $this.data("top"), + currentTop = $this.position().top, + prev = $this.prev(), + next = $this.next(); + + el.removeClass("dragging"); + $this.addClass("dragging"); + + if( prev.length && currentTop <= prev.data("top") + 30 ){ + var index = group * limit + $this.index();//在全集中的位置 + + prev.css("top",top).before($this); + $this.data("top",prev.data("top")); + prev.data("top",top); + swt = that.temp[index - 1]; + that.temp[index - 1] = that.temp[index]; + that.temp[index] = swt; + that.regroupApps(); + + } else if( next.length && currentTop >= next.data("top") - 30 ){ + var index = group * limit + $this.index(); + + next.css("top",top).after($this); + $this.data("top",next.data("top")); + next.data("top",top); + swt = that.temp[index + 1]; + that.temp[index + 1] = that.temp[index]; + that.temp[index] = swt; + that.regroupApps(); + } + + }) + + .on("mouseup.appdrag",function(){ + var $this = $(this), + top = $(this).data("top"); + + $this.css({"top":top}); + }) + .on("mouseover.appdrag",function(){ + var $this = $(this); + $(this).data("data-drag-obj").enable(); + $this.css({"cursor":"move"}); + }) + .on("mouseleave.appdrag",function(){ + var $this = $(this), + top = $(this).data("top"); + + $this.css({"top":top}); + $this.data("data-drag-obj").unable(); + + }); +}; + +/** + *抖动效果 +*/ +sidebarApps.prototype.shaking = function (start) { + var el = $(".app-icons-wrap:visible"), + timer = this.shakeTimer; + + timer && el.removeClass("shaking") && clearInterval(timer); + + if( start ){ + this.shakeTimer = setInterval(function(){ + el.toggleClass("shaking"); + },70); + } + + +}; + +/** + *绑定事件 +*/ + +sidebarApps.prototype.bindEvents = function () { + var that = this, + sidebar = that.sidebar, + status = conf.customSidebar.status; + + //app的icon + sidebar + .on("mouseover",".app-icons-wrap",function(){ + var $this = $(this), + id = $this.attr("appid"), + top = $this.position().top, + tip = $this.find(".hover-tip"); + + + status.isFolded && tip.addClass("dis-table"); + }) + .on("mouseleave",".app-icons-wrap",function(){ + $(this).find(".hover-tip").removeClass("dis-table"); + }) + .on("click",".app-icons-wrap,.open-apps",function(){ + var $this = $(this), + id = $this.attr("appid"), + app = status.app; + + if( status.inProcess && !$this.hasClass("open-apps") ){ + return; + } + //展开或收起内容区 + sidebar.trigger("switchContent",[id]); + //隐藏app描述 + $this.find(".hover-tip").removeClass("dis-table"); + //显隐icon的箭头 + if( app != id ){ + conf.customSidebar.currentApp = id; + } else { + $this.removeClass("app-selected"); + } + }) + .on("click",".open-apps",function(){ + sidebar.trigger("stopManage"); + }) + + //icon区切屏按钮 + .on("mousedown",".switch-icon",function(){ + that.switchApps(); + $(this).addClass("click"); + if( !status.inProcess ){ + sidebar.trigger("foldAll"); + } else { + that.disableDrag(); + that.enableDrag(); + that.shaking(true); + } + }).on("mouseup",".switch-icon",function(){ + $(this).removeClass("click"); + }).on("mouseleave",".switch-icon",function(){ + $(this).removeClass("click"); + }) + + //删除app + .on("mousedown",".delete-app",function(){ + var app = $(this).parent(), + id = app.attr("appid"), + index = that.index; + + that.disableDrag(); + app.fadeOut(function(){ + app.remove(); + that.appList[id] = ""; + that.groupApps(); + that.deleteApps(); + sidebar.trigger("deleteApp",[id]).trigger("removeContent",[id]); + that.getApps(that.temp); + that.enableDrag(); + that.shaking(true); + }); + }) + .on("mouseover",".delete-app",function(){ + $(this).css("cursor","pointer"); + }) + //切换appicon的选中状态 + .on("changeAppStatus",function( e,id,status ){ + var app = $(".si-"+id); + + if( status == "selected" ){ + sidebar.find(".app-icons-wrap,.open-apps").removeClass("app-selected"); + app.addClass("app-selected"); + } else if( status == "hover" ){ + app.addClass("app-hover"); + } else { + app.removeClass("app-hover app-selected"); + } + + }) + + .on("getTop",function( e,id ){ + var app = $(".si-"+id), + offset = app.position().top; + + if( id != "sidebarApplist"){ + offset = that.getTop() + offset + "px"; + } + + return offset; + }) + + //开始编辑 + .on("startManage",function(){ + status.inProcess = 1; + sidebar.trigger("removeMessage",["",sidebar]); + that.appsWrap.find(".delete-app").show(); + that.enableDrag(); + that.shaking(true); + }) + + //结束编辑 + .on("stopManage",function(){ + status.inProcess = 0; + that.appsWrap.find(".delete-app").hide(); + that.disableDrag(); + that.shaking(false); + }) + + //新增一个app + .on("addApp",function( e,id,data ){ + that.disableDrag(); + that.addApp(id,data); + if( status.inProcess ){ + that.enableDrag(); + that.shaking(true); + } + + }); + + //其它操作icon的状态 + + $(window).resize(function(){ + that.appsWrap.css("top",that.getTop()+"px"); + }); +}; + +module.exports = sidebarApps; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-async.js new file mode 100755 index 000000000..1c0ba14af --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-async.js @@ -0,0 +1,163 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var lazyload = require("common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"); +var T = require("common:widget/ui/time/time.js"); +var $cookie = require('common:widget/ui/jquery/jquery.cookie.js'); +var sidebarApps = require('home:widget/custom-sidebar/custom-sidebar-apps.js'); +var sidebarContent = require('home:widget/custom-sidebar/custom-sidebar-content.js'); +var sidebarGuideBubble = require('home:widget/custom-sidebar/custom-sidebar-guidebubble.js'); +var sidebarMessageBubble = require('home:widget/custom-sidebar/custom-sidebar-messagebubble.js'); + +var customSidebar = function (data) { + var that = this, + data = data.sidebar, + applist = data.list; + + /*sidebar的全局状态*/ + //app 当前展开的app + //isFolded 是否有模块展开或是否有引导气泡展现 + //bubbleExsit 是否有引导气泡存在 + //inProcee 是否处于编辑状态 + //hasInited sidebar是否已经初始化过 + //messgeBubble 手工配置的红色气泡 + //inDrag 是否处于app拖拽的状态 + //iClose sidebar是否处于关闭的状态 + conf.customSidebar.status = { + app : "", + isFolded : 1, + bubbleExsit : 0, + inProcess : 0, + hasInited : 0, + messageBubble : "", + inDrag : "", + isClose : 0 + }; + + that.sidebar = $(".mod-custom-sidebar"); + that.version = data.version; + that.list = applist; + that.status = conf.customSidebar.status; + + that.apps = new sidebarApps( applist ); + that.content = new sidebarContent( applist ); + that.guideBubble = new sidebarGuideBubble( data.guideBubble ); + that.messageBubble = new sidebarMessageBubble( data.tipOption[0],data.apiInfo ); + +} + + +/** + *初始化sidebar +*/ +customSidebar.prototype.init = function () { + var cookie = $.cookie.get("sidebar"); + + if( !cookie && $(document).width() > 1024 || (cookie != this.version) ){ + this.trigger(); + } else { + var swi = this.sidebar.find(".sidebar-switch"), + wrap = this.sidebar.find(".sidebar-wrap"); + + swi.addClass("switch-out"); + wrap.addClass("sidebar-fold"); + this.status.isClose = 1; + } + + this.bindEvents(); +}; + +/** + *初始化内容 +*/ +customSidebar.prototype.trigger = function () { + var that = this; + + //初始化app列表 + that.apps.init(); + //初始化内容区 + that.content.init(); + //初始化引导气泡 + that.guideBubble.init(); + //初始化红色提醒气泡 + that.messageBubble.init(); + //标识状态 + that.status.hasInited = 1; + that.status.isClose = 0; + //清除关闭cookie + $.cookie.set("sidebar",that.version,{expires:-1}); +}; + +/** + *收起sidebar +*/ +customSidebar.prototype.fold = function () { + var that = this; + + that.status.isClose = 1; + that.content.foldAll(); + that.guideBubble.terminate(); + that.sidebar.trigger("stopManage"); + $.cookie.set("sidebar",that.version,{expires:30}); +}; + +/** + *fix the dropdownlist bug +*/ +customSidebar.prototype.isDropDown = function( list,el ){ + var flag = false; + for(var i = 0; i' + + '
                                  ' + + '#{title}' + + '' + + '
                                  ' + + '
                                  ' + + '' + + '
                                  ' + + ''; + + for ( key in list ) { + if( !list[key] ){ + continue; + } + var widget = list[key].widget[0], + fullsize = list[key].fullsize || ""; + + el = el + helper.replaceTpl( contentTpl,{"widgetId":widget.pageletId || widget.widgetId,"id":list[key].id,"title":widget.title,"fullsize" : fullsize} ); + }; + + that.sidebar.find(".app-content").append(el); +}; + +/** + *加载app的内容 +*/ + +sidebarContent.prototype.loadApp = function ( widgetId,pageletId ) { + hao123.asyncLoad && hao123.asyncLoad({ + module: "home", + fileType: "tpl", + containerId: pageletId || widgetId, + widgetName: "open-api", + widgetId:[{id: widgetId}], + api: hao123.host + "/openapi" + }); +}; +/** + *计算内容区的位置 +*/ +sidebarContent.prototype.getPosition = function ( id,height ) { + var height = parseInt(height,10), + max = $(window).outerHeight() - 60, + iconTop = parseInt(this.sidebar.triggerHandler("getTop",[id]),10), + top = iconTop / 3.5; + + if( height != "auto" ){ + if( top + height > max ){ + top = top - 40; + top <= 0 && (top = 0); + return top; + } else { + top = (top + height) < (iconTop + 60) ? (iconTop + 20 - height) : top; + } + + } + + + return top; +}; + +/** + *处理内容区的切换 +*/ + +sidebarContent.prototype.switchContent = function ( id ) { + var current = $(".sc-"+id), + status = conf.customSidebar.status, + sidebar = this.sidebar, + list = this.list[id].widget[0], + width = list.width || "auto", + height = list.height || "auto", + top = current.hasClass("fullsize") ? 0 : this.getPosition( id,height ), + style = {"width":width,"top":top}; + + if( current.hasClass("show") ){ + current.removeClass("show"); + status.isFolded = 1; + status.app = ""; + } else { + status.bubbleExsit && sidebar.trigger("terminateBubble",[id]); + status.messageBubble && status.messageBubble == id && sidebar.trigger("resetMessageCookie"); + sidebar.trigger("removeMessage",[id]); + sidebar.trigger("changeAppStatus",[id,"selected"]).find(".content-wrap").removeClass("show"); + !current.hasClass("fullsize") && current.css(style); + current.find(".app-substance").height(height); + current.addClass("show"); + status.isFolded = 0; + status.app = id; + } + //加载对应的模块 + !current.hasClass("hasloaded") && current.addClass("hasloaded") && this.loadApp( list.widgetId,list.pageletId ); +}; + +/** + *收起所有内容区 +*/ + +sidebarContent.prototype.foldAll = function () { + var status = conf.customSidebar.status; + + if( status.app ){ + this.sidebar.trigger("changeAppStatus",[status.app]); + status.app = ""; + } + this.sidebar.find(".content-wrap").removeClass("show"); + status.isFolded = 1; +}; + +/** + *绑定事件 +*/ + +sidebarContent.prototype.bindEvents = function () { + var that = this, + sidebar = that.sidebar, + status = conf.customSidebar.status; + + sidebar.on("switchContent",function( e,id ){ + that.switchContent( id ); + }) + .on("addNewContent",function(e,id,data){ + that.list[id] = data[0]; + that.renderAppContent(data); + }) + .on("removeContent",function(e,id){ + $(".sc-"+id).remove(); + }) + .on("click",".content-close",function(){ + sidebar.trigger("changeAppStatus",[status.app]).find(".content-wrap").removeClass("show"); + sidebar.trigger("stopManage"); + status.app = ""; + status.isFolded = 1; + }) + .on("foldAll",function(){ + that.foldAll(); + }); +}; + + +module.exports = sidebarContent; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-guidebubble.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-guidebubble.js new file mode 100755 index 000000000..2f7e99e79 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-guidebubble.js @@ -0,0 +1,234 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var lazyload = require("common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"); +var T = require("common:widget/ui/time/time.js"); +var $cookie = require('common:widget/ui/jquery/jquery.cookie.js'); + +var guideBubble = function (data) { + var that = this; + + //数据 + that.guide = data; + //父元素 + that.sidebar = $(".mod-custom-sidebar"); + //配置 + that.options = { + time : 5000 + }; + //全局的状态 + that.status = conf.customSidebar.status; + //特型气泡地址列表 + that.special = conf.customSidebar.specialBubble; +}; + +/** + *初始化引导气泡 +*/ + +guideBubble.prototype.init = function() { + var that = this, + guide = that.guide, + queue = $.cookie.get("guideBubbleQueue"), + update = $.cookie.get("guideBubbleQueue"); + + //引导气泡出现和消失的定时器 + that.showTimer = null; + that.hideTimer = null; + that.version = 0; + + if( guide && !guide.hide ){ + //用户第一次加载或更换版本 + if( (!queue && queue != "none") || (update && update != that.guide.updateVersion) ){ + that.setCookie( "guideBubbleQueue",that.guide.bubbleQueue,1 ); + that.setCookie( "guideBubbleUpdate",that.guide.updateVersion,1 ); + } + + + //引导气泡的模板序号 + that.getVersion(); + that.config = $.extend({},that.options,guide.list[that.version]); + + if ( that.version !== "none" ){ + that.status.isFolded = 0; + that.status.bubbleExsit = 1; + + that.showTimer = setTimeout(function(){ + that._render(); + that._startHideTimer(); + },300); + that._bindEvent(); + } else { + + } + } +}; + +/** + *生成引导气泡 +*/ +guideBubble.prototype._render = function () { + var that = this, + config = that.config, + sidebar = that.sidebar, + marginTop = sidebar.triggerHandler("getTop",[config.id]), + elStr = "", + //引导气泡 + guideBubbleTpl = '
                                  ' + + '', + //纯文字模式 + plainTextBubbleTpl = '
                                  ' + +' #{text}' + +'
                                  ', + //图片加文字的模式 + imgWithTextBubbleTpl = '
                                  ' + +' ' + +' #{text}' + +'
                                  ', + cssConfig = { + "marginTop" : marginTop, + "width" : config.width, + "height" : config.height + }, + bubbleTpl = config.img ? imgWithTextBubbleTpl : plainTextBubbleTpl; + + //特型气泡 + if( config.tpl ){ + elStr = guideBubbleTpl + config.tpl + '
                                  '; + sidebar.append(elStr); + + //气泡整个是否可点 + that.config.openable && sidebar.find(".guide-bubble").addClass("open-content"); + + //加载特型气泡的脚本 + if( config.hao123Mod ){ + //hao123主站的方式 + hao123.lazyLoad.js(that.special[config.id],function(){ + require(config.hao123Mod); + }); + } else if( config.scriptMod ) { + //外站的方式 + hao123.lazyLoad.js(config.scriptMod); + } + + //纯文字或图片加文字的形式 + } else { + elStr = guideBubbleTpl + helper.replaceTpl(bubbleTpl,{ "text" : config.text,"src" : "" }) + ''; + sidebar.append(elStr); + } + + sidebar.trigger("changeAppStatus",[config.id,"hover"]).find(".guide-bubble").css(cssConfig); +}; + +/** + *获取引导气泡的模板序号 +*/ +guideBubble.prototype.getVersion = function(){ + var cookie = $.cookie.get("guideBubbleQueue").split(","), + version = cookie[0], + list = this.guide.list; + + if( version == "none" ){ + this.version = "none"; + return; + } else if( !list[version] || !$( ".si-" + list[version].id ).length ){ + this.updateQueue(); + this.getVersion(); + } else { + this.version = version; + } + //return version; +}; + +/** + *设置cookie +*/ +guideBubble.prototype.setCookie = function( name,value,expires ){ + $.cookie.set(name, value, {expires:expires * 1 || 30}); +}; + +/** + *气泡自动消失的定时器 +*/ +guideBubble.prototype._startHideTimer = function () { + var that = this, + sidebar = that.sidebar; + + that.hideTimer = setTimeout(function(){ + sidebar.trigger("changeAppStatus",[that.config.id]).find(".guide-bubble").hide(); + that.status.isFolded = 1; + },that.config.time); + +}; + +/** + *终止引导气泡 +*/ +guideBubble.prototype.terminate = function () { + var that = this, + sidebar = that.sidebar; + + sidebar.trigger("changeAppStatus",[that.config.id]) + sidebar.find(".guide-bubble").hide(); + clearTimeout(that.showTimer); + clearTimeout(that.hideTimer); + that.status.isFolded = 1; + that.status.bubbleExsit = 0; +}; + +/** + *更新气泡队列 +*/ +guideBubble.prototype.updateQueue = function () { + var cookie = $.cookie.get("guideBubbleQueue").split(","); + + cookie.length && this.setCookie("guideBubbleQueue",cookie.slice(1).join(),1); + cookie.length == 1 && this.setCookie( "guideBubbleQueue","none",1); +}; + +/** + *绑定事件 +*/ +guideBubble.prototype._bindEvent = function () { + var that = this, + sidebar = that.sidebar; + + //通过气泡展开内容区 + sidebar.on("click",".open-content",function(){ + //终止气泡 + that.terminate(); + //更新气泡队列 + that.updateQueue(); + //展开内容区 + sidebar.trigger("switchContent",[that.config.id]); + + }) + //点击气泡的关闭叉子关闭气泡 + .on("click",".bubble-close",function(){ + //终止气泡 + that.terminate(); + //更新气泡队列 + that.updateQueue(); + }) + //从非气泡处关闭气泡 + .on("terminateBubble",function(e,id){ + //终止气泡 + that.terminate(); + //展开的app是当前持有引导气泡的app时才更新气泡队列 + id == that.config.id && that.updateQueue(); + }); +}; + +module.exports = guideBubble; + + + + + + + + + + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-messagebubble.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-messagebubble.js new file mode 100755 index 000000000..fac4c3833 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar-messagebubble.js @@ -0,0 +1,235 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var lazyload = require("common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"); +var T = require("common:widget/ui/time/time.js"); +var $cookie = require('common:widget/ui/jquery/jquery.cookie.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); + +var messageBubble = function (option,api) { + var that = this; + + //手动配置的消息提醒 + that.config = option; + //自动的api信息 + that.api = api; + + that.tpl = '#{value}'; + that.sidebar = $(".mod-custom-sidebar"); + that.cookieName = "sidebarMessage"; + that.status = conf.customSidebar.status; + +}; + +/** + *初始化消息提醒气泡 +*/ +messageBubble.prototype.init = function () { + var that = this, + config = that.config, + app = $(".si-" + config.id); + + that.setType(); + that.bindEvents(); + that.handleApiMessage(); + that.getVisibility(app) && + that.setMessage( app,config.value ) && + (that.status.messageBubble = config.id); +}; + +/** + *设置app的消息提醒 +*/ +messageBubble.prototype.setMessage = function ( el,value,id ) { + var message = el.find(".message"), + status = this.status; + + if( status.inProcess || status.app == id ){ + return; + } else if( value && value != 0 && el.length ) { + //显示消息 + message.length ? message.text(value) : el.append(helper.replaceTpl(this.tpl,{"value":value})); + //如果sidebar是关着的,就把消息都加起来 + status.isClose && this.collectMessage(); + + } + + return this; +}; + +/** + 获取策略类型 +*/ +messageBubble.prototype.setType = function () { + var type = 4, + config = this.config; + if( config.once ){ + type = 1; + } + else if( config.userOption ){ + type = 2; + } else if( config.timeOption ){ + type = 3; + } + this.type = type; +}; + +/** + *设置cookie +*/ +messageBubble.prototype.setCookie = function (time) { + $.cookie.set(this.cookieName,this.type,{expires:time}) +}; + +/** + *获取显隐值 +*/ +messageBubble.prototype.getVisibility = function (app) { + var that = this, + cookie = $.cookie.get(that.cookieName), + visible = true; + + if( !cookie ){ + that.config.once && that.setCookie(30); + } else if( cookie ) { + cookie == that.type ? (visible = false) : that.setCookie(-1); + } + + !app.length && (visible = false); + + return visible; +}; +/** + *重设cookie +*/ +messageBubble.prototype.resetCookie = function () { + var that = this, + config = that.config, + name = that.cookieName, + type = that.type, + time = -1; + + that.status.messageBubble = ""; + + if( type == 4 || type == 1){ + return; + } else if( type == 2 ){ + time = 30; + } else if( type == 3 ){ + time = parseInt( config.timeOption,10 ); + } + + that.setCookie(time); +}; + +/** + *绑定事件 +*/ +messageBubble.prototype.bindEvents = function () { + var that = this, + sidebar = this.sidebar; + + sidebar.on("resetMessageCookie",function(){ + that.resetCookie(); + }) + .on("setMessage",function( e,el,value ){ + that.setMessage( el,value ); + }) + .on("removeMessage",function(e,id,el){ + el = el || ".si-" + id; + + $(el).find(".message").remove(); + }); +}; + +/** + *处理api消息 +*/ +messageBubble.prototype.handleApiMessage = function () { + var that = this, + api = that.api; + + for( var i = 0;i < api.length;i++ ){ + var data = api[i]; + if( data.type == "news" ){ + if( data.interval ){ + setInterval(function(){ + that.getNews( data.id ); + },data.interval * 10000); + } else { + that.getNews( data.id ); + } + } + } +}; + + +/** + *获取新闻的未读消息数 +*/ +messageBubble.prototype.getNews = function ( id ) { + var list = conf.customSidebar.newsTypeList, + typeList = [], + result = "", + that = this, + newsApp = $(".si-"+id), + params = "?app=newscount&act=contents&vk=1&country=" + conf.country + "&type="; + + for( var i = 0;i < list.length;i++ ){ + var type = list[i].id || i; + typeList.push(type); + } + params = params + typeList.join("|"); + $.ajax({ + url : conf.apiUrlPrefix + params, + dataType: "jsonp", + jsonp : "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + success: function(result){ + that.setMessage(newsApp,result.content.data[0].count,id); + } + }); +}; + +/** + *如果sidebar处于关闭的状态,就把所有的消息汇总显示 +*/ +messageBubble.prototype.collectMessage = function () { + var result = 0, + that = this, + con = this.sidebar.find(".arrow-wrap"), + el = con.find(".message"); + + $(".app-icons-wrap").find(".message").each(function(i){ + var text = $.trim($(this).text()), + num; + + if( !text.length ){ + return true; + } else { + num = parseInt( text,10 ); + if( !num && num !== 0 ) { + result = "•••"; + return false; + } else { + result = num + result; + } + } + + }); + + el.length ? el.text(result) : con.append(helper.replaceTpl(this.tpl,{"value":result})); +}; + + +module.exports = messageBubble; + + + + + + + + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar.tpl new file mode 100755 index 000000000..e181dc796 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/custom-sidebar.tpl @@ -0,0 +1,54 @@ +<%if $root.urlparam.isHao123 == "false"%> +<%widget name="common:widget/global-conf/global-conf.tpl"%> +<%widget name="common:widget/header/clock/clock-conf/clock-conf.tpl"%> +<%/if%> +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="home:widget/custom-sidebar/ltr/ltr.css"%> + <%require name="common:widget/css-base/dist/base.ltr.css"%> + <%require name="common:widget/css-base/dist/base.ltr.ie.css"%> +<%else%> + <%require name="home:widget/custom-sidebar/rtl/rtl.css"%> + <%require name="common:widget/css-base/dist/base.rtl.css"%> + <%require name="common:widget/css-base/dist/base.rtl.ie.css"%> +<%/if%> +<%require name="common:widget/ui/css-ui/css-ui.css"%> + + +<%script%> + conf.customSidebar = {}; + require.async("home:widget/custom-sidebar/custom-sidebar-async.js", function(customSidebar){ + window.hao123 || (window.hao123 = {}); + if (hao123.appList) { + sb = new customSidebar(hao123.appList); + sb.init(); + } + + }); + + //主站特型气泡列表,这里写一份是因为fis在编译时无法解析来自于数据的地址 + conf.customSidebar.specialBubble = { + "sidebarVote" : '<%uri name="home:widget/sidebar-vote/sidebar-tips-vote-async.js"%>' + }; + conf.customSidebar.newsTypeList = [ + <%foreach $body.News.news_sort as $value%> + { + id: '<%$value.type|default:$value@iteration%>' + }<%if !$value@last%>,<%/if%> + <%/foreach%> + ]; +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/arrow-wrap.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/arrow-wrap.png new file mode 100755 index 000000000..9247ce709 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/arrow-wrap.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-apps.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-apps.png new file mode 100755 index 000000000..b1241d3ab Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-apps.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-close-bubble-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-close-bubble-hover.png new file mode 100755 index 000000000..ce2f19fae Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-close-bubble-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-close-bubble.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-close-bubble.png new file mode 100755 index 000000000..80e7f1be1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-close-bubble.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closebar-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closebar-hover.png new file mode 100755 index 000000000..23a49ccfc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closebar-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closebar.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closebar.png new file mode 100755 index 000000000..035c0e625 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closebar.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closecon-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closecon-hover.png new file mode 100755 index 000000000..9e0507ed8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closecon-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closecon.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closecon.png new file mode 100755 index 000000000..26ef0bbe3 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-closecon.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-delete-app.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-delete-app.png new file mode 100755 index 000000000..cb420da21 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-delete-app.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-openbar-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-openbar-hover.png new file mode 100755 index 000000000..bbda34c11 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-openbar-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-openbar.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-openbar.png new file mode 100755 index 000000000..e2a31eb51 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-openbar.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll-click.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll-click.png new file mode 100755 index 000000000..d053bda31 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll-click.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll-hover.png new file mode 100755 index 000000000..9db57aff9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll.png new file mode 100755 index 000000000..0a240ecad Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/i-scroll.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/widget_loading.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/widget_loading.gif new file mode 100755 index 000000000..b1917cc86 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/img/widget_loading.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/ltr/ltr.css new file mode 100755 index 000000000..8dfd824ef --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/custom-sidebar/ltr/ltr.css @@ -0,0 +1,355 @@ +/*sidebar外框*/ +.mod-custom-sidebar{ + position: fixed; + top: 0; + bottom: 0; + left: 0; + z-index: 300; + display: block !important; +} +.mod-custom-sidebar .sidebar-wrap{ + width: 45px; + height: 100%; + background-color: #dbdedd; +} +.mod-custom-sidebar .sidebar-fold{ + margin-left: -50px; +} + + + +/*通用动画*/ +.mod-custom-sidebar .trans-all{ + transition: all 0.3s; +} +/*所有icon通用样式*/ +.mod-custom-sidebar .icons-wrap{ + position: relative; + width: 45px; + height: 60px; + line-height: 60px; + text-align: center; + cursor: pointer; +} +.mod-custom-sidebar .icons-wrap .icons{ + display: inline-block; + width: 34px; + height: 34px; + vertical-align: middle; +} +.mod-custom-sidebar .show{ + display: block !important; +} +.mod-custom-sidebar .widget-load{ + position: absolute; + display: block; + top: 100px; + left: 110px; + width: 100%; + height: 16px; + background: url(../img/widget_loading.gif) no-repeat; +} + + +/*展开/收起sidebar的开关*/ +.mod-custom-sidebar .sidebar-switch{ + position: absolute; + height: 45px; + bottom: 0px; +} +/*sidebar展开的时候*/ +.mod-custom-sidebar .arrow-wrap{ + position: absolute; + bottom: 8px; + width: 62px; + height: 49px; + z-index: -1; + left: -17px; + background: url(../img/arrow-wrap.png?__sprite) no-repeat; +} +.mod-custom-sidebar .switch-arrow{ + display: block; + width: 25px; + height: 24px; + margin-left: 10px; + background: url(../img/i-closebar.png?__sprite) no-repeat; +} +.mod-custom-sidebar .switch-arrow:hover{ + cursor: pointer; + background: url(../img/i-closebar-hover.png?__sprite) no-repeat; +} +/*sidebar收起的时候*/ +.mod-custom-sidebar .switch-out .arrow-wrap{ + left: 0; +} +.mod-custom-sidebar .switch-out .switch-arrow{ + margin-left: 25px; + background: url(../img/i-openbar.png?__sprite) no-repeat; +} +.mod-custom-sidebar .switch-out .switch-arrow:hover{ + background: url(../img/i-openbar-hover.png?__sprite) no-repeat; +} + + + + +/*展开定制APP模块的icon*/ +.mod-custom-sidebar .open-apps{ + position: absolute; + bottom: 54px; +} +.mod-custom-sidebar .open-apps .icons{ + background: url(../img/i-apps.png?__sprite) no-repeat; +} + + + +/*app列表*/ +.mod-custom-sidebar .apps-wrap{ + position: relative; + max-height: 660px; +} +.mod-custom-sidebar .applist{ + position: relative; + width: 45px; + height: auto; +} +.mod-custom-sidebar .app-icons-wrap:hover,.mod-custom-sidebar .app-selected,.mod-custom-sidebar .app-hover{ + background-color: #c6c7ca; +} +/*app鼠标hover以后的提示语*/ +.mod-custom-sidebar .hover-tip{ + position: absolute; + height: 60px; + line-height: 16px; + width: 150px; + left: 45px; + top: 0; + background-color: #c6c7ca; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + color: white; + text-align: center; + display: none; + text-align: left; + padding:0 10px; +} +.mod-custom-sidebar .hover-tip span{ + display: table-cell; + vertical-align: middle; + color: #808080; +} +.mod-custom-sidebar .dis-table{ + display: table; +} +/*app删除按钮*/ +.mod-custom-sidebar .delete-app{ + position: absolute; + display: none; + width: 18px; + height: 16px; + top: 5px; + right: -3px; + background: url(../img/i-delete-app.png?__sprite) no-repeat; +} +/*appicon的白色箭头*/ +.mod-custom-sidebar b.ui-arrow-l{ + border-right-color:white; + right: 0px; + left: auto; +} +.mod-custom-sidebar b.ui-arrow{ + display: none; + right: -1px; +} +.mod-custom-sidebar .app-selected b.ui-arrow{ + display: block; +} + +/*app切屏按钮*/ +.mod-custom-sidebar .app-switch{ + position: absolute; + bottom: 114px; + border-top: 1px solid #c7c7c7; + border-bottom: 1px solid #c7c7c7; + display: none; +} +.mod-custom-sidebar .switch-icon{ + background: url(../img/i-scroll.png?__sprite) no-repeat; +} +.mod-custom-sidebar .switch-icon:hover{ + background: url(../img/i-scroll-hover.png?__sprite) no-repeat; +} +.mod-custom-sidebar .app-switch .click{ + background: url(../img/i-scroll-click.png?__sprite) no-repeat; +} + + + +/*app内容区*/ +.mod-custom-sidebar .app-content{ + height: auto; +} +.mod-custom-sidebar .app-content .show{ + left: 45px; + transition: left 0.3s; +} +.mod-custom-sidebar .content-wrap{ + position: absolute; + min-width: 239px; + height: auto; + background-color: #ffffff; + top: 0; + left: -500px; + border: 1px solid #cdcdcd; + box-shadow: 4px 4px 10px #d0d3d2; + z-index: -1; + transition: left 0.3s; +} +/*内容区通栏*/ +.mod-custom-sidebar div.fullsize{ + height: 100%; + width: 300px; +} +.mod-custom-sidebar .app-substance{ + min-height: 100px; + min-width: 100px; +} +.mod-custom-sidebar .fullsize .app-substance{ + position: absolute; + width: 100%; + top: 47px; + bottom: 0; + overflow: auto; +} + +.mod-custom-sidebar .app-title{ + width: auto; + height: 46px; + line-height: 46px; + border-bottom: 1px solid #cdcdcd; + color: #00ac73; + padding-left: 15px; + font-size: 14px; +} +.mod-custom-sidebar .app-title .content-close{ + position: absolute; + display: inline-block; + width: 22px; + height: 22px; + right: 15px; + top: 13px; + background: url(../img/i-closecon.png?__sprite) no-repeat; + cursor: pointer; +} +.mod-custom-sidebar .app-title .content-close:hover{ + background: url(../img/i-closecon-hover.png?__sprite) no-repeat; +} + + +/*引导气泡*/ +.mod-custom-sidebar .guide-bubble{ + position: absolute; + display: inline-block; + height: 60px; + width: 150px; + text-align: left; + top: 0; + background-color: #c6c7ca; + left: 45px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + color: #808080; +} +.mod-custom-sidebar .bubble-close{ + position: absolute; + display: inline-block; + width: 18px; + height: 18px; + top: -5px; + right: -5px; + background: url(../img/i-close-bubble.png?__sprite) no-repeat; + +} +.mod-custom-sidebar .bubble-close:hover{ + cursor: pointer; + background: url(../img/i-close-bubble-hover.png?__sprite) no-repeat; +} + +.mod-custom-sidebar .open-content{ + cursor: pointer; +} +.mod-custom-sidebar .bubble-wrap{ + height: 100%; + width: 100%; + cursor: default; + display: table; + cursor: pointer; +} +.mod-custom-sidebar .bubble-text{ + display: table-cell; + line-height: 16px; + vertical-align: middle; + padding-left: 10px; +} +/*红色消息提醒气泡*/ +.mod-custom-sidebar .message{ + position: absolute; + min-width: 19px; + *min-width: 14px; + height: 16px; + border-radius: 8px; + background-color: #f71e01; + left: 30px; + top:0; + background-image:linear-gradient(180deg, #fd5025 0%, #ef0703 100%); + text-shadow:0 -1px 1px #6f1e00; + line-height: 16px; + color: white; + font-size: 14px; + z-index: 2; + border-bottom:2px solid rgba(0,0,0,.5); + padding: 1px 1px 0px 0px; + padding: 0px\0; +} +.mod-custom-sidebar .arrow-wrap .message{ + left: 44px; + top: -4px; + text-align: center; +} + +.mod-custom-sidebar .dragging{ + z-index: 10; +} +.mod-custom-sidebar .shaking{ + -moz-transform: rotate(-3deg); + -webkit-transform: rotate(-3deg); + -ms-transform: rotate(-3deg); +} +.mod-custom-sidebar .invisible{ + visibility: hidden; +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/customsites-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/customsites-async.js new file mode 100755 index 000000000..029a6c907 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/customsites-async.js @@ -0,0 +1,536 @@ +var $ = jQuery = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); +require("common:widget/ui/jquery/widget/jquery.ui.position/jquery.ui.position.js"); +require("common:widget/ui/jquery/widget/jquery.ui.button/jquery.ui.button.js"); +require("common:widget/ui/jquery/widget/jquery.ui.tip/jquery.ui.tip.js"); +require("common:widget/ui/jquery/widget/jquery.ui.autocomplete/jquery.ui.autocomplete.js"); +require("common:widget/ui/jquery/widget/jquery.ui.autocomplete.html/jquery.ui.autocomplete.html.js"); + $(function(){ + //测试是否支持cookie + jQuery.cookie("supportCookie",true); + var supportCookie = !!jQuery.cookie("supportCookie"), + defaultImg = conf.customSite.defaultIcon, + template = 'name", + custom_list = $("#custom_list"), + addBtn = $("#add-btn"), + siteAddr = $("#website-address"), + siteName = $("#website-name"), + customForm = $("#customsite-con"), + suggestUrl = conf.customSite.suggestUrl, + btn_ok_txt = conf.customSite.btnOk, + btn_cancel_txt = conf.customSite.btnCan, + tipContent = conf.customSite.tipContent, + recordUrl = "", + customSiteList = 0, + //用于suggest标识产品名称 + prod = "global_hao123_" + conf.country, + //最多只能自定义10个 + maxSite = 10, + modifiedIndex = -1, + forTn = $("
                                  "), + query = helper.getQuery(), + tn = query.tn; + // Customize hotsite's links according to tn query + forTn.append($(".hotsite-for_tn")); + + tn && forTn.children().each(function () { + var that = $(this), + hotsiteEle = $(".hotsite > span"), + dataTn = that.attr("data-tn").split("|"), + dataPos = that.attr("data-pos"); + dataPos = dataPos >= 0 && dataPos < hotsiteEle.length ? dataPos : hotsiteEle.length - 1; + for (var i = 0; i < dataTn.length; i++) { + if (dataTn[i] === tn) { + that.css("display", "inline-block"); + hotsiteEle.last().hide(); + hotsiteEle.eq(dataPos).before(that); + break; + } + } + }); + + var getFavIconUrl = function(url){ + prohost = url.match(/([^:\/?#]+:\/\/)?([^\/@:]+)/i); + prohost = prohost ? prohost : [true,"http://",document.location.hostname]; + //抓取ico + return prohost[1] + prohost[2] + "/favicon.ico"; + }; + //支持cookie才会用 + if( supportCookie ) { + var first = jQuery.cookie("isOpensitelist"); + var customSite = jQuery.cookie("customSite"); + var showContent = conf.customSite.showContent; + var defaultIsShow = showContent ? parseInt( conf.customSite.showContent ) : 1; + //无cookie时默认展开 + if(first === null || first === undefined) { + // changed by chenliang PM配置默认展示还是隐藏 + first = defaultIsShow; + } + //用户上一次是否已经选择打开 + if (first & 1){ + custom_list.show(); + $("#custom_bar").addClass("bar_open"); + } + try { + if(window.localStorage) { + if(localStorage.getItem("customSite")) { + }else { + localStorage.setItem("customSite", customSite || '{"list":[]}'); + } + //jQuery.cookie("customSite", null); + customSite = $.parseJSON(localStorage.getItem("customSite")); + } else { + custom_list.parent().remove(); + customSite = $.parseJSON('{"list":[]}'); + //jQuery.cookie("customSite", null); + } + } catch(e) { + custom_list.parent().remove(); + customSite = $.parseJSON('{"list":[]}'); + //jQuery.cookie("customSite", null); + } + //添加用户已经定义的网站 + //customSite = $.parseJSON(customSite || '{"list":[]}'); + $.each(customSite.list, function( pos,siteInfo ){ + var temp = template.replace("url",siteInfo["url"]) + .replace("name",siteInfo["name"]) + .replace("imgUrl",siteInfo["imgurl"]); + $(temp).insertBefore("#add-btn"); + }); + customSiteList = customSite.list.length; + ( customSiteList < 10 ) && addBtn.show(); + + $(document).mousedown( function(e){ + var target = $( e.target ), + autocompleteWidget = siteAddr.autocomplete("widget"), + isVisibleForm = customForm.is(":visible"), + isCloseCustomCon = customForm && !target.closest("#customsite-con").length && !target.closest("#add-btn").length && !target.closest( ".ui-menu-item",autocompleteWidget).length, + tipWidget = $("#tip").tip("widget"), + isCloseTip = tipWidget.is(":visible") && !target.hasClass("del") && !target.closest(tipWidget).length; + if ( isCloseCustomCon) { + customForm.hide(); + siteAddr.autocomplete("close"); + //解决网速比较慢的情况,防止suggest出现慢 + } else if( !isVisibleForm){ + siteAddr.autocomplete("close"); + } + //关闭tip + if ( isCloseTip ) { + $("#tip").tip("close"); + $(".del",custom_list).removeClass("sprite-del_ative"); + } + }); + //点击添加自定义条 + $("#custom_bar").click(function(e){ + var self = this; + + if(!$(self).hasClass("bar_open")) { + UT.send({ + type:"click", + position:"folder", + sort: "open", + modId:"customsites" + }); + } else { + UT.send({ + type:"click", + position:"folder", + sort: "close", + modId:"customsites" + }); + } + custom_list.slideToggle("fast",function(){ + var isFirst = jQuery.cookie("isOpensitelist"), + // changed by chenliang PM配置默认展示还是隐藏 + isOpen = (isFirst === null) ? ( defaultIsShow ? 0 : 1 ) : jQuery.cookie("isOpensitelist")^1; + $(self).toggleClass("bar_open"); + //ie6 bug + custom_list.css('overflow', 'visible'); + //记录用户的打开情况 + jQuery.cookie("isOpensitelist",isOpen,{ expires:2000, path: '/'}); + }); + }); + //suggest + //百度suggest全局函数 。。。。。。。。。 + if ( !window.baidu ) { + window.baidu = {}; + } + window.baidu.sug = function( data ){ + var suggest = [], + l = data.s.length, + isVisibleForm = customForm.is(":visible"); + if ( (l > 0) && isVisibleForm ) { + var regEx = new RegExp("^" + custom_suggest_currentVal , "i"); + $.each( data.s, function(key, val){ + + var lab = val.replace(regEx, "" + custom_suggest_currentVal +""); + suggest.push({ label:lab, value:val}); + }); + custom_suggest_resp(suggest); + } else{ + siteAddr.autocomplete("close"); + } + } + //测试数据 + var autoOpts = { + source:function(req, resp){ + var currentVal = req.term; + //全局表单列表,给回调函数 + custom_suggest_resp = resp; + //全局记录表单输入当前值 + custom_suggest_currentVal = currentVal; + $.ajax({ + dataType: 'jsonp', + type: "get", + url: suggestUrl, + data: {prod:prod, wd:currentVal}, + jsonp:"callback" + }); + }, + html: true, + select: function( e, ui ){ + //回车,鼠标点击不提交 + e.preventDefault(); + var url = ui.item.value, + speHostName = ["com","co"]; + //空串 + if ( !url ) { return;} + siteAddr.val( url ); + //自动填充名称字段 + url = String(url).split("/")[0].split("."); + if ( url&&url[1] ) { + //如果有com直接使用com前面的 + var pos = -1, + name = ""; + jQuery.each(speHostName,function(key,val){ + var position = jQuery.inArray(val,url); + if ( position>0 ){ + pos = position; + return false; + } + }); + //有com + if ( pos>0 ) { + name = url[pos-1]; + //没有com + } else { + name = (url.length > 2) ? url[1] : url[0]; + } + siteName.val( name ).get(0).select(); + } + //关闭 + } + }; + siteAddr.autocomplete(autoOpts); + custom_list.delegate(".add-btn","click",function(e){ + var target = $(e.target); + modifiedIndex = -1; + if (target.is(".add-btn-txt,.add-btn,.add-btn-ico")){ + var btnObj = target.closest('.custom_item'), + position = btnObj.position(), + btnLeft = position.left, + btnWidth = btnObj.width(), + formWidth = customForm.width(); + left = conf.dir === "rtl" ? (btnLeft + btnWidth - formWidth) : (btnLeft + parseInt(btnObj.css('margin-left'))); + customForm.css({ + "left":left, + "top":position.top + parseInt(btnObj.css('margin-top')) + }).show().get(0).reset(); + siteAddr.get(0).focus(); //focus第一个input + } + }); + + //自定义网站提交 + customForm.submit( function( e ){ + e.preventDefault(); + siteAddr.autocomplete("close"); + var url = $.trim( siteAddr.val() ), + //如果只填写了地址,没有填写name,使用url代替name + name = $.trim( siteName.val() ) || url, + imgUrl = "", + prohost = "", + customSite = window.localStorage ? $.parseJSON(localStorage.getItem("customSite") || '{"list":[]}') : $.parseJSON('{"list":[]}'); + //填写了address和name或者只填写了address记录填写信息 + if ( name && url ){ + prohost = url.match(/([^:\/?#]+:\/\/)?([^\/@:]+)/i); + prohost = prohost ? prohost : [true,"http://",document.location.hostname]; + //用于统计 + recordUrl = url; + //补全url + if ( !prohost[1] ) { + prohost[1] = "http://"; + url = "http://" + url; + } + //抓取ico + imgUrl = prohost[1] + prohost[2] + "/favicon.ico"; + + //写入dom树 + var temp = template.replace("url",url) + .replace("name",name) + .replace("imgUrl",imgUrl); + if(modifiedIndex == -1){//新增 + //记录到cookie + customSite.list.push({ + name: name, + url : url, + imgurl : imgUrl + }); + addBtn.before(temp); + // 1.统计总添加网站次数2.统计各国添加的top50URL + UT.send({ + type:"click", + ac:"b", + position:"add", + url:url, + sort:"input", + modId:"customsites" + }); + }else{//修改 + if(customSite.list[modifiedIndex].name == name && customSite.list[modifiedIndex].url == url){ + //modifiedIndex = -1; + this.reset();//清空表单 + siteAddr.removeClass("err-warn"); + $(this).hide();//关闭 + return; + }else{ + $(".custom_item:eq("+modifiedIndex+")").replaceWith(temp); + customSite.list[modifiedIndex].name = name; + customSite.list[modifiedIndex].url = url; + customSite.list[modifiedIndex].imgurl = imgUrl; + //modifiedIndex = -1; + // 1.统计总添加网站次数2.统计各国添加的top50URL + UT.send({ + type:"click", + ac:"b", + position:"add", + url:url, + sort:"input", + modId:"customsites" + }); + } + } + + var length = customSite.list.length; + //记录到localStorage中 + if(window.localStorage) { + localStorage.setItem("customSite", jQuery.toJSON(customSite)); + } + customSiteList = length; + //只能写入10个自定义网址 + ( length === maxSite ) && addBtn.hide(); + } else if( name ) {//只填写了name ,不然提交,address框变红 + siteAddr.addClass("err-warn") + .get(0) + .focus(); + return; + } + //清空表单 + this.reset(); + siteAddr.removeClass("err-warn"); + //关闭 + $(this).hide(); + }); + //添加自定义按钮事件 + $("#del-btn-ok").button() + .click(function( e ){ + e.preventDefault(); + customForm.trigger("submit"); + }); + $("#del-btn-cancel").button() + .click(function( e ){ + e.preventDefault(); + customForm.hide(); + //删除警告 + siteAddr.removeClass("err-warn"); + }); + //ok,cancel button + //删除提示 + var tip_conf = { + closeOnEscape: false, + id : "customTip", + buttons: { "Ok": { + text:btn_ok_txt, + click:function() { + //关闭tip + var option = $(this).tip("option"), + item = $(".custom_item",custom_list), + pos = $.inArray( option.delOb.get(0),item.get() ), + length = 0; + if ( pos>-1 ) { + option.delOb.remove(); + var customSite = ""; + // 记录到localSorage + if(window.localStorage) { + customSite = localStorage.getItem("customSite"); + } + //var customSite = jQuery.cookie("customSite"); + customSite = $.parseJSON(customSite || '{"list":[]}'); + customSite.list.splice(pos , 1); + length = customSite.list.length; + if(window.localStorage) { + localStorage.setItem("customSite", jQuery.toJSON(customSite)); + } + //jQuery.cookie("customSite", jQuery.toJSON(customSite),{ expires:2000, path: '/'}); + //如果所有自定义网站清除,也清空cookie(改为清空localStorage) + if ( !length ) { + //jQuery.cookie("customSite", null,{path: '/'}); + if(window.localStorage) { + localStorage.setItem("customSite", '{"list":[]}'); + } + } + //如果已经满10删除,回复添加按钮 + ( ++length === maxSite ) && addBtn.show(); + option.delOb = null; + } + $(this).tip("close"); + }, + addClass: "mod-btn_normal" + }, + "Cancel": { + text:btn_cancel_txt, + click:function() { + var option = $(this).tip("option"); + $(this).tip("close"); + $(".sprite-del_ative",custom_list).removeClass("sprite-del_ative"); + }, + addClass: "mod-btn_cancel" + } + } + } + $('
                                  '+ tipContent + '
                                  ').tip(tip_conf); + $(".ui-tip a").button(); + //阻止点击del后跳转 + custom_list.delegate(".custom_item","click",function(e){ + var target = $(e.target); + if ( target.hasClass("btn") ){ + e.preventDefault(); + } + }); + addBtn.hover(function(e){ + $(this).toggleClass("add-btn_hover"); + }); + //点击删除按钮 + custom_list.delegate(".del","click",function(e){ + //点击自己 + if ( $(this).hasClass("sprite-del_ative") ) { + return; + } + //删除已经打开的窗口 + $("#tip").tip("close"); + //删除上一次打开的 + $(".sprite-del_ative",custom_list).removeClass("sprite-del_ative"); + //计算tip的高度 + var tipWidget = $("#tip").tip("widget"), + target = $(this), + delOb = $(e.target).parent(".custom_item"); + //激活删除按钮 + target.addClass("sprite-del_ative"); + + UT.send({ + type:"click", + position:"set", + sort: "delete", + modId:"customsites" + }); + + //记录激活过的按钮 + $("#tip").tip({autoOpen:"open",delOb:delOb,ativeObj:target}); + }).delegate(".del","hover",function( e ){ + var odel = $(this); + odel.toggleClass("sprite-del_hover"); + }); + + custom_list.delegate(".modify","click",function(e){ + var target = $(e.target), + modifyOb = target.parent(); + //$("#customsite-con").detach().appendTo(modifyOb); + //点击自己 + if ( $(this).hasClass("sprite-modify_ative") ) { + return; + } + //删除已经打开的窗口 + //tip.tip("close"); + //删除上一次打开的 + $(".sprite-modify_ative",custom_list).removeClass("sprite-modify_ative"); + if(customForm.is(":hidden")){ + var position = modifyOb.position(), + btnLeft = position.left, + btnWidth = modifyOb.width(), + formWidth = customForm.width(); + left = conf.dir === "rtl" ? (btnLeft + btnWidth - formWidth) : (btnLeft + parseInt(modifyOb.css('margin-left'))); + customForm.css({ + "left":left, + "top":position.top + parseInt(modifyOb.css('margin-top')) + }).show(); + } + siteAddr.val(modifyOb.attr("href"))[0].select(); + siteName.val(target.prev().text()); + modifiedIndex = $(".custom_item").index(modifyOb); + UT.send({ + type:"click", + position:"set", + sort: "edit", + modId:"customsites" + }); + }).delegate(".modify","hover",function( e ){ + var omodify = $(this); + omodify.toggleClass("sprite-modify_hover"); + }); + /* + 1.统计使用自定义模块的UV数(包括有添加网站 或 点出两种行为的去重UV) + 2.统计总添加网站次数(通过element(button)区分)统计使用自定义模块的UV数 + 3.统计点出次数(通过element(span或者a)区分) + 4.统计各国添加的top50URL + 5.统计各国点击出去的top50URL + */ + custom_list.mousedown(function(e){ + var url = "", + elementName = e.target.nodeName.toLowerCase(), + needLog = $(e.target).not("i").closest("a"); + if ( recordUrl ) { + url = recordUrl; + recordUrl= ""; + } + //只有a标签才做统计 + if ( needLog.length ) { + UT.send({ + type:"click", + position:"click", + sort: "click", + url:url || needLog.attr("href") || "", + modId:"customsites" + }); + } + }); + + //custom hotsite bubble: it will always be shown unless user close this bubble + /*if(!$.cookie("showBubble")){ + $.cookie("showBubble",1,{ expires:2000, path: '/'}); + } + if($.cookie("showBubble") & 1){ + var hotsiteBubble = $("
                                  ").appendTo($(".hotsite-custom")).hide(), + customBarTxt = $("#custom_bar_txt"), + barPos = customBarTxt.position(), + offsetX = (conf.country == "ar")?-(hotsiteBubble.width() + 5):customBarTxt.width() + 5, + offsetY = customBarTxt.height() - hotsiteBubble.height()*0.88, + left = barPos.left + offsetX, + top = barPos.top + offsetY, + closeLeftPos = (conf.country == "ar")?0:hotsiteBubble.width()-19; + + hotsiteBubble.css({ + "top":top, + "left":left + }).show(); + $("#closeBubble").css({ + "left":closeLeftPos + }).click(function(){ + hotsiteBubble.hide(); + $.cookie("showBubble",0,{ expires:2000, path: '/'}); + }); + }*/ + } else { + //不支持cookie,直接隐藏 + $("#custom_bar").hide(); + } + }); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/customsites.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/customsites.tpl new file mode 100755 index 000000000..ad2b2a70d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/customsites.tpl @@ -0,0 +1,77 @@ +<%* 声明对ltr/rtl的css依赖 *%> + +<%if $head.dir=='ltr'%> + <%* inline 自定义区首屏样式 *%> + <%style%> + @import url('/widget/customsites/ltr/ltr.css?__inline'); + <%/style%> + <%require name="home:widget/customsites/ltr/ltr.more.css"%> + <%if !empty($head.splitHotsite) %> + <%* inline 自定义区首屏抽样样式 *%> + <%style%> + @import url('/widget/customsites/small-ltr/small-ltr.css?__inline'); + <%/style%> + <%/if%> + <%if !empty($head.flowLayout) %> + <%* inline 自定义区首屏两种布局样式 *%> + <%style%> + @import url('/widget/customsites/flow/ltr/ltr.flow.css?__inline'); + <%/style%> + <%/if%> +<%else%> + <%style%> + @import url('/widget/customsites/rtl/rtl.css?__inline'); + <%/style%> + <%require name="home:widget/customsites/rtl/rtl.more.css"%> + <%if !empty($head.splitHotsite) %> + <%* inline 自定义区首屏抽样样式 *%> + <%style%> + @import url('/widget/customsites/small-rtl/small-rtl.css?__inline'); + <%/style%> + <%/if%> + <%if !empty($head.flowLayout) %> + <%* inline 自定义区首屏两种布局样式 *%> + <%style%> + @import url('/widget/customsites/flow/rtl/rtl.flow.css?__inline'); + <%/style%> + <%/if%> +<%/if%> + +
                                  +
                                  + +
                                  +
                                  + + + <%$body.customSite.addbtnTitle%> + +
                                  +
                                  + + + + +
                                  + <%$body.customSite.btnOk%> + <%$body.customSite.btnCan%> +
                                  +
                                  +
                                  +
                                  +
                                  + +<%script%> + + <%*自定义网站*%> + conf.customSite={ + tipContent:"<%$body.customSite.tipContent%>", + btnOk:"<%$body.customSite.btnOk%>", + btnCan:"<%$body.customSite.btnCan%>", + defaultIcon:"<%$body.customSite.defaultIcon%>", + suggestUrl:"<%$body.customSite.suggestUrl%>", + showContent:"<%$body.customSite.showContent%>" + }; + + require.async('home:widget/customsites/customsites-async.js'); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..132649faf --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/flow/ltr/ltr.flow.css @@ -0,0 +1,17 @@ +.w960 .hotsite-custom{ + width: 648px; +} +.w960 .custom_item{ + margin-right: 0px; + margin-left: 7px; + width: 119px; +} +.w960 .custom_item .btn{ + margin-right: 1px; +} +.w960 .custom_item span.ico-txt{ + margin-right: 1px; +} +.w960 .custom_item .btn{ + margin-right: 2px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/flow/rtl/rtl.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/flow/rtl/rtl.flow.css new file mode 100755 index 000000000..d5584ad1b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/flow/rtl/rtl.flow.css @@ -0,0 +1,17 @@ +.w960 .hotsite-custom{ + width: 648px; +} +.w960 .custom_item{ + margin-left: 0px; + margin-right: 7px; + width: 119px; +} +.w960 .custom_item .btn{ + margin-left: 1px; +} +.w960 .custom_item span.ico-txt{ + margin-left: 1px; +} +.w960 .custom_item .btn{ + margin-left: 2px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/customsite-add-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/customsite-add-bg.png new file mode 100755 index 000000000..0f2484237 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/customsite-add-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-fold-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-fold-hover.png new file mode 100755 index 000000000..bd8c5524b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-fold-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-fold.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-fold.png new file mode 100755 index 000000000..1fadf73ad Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-fold.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-open-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-open-hover.png new file mode 100755 index 000000000..7ec5f33da Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-open-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-open.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-open.png new file mode 100755 index 000000000..2236aae04 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-bar-open.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-add.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-add.png new file mode 100755 index 000000000..59aa19b07 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-add.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del-active.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del-active.png new file mode 100755 index 000000000..84dcef73d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del-active.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del-hover.png new file mode 100755 index 000000000..0c48ad790 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del.png new file mode 100755 index 000000000..63eb75f39 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-del.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-modify-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-modify-hover.png new file mode 100755 index 000000000..3092ee5b6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-modify-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-modify.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-modify.png new file mode 100755 index 000000000..34e5e16ff Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/img/i-customsite-modify.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/ltr/ltr.css new file mode 100755 index 000000000..3cc184ead --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/ltr/ltr.css @@ -0,0 +1,4 @@ + +.hotsite-custom_list, +.hotsite-custom_list .add-btn +{display:none;overflow: visible;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/ltr/ltr.more.css new file mode 100755 index 000000000..96654b6e3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/ltr/ltr.more.css @@ -0,0 +1,40 @@ +.hotsite-custom{ border: 1px solid;border-top: 0 none; background-color: #fcfdff; position:relative; zoom:1; display: block;z-index: 2;border-color:#e2f2ed #d7ddde #cacccc #dfe4e6;padding-top: 18px;} +.hotsite-custom_bar{width: 100%;outline: none;position:relative;border-bottom:1px solid #e2f2ed;} +.hotsite-custom_bar a{ cursor:pointer;display: inline-block;*display: inline;*zoom:1;position: absolute;height: 15px;width: 43px;left:50%;margin-left:-21px;top:-14px;background: url("../img/i-bar-fold.png?__sprite") no-repeat;} +.hotsite-custom_bar a:hover{background: url("../img/i-bar-fold-hover.png?__sprite") no-repeat;} +.hotsite-custom .bar_open a{background: url("../img/i-bar-open.png?__sprite") no-repeat;} +.hotsite-custom .bar_open a:hover{background: url("../img/i-bar-open-hover.png?__sprite") no-repeat;} +.hotsite-custom_list{padding-bottom:10px;position: relative;/*z-index:5;*/text-align: left;background: #FFF;} +.custom_item{float:left;width:178px;border:1px solid #F5F6F7;background-color:#fafbfc;margin: 10px 0 0px 10px;/*font-size: 12px;*/height:24px;display:inline;border-radius:2px;cursor: pointer;} +a.custom_item:hover{background-color:#f0f1f2;cursor: pointer;} +a.custom_item:hover .btn{visibility:visible;} +body .hotsite-custom_list .add-btn_hover{background:#fafbfc;} +.hotsite-custom_list .add-btn{background: url("../img/customsite-add-bg.png?__sprite") repeat-x;border:1px solid;border-color:#ebebeb #ebebeb #d9dcde #ebebeb;text-align: center;color:#909191;height: 24px;line-height: 24px;cursor: pointer;/*position: relative;*/white-space:nowrap;} +.hotsite-custom_list .add-btn-ico{display:inline-block;*display: inline;*zoom:1;background: url("../img/i-customsite-add.png?__sprite") no-repeat;width:12px;height: 10px;vertical-align: middle;_vertical-align:-2px;} +.hotsite-custom_list .add-btn-txt{display:inline-block;*display: inline;*zoom:1;vertical-align: middle;} +/* .add-btn form{border:1px solid #D7DDDE;color:##454545;background-color:#ebfcf7;position:absolute;display: none;left:0;top:0;z-index:99; }*/ +.hotsite-custom_list form.box-prompt{line-height:24px;padding-top:0;width:178px;display: none;} +.hotsite-custom_list .box-prompt-inner{border:1px solid #FFF;border-bottom: none;} +.hotsite-custom_list form label{display: block;text-align: left;cursor: pointer;} +.hotsite-custom_list form input{border:1px solid;border-color:#D6D7D8 #E3E4E6 #E3E4E6 #EAEBEC;width:148px;height: 24px;display: block;line-height: 24px;overflow: hidden;padding-left: 10px;} +/*搜索列表定大小*/ +.hotsite-custom_list form input.err-warn{border-color:#ff7575} +#customTip .ui-tip-buttonset{text-align: center;} +body .ui-menu .ui-menu-item{width:100%;overflow: hidden;height: 28px;} +/*body .ui-autocomplete{width: 158px !important;}*/ +body .ui-menu .ui-menu-item a{padding-left: 10px;line-height: 28px;height:28px;} +.hotsite-custom_list form .btn-con{text-align: center;margin-top: 6px} +/*当前输入文字*/ +.current-val{color:red} +.custom_item span.ico-txt{margin: 4px;height: 16px;line-height: 16px;width: 136px;overflow: hidden;float: left;white-space:nowrap;color:#454545;text-overflow:ellipsis;-o-text-overflow:ellipsis;} +.custom_item .btn{float:left;height: 12px;width: 12px;overflow:hidden;margin-top:6px;margin-right:5px;cursor:pointer;z-index: 1000;visibility: hidden;} +.custom_item .sprite-del_normal{background:url("../img/i-customsite-del.png?__sprite") no-repeat;} +.custom_item .sprite-modify_normal{background:url("../img/i-customsite-modify.png?__sprite") no-repeat;} +.site-icon{height:16px;width:16px;overflow: hidden;display: inline-block;*zoom:1;*display: inline;} +.custom_item .site-icon{margin-right: 5px;vertical-align: top} +body .hotsite-custom_list .custom_item .sprite-del_ative{background:url("../img/i-customsite-del-active.png?__sprite") no-repeat;visibility:visible;} +/* .custom_item .sprite-modify_ative{background-position:-1px -957px!important;visibility:visible;}*/ +.hotsite-custom_list .custom_item .sprite-del_hover{background:url("../img/i-customsite-del.png?__sprite") no-repeat;} +.hotsite-custom_list .custom_item .sprite-modify_hover{background:url("../img/i-customsite-modify-hover.png?__sprite") no-repeat;} +.custom_item .del .del-tip{position:absolute;z-index: 100;background-color:#fff;display: block;text-align: center;color:#454545;font-size: 12px;} +#customTip .mod-btn_normal,#customTip .mod-btn_cancel{display:inline-block;float:none} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/rtl/rtl.css new file mode 100755 index 000000000..c9d68be74 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/rtl/rtl.css @@ -0,0 +1,3 @@ +.hotsite-custom_list, +.hotsite-custom_list .add-btn +{display:none;overflow: visible;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/rtl/rtl.more.css new file mode 100755 index 000000000..121ba07fc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/rtl/rtl.more.css @@ -0,0 +1,40 @@ +.hotsite-custom{ border: 1px solid;border-top: 0 none; background-color: #fcfdff; position:relative; zoom:1; display: block;z-index: 2;border-color:#e2f2ed #d7ddde #cacccc #dfe4e6;padding-top: 18px;} +.hotsite-custom_bar{width: 100%;outline: none;position:relative;border-bottom:1px solid #e2f2ed;} +.hotsite-custom_bar a{cursor:pointer;display: inline-block;*display: inline;*zoom:1;position: absolute;height: 15px;width: 43px;left:50%;margin-left:-21px;top:-14px;background:url("../img/i-bar-fold.png?__sprite") no-repeat;} +.hotsite-custom_bar a:hover{background: url("../img/i-bar-fold-hover.png?__sprite") no-repeat;} +.hotsite-custom .bar_open a{background: url("../img/i-bar-open.png?__sprite") no-repeat;} +.hotsite-custom .bar_open a:hover{background: url("../img/i-bar-open-hover.png?__sprite") no-repeat;} +.hotsite-custom_list{padding-bottom:10px;position: relative;/*z-index:5*/background: #FFF;} +.custom_item{float:right;width:178px;border:1px solid #F5F6F7;background-color:#fafbfc;margin: 10px 10px 0px 0;/*font-size: 12px;*/height:24px;display:inline;border-radius:2px;cursor: pointer;} +a.custom_item:hover{background-color:#f0f1f2;cursor: pointer;} +a.custom_item:hover .btn{visibility:visible;} +body .hotsite-custom_list .add-btn_hover{background:#fafbfc;} +.hotsite-custom_list .add-btn{background: url("../img/customsite-add-bg.png?__sprite") repeat-x;border:1px solid;border-color:#ebebeb #ebebeb #d9dcde #ebebeb;text-align: center;color:#909191;height: 24px;line-height: 24px;cursor: pointer;/*position: relative;*/white-space:nowrap;} +.hotsite-custom_list .add-btn-ico{display:inline-block;*display: inline;*zoom:1;background: url("../img/i-customsite-add.png?__sprite") no-repeat 3px 2px;width:12px;height: 10px;vertical-align: middle;_vertical-align:-2px;} +.hotsite-custom_list .add-btn-txt{display:inline-block;*display: inline;*zoom:1;vertical-align: middle;} +/* .add-btn form{border:1px solid #D7DDDE;color:##454545;background-color:#ebfcf7;position:absolute;display: none;left:0;top:0;z-index:99; }*/ +.hotsite-custom_list form.box-prompt{line-height:24px;padding-top:0;width:178px;display: none;} +.hotsite-custom_list .box-prompt-inner{border:1px solid #FFF;border-bottom: none;} +.hotsite-custom_list form label{display: block;text-align: right;cursor: pointer;zoom:1;} +.hotsite-custom_list form input{border:1px solid;border-color:#D6D7D8 #E3E4E6 #E3E4E6 #EAEBEC;width:148px;height: 24px;display: block;line-height: 24px;overflow: hidden;padding-right: 10px;} +/*搜索列表定大小*/ +.hotsite-custom_list form input.err-warn{border-color:#ff7575} +body .ui-menu .ui-menu-item{width:100%;overflow: hidden;height: 28px;} +/* body .ui-autocomplete{width: 158px !important;}*/ +body .ui-menu .ui-menu-item a{padding-left: 10px;line-height: 28px;height:28px;} +.hotsite-custom_list form .btn-con{text-align: center;margin-top: 6px} +/*当前输入文字*/ +.current-val{color:red} +.custom_item span.ico-txt{margin: 4px;height: 16px;line-height: 16px;width: 136px;overflow: hidden;float: right;white-space:nowrap;color:#454545;text-overflow:ellipsis;-o-text-overflow:ellipsis;} +.custom_item .btn{float:right;height: 12px;width: 12px;overflow:hidden;margin-top:6px;margin-left:5px;cursor:pointer;z-index: 1000;visibility: hidden;} +.custom_item .sprite-del_normal{background:url("../img/i-customsite-del.png?__sprite") no-repeat;} +.custom_item .sprite-modify_normal{background:url("../img/i-customsite-modify.png?__sprite") no-repeat;} +.site-icon{height:16px;width:16px;overflow: hidden;display: inline-block;*zoom:1;*display: inline;} +.custom_item .site-icon{margin-left: 5px;vertical-align: top} +body .hotsite-custom_list .custom_item .sprite-del_ative{background:url("../img/i-customsite-del-active.png?__sprite") no-repeat !important;visibility:visible;} +/*.custom_item .sprite-modify_ative{background-position:-1px -957px!important;visibility:visible;}*/ +.hotsite-custom_list .custom_item .sprite-del_hover{background:url("../img/i-customsite-del.png?__sprite") no-repeat;} +.hotsite-custom_list .custom_item .sprite-modify_hover{background:url("../img/i-customsite-modify-hover.png?__sprite") no-repeat;} +.custom_item .del .del-tip{position:absolute;z-index: 100;background-color:#fff;display: block;text-align: center;color:#454545;font-size: 12px;} +#customTip .mod-btn_normal,#customTip .mod-btn_cancel{display:inline-block;float:none} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/small-ltr/small-ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/small-ltr/small-ltr.css new file mode 100755 index 000000000..f856260e6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/small-ltr/small-ltr.css @@ -0,0 +1,3 @@ +body .hotsite-custom{width: 708px;float: left;padding-top: 16px;} +body .custom_item{ width: 128px; height: 25px;overflow: hidden;} +body .custom_item span.ico-txt{ width: 86px; } \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/small-rtl/small-rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/small-rtl/small-rtl.css new file mode 100755 index 000000000..25f75c60b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/customsites/small-rtl/small-rtl.css @@ -0,0 +1,3 @@ +body .hotsite-custom{width: 708px;float: right;padding-top: 16px;} +body .custom_item{ width: 128px;height: 25px;overflow: hidden; } +body .custom_item span.ico-txt{ width: 86px; } diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/daily-sign-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/daily-sign-async.js new file mode 100755 index 000000000..133e422d0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/daily-sign-async.js @@ -0,0 +1,450 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); + +var _conf = conf.dailySign, + _jumpUrl = _conf.jumpUrl, + _api = conf.apiUrlPrefix, + _box = _conf.box, + _boxOpen = _conf.boxOpen, + _noLog = _conf.noLog, + _logged = _conf.logged, + _noLogBub = _conf.noLogBubble, + _loggedBub = _conf.loggedBubble, + _dailyTips = _conf.dailyTips; + +_loggedBub.link = _jumpUrl; +_dailyTips.link = _jumpUrl; +_noLogBub.link = _jumpUrl; +_logged.box = _box; +_noLog.box = _box; +_dailyTips.id = _conf.dailyTipId; + +var _tpl = { + noLogTitle: '#{content}', + loggedTitle: '#{content}
                                  [x0]
                                  ', + noLogBubble: '

                                  #{content}#{more}

                                  #{login}

                                  ', + loggedBubble: '

                                  #{content}#{more}

                                  ', + dailyTips: '

                                  #{title}

                                  ' +}; + +var dailySign = $("#" + _conf.id), + dailyTips = "#" + _conf.dailyTipId, + signTitle = $(".ds-title", dailySign), + noLogTitle = $(".ds-out-title", dailySign), + noLogBubble = $(".ds-out-bubble", dailySign), + loggedTitle = $(".ds-in-title", dailySign), + loggedBubble = $(".ds-in-bubble", dailySign), + bubbleWrap = $(".ds-bubble", dailySign); + +var isSigned = false, // 用户签到状态 + isGift = false, // 是否提醒礼物 + _tn = helper.getQuery()["tn"], + isTn = checkTn(_tn), // 是否为客户端签到 + repTpl = helper.replaceTpl; + +// check当前TN号是否属于客户端TN号 +function checkTn(tn) { + var arrTn = $.trim(_conf.tn); + if (arrTn === "") { + return false; + } + arrTn = arrTn.split("|"); + for (var i = 0, j = arrTn.length; i < j; i++) { + if (arrTn[i] === tn) { + return true; + } + } + return false; +} + +var controller = { + // 初始化 + init: function() { + var that = this; + isTn && that.showDailyTips(); + //if(that.checkStatus()) { + //that.loggedInit(); + //} else { + that.noLogInit(); + //} + that.bindEvent(); + }, + // 未登录FB时初始化 + noLogInit: function() { + var that = this; + that.createNoLogHtml(); + that.bindNoLogEvent(); + that.showTips(); + + loggedTitle.hide(); + loggedBubble.hide(); + }, + // 账号登录后初始化 + loggedInit: function() { + var that = this; + + that.createLoggedHtml(); + that.bindLoggedEvent(); + + noLogTitle.hide(); + noLogBubble.hide(); + bubbleWrap.hide(); + loggedBubble.show(); + loggedTitle.css("display", "block"); + isTn && loggedBubble.find(".ds-btn-wrap").remove(); + + that.getGiftMsg(that.updateGiftTips); + that.checkSignStatus(that.updateKey, that.showTips, that.updateSignedWord); + }, + // 蒙层弹窗每日提醒初始化 + dailyTipsInit: function() { + var that = this; + that.createDailyTipsHtml(); + that.bindDailyTipsEvent(); + }, + // 不记cookie的气泡提醒 + showTips: function() { + bubbleWrap.show(); + setTimeout(function() { + (!isGift) && bubbleWrap.hide(); + }, _conf.tipAutoClose); + }, + // 蒙层弹窗每日提醒,仅有客户端 + showDailyTips: function() { + var that = this, + expir = that.fixTime(); + + if ($.cookie("dailyC")) return; + $.cookie("dailyC", 1, { + expires: expir + }); + that.dailyTipsInit(); + }, + // 获取一天内剩余时间 + fixTime: function() { + var that = this, + _date = that.getCurTime(), + stamp; + + stamp = 24*60*60-_date.getHours()*3600-_date.getMinutes()*60-_date.getSeconds(); + _date.setTime(_date.getTime() + stamp * 1000); + return _date; + }, + // 获取当前时间 + getCurTime: function() { + var _date; + if (Gl && Gl.time && Gl.time.getTime) { + _date = Gl.time.getTime(); + } + _date = _date || (new Date()); + return _date; + }, + // 获取登录状态 + checkStatus: function() { + return (loginCtroller && loginCtroller.verify == 1); + }, + // 登陆操作 + logIn: function() { + loginCtroller && loginCtroller.fire && loginCtroller.fire(); + }, + // 用户没有登录时创建HTML + createNoLogHtml: function() { + noLogTitle.html(repTpl(_tpl.noLogTitle, _noLog)); + noLogBubble.html(repTpl(_tpl.noLogBubble, _noLogBub)); + }, + // 用户登录后创建HTML + createLoggedHtml: function() { + loggedTitle.html(repTpl(_tpl.loggedTitle, _logged)); + loggedBubble.html(repTpl(_tpl.loggedBubble, _loggedBub)); + }, + // 创建只有客户端有的每日提醒HTML + createDailyTipsHtml: function() { + $(document.body).append(repTpl(_tpl.dailyTips, _dailyTips)); + dailyTips = $(dailyTips); + setTimeout(function() { + dailyTips.hide(); + }, _conf.dailyTipsDelay); + UT.send({ + "type" : "others", + "position" : "client", + "sort" : "tipsShow", + "modId" : "daily-sign" + }); + }, + // 整体事件绑定 + bindEvent: function() { + + dailySign.hover(function() { + var outBox = noLogTitle.find(".ds-out-box"), + inBox = loggedTitle.find(".ds-in-box"); + outBox && outBox.attr("src", _boxOpen); + inBox && inBox.attr("src", _boxOpen); + }, function() { + var outBox = noLogTitle.find(".ds-out-box"), + inBox = loggedTitle.find(".ds-in-box"); + outBox && outBox.attr("src", _box); + inBox && inBox.attr("src", _box); + bubbleWrap.hide(); + }); + }, + // 未登录事件绑定 + bindNoLogEvent: function() { + var that = this; + noLogTitle.on("click", function() { + bubbleWrap.show(); + }); + noLogBubble.on("click", ".ds-out-close", function() { + bubbleWrap.hide(); + }).on("click", ".ds-btn", function() { + that.logIn(); + if(isTn) { + that.sendLog("client", "login", true); + } else { + that.sendLog("web", "login", true); + } + //bubbleWrap.hide(); + }).on("click", ".ds-more", function() { + var _that = $(this), + url = _that.attr("href"); + if(isTn) { + that.sendLog("client", "detail"); + _that.attr("href", that.addTn(_tn, url)); + } else { + that.sendLog("web", "detail"); + } + }); + }, + // 已登录事件绑定 + bindLoggedEvent: function() { + var that = this; + loggedTitle.on("click", function(e) { + var _that = $(this), + url = _that.attr("href"); + if (isSigned) { + if (isTn) { + that.sendLog("client", "signed"); + _that.attr("href", that.addTn(_tn, url)); + } else { + that.sendLog("web", "signed"); + } + bubbleWrap.hide(); + } else { + if(isTn) { + that.signAction(that.updateSignedWord, that.updateKey); + that.sendLog("client", "sign"); + _that.attr("href", that.addTn(_tn, url)); + bubbleWrap.hide(); + } else { + bubbleWrap.show(); + e.preventDefault(); + } + } + }); + loggedBubble.on("click", ".ds-in-close", function(e) { + bubbleWrap.hide(); + }).on("click", ".ds-in-client", function(e) { + var _that = $(this), + url = _that.attr("href"); + !isSigned && that.sendLog("web", "signClient"); + if (url.search(/download/) > -1) {} else { + _that.attr("href", (url + ((url.search(/\?/) > -1) ? "&" : "?") + "download=1")); + } + bubbleWrap.hide(); + }).on("click", ".ds-in-web", function() { + if (!isSigned) { + that.sendLog("web", "signDirect"); + that.signAction(that.updateSignedWord, that.updateKey); + } + bubbleWrap.hide(); + }).on("click", ".ds-more", function() { + var _that = $(this), + url = _that.attr("href"); + if (isTn) { + that.sendLog("client", "detail"); + _that.attr("href", that.addTn(_tn, url)); + } else { + that.sendLog("web", "detail"); + } + }); + }, + // 蒙层事件绑定 + bindDailyTipsEvent: function() { + var that = this; + dailyTips.on("click", ".ds-pop-close", function() { + dailyTips.hide(); + that.sendLog("client", "tipClose"); + }).on("click", ".ds-pop-to", function() { + var _that = $(this), + url = _that.attr("href"); + if (isTn) { + that.sendLog("client", "detailTips"); + _that.attr("href", that.addTn(_tn, url)); + } + }); + }, + // URL添加TN参数 + addTn: function(tn, url) { + if(url.search(/tn=/) > -1) { + return url; + } + return url + ((url.search(/\?/) > -1) ? "&" : "?") + "tn=" + tn; + }, + // 检查签到状态 + checkSignStatus: function(callback1, callback2, callback3) { + var that = this; + $.ajax({ + type: 'get', + url: _api, + dataType: 'jsonp', + jsonp: 'jsonp', + data: { + app: "checkin", + act: "getInfo", + cno: _conf.cno, + country: conf.country + }, + success: function(data) { + data = (data && data["content"] && data["content"].data) || {}; + if (data["status"] == 1) { + data["gold_num"] && callback1.call(that, data["gold_num"]); + if (data["hascheckin"] == 1) { + isSigned = true; + callback3.call(that); + } else { + callback2.call(that); + } + } + } + }); + }, + // 用户已签到时页面跳转到活动页 + reloadSelf: function() { + var that = this, + curUrl = isTn ? that.addTn(_tn, _jumpUrl) : _jumpUrl; + + window.location.assign(curUrl); + }, + // 更新奖品提醒 + updateGiftTips: function(stamp) { + var that = this, + oldCo = $.cookie("dailyGift"), + liveCo = $.cookie("dailyLive"); + + var _curDate = that.getCurTime(), + _stampDate = (new Date()).setTime(stamp * 1000), + gap = _curDate.getTime() - stamp * 1000; + + if ((gap < 11*60*1000) || (gap >= 3*24*60*60*1000)) { + return; + } + _curDate.setTime(stamp * 1000 + 3*24*60*60*1000); + if (!liveCo) { + $.cookie("dailyLive", stamp, { + expires: parseInt(_conf.live, 10) + }); + $.cookie("dailyGift", stamp, { + expires: _curDate + }); + } else { + if (liveCo != stamp) { + $.cookie("dailyLive", stamp); + $.cookie("dailyGift", stamp, { + expires: _curDate + }); + } + } + if (liveCo == stamp && !oldCo) {} else { + isGift = true; + (!isTn) && loggedBubble.find(".ds-btn-wrap").remove(); + loggedBubble.find(".ds-content").html(_conf.giftTips); + bubbleWrap.show(); + } + }, + // 用户获奖信息,提示用户查看邮件 + getGiftMsg: function(callback) { + var that = this; + $.ajax({ + type: 'get', + url: _api, + dataType: 'jsonp', + jsonp: 'jsonp', + data: { + app: "activity", + ano: _conf.ano, + act: "userPrizeInfo", + lst: "1", + uid: "1", + country: conf.country + }, + success: function(data) { + data = (data && data["content"] && data["content"].data) || {}; + if (data["status"] == 1 && data["prizeInfo"] && data["prizeInfo"][0]) { + //更新用户获奖信息 + if( data["prizeInfo"][0]["update_time"]) { + callback.call(that, data["prizeInfo"][0]["update_time"]); + } + } + } + }); + }, + // 用户签到成功后显示签到成功文字 + updateSignedWord: function() { + loggedTitle.find(".ds-in-tip").html(_conf.signSuc); + }, + // 更新钥匙数 + updateKey: function(num) { + loggedTitle.find(".ds-num").html(num); + }, + // 签到 + signAction: function(callback1, callback2) { + var that = this; + $.ajax({ + type: 'get', + url: _api, + dataType: 'jsonp', + jsonp: 'jsonp', + data: { + app: "checkin", + cno: _conf.cno, + act: "check", + type: (isTn ? "2" : "1"), + country: conf.country + } + }).done(function(data) { + data = (data && data["content"] && data["content"].data) || {}; + if (data["status"] == 1 || data["status"] == 3) { + isSigned = true; + callback1.call(that); + } + }).done(function(data) { + data = (data && data["content"] && data["content"].data) || {}; + if (data["status"] == 1 || data["status"] == 3) { + isSigned = true; + data["gold_num"] && callback2.call(that, data["gold_num"]); + } + }); + }, + // 统计 + sendLog: function(pos, sort, ac) { + var utObj = { + "type" : "click", + "position" : pos, + "sort" : sort, + "modId" : "daily-sign" + }; + if(ac) { + utObj.ac = "b"; + } + UT.send(utObj); + } +}; + +controller.init(); + +// 注册自定义事件,放于账号回调中使用 +$(window).on("dailySign.login", function() { + controller.loggedInit(); +}); + +module.exports = controller; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/daily-sign.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/daily-sign.tpl new file mode 100755 index 000000000..29b4fc22f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/daily-sign.tpl @@ -0,0 +1,34 @@ +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="home:widget/daily-sign/ltr/ltr.css"%> +<%else%> + <%require name="home:widget/daily-sign/rtl/rtl.css"%> +<%/if%> +<%style%> +.mod-daily-sign {visibility: hidden;} +<%/style%> +
                                  +
                                  +
                                  + +
                                  + +
                                  + +<%script%> + conf.dailySign = <%json_encode($body.dailySign)%>; + require.async(['home:widget/daily-sign/daily-sign-async.js', 'common:widget/header/account-test/account-test-async.js'], function(contro) { + if(window.loginCtroller) { + loginCtroller.checkStatus({ + success: function(data) { + contro.loggedInit(); + } + }); + } + }); +<%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/bg-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/bg-hover.png new file mode 100755 index 000000000..f700eaecc Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/bg-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/bg.png new file mode 100755 index 000000000..89ed4747e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/box-open.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/box-open.png new file mode 100755 index 000000000..7835b2e11 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/box-open.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/box.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/box.png new file mode 100755 index 000000000..e1861d162 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/box.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/close-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/close-btn.png new file mode 100755 index 000000000..503749692 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/close-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/fb.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/fb.png new file mode 100755 index 000000000..104d5f4be Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/fb.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/gift.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/gift.png new file mode 100755 index 000000000..c33b8fb0a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/gift.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/key.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/key.png new file mode 100755 index 000000000..d7fc81433 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/key.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/more-gt.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/more-gt.png new file mode 100755 index 000000000..48b9a3b59 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/more-gt.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/popup-btn.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/popup-btn.png new file mode 100755 index 000000000..a9456cbfa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/img/popup-btn.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/ltr/ltr.css new file mode 100755 index 000000000..090d5e2c1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/ltr/ltr.css @@ -0,0 +1,257 @@ +body .mod-daily-sign { + visibility: visible; + visibility: visible !important; +} +.mod-daily-sign { + /* width: 238px; + _width: 233px; */ + position: relative; + border: 1px solid #e4e6e5; + font-size: 12px; + background: #fafbfc; + color: #333; + z-index: 3; +} +.mod-daily-sign .ds-title { + height: 46px; + /* width: 236px; */ + line-height: 46px; + color: #E9FDF5; + overflow: hidden; + border: 1px solid #fff; + cursor: pointer; + background: #01A971; + /*background: url(../img/bg-hover.png?__sprite) no-repeat;*/ + background-image: linear-gradient(top, #03BE80, #01A971, #009C68); + background-image: -webkit-linear-gradient(top, #03BE80, #01A971, #009C68); + background-image: -o-linear-gradient(top, #03BE80, #01A971, #009C68); + background-image: -moz-linear-gradient(top, #03BE80, #01A971, #009C68); + background-image: -ms-linear-gradient(top, #03BE80, #01A971, #009C68); +} +.mod-daily-sign .ds-title:hover { + background: #01B67F; + /*background: url(../img/bg-hover.png?__sprite) no-repeat;*/ + background-image: linear-gradient(top, #04C98E, #01B67F, #00A874); + background-image: -webkit-linear-gradient(top, #04C98E, #01B67F, #00A874); + background-image: -o-linear-gradient(top, #04C98E, #01B67F, #00A874); + background-image: -moz-linear-gradient(top, #04C98E, #01B67F, #00A874); + background-image: -ms-linear-gradient(top, #04C98E, #01B67F, #00A874); +} +.mod-daily-sign .ds-in-title { + display: block; + color: #E9FDF5; +} +.mod-daily-sign .ds-bubble { + position: absolute; + left: -1px; + top: 48px; + z-index: 599; + /* width: 238px; */ + border: 1px solid #BDE2D6; + box-shadow: 2px 2px 2px #DBDDDC, -2px 0 2px #DBDDDC; + background-color: #F0FFFB; +} +.mod-daily-sign .ds-out-box { + float: left; + margin-left: 4px; + _margin-left: 2px; + margin-right: 5px; + width: 56px; + height: 46px; +} +.mod-daily-sign .ds-out-gift { + float: right; +} +.mod-daily-sign .ds-out-tip { + font-size: 20px; +} +.mod-daily-sign .ds-in-box { + float: left; + margin-left: 2px; + _margin-left: 1px; + margin-right: 8px; + width: 56px; + height: 46px; +} +.mod-daily-sign .ds-in-gift { + float: right; + font-size: 14px; + color: #80D5B9; + margin-right: 6px; +} +.mod-daily-sign .ds-bracket-l { + margin-right: 8px; +} +.mod-daily-sign .ds-bracket-r { + margin-left: 8px; +} +.mod-daily-sign .ds-in-tip { + font-size: 20px; +} +.mod-daily-sign .ds-key { + display: inline-block; + height: 28px; + width: 14px; + vertical-align: middle; + background: url(../img/key.png?__sprite) no-repeat; +} +.mod-daily-sign .ds-in-multi { + margin-left: 6px; + margin-right: 6px; +} +.mod-daily-sign .ds-num { + color: #ffffff; +} + +.mod-daily-sign .ui-arrow-t { + border-width: 6px; + top: -12px; + left: 100px; + border-bottom-color: #F0FFFB; +} +.mod-daily-sign .ds-out-bubble, .mod-daily-sign .ds-in-bubble { + position: relative; +} +.mod-daily-sign .ds-content { + line-height: 1.7; + color: #666666; + padding: 14px 16px 14px 8px; + border-bottom: 1px solid #D6F8EF; +} +.mod-daily-sign .ds-out-close, .mod-daily-sign .ds-in-close { + display: block; + width: 11px; + height: 11px; + position: absolute; + right: 3px; + top: 3px; + background: url(../img/close-btn.png?__sprite) no-repeat; +} +.mod-daily-sign .ds-more { + color: #00ae74; + padding-left: 6px; +} +.mod-daily-sign .ds-more-gt { + display: inline-block; + width: 6px; + height: 9px; + margin-left: 4px; + background: url(../img/more-gt.png?__sprite) no-repeat; +} +.mod-daily-sign .ds-btn-wrap { + border-top: 1px solid #FBFEFE; + background-color: #D6F8EF; + padding-top: 15px; + padding-bottom: 15px; + text-align: center; +} +.mod-daily-sign .ds-btn { + text-align: center; + margin-left:auto; + margin-right:auto; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + cursor: pointer; + color: #ffffff; + overflow: hidden; + display: inline-block; + *display: inline; + *zoom: 1; +} +.mod-daily-sign .ds-out-bubble .ds-btn { + height: 29px; + line-height: 29px; + padding-left: 30px; + text-align: center; + font-size: 14px; + /*border-width: 1px; + border-style: solid; + border-color: #5F7CB9 #526C9F #495F8A #3B5392;*/ + background: url(../img/fb.png?__sprite) no-repeat; + background-color: #4F6CBD; +} +.mod-daily-sign .ds-out-btn-content { + display: inline-block; + height: 29px; + line-height: 29px; + padding-left: 15px; + padding-right: 15px; + white-space: nowrap; +} +.mod-daily-sign .ds-in-bubble .ds-btn { + width: 180px; + background-color: #00B075; +} +.mod-daily-sign .ds-in-btn-content { + display: block; + line-height: 1.4; + padding: 8px 30px; + color: #ffffff; +} +.mod-daily-sign .ds-direct { + margin-top: 8px; +} + + +.mod-ds-pop { + position: fixed; + width: 378px; + right: 0; + bottom: 0; + z-index: 9999; + background-color: #FFFFFF; + border: 1px solid #588B00; + color: #464646; + /*display: none;*/ + font-size: 15px; + font-weight: 600; + text-align: center; + border-radius: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; +} +.mod-ds-pop .ds-pop-close-x { + position: absolute; + right: 0; + top: -13px; + display: inline-block; + width: 26px; + height: 26px; + background: url(../img/popup-btn.png?__sprite) no-repeat; +} +.mod-ds-pop .ds-pop-hd { + font-size: 18px; + color: #ffffff; + background-color: #69A100; + height: 40px; + width: 100%; + overflow: hidden; + line-height: 40px; +} +.mod-ds-pop .ds-pop-content { + margin: 24px 60px; + line-height: 1.2; +} +.mod-ds-pop .ds-pop-btn { + margin-bottom: 22px; + font-size: 14px; +} +.mod-ds-pop .ds-pop-btn a { + display: inline-block; + width: 112px; + height: 32px; + line-height: 32px; + border: 1px solid #4A9800; + color: #eaffc5; + border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + background-color: #72AB00; +} +.mod-ds-pop .ds-pop-btn .ds-pop-close-btn { + margin-left: 8px; + background-color: #C5C5C5; + border-color: transparent; + color: #636363; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/rtl/rtl.css new file mode 100755 index 000000000..28ba581a0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/daily-sign/rtl/rtl.css @@ -0,0 +1,257 @@ +body .mod-daily-sign { + visibility: visible; + visibility: visible !important; +} +.mod-daily-sign { + /* width: 238px; + _width: 233px; */ + position: relative; + border: 1px solid #e4e6e5; + font-size: 12px; + background: #fafbfc; + color: #333; + z-index: 3; +} +.mod-daily-sign .ds-title { + height: 46px; + /* width: 236px; */ + line-height: 46px; + color: #E9FDF5; + overflow: hidden; + border: 1px solid #fff; + cursor: pointer; + background: #01A971; + /*background: url(../img/bg-hover.png?__sprite) no-repeat;*/ + background-image: linear-gradient(top, #03BE80, #01A971, #009C68); + background-image: -webkit-linear-gradient(top, #03BE80, #01A971, #009C68); + background-image: -o-linear-gradient(top, #03BE80, #01A971, #009C68); + background-image: -moz-linear-gradient(top, #03BE80, #01A971, #009C68); + background-image: -ms-linear-gradient(top, #03BE80, #01A971, #009C68); +} +.mod-daily-sign .ds-title:hover { + background: #01B67F; + /*background: url(../img/bg-hover.png?__sprite) no-repeat;*/ + background-image: linear-gradient(top, #04C98E, #01B67F, #00A874); + background-image: -webkit-linear-gradient(top, #04C98E, #01B67F, #00A874); + background-image: -o-linear-gradient(top, #04C98E, #01B67F, #00A874); + background-image: -moz-linear-gradient(top, #04C98E, #01B67F, #00A874); + background-image: -ms-linear-gradient(top, #04C98E, #01B67F, #00A874); +} +.mod-daily-sign .ds-in-title { + display: block; + color: #E9FDF5; +} +.mod-daily-sign .ds-bubble { + position: absolute; + right: -1px; + top: 48px; + z-index: 599; + /* width: 238px; */ + border: 1px solid #BDE2D6; + box-shadow: 2px 2px 2px #DBDDDC, -2px 0 2px #DBDDDC; + background-color: #F0FFFB; +} +.mod-daily-sign .ds-out-box { + float: right; + margin-right: 4px; + _margin-right: 2px; + margin-left: 5px; + width: 56px; + height: 46px; +} +.mod-daily-sign .ds-out-gift { + float: left; +} +.mod-daily-sign .ds-out-tip { + font-size: 20px; +} +.mod-daily-sign .ds-in-box { + float: right; + margin-right: 2px; + _margin-right: 1px; + margin-left: 8px; + width: 56px; + height: 46px; +} +.mod-daily-sign .ds-in-gift { + float: left; + font-size: 14px; + color: #80D5B9; + margin-left: 6px; +} +.mod-daily-sign .ds-bracket-l { + margin-left: 8px; +} +.mod-daily-sign .ds-bracket-r { + margin-right: 8px; +} +.mod-daily-sign .ds-in-tip { + font-size: 20px; +} +.mod-daily-sign .ds-key { + display: inline-block; + height: 28px; + width: 14px; + vertical-align: middle; + background: url(../img/key.png?__sprite) no-repeat; +} +.mod-daily-sign .ds-in-multi { + margin-left: 6px; + margin-right: 6px; +} +.mod-daily-sign .ds-num { + color: #ffffff; +} + +.mod-daily-sign .ui-arrow-t { + border-width: 6px; + top: -12px; + right: 100px; + border-bottom-color: #F0FFFB; +} +.mod-daily-sign .ds-out-bubble, .mod-daily-sign .ds-in-bubble { + position: relative; +} +.mod-daily-sign .ds-content { + line-height: 1.7; + color: #666666; + padding: 14px 8px 14px 16px; + border-bottom: 1px solid #D6F8EF; +} +.mod-daily-sign .ds-out-close, .mod-daily-sign .ds-in-close { + display: block; + width: 11px; + height: 11px; + position: absolute; + left: 3px; + top: 3px; + background: url(../img/close-btn.png?__sprite) no-repeat; +} +.mod-daily-sign .ds-more { + color: #00ae74; + padding-right: 6px; +} +.mod-daily-sign .ds-more-gt { + display: inline-block; + width: 6px; + height: 9px; + margin-right: 4px; + background: url(../img/more-gt.png?__sprite) no-repeat; +} +.mod-daily-sign .ds-btn-wrap { + border-top: 1px solid #FBFEFE; + background-color: #D6F8EF; + padding-top: 15px; + padding-bottom: 15px; + text-align: center; +} +.mod-daily-sign .ds-btn { + text-align: center; + margin-left:auto; + margin-right:auto; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + cursor: pointer; + color: #ffffff; + overflow: hidden; + display: inline-block; + *display: inline; + *zoom: 1; +} +.mod-daily-sign .ds-out-bubble .ds-btn { + height: 29px; + line-height: 29px; + padding-right: 30px; + text-align: center; + font-size: 14px; + /*border-width: 1px; + border-style: solid; + border-color: #5F7CB9 #526C9F #495F8A #3B5392;*/ + background: url(../img/fb.png?__sprite) no-repeat; + background-color: #4F6CBD; +} +.mod-daily-sign .ds-out-btn-content { + display: inline-block; + height: 29px; + line-height: 29px; + padding-left: 15px; + padding-right: 15px; + white-space: nowrap; +} +.mod-daily-sign .ds-in-bubble .ds-btn { + width: 180px; + background-color: #00B075; +} +.mod-daily-sign .ds-in-btn-content { + display: block; + line-height: 1.4; + padding: 8px 30px; + color: #ffffff; +} +.mod-daily-sign .ds-direct { + margin-top: 8px; +} + + +.mod-ds-pop { + position: fixed; + width: 378px; + left: 0; + bottom: 0; + z-index: 9999; + background-color: #FFFFFF; + border: 1px solid #588B00; + color: #464646; + /*display: none;*/ + font-size: 15px; + font-weight: 600; + text-align: center; + border-radius: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; +} +.mod-ds-pop .ds-pop-close-x { + position: absolute; + left: 0; + top: -13px; + display: inline-block; + width: 26px; + height: 26px; + background: url(../img/popup-btn.png?__sprite) no-repeat; +} +.mod-ds-pop .ds-pop-hd { + font-size: 18px; + color: #ffffff; + background-color: #69A100; + height: 40px; + width: 100%; + overflow: hidden; + line-height: 40px; +} +.mod-ds-pop .ds-pop-content { + margin: 24px 60px; + line-height: 1.2; +} +.mod-ds-pop .ds-pop-btn { + margin-bottom: 22px; + font-size: 14px; +} +.mod-ds-pop .ds-pop-btn a { + display: inline-block; + width: 112px; + height: 32px; + line-height: 32px; + border: 1px solid #4A9800; + color: #eaffc5; + border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + background-color: #72AB00; +} +.mod-ds-pop .ds-pop-btn .ds-pop-close-btn { + margin-right: 8px; + background-color: #C5C5C5; + border-color: transparent; + color: #636363; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/easter-game-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/easter-game-async.js new file mode 100755 index 000000000..c003eb386 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/easter-game-async.js @@ -0,0 +1,31 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var message = require("common:widget/ui/message/src/message.js"); + +!function () { + var iframe = ''; + _conf = conf.easterGame; + + function render () { + var el = ""; + + el = helper.replaceTpl(iframe,{ + "src" : _conf.src, + "width" : _conf.width, + "height" : _conf.height + }); + $(".mod-easter-game").append(el).show(); + } + + function bindEvents () { + message.on("iframe.gEaster.close",function(){ + $(".mod-easter-game").hide().empty(); + }); + $(document).on("click",".mod-anchorside a,#indexLogo",function(e){ + e.preventDefault(); + !$(".mod-easter-game").is(":visible") && render(); + + }); + } + bindEvents(); +}(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/easter-game.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/easter-game.tpl new file mode 100755 index 000000000..0af774f2f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/easter-game.tpl @@ -0,0 +1,7 @@ +<%if $head.dir=='ltr'%> <%require name="home:widget/easter-game/ltr/ltr.css"%> <%else%> <%require name="home:widget/easter-game/rtl/rtl.css"%> <%/if%> +
                                  +
                                  +<%script%> + conf.easterGame = <%json_encode($body.easterGame)%>; + require.async("home:widget/easter-game/easter-game-async.js"); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/ltr/ltr.css new file mode 100755 index 000000000..219a67553 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/easter-game/ltr/ltr.css @@ -0,0 +1,9 @@ +.mod-easter-game{ + position: fixed; + top: 20px; + bottom: 0; + left: 50%; + margin-left: -375px; + z-index: 10000; + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ecommerce-prompt-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ecommerce-prompt-async.js new file mode 100755 index 000000000..4c90e5f8e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ecommerce-prompt-async.js @@ -0,0 +1,125 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var helper = require("common:widget/ui/helper/helper.js"); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var UT = require('common:widget/ui/ut/ut.js'); + +var ecommercePrompt = function (){ + var goodsItemTpl = '
                                • ' + +'' + + '' + + '#{title}' + + '#{price}' + +'' + +'
                                • ', + sellerTpl = '
                                • #{title}
                                • ', + jumpToBottomTpl = '
                                • #{guiderDescription}
                                • ', + _conf = conf.ecommercePrompt, + scollHandle = null, + timer = null, + isScrolled = true, + win = $(window), + target = $(".mod-bottom-ecommerce"), + $this = $(".mod-ecommerce-prompt"); + + function init(){ + getData(); + _conf.time && initTimer(); + } + + function render( result ){ + var goodsList = [], + els = ""; + + els = els + helper.replaceTpl(sellerTpl,{"title":_conf.title+":"}); + for(var i=0;i<3;i++){ + var data = _conf.list, + results = result[_conf.seller]; + els = els + helper.replaceTpl(goodsItemTpl,{ + "img":data[i].img || results[i].img, + "url":data[i].url || results[i].link, + "title":data[i].title || results[i].title, + "price": data[i].price || $.trim(results[i].price.replace(/a partir de/, "")) + }); + } + els = els + helper.replaceTpl(jumpToBottomTpl,{"guiderDescription":_conf.guiderDescription}); + $(".ep-goods-list").append(els); + $this.animate({"bottom":"0px"},700); + } + + function getData(){ + if(_conf.apiParams){ + $.ajax({ + url:conf.apiUrlPrefix+_conf.apiParams, + dataType: "jsonp", + jsonp: "jsonp", + async:false, + jsonpCallback: "ghao123_" + hex_md5(_conf.apiParams,16), + cache: false, + success:function(result){ + render(result.content.data.contents); + }, + error:function(){ + + } + }); + } else { + render(); + } + } + function initTimer(){ + timer = setTimeout(function(){ + $this.remove(); + scollHandle && clearInterval(scollHandle); + },_conf.time); + } + $(".mod-ecommerce-prompt").on("click",".item-jump",function(){ + $(".g-area-lazyload").lazyload({triggerAll:true}); + win.scrollTop(target.offset().top-100); + timer && clearTimeout(timer); + $.cookie("eco-prompt", _conf.version, {expires:2000}); + UT.send({ + modId:"ecommerce-prompt", + ac:"b", + type:"click", + position:"bottom" + }); + }). + on("click",".ep-i-close",function(){ + $this.remove(); + $.cookie("eco-prompt", _conf.version, {expires:2000}); + timer && clearTimeout(timer); + UT.send({ + modId:"ecommerce-prompt", + ac:"b", + type:"click", + position:"close" + }); + }). + on("click",".item-link",function(e){ + e.preventDefault(); + //这里用window方法是为了避免hover上去以后浏览器的提示遮挡这个浮层 + window.open($(this).attr("data-href")); + UT.send({ + modId:"ecommerce-prompt", + type:"click", + position:"items" + }); + }); + win.one("scroll", function() { + (!$.cookie("eco-prompt") || $.cookie("eco-prompt") != _conf.version) && init(); + }); + win.on("scroll", function() { + isScrolled = true; + }); + scollHandle = setInterval(function(){ + if(isScrolled){ + isScrolled = false; + if($this.offset().top >= target.offset().top){ + $this.remove(); + clearInterval(scollHandle); + } + } + },250); + +} +module.exports = ecommercePrompt; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ecommerce-prompt.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ecommerce-prompt.tpl new file mode 100755 index 000000000..1f03dc898 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ecommerce-prompt.tpl @@ -0,0 +1,13 @@ +<%if $head.dir=='ltr'%> <%require name="home:widget/ecommerce-prompt/ltr/ltr.css"%> <%else%> <%require name="home:widget/ecommerce-prompt/rtl/rtl.css"%> + <%/if%> + +<%script%> + conf.ecommercePrompt = <%json_encode($body.ecommercePrompt)%>; + require.async('home:widget/ecommerce-prompt/ecommerce-prompt-async.js',function(ecommercePrompt){ + ecommercePrompt(); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..224f3d965 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/flow/ltr/ltr.flow.css @@ -0,0 +1,3 @@ +.w1020 .mod-ecommerce-prompt{ + width: 1020px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-close.png new file mode 100755 index 000000000..38aa0c623 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-close_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-close_hover.png new file mode 100755 index 000000000..a92b57a34 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-close_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-jump.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-jump.png new file mode 100755 index 000000000..317fb7737 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/img/i-jump.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ltr/ltr.css new file mode 100755 index 000000000..09810a28f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ecommerce-prompt/ltr/ltr.css @@ -0,0 +1,117 @@ +.mod-ecommerce-prompt{ + position: fixed; + bottom:-60px; + width: 960px; + height:50px; + line-height: 50px; + margin-left: -8px; + z-index: 400; + border-left: 8px solid #646464; + display: block !important; +} +.mod-ecommerce-prompt .ep-goods-list{ + position: relative; + float: left; + display: block; + height: 100%; + width: 100%; + overflow: hidden; + color: white; + font-size: 15px; +} +.mod-ecommerce-prompt .goods-list-item{ + float: left; + height: 100%; + border-left: 1px dashed #979797; + border-right: 1px dashed #595959; + color: white; + cursor: pointer; +} +.mod-ecommerce-prompt .items{ + /*width: 238px;*/ + width: 24.79%; + background-color: #8a8a8a; +} +.mod-ecommerce-prompt .items:hover{ + background-color: #717070; + cursor: pointer; +} +.mod-ecommerce-prompt .item-selleer{ + /*width: 115px;*/ + width: 11.9%; + margin-left: -4px; + text-align:center; + cursor: default; + background-color: #8a8a8a; +} + +.mod-ecommerce-prompt .item-jump{ + /*width: 125px;*/ + width: 13.2%; + text-align:center; + border-right:0 none; + border-left: 1px dashed #398f74; + background-color: #289773; + cursor: pointer; +} +.mod-ecommerce-prompt .item-jump:hover{ + background-color: #1c7b5c; +} +.mod-ecommerce-prompt .i-jump-bottom,.mod-ecommerce-prompt .jump-des{ + float:left; + margin-left: 5px; +} +.mod-ecommerce-prompt .i-jump-bottom{ + width: 20px; + height: 20px; + background: url(../img/i-jump.png?__sprite) no-repeat; + margin-left: 10px; + margin-top: 14px; +} +.mod-ecommerce-prompt .item-link{ + display: block; + width: 100%; + height: 100%; + position: relative; +} +.mod-ecommerce-prompt .item-img{ + width: 39px; + height: 39px; + border: 1px solid #717171; + margin-left: 19px; + margin-top: -1px; +} +.mod-ecommerce-prompt .item-title,.mod-ecommerce-prompt .item-price{ + text-overflow:ellipsis; + overflow: hidden; + white-space:nowrap; + display: inline-block; + /*width: 165px;*/ + width: 69.32%; + position: relative; + color: white; + font-size: 13px; + left: 70px; + position: absolute; + font-weight: 700; +} +.mod-ecommerce-prompt .item-title{ + top:-10px; +} +.mod-ecommerce-prompt .item-price{ + bottom: -8px; + color: #ffcc00; +} +.mod-ecommerce-prompt .ep-i-close{ + position: absolute; + display: block; + width: 17px; + height: 17px; + right: -10px; + top: -10px; + background: url(../img/i-close.png?__sprite) no-repeat; + cursor: pointer; +} +.mod-ecommerce-prompt .ep-i-close:hover{ + background: url(../img/i-close_hover.png?__sprite) no-repeat; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/current-left.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/current-left.png new file mode 100755 index 000000000..b8e724f6f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/current-left.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/current-right.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/current-right.png new file mode 100755 index 000000000..cbf28ff2b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/current-right.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/embed-lv2-async.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/embed-lv2-async.css new file mode 100755 index 000000000..617b38a19 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/embed-lv2-async.css @@ -0,0 +1,228 @@ +#embedlv2 { + overflow: hidden; +} +#embed-iframe-nav { + width: 958px; + height: 34px; + border: 1px solid #D0DAD6; + border-width: 0 1px; + background: #EDF0EF; + margin-bottom: 10px; +} +#embed-iframe-wrapper { + border: 1px solid; + border-color: #d7ddde #d7ddde #cacccc #dfe4e6; + overflow: hidden; + background-color: #fcfdff; + padding: 10px; + height: 265px; +} +#embed-iframe-nav i { + display: inline-block; + width: 34px; + height: 34px; +} +#embed-iframe-nav .nav-item { + position: relative; + float: right; + line-height: 32px; +} +#embed-iframe-nav .nav-item, +#embed-iframe-nav .nav-item a, +#embed-iframe-nav .nav-item p +{ + text-align: center; + display: block; + height: 34px; + color: #fff; + font-size: 14px; +} +#embed-iframe-nav .nav-item span, +#embed-iframe-nav .nav-item i +{ + vertical-align: middle; + margin-left: 5px; + +} + +#embed-iframe-nav .space { + float:right; + width: 18px; + line-height: 34px; + height: 34px; + background: url(./space.png?__sprite) no-repeat; +} +#embed-iframe-nav .home { + width: 89px; +} +#embed-iframe-nav .home i{ + background: url('./home-current.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .home.current i{ + background: url('./home-link.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .news { + width: 270px; +} +#embed-iframe-nav .news i{ + background: url('./news-current.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .news.current i{ + background: url('./news-link.png?__sprite') no-repeat 0 0; +} + +#embed-iframe-nav .image { + width: 270px; +} +#embed-iframe-nav .image i{ + background: url('./image-current.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .image.current i{ + background: url('./image-link.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .movie { + width: 275px; +} +#embed-iframe-nav .movie i{ + background: url('./movie-current.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .movie .icon-new_red_ltr{ + display: inline-block; + width: 25px; + height: 15px; + vertical-align: middle; + margin-left: -6px; + background: url('./i-big-new.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .movie.current i{ + background: url('./movie-link.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .movie.current .icon-new_red_ltr{ + display: none; +} +#embed-iframe-nav .current-right { + background: url('./current-right.png?__sprite') no-repeat; +} +#embed-iframe-nav .current-left { + background: url('./current-left.png?__sprite') no-repeat; +} + +#embed-iframe-nav .nav-item { + background: url(./hover-bg.png?__sprite) repeat-x; +} +#embed-iframe-nav .nav-item.current { + background: url(./link-bg.png?__sprite) repeat-x; +} +#embed-iframe-nav .nav-item.current a{ + color: #00AF71; +} + +.embed-fixed { + position: fixed; + top: 0; + z-index: 10; +} + +#embed-iframe-loading { + position: absolute; + z-index:2; + width: 960px; + height: 400px; + text-align: center; +} +#embed-iframe-loading .loading { + margin-top: 80px; + width: 45px; + height: 44px; +} +#embed-iframe-loading .loading-desc { + margin-top: 20px; + color: #999; +} + + +/*菜单翻转动画*/ +#embed-iframe-nav .nav-item a, +#embed-iframe-nav .nav-item p { + width: 100%; +} + + +#embed-iframe-nav .nav-item a{ + display: block\9; + -webkit-transform: perspective(800px) rotateX(0deg); + -moz-transform:perspective(800px) rotateX(0deg); + position:absolute; + -webkit-transform-origin: 0 5px; + -moz-transform-origin: 0 5px; + -webkit-transition: 0.5s ease; + -moz-transition: 0.5s ease; + -webkit-transition-property:all; + -moz-transition-property:all; + opacity: 1; + text-decoration:none; +} +#embed-iframe-nav .nav-item p { + display: none\9; + -webkit-transform: perspective(800px) rotateX(-90deg); + -moz-transform: perspective(800px) rotateX(-90deg); + position: absolute; + -webkit-transition: 0.7s ease; + -moz-transition: 0.7s ease; + -webkit-transition-property:all; + -moz-transition-property:all; + + -webkit-transform-origin: 0 34px; + -moz-transform-origin: 0 34px; + opacity: 0.5; +} +#embed-iframe-nav .nav-item.hover a, +#embed-iframe-nav .nav-item.hover-animate a + +{ + display: none\9; + -webkit-transform: perspective(800px) rotateX(90deg); + -moz-transform: perspective(800px) rotateX(90deg); + -webkit-transition: 0.5s ease; + -moz-transition: 0.5s ease; + -webkit-transition-property:all; + -moz-transition-property:all; + opacity: 0.5; +} +#embed-iframe-nav .nav-item.hover p, +#embed-iframe-nav .nav-item.hover-animate p + +{ + display: block; + cursor: pointer; + -webkit-transform: perspective(800px) rotateX(0deg); + -moz-transform: perspective(800px) rotateX(0deg); + + -webkit-transition: 0.4s ease; + -moz-transition: 0.4s ease; + -webkit-transition-property:all; + -moz-transition-property:all; + opacity: 1; +} + +#embed-iframe-nav .home.nav-item.hover a { /* 一直在 */ + display: block; + -webkit-transform: none; + -moz-transform: none; + opacity: 1; +} +#embed-iframe-nav .nav-item.current a, +#embed-iframe-nav .nav-item.current p { + display: block\9; + opacity: 1; + -webkit-transform: none; + -moz-transform: none; +} +#embed-iframe-nav .nav-item.current p { + display: none; +} + +/* 收缩搜索框的距离,避免新闻模块下移太多 */ +.box-search_inner { + height: 55px !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/embed-lv2-async.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/embed-lv2-async.tpl new file mode 100755 index 000000000..b8f07beb9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/embed-lv2-async.tpl @@ -0,0 +1,132 @@ + +
                                  + + +
                                  + <%script%> + conf.embedlv2 = { + animateTime: <%$body.embedlv2.animateTime|default:'1000'%>, + loadingTime: <%$body.embedlv2.loadingTime|default:'2500'%> + }; + require.async(['common:widget/ui/jquery/jquery.js', 'common:widget/ui/ut/ut.js', 'common:widget/ui/helper/helper.js'],function($,UT,helper){ + + function changeIframe(url, id){ + $("#embed-iframe-wrapper").children().hide(); + $('#embed-iframe-loading').show(); + if ($('#embed-iframe-'+ id).length > 0) { + $('#embed-iframe-'+ id).show(); + $('#embed-iframe-loading').hide(); + } else { + $.getJSON('/resource/ar' + url + '/data.json', function (data) { + var dom = $('
                                  ').append($(data.html)); + $("#embed-iframe-wrapper").append(dom); + helper.globalEval(data.script); + $('#embed-iframe-loading').hide(); + }); + } + + setTimeout(function(){$('#embed-iframe-loading').hide();}, conf.embedlv2.loadingTime); + } + + + //initBindEvent + $('#embed-iframe-nav').on('mouseenter','.nav-item',function(e){ + $(window).trigger('e_embedlv2_nav_user_act'); + + var $link = $(this); + if($link.hasClass('current')){ + return; + } else { + $link.addClass('hover'); + } + }).on('mouseleave','.nav-item',function(e){ + $(this).removeClass('hover'); + }).on('click','.nav-item', function(e){ + e.preventDefault(); + $(window).trigger('e_embedlv2_nav_user_act'); + + var $link = $(this); + var url = $link.attr('data-url'); + //返回顶区,再展现新内容 + window.scrollTo(0,0); + + if($link.hasClass('home')){ + + $('#embed-iframe-wrapper').hide(); + $('#embed-iframe-loading').hide(); + + $('.hotsite_b').show(); + } else if($link.hasClass('current')){ //选中的Tab直接打开 + window.open(url); + } else { + changeIframe(url, $link.attr('data-id')); + $('#embed-iframe-wrapper').show(); + $('.hotsite_b').hide(); + } + $('#embed-iframe-nav .nav-item').removeClass('current'); + $('#embed-iframe-nav .space').removeClass('current-left').removeClass('current-right'); + var $current = $(this).addClass('current'); + $current.prev().addClass('current-right'); + $current.next().addClass('current-left'); + + + //LOG + UT.send({ + type:"click", + modId:"embedlv2", + element: $link.attr('data-id'), + url: url + }); + }); + + //菜单跟随效果 + $(window).on('scroll',function(){ + $(window).scrollTop() > $("#embed-iframe-nav").parent().offset().top ? $('#embed-iframe-nav').addClass("embed-fixed") : $('#embed-iframe-nav').removeClass("embed-fixed"); + }); + + //菜单动画,只动画一次,会记cookie + var isEmbedlv2Guide = jQuery.cookie("isEmbedlv2Guide"); + if(!isEmbedlv2Guide){ + jQuery.cookie("isEmbedlv2Guide", 1,{ expires:2000}); + + var $navItems = $('#embed-iframe-nav .nav-item').not(".home"); + var item = 0,itemLen = $navItems.length; + var timerFlip = null; + function flipNav(){ + if(item < itemLen * 2){ + $($navItems[item < itemLen ? item : item - itemLen]).addClass('hover-animate'); + timerFlip = setTimeout(flipOutNav, conf.embedlv2.animateTime); + } + } + function flipOutNav(){ + $($navItems[item < itemLen ? item : item - itemLen]).removeClass('hover-animate'); + item++; + timerFlip = setTimeout(flipNav, 300); + } + setTimeout(flipNav, conf.embedlv2.animateTime); + //一旦用户开始交互,则触发动画停止 + $(window).one('e_embedlv2_nav_user_act',function(){ + clearTimeout(timerFlip); + $('#embed-iframe-nav .nav-item').removeClass('hover-animate'); + }); + } + }); + <%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/home-current.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/home-current.png new file mode 100755 index 000000000..9deb0b94a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/home-current.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/home-link.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/home-link.png new file mode 100755 index 000000000..8d32b4081 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/home-link.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-bg.png new file mode 100755 index 000000000..cb0006896 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-left.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-left.png new file mode 100755 index 000000000..3afe153a8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-left.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-right.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-right.png new file mode 100755 index 000000000..146fd5dc5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/hover-right.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/i-big-new.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/i-big-new.png new file mode 100755 index 000000000..5f73d5696 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/i-big-new.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/image-current.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/image-current.png new file mode 100755 index 000000000..a79439160 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/image-current.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/image-link.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/image-link.png new file mode 100755 index 000000000..d6981f1e8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/image-link.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/link-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/link-bg.png new file mode 100755 index 000000000..0924a4b31 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/link-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/loading.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/loading.gif new file mode 100755 index 000000000..bf9d30210 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/loading.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/movie-current.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/movie-current.png new file mode 100755 index 000000000..58746a6f8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/movie-current.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/movie-link.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/movie-link.png new file mode 100755 index 000000000..da9ea083b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/movie-link.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/news-current.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/news-current.png new file mode 100755 index 000000000..d5cd79022 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/news-current.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/news-link.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/news-link.png new file mode 100755 index 000000000..dd3be0e16 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/news-link.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/space.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/space.png new file mode 100755 index 000000000..b8fd07c14 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async/space.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-bg.png new file mode 100755 index 000000000..d26b65f99 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-left-edge.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-left-edge.png new file mode 100755 index 000000000..dae231e6f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-left-edge.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-left.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-left.png new file mode 100755 index 000000000..494ff9be4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-left.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-right-edge.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-right-edge.png new file mode 100755 index 000000000..7abea0a9e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-right-edge.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-right.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-right.png new file mode 100755 index 000000000..fabba8479 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/current-right.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/embed-lv2-async2.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/embed-lv2-async2.css new file mode 100755 index 000000000..cebb1c203 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/embed-lv2-async2.css @@ -0,0 +1,192 @@ +#embed-iframe-nav { + width: 960px; + height: 38px; + margin-bottom: -1px; + position: relative; + z-index: 3 +} +#embed-iframe-wrapper { + border: 1px solid; + border-color: #d7ddde #d7ddde #cacccc #dfe4e6; + overflow: hidden; + background-color: #fcfdff; + padding: 10px; + height: 265px; +} +#embed-iframe-nav i { + display: inline-block; + width: 40px; + height: 37px; +} +#embed-iframe-nav .nav-item { + position: relative; + float: right; + line-height: 32px; +} +#embed-iframe-nav .nav-item, +#embed-iframe-nav .nav-item a, +#embed-iframe-nav .nav-item p +{ + text-align: center; + display: block; + height: 38px; + color: #fff; + font-size: 14px; +} +#embed-iframe-nav .nav-item span, +#embed-iframe-nav .nav-item i +{ + vertical-align: middle; + margin-left: 10px; +} +#embed-iframe-nav .nav-item i +{ + margin-top: -5px; +} +#embed-iframe-nav .nav-item span{ + margin-top: 4px; + display: inline-block; + *display: inline; + *zoom: 1; +} +#embed-iframe-nav .space { + float:right; + width: 20px; + line-height: 38px; + height: 38px; + background: url(./space-bg.png?__sprite) no-repeat; +} +#embed-iframe-nav .first{ + background: url(./space-bg-right.png?__sprite) no-repeat; +} +#embed-iframe-nav .last{ + background: url(./space-bg-left.png?__sprite) no-repeat; +} +#embed-iframe-nav .home, #embed-iframe-nav li.last-nav{ + width: 218px; +} +#embed-iframe-nav .home i{ + background: url('./home-link.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .news { + width: 212px; +} +#embed-iframe-nav .news i{ + background: url('./news-link.png?__sprite') no-repeat 0 0; +} + +#embed-iframe-nav .image { + width: 212px; +} +#embed-iframe-nav .image i{ + background: url('./imgae-link.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .movie { + width: 212px; +} +#embed-iframe-nav .movie i{ + background: url('./movie-link.png?__sprite') no-repeat 0 0; +} +#embed-iframe-nav .current-right { + background: url('./current-right.png?__sprite') no-repeat; +} +#embed-iframe-nav .first.current-right { + background: url('./current-right-edge.png?__sprite') no-repeat; +} +#embed-iframe-nav .current-left { + background: url('./current-left.png?__sprite') no-repeat; +} +#embed-iframe-nav .last.current-left { + background: url(./current-left-edge.png?__sprite) no-repeat; +} +#embed-iframe-nav .nav-item { + background: url(./link-bg.png?__sprite) repeat-x; +} +#embed-iframe-nav .nav-item.current { + background: url(./current-bg.png?__sprite) repeat-x; +} +#embed-iframe-nav .nav-item.current a{ + color: #00AF71; +} +/*hover*/ +#embed-iframe-nav .nav-item.hover a{ + text-decoration: none; +} +#embed-iframe-nav .nav-item.hover i{ + + animation-name: shake; + animation-duration: 0.12s; + animation-timing-function: ease-in-out; + animation-iteration-count: 3; + + -moz-animation-name: shake; + -moz-animation-duration: 0.12s; + -moz-animation-timing-function: ease-in-out; + -moz-animation-iteration-count: 3; + + -webkit-animation-name: shake; + -webkit-animation-duration: 0.12s; + -webkit-animation-timing-function: ease-in-out; + -webkit-animation-iteration-count: 3; + + -o-animation-name: shake; + -o-animation-duration: 0.12s; + -o-animation-timing-function: ease-in-out; + -o-animation-iteration-count: 3; + + -ms-animation-name: shake; + -ms-animation-duration: 0.12s; + -ms-animation-timing-function: ease-in-out; + -ms-animation-iteration-count: 3; + +} +/*是否将nav-item固定在页面顶端*/ +#embed-iframe-nav.embed-fixed { + position: fixed; + top: 0; + z-index: 10; +} + +#embed-iframe-loading { + position: absolute; + z-index:2; + width: 960px; + height: 400px; + text-align: center; +} +#embed-iframe-loading .loading { + margin-top: 80px; + width: 45px; + height: 44px; +} +#embed-iframe-loading .loading-desc { + margin-top: 20px; + color: #999; +} + +/*动画定义*/ +@keyframes shake { + 0% {margin-top: -5px;} + 50% {margin-top: -8px;} + 100% {margin-top: -5px;} +} +@-webkit-keyframes shake { + 0% {margin-top: -5px;} + 50% {margin-top: -8px;} + 100% {margin-top: -5px;} +} +@-moz-keyframes shake { + 0% {margin-top: -5px;} + 50% {margin-top: -8px;} + 100% {margin-top: -5px;} +} +@-o-keyframes shake { + 0% {margin-top: -5px;} + 50% {margin-top: -8px;} + 100% {margin-top: -5px;} +} +@-ms-keyframes shake { + 0% {margin-top: -5px;} + 50% {margin-top: -8px;} + 100% {margin-top: -5px;} +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/embed-lv2-async2.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/embed-lv2-async2.tpl new file mode 100755 index 000000000..ab7cde505 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/embed-lv2-async2.tpl @@ -0,0 +1,96 @@ + +
                                  + + +
                                  + <%script%> + conf.embedlv2 = { + loadingTime: <%$body.embedlv2.loadingTime|default:'2500'%> + }; + require.async(['common:widget/ui/jquery/jquery.js', 'common:widget/ui/ut/ut.js', 'common:widget/ui/helper/helper.js'],function($,UT,helper){ + + function changeIframe(url, id){ + $("#embed-iframe-wrapper").children().hide(); + $('#embed-iframe-loading').show(); + if ($('#embed-iframe-'+ id).length > 0) { + $('#embed-iframe-loading').hide(); + $('#embed-iframe-'+ id).show(); + } else { + $.getJSON('/resource/ar' + url + '/data.json', function (data) { + var dom = $('
                                  ').append($(data.html)); + $('#embed-iframe-loading').hide(); + $("#embed-iframe-wrapper").append(dom); + helper.globalEval(data.script); + }); + } + + setTimeout(function(){$('#embed-iframe-loading').hide();}, conf.embedlv2.loadingTime); + } + + //initBindEvent + $('#embed-iframe-nav .nav-item').on('mouseenter', function(e){ + var $link = $(this); + if($link.hasClass('current')){ + return; + } else { + //为icon添加hover之后的震动动画 + $link.addClass('hover'); + } + }).on('mouseleave', function(e){ + //取消icon上的动画 + $(this).removeClass('hover'); + }).on('click', function(e){ + e.preventDefault(); + + var $link = $(this); + var url = $link.attr('data-url'); + + if($link.hasClass('home')){ + $('#embed-iframe-wrapper').hide(); + $('#embed-iframe-loading').hide(); + + $('.hotsite_b').show(); + } else if($link.hasClass('current')){ //选中的Tab直接打开 + window.open(url); + } else { + changeIframe(url, $link.attr('data-id')); + $('.hotsite_b').hide(); + $('#embed-iframe-wrapper').show(); + } + $('#embed-iframe-nav .nav-item').removeClass('current'); + $('#embed-iframe-nav .space').removeClass('current-left').removeClass('current-right'); + var $current = $(this).addClass('current'); + $current.prev().addClass('current-right'); + $current.next().addClass('current-left'); + //LOG + UT.send({ + type:"click", + modId:"embedlv2", + element: $link.attr('data-id'), + url: url + }); + }); + }); + <%/script%> + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/home-link.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/home-link.png new file mode 100755 index 000000000..ca9f9b00e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/home-link.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/imgae-link.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/imgae-link.png new file mode 100755 index 000000000..8bb9f534f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/imgae-link.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/link-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/link-bg.png new file mode 100755 index 000000000..b7d3ca3bd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/link-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/loading.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/loading.gif new file mode 100755 index 000000000..bf9d30210 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/loading.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/movie-link.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/movie-link.png new file mode 100755 index 000000000..de454e4a2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/movie-link.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/news-link.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/news-link.png new file mode 100755 index 000000000..a326f723e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/news-link.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg-left.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg-left.png new file mode 100755 index 000000000..ea0510072 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg-left.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg-right.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg-right.png new file mode 100755 index 000000000..30eb62e1a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg-right.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg.png new file mode 100755 index 000000000..0a6a0aeb8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-async2/space-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-sortsite/embed-lv2-sortsite-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-sortsite/embed-lv2-sortsite-async.js new file mode 100755 index 000000000..51269f145 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/embed-lv2-sortsite/embed-lv2-sortsite-async.js @@ -0,0 +1,390 @@ +/* + * cookie策略:记录用户的上次点击 + * 统计策略:统计每个tab的点击,但cookie跳转分两种情况,用户没有点击cookie跳转的内容,不记录,否则记录一次点击。 + * PM可配置默认展示哪个tab。 + */ + +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + helper = require("common:widget/ui/helper/helper.js"); + +$.cookie("supportCookie",true); + +var embedNav = $( "#embed-iframe-nav" ), + supportCookie = !!jQuery.cookie( "supportCookie" ), + embedWrapper = $( "#embed-iframe-wrapper" ), + embedLoading = $( "#embed-iframe-loading" ), + homeContent = $( ".box-sort" ), + _conf = conf.embedlv2, + navOptions = _conf.navData, + defaultShow = _conf.defaultShow, + // 如果来自特殊渠道,默认展示配置的tab,该策略高于cookie和pm配置 + spcTn = _conf.spcTn, + spcTnDefaultShow = _conf.spcTnDefaultShow, + urlParamTn = ( helper.getQuery() ).tn, + + /* + * 由于几个请求可能同时发出,该字段用来记录需要显示哪个 + * 此字段存在语义问题,因为初始值并不是在click之后赋值的。 + * 如果有cookie则记录cookie值,如果没有则记录PM配置,如果都没有,为空 + */ + shouldShow = (supportCookie && $.cookie( "navClass" )) || defaultShow, + + // 记录正在发送的清空,防止同一请求发出尚未返回时再次发出。 + sendingAjax = {}; + +function bindEvent(){ + + embedNav.on( "mouseenter", ".nav-item", function( e ){ + var $link = $( this ); + + if( $link.hasClass( "current" ) ){ + return; + + } else { + + // 为icon添加hover之后的震动动画 + $link.addClass( "hover" ); + } + + } ).on( "mouseleave", ".nav-item", function( e ){ + + // 取消icon上的动画 + $(this).removeClass( "hover" ); + + } ).on( "click", ".nav-item", function( e ){ + e.preventDefault(); + var $link = $( this ); + + // 记录最后一次点击的tab + shouldShow = $link.attr( "data-id" ); + + changeTabs( $link, relocation, true ); + } ); + + // 自定义事件,按需加载二级页资源中的图片 暂时未启动。 + // embedWrapper.on( "lazyloadImg", function(){ + + // var images = $( this ).find( ".g-img-lazyload" ).filter( ":visible" ); + + // images.lazyload( { + + // //imgClass : "vs-img-src", + // autoFireEvent : null + // } ); + // } ); +} + +/* + * elem 需要切换到的标签的DOM或jQuery对象 + * fn 如果是用户主动点击标签则传入fn,fn的作用主要是进行位置的调整 + 如果是加载页面时,通过cookie进行的标签切换,则不需要调整位置 + * isClick 当该tab的切换是来自用户主动点击而不是cookie时为true,否则为false + */ +function changeTabs( elem, fn , isClick ){ + + var $link = $( elem ), + dataId = $link.attr( "data-id" ), + url = "/"; + + // 如果数据中存在api字段 url设置为api,否则url设置为数据中的url字段 + dataId == "home" ? url : navOptions[dataId].api ? url = navOptions[dataId].api : url = navOptions[dataId].url; + + if( dataId == "home" ){ + + embedWrapper.hide(); + homeContent.show(); + + if(isClick){ + + supportCookie && $.cookie( "navClass", "home", {expires: 1800} ); + + sendLog( "tabs", "home" ); + } + + // 如果点击的是当前tab,链接到相应的二级页 + }else if( $link.hasClass( "current" ) ){ + + if(navOptions[dataId].noLv2){ + return; + } + + //选中的Tab直接打开 + window.open( "/" + dataId + "?from=hao123_tab" ); + + sendLog( "lv2", dataId ); + + }else{ + + homeContent.hide(); + embedWrapper.show(); + embedWrapper.children().hide(); + embedLoading.show() + + // 重新定位嵌入资源的位置,当用户不是手动点击,而是cookie触发的change时,不会进行重新定位 + if( fn ){ + fn(); + } + + initLv2( url, dataId ); + + // 记录data-id,用以记录用户此次点击的标签。 + if( supportCookie && isClick ){ + + $.cookie( "navClass", dataId, {expires: 1800} ); + } + + // 如果是用户手动切换tab,发送一条log + if( isClick ){ + + sendLog( "tabs", dataId ); + + // 如果是cookie触发的切换tab,则为该tab对应的内容绑定点击事件。统计需要。 + }else{ + + bindClickEvent(); + } + } + + // 标签样式的改变 + embedNav.find( ".nav-item" ).removeClass( "current" ); + $link.addClass( "current" ); + +} + +/* + * url 每个标签下面对应的二级页资源的url + * id 每个标签的标记 data-id + */ +function initLv2( url, id ){ + + var content = $( "#embed-iframe-"+ id, embedWrapper ); + + if ( content.length > 0 ) { + embedLoading.hide(); + content.show(); + + } else { + + if( !sendingAjax[id] ){ + + getDatas( url, id ); + } + } +} + +// 读静态资源和读api都使用该方法 +function getDatas( url, id ){ + + sendingAjax[id] = true; + + var timeout = navOptions[id].timeout, + updataTime = navOptions[id].updateTime, + dataUrl = navOptions[id].dataUrl, + getData, + getTpl; + + timeout = url == navOptions[id].api ? parseInt( timeout ) : 0; + + if(dataUrl){ + getData = $.ajax( + { + url : dataUrl, + dataType : "jsonp" + } + ); + } + + getTpl = $.ajax( + { + url: setTimeStamp( url, updataTime ), + dataType: "json", + timeout: timeout + } + ); + + $.when(getTpl, getData ).done( function( tpl, data ){ + + if(data){ + _conf.data = data[0]; + var categorys = helper.getQuery(dataUrl).category.split(","), + recommond = categorys[0], + firstNav = categorys[1]; + + _conf.data.recommond = recommond; + _conf.data.firstNav = firstNav; + + } + + render( tpl[0], id ); + embedLoading.hide(); + + // 显示最后一次点击的tab相应的内容 + embedWrapper.find( "#embed-iframe-" + shouldShow ).show(); + + // 按需加载图片 + // embedWrapper.trigger("lazyloadImg"); + + sendingAjax[id] = false; + + } ).fail( function(){ + + // 如果此次发送的请求不是请求的静态json文件,而是api,并且失败了,则请求resource目录的备份。 + if( url != navOptions[id].url ){ + + // navOptions[id].url 和第一次请求的url并不一样,如需修改请谨慎 + getDatas( navOptions[id].url, id ); + + }else{ + + sendingAjax[id] = false; + } + } ); +} + +// 将获取到的数据插入DOM,此处可能会有用户不会用到的渲染,造成渲染浪费 +function render( data, id ){ + + if( $.isEmptyObject( data ) ){ + return; + } + + var dom = $(''; + $(".sidetoolbar").append(elStr); + } + + + + $(".guide-bubble").css(cssConfig); + +}; + +messageBubble.prototype._startTimer = function(){ + var that = this, + el = that.icon; + + that.sidebar.trigger("changeIconStatus",[el,"hover"]); + that.timer = setTimeout(function(){ + $(".guide-bubble").hide(); + that.sidebar.trigger("changeIconStatus",[el]); + that.guideBubbleStatus = 0; + },that.settings.time); +}; + +messageBubble.prototype._bindEvent = function(){ + var that = this, + index = that.index, + el = that.icon; + + that.sidebar.on("click.hao123",".bubble-close",function(){ + that.stopGuideBubbleTimer(); + that.resetGuideBubbleVersion(); + }). + on("click.hao123",".open-content",function(){ + that.sidebar.trigger("handleContentFold",[index]); + that.stopGuideBubbleTimer(); + that.sidebar.trigger("changeIconStatus",[that.icon,"selected"]); + that.sidebar.trigger("renderAppContent", [index]) && that.icon.attr( "hasClicked", "true" ); + UT.send({ + modId:"sidetoolbar", + type:"click", + position:that.settings.id, + sort:"bubbleOpenContent", + ac:"b" + }); + that.resetGuideBubbleVersion(); + }). + on("stopGuideBubbleTimer",function(){ + that.stopGuideBubbleTimer(); + }). + on("getGuideBubbleStatus",function(){ + return that.guideBubbleStatus; + }). + on("handleBubbleCookie",function(e,index){ + if( index == that.index ){ + that.resetGuideBubbleVersion(); + that.index = -1; + } + }); + +}; + +messageBubble.prototype.stopGuideBubbleTimer = function(){ + var that = this; + $(".guide-bubble").hide(); + //that.sidebar.trigger("changeIconStatus",[that.icon]); + that.timer && clearTimeout(that.timer); + that.guiderTimer && clearTimeout(that.guiderTimer); + that.guideBubbleStatus = 0; +}; + +messageBubble.prototype.getBubbleType = function (data) { + var type = 4; + if( data.once ){ + type = 1; + } else if( data.userOption ){ + type = 2; + } else if( data.timeOption ){ + type = 3; + } + return type; +}; + +messageBubble.prototype.getBubbleVisibility = function (data,cookieName) { + + var flag = false, + cookie = $.cookie.get(cookieName), + type = this.getBubbleType( data ); + + if( type == 1 ){ + !cookie && (flag = true) && this.setBubbleCookie( cookieName,data ); + } else if( type == 2 || type == 3 ){ + !cookie && (flag = true); + } else { + flag = true; + } + return flag; +}; + +messageBubble.prototype.setBubbleCookie = function (cookieName,data,value,expires) { + var type = data ? this.getBubbleType( data ) : ""; + + if( type == 3 ){ + value = type; + expires = data.timeOption; + } + + $.cookie.set(cookieName, value, {expires:expires * 1 || 30}); +}; + +messageBubble.prototype.resetCookie = function( cookieName ){ + $.cookie.set(cookieName,"",{expires: - 1}); +}; + +messageBubble.prototype.resetGuideBubbleVersion = function(){ + var cookie = $.cookie.get("guideBubbleQueue").split(","); + + cookie.length && this.setBubbleCookie("guideBubbleQueue","",cookie.slice(1).join(),1); + cookie.length == 1 && this.setBubbleCookie( "guideBubbleQueue","","none",1); + +} + +messageBubble.prototype.getGuideBubbleVersion = function(){ + var cookie = $.cookie.get("guideBubbleQueue").split(","); + var version = cookie ? cookie[0] : ""; + + return version; +} + +messageBubble.prototype.init = function(){ + var that = this, + config = that.guide, + version = 0, + guideBubbleQueue = $.cookie.get("guideBubbleQueue"); + + that.guiderTimer = null; + + if(config && !config.hide){ + //如果外站要在页面右侧展现ltr的sidebar,就把气泡干掉 + if( window.hao123 && hao123.atRightSide ){ + return; + } + if( !guideBubbleQueue && guideBubbleQueue != "none" ){ + that.setBubbleCookie( "guideBubbleQueue","",that.guide.bubbleQueue,1); + } + + version = that.getGuideBubbleVersion(); + that.settings = $.extend({},that.options,that.guide.list[version]); + that.guideBubbleStatus = 1; + that.icon = $("."+that.settings.id+"Icon"); + that.index = that.icon.index(); + if ( version !== "none" ){ + that.guiderTimer = setTimeout(function(){ + that._renderGuideBubble(); + that._startTimer(); + },3000); + that._bindEvent(); + } else { + that.guideBubbleStatus = 0; + } + + } +}; + + +messageBubble.prototype.handleVisibel = function( el,message ){ + message = message || ""; + el.text( message ); + message ? el.show() : el.hide(); +}; + + +module.exports = messageBubble; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar-content.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar-content.js new file mode 100755 index 000000000..a1204e8f5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar-content.js @@ -0,0 +1,143 @@ +/* +sidebar content class + */ + +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var lazyload = require("common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"); +var T = require("common:widget/ui/time/time.js"); +var $cookie = require('common:widget/ui/jquery/jquery.cookie.js'); + +window.hao123 || (window.hao123 = {}); + +var leftSideContents = function(){ + this.list = conf.sidebar.list; + this.sidebar = $("#sidetoolbarContainer"); + this.isLoadWidget = 0; + this.index = 0; +}; + +leftSideContents.prototype.render = function(){ + var el = "", + _this = this, + contentTpl = + '
                                  ' + + '
                                  ' + + '#{title}' + + '' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  '; + $.each(this.list,function(key,value){ + if( key > 6 ){ + return false; + } + var settings = value.widget[0]; + el = el + helper.replaceTpl( contentTpl,{"widgetId":settings.pageletId || settings.widgetId,"title":settings.title,"id":value.id} ); + + }); + $(".contents-container").append(el); + $(".contents").each(function(i){ + var settings = _this.list[i].widget[0], + sty = {}, + $this = $(this); + settings.width && (sty["width"] = settings.width); + settings.height && (sty["height"] = settings.height); + $this.css(sty); + $this.find(".contents-substance").css({width:sty.width-1,height:sty.height}); + }); +} + +leftSideContents.prototype.handleContentFold = function(index){ + var settings = this.list[index].widget[0], + widget = "#"+ ( settings.pageletId || settings.widgetId ) +"Content", + $this = $(widget), + icon = $("."+this.list[index].id+"Icon"), + _this = this; + + if( $this.hasClass("contents_unfold") ){ + $this.removeClass("contents_unfold"); + _this.contentStatus = 0; + } + else { + $(".contents").removeClass("contents_unfold"); + $this.addClass("contents_unfold"); + this.sidebar.trigger("changeIconStatus",[icon,"selected"]); + _this.contentStatus = 1; + } + _this.index = index; +}; + +leftSideContents.prototype.renderAppContent = function (index) { + var widget = this.list[index].widget[0], + widgetId = widget.widgetId, + widgetContainer = widget.pageletId || widgetId, + appType = widget.appType ? widget.appType : "", + iframeUrl = widget.iframeUrl ? widget.iframeUrl : "", + width = widget.width ? widget.width : "", + height = widget.height ? widget.height : ""; + + + hao123.asyncLoad && hao123.asyncLoad({ + module: "home", + fileType: "tpl", + containerId: widgetContainer, + widgetName: "open-api", + widgetId:[{id: widgetId}], + api: hao123.host + "/openapi", + // for common iframe + appType : appType, + iframeUrl : iframeUrl, + width : width, + height : height + }); +}; + +leftSideContents.prototype.bindEvent = function(){ + var _this = this; + this.sidebar.on("click.hao123",".contents-title_ar",function(){ + var sortId = $(this).attr("sort-id"); + _this.foldContent(); + _this.sidebar.trigger("changeIconStatus",[$(".applist-li")]); + _this.contentStatus = 0; + UT.send({ + modId:"sidetoolbar", + type:"click", + position:sortId, + sort:"contentArrow", + ac:"b" + }); + }). + on("handleContentFold",function(e,index){ + _this.handleContentFold( index ); + }). + on("getContentStatus",function(){ + return _this.contentStatus; + }). + on("renderAppContent", function (e, index) { + _this.renderAppContent(index); + }); +}; + +leftSideContents.prototype.init = function () { + var _this = this; + this.contentStatus = 0; + _this.render(); + _this.bindEvent(); +}; + +leftSideContents.prototype.foldContent = function(){ + $(".contents").removeClass("contents_unfold"); + this.contentStatus = 0; +}; + +leftSideContents.prototype.getCurrentIndex = function(){ + return this.index; +}; + +module.exports = leftSideContents; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar-icon.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar-icon.js new file mode 100755 index 000000000..ac6273f23 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar-icon.js @@ -0,0 +1,176 @@ +/* +icon class + */ + +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var lazyload = require("common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"); +var T = require("common:widget/ui/time/time.js"); +var $cookie = require('common:widget/ui/jquery/jquery.cookie.js'); +var messageBubble = require('home:widget/sidebar/sidebar-bubble.js'); + +var leftSideIcon = function () { + var that = this; + // tipOption = conf.sidebar.tipOption[0], + // list = conf.sidebar.list, + + + that.tipOption = conf.sidebar.tipOption[0]; + + + this.list = conf.sidebar.list; + that.arrow = conf.dir == "ltr" ? "ui-arrow-l" : "ui-arrow-r", + window.hao123 && hao123.atRightSide && (that.arrow = "ui-arrow-r"); + //这里的气泡实例用来处理红色气泡 + // that.bubble = new messageBubble(); + // sidebar = $("#sidetoolbarContainer"); + + that.bubble = new messageBubble(); + + that.sidebar = $("#sidetoolbarContainer"); +} + +leftSideIcon.prototype._clickHandle = function( el ){ + var index = el.index(), + link = el.attr("icon-link"), + content = null; + //type = bubble.getBubbleType( guid ); + if( link.length ){ + window.open( link ); + sidetoolbar.unfoldAll(); + } + else{ + // for iframe @chenliang + !el.attr( "hasClicked" ) && el.attr( "hasClicked", "true" ) && this.sidebar.trigger("renderAppContent", [index]); + this.sidebar.trigger("handleContentFold",[index]); + this.sidebar.trigger("handleBubbleCookie",[index]); + } + + !$.cookie.get("sideBarRedIcon") && el.find(".applist-i").text().length && this.bubble.setBubbleCookie( "sideBarRedIcon", this.tipOption ); + +} + +leftSideIcon.prototype._bindEvent = function(){ + var that = this; + + that.sidebar.on("click.hao123",".applist-li",function(){ + var $this = $(this), + arrow = $this.find("b"), + index = $this.index(); + + //终止气泡 + $this.trigger("stopGuideBubbleTimer"); + + $(".applist-li .ui-arrow").hide(); + $this.find(".applist-div").hide(); + $(".applist-li").removeClass("applist-li_fold"); + if( $this.attr("isflod").length ){ + $this.attr("isflod",""); + arrow.hide(); + } + else{ + $this.attr("isflod","true"); + arrow.show(); + } + that._clickHandle( $this ); + that.bubble.handleVisibel( $this.find(".applist-i"),"" ); + UT.send({ + modId:"sidetoolbar", + type:"click", + sort:"icons", + position:$this.attr("icon-name"), + ac:"b" + }); + }). + on("mouseover.hao123",".applist-li",function(){ + var contentStatus = that.sidebar.triggerHandler("getContentStatus"), + guideBubbleStatus = that.sidebar.triggerHandler("getGuideBubbleStatus"); + + !contentStatus && !guideBubbleStatus && $(this).find(".applist-div").css("display","table"); + }). + on("mouseleave.hao123",".applist-li",function(){ + $(this).find(".applist-div").hide(); + }). + on("changeIconStatus",function( e,el,st ){ + that.changeIconStatus( el,st ); + }); + +}; + + +leftSideIcon.prototype.init = function(){ + var li = "", + that = this, + tipType = this.bubble.getBubbleType( that.tipOption ), + tipCookie = $.cookie.get("sideBarRedIcon"), + iconTpl = + '
                                • ' + + '' + + '
                                  #{hoverWord}
                                  ' + + '#{tip}' + + '' + +'
                                • '; + + $.each(this.list,function( key,value ){ + if( key > 6 ){ + return false; + } + + li = li + helper.replaceTpl(iconTpl,{"id":value.id,"src":value.src,"hoverWord":value.hoverWord,"link":value.link||"","tip":value.tip||""}); + }); + $(".applist").append(li); + this._bindEvent(); + //tipCookie && (tipType != tipCookie) && resetCookie( "sideBarRedIcon" ); + $(".applist-i").each(function(i){ + var visibitily = false; + $(this).text().length && (visibitily = that.bubble.getBubbleVisibility( that.tipOption,"sideBarRedIcon" )); + !visibitily && $(this).text(""); + that.bubble.handleVisibel($(this),$(this).text()); + }); +}; + +leftSideIcon.prototype.changeIconStatus = function( el,st ){ + var el = el || $(".applist-li"), + arrow = el.find("b"); + //选中效果 + if( st === "selected" ){ + el.attr("isflod","true"); + el.removeClass("applist-li_fold"); + arrow.show(); + //hover效果 + } else if ( st === "hover" ) { + el.addClass("applist-li_fold"); + //默认状态 + } else { + el.removeClass("applist-li_fold"); + el.attr("isflod",""); + arrow.hide(); + } +}; +leftSideIcon.prototype.getMessages = function(){ + var result = 0; + + $(".applist-li").find("i").each(function(i){ + var text = $.trim($(this).text()), + num; + + if( !text.length ){ + return true; + } else { + num = parseInt( text,10 ); + if( !num && num !== 0 ) { + result = "•••"; + return false; + } else { + result = num + result; + } + } + + }); + + return result; + +} + +module.exports = leftSideIcon; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar.tpl new file mode 100755 index 000000000..553845b72 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidebar/sidebar.tpl @@ -0,0 +1,40 @@ +<%if $root.urlparam.isHao123 == "false"%> +<%widget name="common:widget/global-conf/global-conf.tpl"%> +<%widget name="common:widget/header/clock/clock-conf/clock-conf.tpl"%> +<%/if%> +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="home:widget/sidebar/ltr/ltr.css"%> + <%require name="home:widget/sidebar/ltr/right-ltr.css"%> + <%require name="common:widget/css-base/dist/base.ltr.css"%> + <%require name="common:widget/css-base/dist/base.ltr.ie.css"%> +<%else%> + <%require name="home:widget/sidebar/rtl/rtl.css"%> + <%require name="common:widget/css-base/dist/base.rtl.css"%> + <%require name="common:widget/css-base/dist/base.rtl.ie.css"%> +<%/if%> +<%require name="common:widget/ui/css-ui/css-ui.css"%> + +<%script%> + require.async(["home:widget/sidebar/sidebar-async.js","common:widget/ui/jquery/jquery.js"], function(sidebar,$){ + window.hao123 || (window.hao123 = {}); + + hao123.atRightSide ? $("#hao123Container").addClass("sidebar-right") : $("#hao123Container").addClass("sidebar-left"); + if (hao123.appList) { + sb = new sidebar(hao123.appList); + sb.init(); + } + + }); + conf.flowLayout = 1; + conf.sidebarBubble = { + "sidebarVote" : '<%uri name="home:widget/sidebar-vote/sidebar-tips-vote-async.js"%>', + }; + +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/close-btn_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/close-btn_hover.png new file mode 100755 index 000000000..9665159ab Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/close-btn_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/close-btn_normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/close-btn_normal.png new file mode 100755 index 000000000..85487942a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/close-btn_normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/content-bk.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/content-bk.png new file mode 100755 index 000000000..dfc99784a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/content-bk.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/guid-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/guid-close.png new file mode 100755 index 000000000..80e7f1be1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/guid-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/guid-close_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/guid-close_hover.png new file mode 100755 index 000000000..ce2f19fae Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/guid-close_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/panel-box.jpg b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/panel-box.jpg new file mode 100755 index 000000000..e110f4daa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/panel-box.jpg differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/sidebar-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/sidebar-close.png new file mode 100755 index 000000000..9247ce709 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/sidebar-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/sidebar-rtl-close.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/sidebar-rtl-close.png new file mode 100755 index 000000000..d44d8fdab Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/sidebar-rtl-close.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-ar-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-ar-hover.png new file mode 100755 index 000000000..4a0404300 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-ar-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-ar-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-ar-normal.png new file mode 100755 index 000000000..4868d9b39 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-ar-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-rtl-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-rtl-hover.png new file mode 100755 index 000000000..b3f5a5d95 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-rtl-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-rtl-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-rtl-normal.png new file mode 100755 index 000000000..78726325b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/title-rtl-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/widget_loading.gif b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/widget_loading.gif new file mode 100755 index 000000000..b1917cc86 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/img/widget_loading.gif differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/ltr/ltr.css new file mode 100755 index 000000000..ca91a4b8c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/ltr/ltr.css @@ -0,0 +1,274 @@ +@import url('/widget/sidetoolbar/sidetoolbar-common.css?__inline'); +#sidetoolbarContainer{ + position: fixed; + left: 0; + top: 163px; + height: auto; + width: 45px; + z-index:300; + display: block !important; +} +#sidetoolbarContainer .sidetoolbar{ + position: absolute; + width: 100%; + height: 100%; + background-color: #70767d; + left: -51px; + transition: all 0.3s; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +#sidetoolbarContainer .sidetoolbar_fold{ + left: 0; + transition: all 0.3s; +} +.sidetoolbar .applist{ + position: relative; + top: 0; + width: 100%; + height: auto; + text-align: center; + border-bottom: 1px solid #878c92; +} +.applist .applist-li{ + width: 100%; + height: 57px; + line-height: 57px; + display: inline-block; + border-bottom: 1px solid #646c76; + border-top: 1px solid #878c92; + position: relative; +} +.applist .applist-li:first-child{ + border-top: none; +} +.applist .applist-li:hover,.applist .applist-li_fold{ + background-color: #54585e; + cursor: pointer; +} + +.applist-li img{ + display: inline-block; + width: 34px; + height: 34px; +} +.applist-li .applist-div,.sidetoolbar .guidbubbles{ + position: absolute; + height: 100%; + width: 150px; + background-color: #878888; + left: 45px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + color: white; + text-align: center; + display: none; + z-index: 1; + text-align: left; +} +.applist-li .applist-div{ + top: 0; + padding: 0 10px; +} +.applist-div span{ + display: table-cell; + vertical-align: middle; + line-height: 16px; +} +.applist-li i,.sidetoolbar-close_flod i{ + position: absolute; + min-width: 19px; + *min-width: 14px; + height: 16px; + border-radius: 8px; + background-color: #f71e01; + left: 30px; + top:0; + background-image:linear-gradient(180deg, #fd5025 0%, #ef0703 100%); + text-shadow:0 -1px 1px #6f1e00; + line-height: 16px; + color: white; + font-size: 14px; + z-index: 2; + border-bottom:2px solid rgba(0,0,0,.5); + padding: 1px 1px 0px 0px; + padding: 0px\0; +} +#sidetoolbarContainer .sidetoolbar-closebtn{ + position: absolute; + width: 25px; + height: 25px; + background: url(../img/close-btn_normal.png?__sprite) no-repeat; + bottom:14px; + cursor: pointer; + display: none; + + transition: -webkit-transform 0.5s; + transition: -moz-transform 0.5; + transition: -ms-transform 0.5s; + transition: transform 0.5s; +} + +#sidetoolbarContainer .sidetoolbar-closebtn:hover,#sidetoolbarContainer .sidetoolbar-closebtn_hover{ + background: url(../img/close-btn_hover.png?__sprite) no-repeat; +} +#sidetoolbarContainer .closebtn_close{ + left: 10px; + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); +} + +#sidetoolbarContainer .closebtn_open{ + left: 24px; + -moz-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + -ms-transform: rotate(360deg); +} +.sidetoolbar .contents-container{ + position: absolute; + left: 45px; + top:-35px; + width: 240px; + height: auto; + z-index: -1; +} +.contents-container .contents{ + position: absolute; + width: 240px; + height: auto; + left: -500px; + transition: all 0.3s; + visibility: hidden; + +} +.contents-container .contents_unfold{ + left: 0; + visibility: visible; +} +.contents .contents-title{ + width:100%; + height: 35px; + line-height: 35px; + background: url(../img/content-bk.png?__sprite) repeat-x; + border-top-right-radius: 25px; + border-top-left-radius: 25px; + box-shadow:6px 0px 10px #d0d3d2; +} +.contents-title .contents-title_t{ + display: inline-block; + float: left; + width:auto; + height: 100%; + color: #e0e0e0; + margin-left: 12px; + font-size: 15px; +} +.contents-title .contents-title_ar{ + display: inline-block; + float: right; + width:21px; + height: 21px; + margin-top: 8px; + margin-right: 11px; + background: url(../img/title-ar-normal.png?__sprite) no-repeat; +} +.contents-title .contents-title_ar:hover{ + background: url(../img/title-ar-hover.png?__sprite) no-repeat; + cursor: pointer; +} +.contents .contents-substance{ + width:239px; + min-height: 300px; + height: auto; + border-right:1px solid white; + border-bottom:1px solid white; + background-color: #f5f7f7; + box-shadow: 6px 6px 10px #d0d3d2 +} +.contents .contents-substance .loading{ + height: 250px; +} +.contents-substance .widget-load{ + position: absolute; + display: block; + top: 150px; + left: 110px; + width: 100%; + height: 16px; + background: url(../img/widget_loading.gif) no-repeat; +} +.sidetoolbar .sidetoolbar-close_flod{ + position: absolute; + width: 62px; + height: 48px; + background: url(../img/sidebar-close.png?__sprite) no-repeat; + bottom: 3px; + top: auto; + left: -18px; + z-index: -1; + transition: all 0.3s; +} +.sidetoolbar .sidetoolbar_unfold{ + left: 50px; + transition: all 0.3s; + cursor: pointer; +} +.sidetoolbar-close_flod i{ + text-align: center; + left:42px; + top: -10px; +} +.sidetoolbar b.ui-arrow-l{ + border-right-color:white; + right: 0px; + left: auto; +} +.sidetoolbar b.ui-arrow{ + display: none; +} +.sidetoolbar .guidbubbles{ + display: inline; + height: 57px; + width: 197px; + text-align: left; + top: 0; +} +.guidbubbles .guidbubble-normal,.guidbubbles .guidbubble-slide{ + display: table; + cursor: default; +} +.guidbubbles .guidbubble-close{ + position: absolute; + display: inline-block; + width: 18px; + height: 18px; + top: -5px; + right: -5px; + background: url(../img/guid-close.png?__sprite) no-repeat; + +} +.guidbubbles .guidbubble-close:hover{ + cursor: pointer; + background: url(../img/guid-close_hover.png?__sprite) no-repeat; +} +.guidbubbles .guidbubble-normal{ + position: relative; + height: auto; + width: 100%; +} +.guidbubbles .guidbubble-slide{ + height: auto; + width: 100%; + background-color: #393939; + position: relative; + border-bottom-right-radius: 4px; + padding: 2px 0; +} +.guidbubbles .opencontent{ + cursor: pointer; +} + +#sidetoolbarContainer .mod-lottery label{ + margin-right: 5px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/rtl/rtl.css new file mode 100755 index 000000000..f1ae0f9df --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/rtl/rtl.css @@ -0,0 +1,265 @@ +@import url('/widget/sidetoolbar/sidetoolbar-common.css?__inline'); +#sidetoolbarContainer{ + position: fixed; + right: 0; + top: 163px; + height: auto; + width: 45px; + z-index:300; + display: block !important; +} +#sidetoolbarContainer .sidetoolbar{ + position: absolute; + width: 100%; + height: 100%; + background-color: #70767d; + right: -51px; + transition: all 0.3s; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +#sidetoolbarContainer .sidetoolbar_fold{ + right: 0; + transition: all 0.3s; +} +.sidetoolbar .applist{ + position: relative; + top: 0; + width: 100%; + height: auto; + text-align: center; + border-bottom: 1px solid #878c92; +} +.applist .applist-li{ + width: 100%; + height: 57px; + line-height: 57px; + display: inline-block; + border-bottom: 1px solid #646c76; + border-top: 1px solid #878c92; + position: relative; +} +.applist .applist-li:first-child{ + border-top: none; +} +.applist .applist-li:hover,.applist .applist-li_fold{ + background-color: #54585e; + cursor: pointer; +} + +.applist-li img{ + display: inline-block; + width: 34px; + height: 34px; +} +.applist-li .applist-div,.sidetoolbar .guidbubbles{ + position: absolute; + height: 100%; + width: 150px; + background-color: #878888; + right: 45px; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + color: white; + text-align: center; + display: none; + z-index: 1; + text-align: right; +} +.applist-li .applist-div{ + top: 0; + padding: 0 10px; +} +.applist-div span{ + display: table-cell; + vertical-align: middle; + line-height: 16px; +} +.applist-li i,.sidetoolbar-close_flod i{ + position: absolute; + min-width: 19px; + *min-width: 14px; + height: 16px; + border-radius: 8px; + background-color: #f71e01; + right: 30px; + top:0; + background-image:linear-gradient(180deg, #fd5025 0%, #ef0703 100%); + text-shadow:0 -1px 1px #6f1e00; + line-height: 16px; + color: white; + font-size: 14px; + z-index: 2; + border-bottom:2px solid rgba(0,0,0,.5); + padding: 1px 1px 0px 0px; + padding: 0px\0; + font-family: arial,tahoma,helvetica,clean,sans-serif; +} +#sidetoolbarContainer .sidetoolbar-closebtn{ + position: absolute; + width: 25px; + height: 25px; + background: url(../img/close-btn_normal.png?__sprite) no-repeat; + bottom:13px; + cursor: pointer; + display: none; + + transition: -webkit-transform 0.5s; + transition: -moz-transform 0.5s; + transition: -ms-transform 0.5s; + transition: transform 0.5s; +} + +#sidetoolbarContainer .sidetoolbar-closebtn:hover,#sidetoolbarContainer .sidetoolbar-closebtn_hover{ + background: url(../img/close-btn_hover.png?__sprite) no-repeat; +} +#sidetoolbarContainer .closebtn_close{ + right: 10px; + -moz-transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); +} + +#sidetoolbarContainer .closebtn_open{ + right: 23px; + -moz-transform: rotate(-360deg); + -webkit-transform: rotate(-360deg); + -ms-transform: rotate(-360deg); +} +.sidetoolbar .contents-container{ + position: absolute; + right: 45px; + top:-35px; + width: 240px; + height: auto; + z-index: -1; +} +.contents-container .contents{ + position: absolute; + width: 240px; + height: auto; + right: -500px; + transition: all 0.3s; + visibility: hidden; +} +.contents-container .contents_unfold{ + right: 0; + visibility: visible; +} +.contents .contents-title{ + width:100%; + height: 35px; + line-height: 35px; + background: url(../img/content-bk.png?__sprite) repeat-x; + border-top-right-radius: 25px; + border-top-left-radius: 25px; + box-shadow:-6px 0px 10px #d0d3d2; +} +.contents-title .contents-title_t{ + display: inline-block; + float: right; + width:auto; + height: 100%; + color: #e0e0e0; + margin-right: 12px; + font-size: 15px; +} +.contents-title .contents-title_ar{ + display: inline-block; + float: left; + width:21px; + height: 21px; + margin-top: 8px; + margin-left: 11px; + background: url(../img/title-rtl-normal.png?__sprite) no-repeat; +} +.contents-title .contents-title_ar:hover{ + background: url(../img/title-rtl-hover.png?__sprite) no-repeat; + cursor: pointer; +} +.contents .contents-substance{ + width:239px; + min-height: 300px; + height: auto; + border-left:1px solid white; + border-bottom:1px solid white; + background-color: #f5f7f7; + box-shadow: -6px 6px 10px #d0d3d2 +} +.contents .contents-substance .loading{ + height: 250px; +} +.sidetoolbar .sidetoolbar-close_flod{ + position: absolute; + width: 62px; + height: 48px; + background: url(../img/sidebar-rtl-close.png?__sprite) no-repeat; + bottom: 3px; + top: auto; + right: -18px; + z-index: -1; + transition: all 0.3s; +} +.sidetoolbar .sidetoolbar_unfold{ + right: 50px; + transition: all 0.3s; + cursor: pointer; +} +.sidetoolbar-close_flod i{ + text-align: center; + right:42px; + top: -10px; +} +.sidetoolbar b.ui-arrow-r{ + border-left-color:white; + left: 0px; + right: auto; +} +.sidetoolbar b.ui-arrow{ + display: none; +} +.sidetoolbar .guidbubbles{ + display: inline; + height: 57px; + width: 197px; + text-align: right; + top: 0; +} +.guidbubbles .guidbubble-normal,.guidbubbles .guidbubble-slide{ + display: table; + cursor: default; +} +.guidbubbles .guidbubble-close{ + position: absolute; + display: inline-block; + width: 18px; + height: 18px; + top: -5px; + left: -5px; + background: url(../img/guid-close.png?__sprite) no-repeat; + +} +.guidbubbles .guidbubble-close:hover{ + cursor: pointer; + background: url(../img/guid-close_hover.png?__sprite) no-repeat; +} +.guidbubbles .guidbubble-normal{ + position: relative; + height: auto; + width: 100%; +} +.guidbubbles .guidbubble-slide{ + height: auto; + width: 100%; + background-color: #393939; + position: relative; + border-bottom-right-radius: 4px; + padding: 2px 0; +} +.guidbubbles .opencontent{ + cursor: pointer; +} + +#sidetoolbarContainer .mod-lottery label{ + margin-right: 5px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/sidetoolbar-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/sidetoolbar-async.js new file mode 100755 index 000000000..6ff4f078f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sidetoolbar/sidetoolbar-async.js @@ -0,0 +1,577 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var lazyload = require("common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"); +var T = require("common:widget/ui/time/time.js"); +var $cookie = require('common:widget/ui/jquery/jquery.cookie.js'); + + +var sideToolBar = function(){ + var arrow = conf.dir == "ltr" ? "ui-arrow-l" : "ui-arrow-r"; + var iconTpl = + '
                                • ' + + '' + + '
                                  #{hoverWord}
                                  ' + + '#{tip}' + + '' + +'
                                • ', + contentTpl = + '
                                  ' + + '
                                  ' + + '#{title}' + + '' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  ' + +'
                                  ', + guidbubbleTpl = + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '
                                  ' + + '' + +'
                                  ', + sidetoolbar_foldTpl = + '
                                  ' + +'
                                  ', + list = conf.sidetoolbar.list, + guid = conf.sidetoolbar.leftSideGuidBubble, + tipOption = conf.sidetoolbar.tipOption[0], + isfold = 0, + contentindex = 0, + isLoadWidget = 0, + guider,guiderTimer,icons,messageb = null; + + /*红色提醒气泡*/ + function messageBubble(){ + + } + messageBubble.prototype = { + handleVisibel:function( el,message ){ + message ? el.show():el.hide(); + } + } + /*api信息获取*/ + function messagePull( api ){ + $.ajax({ + url:api, + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + cache: false, + + success:function(result){ + messageb.handleVisibel( el,result ); + }, + error:function(){ + + } + }); + } + /** + *处理气泡的显隐策略,状态一共有四种 + + 1) once => 只显示一次 + 2) userOption => 用户有过操作便不再显示 + 3) timeOption => 间隔一段时间显示,首次记录一个时间,超过设定的时间段以后重新记录时间,在此期间若用户有过操作则不显示 + 4) alwaysShow => 每次刷新都显示 + + *适用范围包括手工配置的红色提醒气泡和旁边的提醒气泡浮层 + + */ + function getBubbleVisibility( data,cookieName ){ + + var flag = false, + cookie = $.cookie.get(cookieName), + type = getBubbleType( data ); + + if( type == 1 ){ + !cookie && (flag = true) && setBubbleCookie( cookieName,data ); + } else if( type == 2 || type == 3 ){ + !cookie && (flag = true); + } else { + flag = true; + } + return flag; + } + /*根据数据配置设置气泡的cookie*/ + function setBubbleCookie( cookieName,data,value,expires ){ + var type = getBubbleType( data ); + value = value || type; + if( type == 3 ){ + expires = data.timeOption; + } + $.cookie.set(cookieName, type, {expires:expires*1 || 2000}); + } + /*清除cookie,重置策略*/ + function resetCookie( cookieName ){ + $.cookie.set(cookieName,"",{expires:-1}); + } + /*判断显隐策略类型*/ + function getBubbleType( data ){ + var type = 4; + if( data.once ){ + type = 1; + } else if( data.userOption ){ + type = 2; + } else if( data.timeOption ){ + type = 3; + } + return type; + } + /*内容区*/ + function leftSideContents( index ){ + var that = this, + data = list[index]; + + that.settings = data.widget[0]; + that.id = data.id; + that.widget = "#"+ ( that.settings.pageletId || that.settings.widgetId ) +"Content"; + contentindex = index; + + } + leftSideContents.prototype = { + constructor: leftSideContents, + + handleStatu:function(){ + var that = this; + $(".contents").length ? that.handleFold():that.init(); + }, + resetContent:function(){ + $(".contents").removeClass("contents_unfold"); + }, + init:function(){ + var el = "", + that = this, + className = "."+that.id; + $.each(list,function(key,value){ + var settings = value.widget[0]; + el = el + helper.replaceTpl( contentTpl,{"widgetId":settings.pageletId || settings.widgetId,"title":settings.title,"id":value.id} ); + + }); + $(".contents-container").append(el); + that.render(); + !isLoadWidget && $(className).lazyload({autoFireEvent:null}); + !isLoadWidget && $(className).lazyload({triggerAll:true}); + that.handleStatu(); + that.bindEvent(); + }, + render:function(){ + $(".contents").each(function(i){ + var settings = list[i].widget[0], + sty = {}, + $this = $(this); + settings.width && (sty["width"] = settings.width); + settings.height && (sty["height"] = settings.height); + $this.css(sty); + $this.find(".contents-substance").css({width:sty.width-1,height:sty.height}); + }); + }, + //处理内容区的切换 + handleFold:function(){ + var $this = $(this.widget); + if( $this.hasClass("contents_unfold") ){ + $this.removeClass("contents_unfold"); + isfold = 0; + } + else { + $(".contents").removeClass("contents_unfold"); + $this.addClass("contents_unfold"); + icons.changeStatu("."+this.id+"Icon","selected"); + isfold = 1; + } + }, + //绑定内容区的关闭按钮 + bindEvent:function(){ + var that = this; + $(".contents-title_ar").click(function(){ + var sortId = $(this).attr("sort-id"); + that.resetContent(); + icons.changeStatu(".applist-li"); + isfold = 0; + UT.send({ + modId:"sidetoolbar", + type:"click", + position:sortId, + sort:"contentArrow", + ac:"b" + }); + }); + } + + + }; + /*引导气泡*/ + function leftSideGuidBubble( data ){ + var options = { + id:"", + close:1, + normalTpl:"", + slideTpl:"", + timer:null, + time:5000 + }, + that = this; + + that.settings = $.extend({},options,data); + that.icon = "."+that.settings.id+"Icon"; + that.index = $(that.icon).index(); + that.src = list[that.index].src; + } + leftSideGuidBubble.prototype = { + //初始化气泡外框,大小可定制 + init:function(){ + var that = this, + top = that.index*59; + $(".sidetoolbar").append(helper.replaceTpl(guidbubbleTpl,{"index":that.index})); + $(".guidbubble"+that.index).css("marginTop",top+"px"); + that.settings.width && $(".guidbubble"+that.index).width(that.settings.width); + that.settings.height && $(".guidbubble"+that.index).height(that.settings.height); + icons.changeStatu( that.icon,"hover" ); + that._generate(); + that.settings.replaceSrc && that._replaceImg(); + that._bindEvent(); + + }, + //构造气泡内容 + _generate:function(){ + var that = this, + settings = that.settings, + //上半部分内容 + normaltpl = $(".guidbubble"+that.index).find(".guidbubble-normal"), + //下半部分内容 + slidetpl = $(".guidbubble"+that.index).find(".guidbubble-slide"), + //解决gif图片缓存问题添加的随机数 + rnum = Math.random(); + settings.openable && normaltpl.addClass("opencontent"); + normaltpl.append(helper.replaceTpl(settings.normalTpl,{"random":rnum})); + normaltpl.height(settings.normalTplHeight); + normaltpl.css("lineHeight",settings.normalTplHeight+"px"); + if( settings.slideTpl.length ){ + slidetpl.append(settings.slideTpl); + slidetpl.height(settings.slideTplHeight); + slidetpl.css("lineHeight",settings.slideTplHeight+"px"); + } + else{ + slidetpl.hide(); + } + that._initTimer(); + isfold = 1; + + }, + //初始化显隐策略,默认5秒后消失 + _initTimer:function(){ + var that = this; + that.settings.timer = setTimeout(function(){ + $(".guidbubble"+that.index).hide(); + icons.changeStatu( that.icon ); + isfold = 0; + },that.settings.time); + $(".speedresult").length && that.initSpeedtestTimer(); + }, + initSpeedtestTimer:function(){ + var that = this; + setTimeout(function(){ + $(".speedresult").show(); + $(".processbar").hide(); + $(".testbtn").show(); + that.settings.replaceSrc && that._resetImg(); + },3000); + }, + stopTimer:function(){ + var that = this; + $(".guidbubbles").hide(); + that.settings.timer && clearTimeout(that.settings.timer); + that.settings.replaceSrc && that._resetImg(); + guider = null; + }, + _replaceImg:function(){ + var settings = this.settings; + $(this.icon).find("img").attr("src",settings.replaceSrc); + }, + _resetImg:function( src ){ + var that = this, + settings = that.settings; + src = src || that.src; + if(!that.settings.replaceSrc){ + return; + } + $(that.icon).find("img").attr("src",src); + }, + //绑定一些默认的事件,包括关闭气泡和打开对应内容区 + _bindEvent:function(){ + var el = $(".guidbubble"+this.index), + that = this; + el.find(".guidbubble-close").click(function(){ + el.hide(); + that.stopTimer(); + icons.changeStatu( that.icon ); + isfold = 0; + setBubbleCookie( "sideBarGuid",guid ); + + }); + $(".opencontent").click(function(){ + var content = new leftSideContents(that.index); + messageb.handleVisibel( $(that.icon).find("i"),"" ); + content.handleStatu(); + icons.changeStatu( that.icon,"selected" ); + that.stopTimer(); + setBubbleCookie( "sideBarGuid",guid ); + isfold = 1; + UT.send({ + modId:"sidetoolbar", + type:"click", + position:guid.list[guid.modVersion].id, + sort:"bubbleOpenContent", + ac:"b" + }); + that.settings.replaceSrc && that._resetImg(); + }); + + } + } + function leftSideIcon(){ + + } + leftSideIcon.prototype = { + init:function(){ + var li = "", + tipType = getBubbleType( tipOption ), + tipCookie = $.cookie.get("sideBarRedIcon"); + $.each(list,function( key,value ){ + li = li + helper.replaceTpl(iconTpl,{"id":value.id,"src":value.src,"hoverWord":value.hoverWord,"link":value.link,"tip":value.tip}); + }); + $(".applist").append(li); + this._bindEvent(); + tipCookie && (tipType != tipCookie) && resetCookie( "sideBarRedIcon" ); + $(".applist-i").each(function(i){ + var visibitily = false; + $(this).text().length && (visibitily = getBubbleVisibility( tipOption,"sideBarRedIcon" )); + !visibitily && $(this).text(""); + messageb.handleVisibel($(this),$(this).text()); + }); + }, + //处理icon的点击行为,包括打开一个链接或展开内容区 + _clickHandle:function( el ){ + var index = el.index(), + link = el.attr("icon-link"), + content = null; + var type = getBubbleType( guid ); + if( link.length ){ + window.open( link ); + sidetoolbar.unfoldAll(); + } + else{ + // for iframe @chenliang + !el.attr( "hasClicked" ) && el.attr( "hasClicked", "true" ); + content = new leftSideContents( index ); + content.handleStatu(); + !$.cookie.get("sideBarGuid") && (list[index].id == guid.list[guid.modVersion].id) + && setBubbleCookie( "sideBarGuid",guid ); + } + + !$.cookie.get("sideBarRedIcon") && el.find(".applist-i").text().length && setBubbleCookie( "sideBarRedIcon",tipOption ); + + guider && guider.stopTimer(); + + + }, + //改变icon的样式状态 + changeStatu:function( el,st ){ + var el = $(el), + arrow = el.find("b"); + //选中效果 + if( st === "selected" ){ + el.attr("isflod","true"); + el.removeClass("applist-li_fold"); + arrow.show(); + //hover效果 + } else if ( st === "hover" ) { + el.addClass("applist-li_fold"); + //默认状态 + } else { + el.removeClass("applist-li_fold"); + el.attr("isflod",""); + arrow.hide(); + } + }, + _bindEvent:function(){ + var that = this; + $(".applist-li").on("click",function(){ + var $this = $(this), + arrow = $this.find("b"); + guiderTimer && clearTimeout(guiderTimer); + $(".applist-li .ui-arrow").hide(); + $this.find(".applist-div").hide(); + $(".applist-li").removeClass("applist-li_fold"); + if( $this.attr("isflod").length ){ + $this.attr("isflod",""); + arrow.hide(); + } + else{ + $this.attr("isflod","true"); + arrow.show(); + } + that._clickHandle( $this ); + messageb.handleVisibel( $this.find(".applist-i"),"" ); + UT.send({ + modId:"sidetoolbar", + type:"click", + sort:"icons", + position:$this.attr("icon-name"), + ac:"b" + }); + }); + $(".applist-li").hover( + function(){ + //如果右侧有元素,则不显示hover提示 + !isfold && $(this).find(".applist-div").css("display","table"); + }, + function(){ + $(this).find(".applist-div").hide(); + } + ); + } + } + + //整体 + var sidetoolbar = { + hasInited:0, + init:function(){ + $(".sidetoolbar").append(sidetoolbar_foldTpl); + $("#sidetoolbarContainer").height((list.length+1)*57+list.length+1); + this.bindEvent(); + !$.cookie.get("sidebarVersion") && $.cookie.set("sidebarVersion",conf.sidetoolbar.version,{expires:2000}); + if( $.cookie.get("sidebarVersion") != conf.sidetoolbar.version ){ + $.cookie.set("sidebarVersion",conf.sidetoolbar.version,{expires:2000}); + $.cookie("sidebartool", "1", {expires:2000}); + $(".sidetoolbar-closebtn").addClass("closebtn_close").css("display","block"); + $(".sidetoolbar").addClass("sidetoolbar_fold"); + this.trigger(); + return; + } + //如果分辨率小于1024或者计有cookie则默认收起 + if(!$.cookie.get("sidebartool") && $(document).width() > 1024 || $.cookie.get("sidebartool") == 1){ + $(".sidetoolbar-closebtn").addClass("closebtn_close").css("display","block"); + $(".sidetoolbar").addClass("sidetoolbar_fold"); + this.trigger(); + } + else{ + $(".sidetoolbar-close_flod").addClass("sidetoolbar_unfold"); + $(".sidetoolbar-closebtn").addClass("closebtn_open").css("display","block"); + } + + + }, + //构造 + trigger:function(){ + icons = new leftSideIcon(); + messageb = new messageBubble(); + icons.init(); + if(guid && !guid.hide){ + var type = getBubbleType( guid ), + sideBarGuid = $.cookie.get("sideBarGuid"); + //如果更换了cookie策略或者更换了气泡版本则重置气泡的cookie + ((sideBarGuid && sideBarGuid != type) || ($.cookie.get("sideBarGuidVersion") != guid.modVersion)) && resetCookie("sideBarGuid"); + var isInit = getBubbleVisibility( guid,"sideBarGuid" ); + + isInit && (isfold = 1) && (guiderTimer = setTimeout(function(){ + guider = new leftSideGuidBubble(guid.list[guid.modVersion]); + guider.init(); + $.cookie.set("sideBarGuidVersion", guid.modVersion, {expires:2000}); + },3000)); + + } + this.hasInited = 1; + }, + + //收起 + unfoldAll:function(){ + $(".contents").removeClass("contents_unfold"); + icons.changeStatu(".applist-li"); + guider && guider.stopTimer(); + guiderTimer && clearTimeout(guiderTimer); + isfold = 0; + }, + //处理点击dropdownList组件的内容时,左侧栏意外收起的情况 + isDropDown:function( list,el ){ + var flag = false; + for(var i = 0; i +<%if $head.dir=='ltr'%> <%require name="home:widget/sidetoolbar/ltr/ltr.css"%> <%else%> <%require name="home:widget/sidetoolbar/rtl/rtl.css"%> <%/if%> +<%require name="common:widget/ui/css-ui/css-ui.css"%> + +<%script%> + + conf.sidetoolbar = <%json_encode($body.sidetoolbar)%>; + require.async("home:widget/sidetoolbar/sidetoolbar-async.js", function(sideToolBar){ + sideToolBar(); + }); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/snow/snow-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/snow/snow-async.js new file mode 100755 index 000000000..fa8c4870a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/snow/snow-async.js @@ -0,0 +1,146 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); + +function Snow(config){ + config = typeof config == 'object' ? config : {}; + var begin = new Date(); + var timeout = config.timeout?config.timeout:10000; + var imgInfo = config.img; + var snowlevel = config.snowlevel?config.snowlevel:2; + var speed = config.speed; + var snowNum = 15; + var screenWidth = document.documentElement.clientWidth || document.body.clientWidth; + snowNum = Math.ceil(snowNum*screenWidth/1024); + // console.log(snowNum); + var snows = []; + var UA = navigator.userAgent; + var IE = UA.match(/MSIE (\d+)/); + IE = IE && +IE[1]; + var IE6 = (IE == 6); + var snowInterval = null; + if (!IE6) { + function initFn() { + var snow = function(index){ + var screenWidth = document.documentElement.clientWidth || document.body.clientWidth, + screenHeight = document.documentElement.clientHeight || document.body.clientHeight, + scale = Math.random() * 1 - 0.3, + sizeW = Math.ceil(40 * (1 + scale) ), + sizeH = Math.ceil(62 * (1 + scale) ), + sizeW = 40, + sizeH = 62, + snowX = Math.random() * (screenWidth-100), + snowY = 0, + speedX = 0, + angleX = 0, + speedY = parseInt(snowlevel,10) + Math.random() * speed, + amplitude = Math.random() * 3, + opacity = 1, + img = null, + moveInterval = null, + hideInterval = null, + _this = this; + + if ( Math.random() - 0.5 > 0) { + speedX = (0.01 + Math.random()/100); + } else { + speedX = -(0.01 + Math.random()/100); + } + var draw = function (){ + img = document.createElement('img'); + var cnt = imgInfo.length; + var info = imgInfo[Math.floor(Math.random() * cnt % cnt)]; + img.src = info['src']; + sizeW = info['width']; + sizeH = info['height']; + var cssStyle = { + 'position':'absolute', + 'zIndex':'10000000', + 'opacity':opacity, + 'width':(sizeW + 'px'), + 'height':(sizeH + 'px') + }; + for( var i in cssStyle) { + if(cssStyle.hasOwnProperty(i)){ + img.style[i] = cssStyle[i]; + } + } + img.style.left = snowX + 'px'; + img.style.top = snowY + 'px'; + document.body.appendChild(img); + }; + var move = function (){ + angleX += speedX; + snowX = snowX + amplitude * Math.sin(angleX); + snowY += speedY; + var screenWNow = document.documentElement.clientWidth || document.body.clientWidth, + screenHNow = document.documentElement.clientHeight || document.body.clientHeight; + /*表情下的高度,统一为600,大屏中就只下上半部分*/ + var maxHeight = 600; + if ( 70 < snowX && snowX < (screenWNow - 100) && 0 < snowY && snowY < maxHeight ) { + img.style.left = snowX + 'px'; + img.style.top = snowY + 'px'; + } else { + img.style.left = snowX + 'px'; + img.style.top = snowY + 'px'; + if ( !hideInterval) { + hideInterval = setInterval(function(){ + if (opacity >= 0) { + opacity -= 0.2; + img.style.opacity = opacity; + } else { + destory(); + var end = new Date(); + if ((end-begin) <= timeout) { + snows[index] = new snow(index); + } + } + }, 50); + } + } + }; + var destory = this.destory = function(){ + clearInterval(hideInterval); + clearInterval(moveInterval); + if (img.parentNode) { + img.parentNode.removeChild(img); + } + _this = null; + }; + + var init = function() { + draw(); + moveInterval = setInterval(function(){ + move(); + }, 50) + }; + init(); + }; + function initSnow(){ + var initSnowNum = 10 + 3 * snowlevel; + for (var i = 0; i < initSnowNum; i ++) { + snows[i] = new snow(i); + } + /*下雪时间间隔跟下雪速度有关,速度越快,间隔越小*/ + snowInterval = setInterval( function() { + var snowCount = snows.length; + if ( snowCount < snowNum) { + snows[snowCount] = new snow(snowCount); + } else { + clearInterval(snowInterval); + } + }, 200/snowlevel); + } + function destroySnow() { + clearInterval(snowInterval); + } + + var me = this; + setTimeout(function() { + destroySnow(); + }, timeout); + + initSnow(); + } + initFn(); + } +}; +module.exports = Snow; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/snow/snow.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/snow/snow.tpl new file mode 100755 index 000000000..7462af372 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/snow/snow.tpl @@ -0,0 +1,32 @@ +<%script%> + require.async( ["common:widget/ui/jquery/jquery.js", "home:widget/snow/snow-async.js"], function( $, Snow ){ + var snow = <%json_encode( $body.snow )%>; + var triggerMods = snow.modIds || []; + var directShow = snow.directShow; + var delay = parseInt( snow.delay ) || 0; + var begin = 0; + var config = { + 'snowNum' : snow.snowNum, + 'snowlevel': snow.snowlevel || 2, + 'timeout': 1000 * snow.timeout || 10, + 'speed' : snow.speed, + 'img': snow.img + }; + for( var i=0, len=triggerMods.length; i parseInt( config.timeout ) ){ + begin = + new Date(); + new Snow( config ); + } + } ); + } + if( directShow === "1" && !$.cookie.get( "snowed" ) ){ + setTimeout( function(){ + new Snow( config ); + + }, delay ); + $.cookie.set('snowed', '1', { expires: 1 }); + } + } ); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/apps.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/apps.tpl new file mode 100755 index 000000000..bd0bb6ff1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/apps.tpl @@ -0,0 +1,40 @@ +<%script%> + conf = conf || {}; + conf.sortAreaApp = <%json_encode( $body.sortAreaApp )%>; + conf.sortAreaApp.id = "sortAreaApps"; + + /**for test + require.async( ["home:widget/sort-area/apps/save-apps-async.js","common:widget/ui/jquery/jquery.js"], function( init, $ ){ + var hotItems = conf.sortAreaApp.hot.items; + var length = hotItems.length; + var dataUrl = "?app=apps&act=content&country=br&vk=1&num_hot=" + conf.sortAreaApp.hot.num_hot + "&num_new=" + conf.sortAreaApp.newApp.num_new + "&num_all=" + conf.sortAreaApp.more.num_more + "&ids_hot="; + + for( var i=0; i", function(){ + new CreateContent( "<%$tab.id%>", dataUrl ); + } ); + conf.sortArea.clildModuleReady["<%$tab.id%>"] = "true"; + } ); + +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/app-tab.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/app-tab.png new file mode 100755 index 000000000..9902ff8ab Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/app-tab.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/left-btn-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/left-btn-normal.png new file mode 100755 index 000000000..a694afec4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/left-btn-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon-gray.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon-gray.png new file mode 100755 index 000000000..71ccbda4b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon-gray.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon-green.png new file mode 100755 index 000000000..af02ea0c8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon.png new file mode 100755 index 000000000..f0bb5f634 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/new-icon.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/people-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/people-green.png new file mode 100755 index 000000000..119fa4eb8 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/people-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/people-pray.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/people-pray.png new file mode 100755 index 000000000..8c9135830 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/people-pray.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/right-btn-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/right-btn-normal.png new file mode 100755 index 000000000..87b016fdd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/img/right-btn-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/save-apps-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/save-apps-async.js new file mode 100755 index 000000000..974a98206 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/save-apps-async.js @@ -0,0 +1,300 @@ +( function( win ){ + var $ = require( "common:widget/ui/jquery/jquery.js" ), + UT = require( "common:widget/ui/ut/ut.js" ), + helper = require( "common:widget/ui/helper/helper.js" ), + cycletabs = require("common:widget/ui/cycletabs/cycletabs.js"), + + + + sortAreaApp = function(){ + var opt = conf.sortAreaApp, + id = opt.id, + mod = $( "#" + id ), + + data = conf.sortArea.data.content.data, + /* banner轮播区*/ + initCarousel = function(){ + var carouselOpt = opt.carousel, + carouselMod = mod.find( ".carousel" ), + contentMod = carouselMod.find( ".carousel-content" ), + itemsMod = contentMod.find( "ul" ), + leftBtn = contentMod.find( ".left" ), + rightBtn = contentMod.find( ".right" ), + leftItem = contentMod.find( ".leftItem" ), + rightItem = contentMod.find( ".rightItem" ), + itemsData = carouselOpt.items, + length = itemsData.length, + formatedData = [], + left1 = "-738px", + left2 = "-308px", + itemTpl = '', + itemsStr = '
                                    ', + timer, isSliding; + + init(); + function init(){ + carouselMod.find( "h2" ).text( carouselOpt.title ); + render(); + bindEvent(); + autoSlide(); + } + function render(){ + for( var i=0; i<3; i++ ){ + var curData = itemsData[i]; + itemsStr += helper.replaceTpl( itemTpl, itemsData[i] ); + } + itemsStr += '
                                  '; + contentMod.append( itemsStr ); + } + function slide( dir ){ + if( isSliding ) return; + isSliding = true; + var tmp; + itemsMod = contentMod.find( "ul" ); + if( dir == "right" ){ + tmp = itemsData.shift(); + itemsData = itemsData.concat( tmp ); + itemsMod.append( helper.replaceTpl( itemTpl, itemsData[2] ) ); + }else{ + itemsMod.css( "left", left1 ); + itemsMod.prepend( helper.replaceTpl( itemTpl, itemsData[length-1] ) ); + tmp = itemsData.pop(); + itemsData = [tmp].concat( itemsData ); + } + itemsMod.animate( { + left : dir == "right" ? left1 : left2 + }, parseInt( carouselOpt.scrollDuration ) || 500, function(){ + if( dir == "right" ){ + itemsMod.find( "li:eq(0)" ).remove(); + itemsMod.css( "left", left2 ); + }else{ + itemsMod.find( "li:eq(3)" ).remove(); + } + isSliding = false; + } ); + } + function autoSlide(){ + if( !timer ){ + timer = setInterval( function(){ + slide( carouselOpt.autoScrollDirection || "right"); + }, parseInt( carouselOpt.autoDuration ) || 3000 ); + } + } + function stopAutoSlide(){ + clearInterval( timer ); + timer = null; + } + function bindEvent(){ + leftBtn.on( "click", function(){ + slide( "left" ); + } ); + leftItem.on( "click", function(){ + slide( "left" ); + } ); + rightBtn.on( "click", function(){ + slide( "right" ); + } ); + rightItem.on( "click", function(){ + slide( "right" ); + } ); + contentMod.on( "mouseenter", function(){ + stopAutoSlide(); + } ) + .on( "mouseleave", function(){ + autoSlide(); + } ); + + } + window.Gl && Gl.message && Gl.message.on("module.flow.switch",function ( width ){ + if( width == 1020 ){ + left1 = "-738px"; + left2 = "-308px"; + itemsMod.css( "left", left2 ); + }else{ + left1 = "-768px"; + left2 = "-338px"; + itemsMod.css( "left", left2 ); + } + }); + }, + initHot = function(){ + var hotOpt = opt.hot, + hotData = data.hot, + hotMod = mod.find( ".hot" ), + itemTpl = '
                                • ' + + '
                                  ' + + '#{app_name}' + + '

                                  #{app_name}

                                  ' + + '

                                  ' + + '' + + '#{app_loaded}' + + '

                                  ' + + '
                                  ' + + '
                                  ' + + '' + + '' + + '
                                  ' + + '

                                  #{app_abstract}

                                  ' + + '
                                  ' + + '
                                  ' + + '' + + '
                                • ', + itemsStr = ""; + hotMod.find( "h2" ).text( hotOpt.title ); + for( var i=0; i 10 ? 10 : length, + itemTpl = '
                                • ' + + '' + + '#{index}' + + '' + + '#{app_name}' + + '' + + '
                                • ', + itemsStr = ""; + newMod.find( "h2" ).text( newAppOpt.title ); + for( var i=0; i dataLength ? dataLength : setedLength, + moreMod = mod.find( ".more" ), + listContainer = moreMod.find(".list-container"), + itemTpl = '
                                • ' + + '
                                  ' + + '#{app_name}' + + '

                                  #{app_name}

                                  ' + + '

                                  ' + + '' + + '#{app_loaded}' + + '

                                  ' + + '
                                  ' + + '
                                  ' + + '' + + '' + + '
                                  ' + + '

                                  #{app_abstract}

                                  ' + + '
                                  ' + + '
                                  ' + + '
                                • ', + slideData = [], + slideItemId = 1, + slideItemStr = '
                                    '; + + init(); + + function init(){ + var curLayout = conf.curLayout; + moreMod.find( "h2" ).text( moreOpt.title ); + formatSliderData( curLayout ); + render( curLayout ); + bindEvent(); + } + function formatSliderData( width ){ + for( var i=0; i', + "id": slideItemId + } ); + slideItemId ++ ; + slideItemStr = '
                                      '; + } + if( num === 12 ){ + curData.last = i % 4 === 3 ? "last" : ""; + }else{ + curData.last = i % 3 === 2 ? "last" : ""; + } + + slideItemStr += helper.replaceTpl( itemTpl, curData ); + if( i === length-1 ){ + slideData.push( + { + "content": slideItemStr + '
                                    ', + "id": slideItemId + } + ); + } + } + } + function render( width ){ + var options = { + offset: 0, + navSize: 1, + itemSize: width && width == 960 ? 562 : 612, + autoScroll: true, + autoScrollDirection: moreOpt.autoScrollDirection || "forward", + autoDuration: parseInt( moreOpt.autoDuration ) || 3000, + scrollDuration: parseInt( moreOpt.scrollDuration ) || 500, + containerId: listContainer, + data: slideData, + defaultId: 1 + }, + slider = new cycletabs.NavUI(); + slider.init(options); + } + function bindEvent(){ + moreMod.on( "mouseenter", ".more-list", function(){ + var thisMod = $( this ); + thisMod.addClass( "hovered" ); + moreMod.find( ".more-des" ).stop( true, true ); + thisMod.find( ".more-des" ).slideDown( "normal" ); + } ) + .on( "mouseleave", ".more-list", function(){ + var thisMod = $( this ); + moreMod.find( ".more-des" ).stop( true, true ); + thisMod.find( ".more-des" ).slideUp( "fast", function(){ + thisMod.removeClass( "hovered" ); + } ); + } ); + } + window.Gl && Gl.message && Gl.message.on("module.flow.switch",function ( width ){ + slideItemStr = '
                                      '; + slideItemId = 1; + slideData = []; + listContainer.html( "" ); + init(); + }); + }, + init = function(){ + initCarousel(); + initHot(); + initNew(); + initMore(); + }; + + + return init; + }(); + + sortAreaApp(); +} )( window ); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/save-apps.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/save-apps.tpl new file mode 100755 index 000000000..0c1e02b20 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/apps/save-apps.tpl @@ -0,0 +1,485 @@ + + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/container.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/container.tpl new file mode 100755 index 000000000..1176ebe82 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/container.tpl @@ -0,0 +1,20 @@ +<%style%> +<%if $head.dir=='ltr'%> + @import url('/widget/sort-area/container/ltr/ltr.css?__inline'); +<%else%> + @import url('/widget/sort-area/container/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> +
                                      + <%foreach $body.sortAreaTab.tabs as $tab%> +
                                      + <%if !empty($tab.tpl)%> + <%widget name="home:widget/sort-area/`$tab.tpl`/`$tab.tpl`.tpl"%> + <%/if%> +
                                      + <%/foreach%> + +
                                      \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/ltr/ltr.css new file mode 100755 index 000000000..26a794d0e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/ltr/ltr.css @@ -0,0 +1,13 @@ +.mod-sort-area .container{ + min-height: 800px; + border: 1px solid; + border-color: #d7ddde #d7ddde #cacccc #dfe4e6; + background-color: #fff; + border-top: none; +} +.mod-sort-area .container .loading{ + height: 60px; + text-align: center; + padding-top:120px; + color: #999; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/rtl/rtl.css new file mode 100755 index 000000000..26a794d0e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/container/rtl/rtl.css @@ -0,0 +1,13 @@ +.mod-sort-area .container{ + min-height: 800px; + border: 1px solid; + border-color: #d7ddde #d7ddde #cacccc #dfe4e6; + background-color: #fff; + border-top: none; +} +.mod-sort-area .container .loading{ + height: 60px; + text-align: center; + padding-top:120px; + color: #999; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/create-content-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/create-content-async.js new file mode 100755 index 000000000..2199a8226 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/create-content-async.js @@ -0,0 +1,112 @@ +/** + * tab的特殊情况处理(例如日本购物) + * 此方法目前只在日本购物使用 + * 通过同时发送两条请求获取模板和数据,并在成功后写入到页面 + * @author chenliang + * @email chenliang08@baidu.com + * @time 2013/12/27 +**/ +var $ = require("common:widget/ui/jquery/jquery.js"); + helper = require("common:widget/ui/helper/helper.js"); +/** + * 构造函数 + * @param tab{string} tab的类型(和tab模板中的data-type一致) + * @param dataUrl{string} apps中用到 + * @param defaultData{string} 支持配置的数据替换接口中的数据 + */ +function CreateContent( tab, dataUrl, defaultData ){ + var that = this; + that.dataUrl = dataUrl; + that.opt = conf.sortArea; + that.mod = $( "#" + that.opt.id ); + that.tabOpt = that.opt.sortAreaTab[tab]; + that.container = that.mod.find( ".container" ); + that.content = that.container.find( "." + tab ); + that.loadingFlower = that.container.find( ".loading" ); + that.defaultData = defaultData; + // save tpl and data from ajax request, render will use them + // that.cache = { + // tpl : null, + // data : null + // }; + that.showLoadingFlower(); + that.render( tab ); +} + +CreateContent.prototype = { + /** + * 1、将获取到的tpl的html、css插入页面。2、将数据推到conf.sortArea.data供tpl中的js使用。3、globalEvaltpl中的js + * @param tab{string} tab的类型(和tab模板中的data-type一致) + * + */ + render : function( tab ){ + var that = this, + gotResource = that.getResource(); + $.when( gotResource ) + .done( function( tpl, data ){ + that.hideLoadingFlower(); + // 将html、css插入页面 + that.content.html( tpl.html ); + that.opt.data = data; + // 执行js,并到conf.sortArea.data中拿到数据拼装页面 + helper.globalEval( tpl.script ); + } ); + }, + /** + * 同时发送两条请求分别获取模板(包括html、css、js)和数据(api提供) + * @param tab{string} tab的类型(和tab模板中的data-type一致) + ***/ + getResource : function(){ + var that = this, + deferred = $.Deferred(), + tplUrl = that.tabOpt.url, + apiPre = that.tabOpt.apiPre, + dataUrl = ( apiPre ? apiPre : conf.apiUrlPrefix ) + ( that.dataUrl ? that.dataUrl : that.tabOpt.dataUrl ) + "&jsonp=?", + updateTime = that.tabOpt.updateTime, //"http://api.dev.hao123.com:8999/api.php" + ajaxTpl, + ajaxData, + defaultData = that.defaultData; + // 获取模板 + ajaxTpl = $.ajax( { + url : tplUrl, + dataType : "json" + } ); + // 获取数据 + ajaxData = $.ajax( { + url : dataUrl, + dataType : "jsonp" + } ); + // 同时监控获取模板和获取数据 + $.when( ajaxTpl, ajaxData ) + .done( function( tpl, data ){ + // that.cache.tpl = tpl[0]; + // that.cache.data = data[0]; + // 标记两条ajax都成功,并将模板和数据传递给render方法处理 + if( defaultData ){ + data[0]["defaultData"] = defaultData; + } + deferred.resolve( tpl[0], data[0]); + } ) + .fail( function(){ + // 标记两条请求没有都成功 + deferred.reject(); + } ); + + return deferred.promise(); + }, + /** + * 隐藏菊花 + */ + showLoadingFlower : function(){ + var that = this; + that.loadingFlower.css( "display", "block" ); + }, + /** + * 显示菊花 + */ + hideLoadingFlower : function(){ + var that = this; + that.loadingFlower.hide(); + } +}; +module.exports = CreateContent; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/ltr/ltr.css new file mode 100755 index 000000000..8bc795c94 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/ltr/ltr.css @@ -0,0 +1,5 @@ +.mod-sort-area{ + position: relative; + margin-top: 10px; + visibility: visible !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/img/btn-normal-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/img/btn-normal-bg.png new file mode 100755 index 000000000..bda10145b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/img/btn-normal-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/img/i-sortsites-tabs.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/img/i-sortsites-tabs.png new file mode 100755 index 000000000..ddb954744 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/img/i-sortsites-tabs.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/ltr/ltr.css new file mode 100755 index 000000000..8ae1e883c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/ltr/ltr.css @@ -0,0 +1,135 @@ +.mod-sort-area .sortsites-tabs-container{ + display:block !important; +} +.mod-sort-area div.sortsites-tabs-container{ + *display:none !important; +} +.mod-sort-area .sortsite.select{ + border-color: #FF8C00; + border-width:1px 2px; +} +.mod-sort-area .sortsites-tabs-container{ + position: relative; + overflow: visible; + margin-top: 10px; + *display:none; +} +.mod-sort-area .sortsites-tabs{ + width: 708px; + height: 30px; + line-height:30px; + background-image:url(../img/btn-normal-bg.png?__sprite); + background-repeat: repeat-x; + margin-top: 10px; + font-size: 12px; + padding-top: 2px; + overflow: hidden; + border-left: 1px solid #E3E5E6; + border-right:1px solid #E3E5E6; +} +.mod-sort-area .sortsites-tabs i, +.mod-sort-area .sortsites-tabs-container i{ + display: inline-block; + height: 20px; + width: 23px; + margin-bottom: -3px; + background-image:url(../img/i-sortsites-tabs.png); + background-repeat: no-repeat; +} +.mod-sort-area .sortsites-tabs a:hover{ + color: #49B18E; + text-decoration: underline; +} +.mod-sort-area .sortsites-tabs .tab-lists{ + position: relative; + min-width: 55%; + max-width:55%; + float: left; + top:0; +} +.mod-sort-area .sortsites-tabs .tab-lists li{ + float: left; + min-width:21%; + max-width: 33%; + height: 30px; + text-align: center; + padding: 0 1px; + position: relative; +} +.mod-sort-area .sortsites-tabs .tab-lists a:hover{ + text-decoration: none; +} +.mod-sort-area .sortsites-tabs .tab-item{ + display: inline-block; + width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + background: none; +} +.mod-sort-area .sortsites-tabs-refresh{ + float: right; + padding-right: 8px; +} +.mod-sort-area .sortsites-tabs-refresh i{ + background-position: -84px 1px; + margin-bottom: -4px; + margin-right: 5px; +} +.mod-sort-area .sortsites-tabs-description{ + position: relative; + float: left; + padding-left: 15px; + font-weight: bold; +} +.mod-sort-area .sortsites-tabs-description i{ + background-position: -61px 1px; +} +.mod-sort-area .sortsites-tabs-container .bubble-like{ + position: absolute; + bottom: 30px; + left: 0px; + background-image: url(../img/i-sortsites-tabs.png); + background-repeat: no-repeat; + background-position: 0 -20px; + height: 33px; + min-width: 230px; + z-index: 9; + font-weight: bold; + color: white; + padding-left: 20px; + padding-top: 2px; +} +.mod-sort-area .sortsites-tabs-container .bubble-like i{ + background-position: -119px 2px; + margin-bottom: -3px; + margin-left: 3px; +} +.mod-sort-area .sortsites-tabs-container .bubble-like i:hover{ + background-position: -146px 2px; + margin-bottom: -3px; + margin-left: 3px; + cursor: pointer; +} +.mod-sort-area .sortsite_sep{ + border-left: 1px solid #E6E6E6; + display: block; + height: 14px; + line-height: 6px; + position: absolute; + margin-top: 0px; + left: 0; + top: 8px; + z-index: 0; +} +.mod-sort-area ul.block_sep { + background-image:url(../img/btn-normal-bg.png?__sprite); + background-repeat: repeat-y; + display: block; + height: 100%; + left: -1px; + position: absolute; + top: -10px; + width: 1px; + z-index: 1; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/nav.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/nav.tpl new file mode 100755 index 000000000..cabe9899c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/nav.tpl @@ -0,0 +1,47 @@ +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="home:widget/sort-area/nav/ltr/ltr.css"%> +<%else%> + <%require name="home:widget/sort-area/nav/rtl/rtl.css"%> +<%/if%> + +<%if !empty($body.sortAreaNav) && $body.sortAreaNav.isHidden !=="true"%> + +<%/if%> +<%script%> + conf = conf || {}; + conf.sortArea = conf.sortArea || {}; + conf.sortArea.sortAreaNav = conf.sortArea.sortAreaNav || {}; + conf.sortArea.sortAreaNav.opt = { + show:"<%$body.sortAreaNav.showBubble%>", + paddingTop:"<%$body.sortAreaNav.paddingTop%>", + paddingTop1:"<%$body.sortAreaNav.paddingTop1%>", + newHeader:"<%$body.headerTest.widget%>", + isCeiling:"<%$body.headerTest.isCeiling%>", + ceilingMore:"<%$body.headerTest.ceilingMore%>" + }; +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/rtl/rtl.css new file mode 100755 index 000000000..31264e8fc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/nav/rtl/rtl.css @@ -0,0 +1,144 @@ +.mod-sort-area .sortsites-tabs-container{ + display:block !important; +} +.mod-sort-area div.sortsites-tabs-container{ + *display:none !important; +} +.mod-sort-area .sortsite.select{ + border-color: #FF8C00; + border-width:1px 2px; +} +.mod-sort-area .sortsites-tabs-container{ + position: relative; + overflow: visible; + *display:none; +} +.mod-sort-area .sortsites-tabs{ + width: 708px; + height: 30px; + line-height: 30px; + background:url(../img/btn-normal-bg.png?__sprite) repeat-x; + margin-top: 10px; + font-size: 12px; + padding-top: 2px; + overflow: hidden; + border-left: 1px solid #E3E5E6; + border-right:1px solid #E3E5E6; +} +.mod-sort-area .sortsites-tabs i, +.mod-sort-area .sortsites-tabs-container i{ + display: inline-block; + height: 20px; + width: 23px; + margin-bottom: -3px; + background-image:url(../img/i-sortsites-tabs.png); + background-repeat: no-repeat; +} +.mod-sort-area .sortsites-tabs a:hover{ + color: #49B18E; + text-decoration: underline; +} +.mod-sort-area .sortsites-tabs .tab-lists{ + position: relative; + min-width: 55%; + max-width:55%; + float: right; + padding-left: 10px; + top:0px; +} +.mod-sort-area .sortsites-tabs .tab-lists li{ + float: right; + min-width: 21%; + max-width: 33%; + height: 30px; + text-align: center; + padding: 0 1px; + position: relative; +} +.mod-sort-area .sortsites-tabs .tab-lists a:hover{ + text-decoration: none; +} +.mod-sort-area .sortsites-tabs .tab-item{ + display: inline-block; + width: 100%; + text-overflow:ellipsis; + white-space:nowrap; + overflow: hidden; + background: none; +} +.mod-sort-area .sortsites-tabs-refresh{ + float: left; + padding-right: 8px; +} +.mod-sort-area .sortsites-tabs-refresh i{ + background-position: -84px 1px; + margin-top: 4px; + margin-right: 5px; + float: left; + display: inline-block; +} +.mod-sort-area .sortsites-tabs-description{ + position: relative; + float: right; + padding-right: 15px; + font-weight: bold; + margin-left: -1px; + margin-top: -1px; +} +.mod-sort-area .sortsites-tabs-description i{ + background-position: -169px 1px; +} +.mod-sort-area .sortsites-tabs-container .bubble-like{ + position: absolute; + bottom: 30px; + right: 0px; + background-image:url(../img/i-sortsites-tabs.png); + background-repeat: no-repeat; + background-position: 0 -20px; + height: 33px; + min-width: 230px; + z-index: 9; + font-weight: bold; + color: white; + padding-top: 2px; +} +.mod-sort-area .sortsites-tabs-container .bubble-like i{ + background-position: -119px 2px; + margin-bottom: -2px; + margin-left: 3px; + float: right; +} +.mod-sort-area .sortsites-tabs-container .bubble-like span{ + float: left; + margin-top: 5px; + margin-left: 10px; + display: inline-block; +} +.mod-sort-area .sortsites-tabs-container .bubble-like i:hover{ + background-position: -146px 2px; + margin-bottom: -3px; + margin-left: 3px; + cursor: pointer; +} +.mod-sort-area .sortsite_sep{ + border-left: 1px solid #E6E6E6; + display: block; + height: 14px; + line-height: 6px; + position: absolute; + right: 0; + top: 8px; + margin-top: 0px; + z-index: 0; +} +.mod-sort-area ul.block_sep { + background:url(../img/btn-normal-bg.png?__sprite); + background-repeat: repeat-y; + display: block; + height: 100%; + right: 0px; + position: absolute; + top: -10px; + width: 1px; + z-index: 1; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/rtl/rtl.css new file mode 100755 index 000000000..9954a86db --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/rtl/rtl.css @@ -0,0 +1,5 @@ +.mod-sort-area{ + position: relative; + margin-top: 10px; + visibility: visible !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-games/games.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-games/games.tpl new file mode 100755 index 000000000..edbd1e45a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-games/games.tpl @@ -0,0 +1,599 @@ +<%*****该模板是生成日本游戏内容json文件的模板*****%> + + + + + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-shop/shop.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-shop/shop.js new file mode 100755 index 000000000..74db18203 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-shop/shop.js @@ -0,0 +1,411 @@ +/* + * shop.js只处理模块内部事务,要尽量少的与外框耦合。 + * 该文件最终会以字符串的形式存储与json格式的文件中 + * 保持和二级页方面一致,使用闭包 + */ +( function( $, window ){ + + var $ = require( "common:widget/ui/jquery/jquery.js" ), + UT = require( "common:widget/ui/ut/ut.js" ), + helper = require( "common:widget/ui/helper/helper.js" ), + cycletabs = require("common:widget/ui/cycletabs/cycletabs.js"), + + //推荐部分滚动的元素共12个 + RECOMMONDLEN = 12, + NAVCONTENTLEN = 15, + //win = $(window), + //一些需要PM配置的数据 + _conf = conf.sortArea.shopOpt, + dataParam = helper.getQuery( conf.sortArea.sortAreaTab[_conf.tabId].dataUrl ).category.split(","), + + //此data来自tab(大框架的tab)发送请求时请求回来的dada,该data被绑定到全局对象conf的embedShopSortsite中 + data = conf.sortArea.data, + dataContent = data.content.data.contents, + recommondDataDefault = data.defaultData && data.defaultData.recommand, + recommondData = recommondDataDefault ? recommondDataDefault.concat(dataContent[dataParam[0]]) : dataContent[dataParam[0]], + firstNavDataDefault = data.defaultData && data.defaultData.firstTab, + firstNavData = firstNavDataDefault ? firstNavDataDefault.concat(dataContent[dataParam[1]]) : dataContent[dataParam[1]], + firstNav = dataParam[1] || "cms", + offsetTime = {}, + + //test + // data = {"message":{"errNum":2,"errMessage":"GET DB DATA SUCCESS"},"content":{"data":{"contents":{"fashion":[{"price":"2980","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2F453402%2Fa02055.html","title":"\u30cf\u30a4\u30c9\u30ed\u30b2\u30f3 HYDROGEN \u30ed\u30f3T \u30ed\u30f3\u30b0T\u30b7\u30e3\u30c4 \u9577\u8896T\u30b7\u30e3\u30c4 \u30e1\u30f3\u30ba","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/453402_a02055","createtime":"1384438525"},{"price":"45300","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Ftelaffy%2Fgf-8230e-9jr.html","title":"GF-8230E-9JR \u30ab\u30b7\u30aa G-SHOCK 30th Anniversary Lightning Yellow FROGMAN \u3010New\u3011","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/telaffy_gf-8230e-9jr","createtime":"1384438525"},{"price":"1278","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fsoukai%2F4902522914451.html","title":"(\u8a33\u3042\u308a)\u30b9\u30ea\u30e0\u30a6\u30a9\u30fc\u30af \u7f8e\u811a\u30bf\u30a4\u30c4 \u30d6\u30e9\u30c3\u30af\u30fb\u7121\u5730 M\u301cL\u30b5\u30a4\u30ba ( 2\u30b3\u30d1\u30c3\u30af )\/ \u30b9\u30ea\u30e0\u30a6\u30a9\u30fc\u30af","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/soukai_4902522914451","createtime":"1384438525"},{"price":"8190","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fvoodoocats%2F9170.html","title":"FIREFIRST\u3000\u30bf\u30fc\u30dd\u30ea\u30f3\u30d0\u30c3\u30af\u30d1\u30c3\u30af\u3000\u30e1\u30c3\u30bb\u30f3\u30b8\u30e3\u30fc\u30d0\u30c3\u30b0","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/voodoocats_9170","createtime":"1384438525"},{"price":"1999","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fkutsu-nishimura%2Fstepluck09104blk.html","title":"STEP LUCK KSM-09104 \u30e1\u30f3\u30ba \u30d3\u30b8\u30cd\u30b9\u30b7\u30e5\u30fc\u30ba \u30e2\u30f3\u30af\u30d9\u30eb\u30c8\u30bf\u30a4\u30d7 \u30d6\u30e9\u30c3\u30af","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/kutsu-nishimura_stepluck09104blk","createtime":"1384438525"},{"price":"2980","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Ffurufuru%2Fmarc-wallet.html","title":"\u30a2\u30d0\u30af\u30ed Abercrombie \u30a2\u30d0\u30af\u30ed\u30f3\u30d3\u30fc\uff06\u30d5\u30a3\u30c3\u30c1 \u30a2\u30d0\u30af\u30ed \u30ed\u30f3\u30b0T\u30b7\u30e3\u30c4 \u30e1\u30f3\u30ba \u9577\u8896 \u30a2\u30d0\u30af\u30ed lon2680-2","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/furufuru_marc-wallet","createtime":"1384438525"},{"price":"3885","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fe-que%2Fvwne000000094.html","title":"\u30f4\u30a3\u30f4\u30a3\u30a2\u30f3\u30a6\u30a8\u30b9\u30c8\u30a6\u30c3\u30c9 \u30cd\u30af\u30bf\u30a4 94","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/e-que_vwne000000094","createtime":"1384438525"},{"price":"1050","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Feclity%2Fayc-evreco-.html","title":"\u30d0\u30c3\u30b0 \u4eba\u6c17 \u30d6\u30e9\u30f3\u30c9 \u6298\u308a\u305f\u305f\u307f \u30a8\u30f3\u30d3\u30ed\u30b5\u30c3\u30af\u30b9 ENVIROSAX","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/eclity_ayc-evreco-","createtime":"1384438525"},{"price":"56700","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Finfinity%2Fbarbour-internationala7.html","title":"Barbour\u3000\u30d0\u30fc\u30d6\u30a1\u30fc\u3000INTERNATIONAL\u3000JACKET\u3000\u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u3000\u30aa\u30a4\u30eb\u30af\u30ed\u30b9\u3000\u30b8\u30e3\u30b1\u30c3\u30c8\u3000BLACK\u3000A007","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/infinity_barbour-internationala7","createtime":"1384438525"},{"price":"3885","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fe-que%2Fvwne000000021.html","title":"\u30f4\u30a3\u30f4\u30a3\u30a2\u30f3\u30a6\u30a8\u30b9\u30c8\u30a6\u30c3\u30c9 \u30cd\u30af\u30bf\u30a4 21","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/e-que_vwne000000021","createtime":"1384438525"},{"price":"3822","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Ffukuei%2F104-0485-001.html","title":"\u30b9\u30fc\u30d1\u30fc\u30df\u30ea\u30aa\u30f3\u30d8\u30a2\u30fc\u3000\u30d6\u30e9\u30c3\u30af\uff2e\uff4f.1 30g","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/fukuei_104-0485-001","createtime":"1384438525"},{"price":"3380","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Faquagarden%2Fhydrogen-13lt-1.html","title":"\u30cf\u30a4\u30c9\u30ed\u30b2\u30f3 HYDROGEN \u30ed\u30f3\u30b0\uff34\u30b7\u30e3\u30c4 \u9577\u8896\u30ed\u30f3\u30b0\uff34\u30b7\u30e3\u30c4 \u30e1\u30f3\u30ba","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/aquagarden_hydrogen-13lt-1","createtime":"1384438525"}],"food":[{"price":"687","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fbuchibarimarket%2F4822-545.html","title":"\u30af\u30ea\u30b9\u30de\u30b9\u304a\u83d3\u5b50\u30d6\u30fc\u30c4\uff08\uff2c\uff09","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/buchibarimarket_4822-545","createtime":"1384438539"},{"price":"1980","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307217&va=2294857&vc_url=http%3A%2F%2Fwww.amazon.jp%2Fdp%2FB009HL937O%2Fref%3Dasc_df_B009HL937O887094%3Fsmid%3DAN1VRQENFRJN5%26tag%3DAssocID%26creative%3D9407%26creativeASIN%3DB009HL937O%26linkCode%3Dasn","title":"\u65ed\u677e \u30c0\u30a4\u30a8\u30c3\u30c8\u3053\u3046\u3084 \u7c89\u672b 64g\u00d710\u500b","img":"http:\/\/ecx.images-amazon.com\/images\/I\/51%2B9qMykyDL._SL160_.jpg","createtime":"1384438539"},{"price":"1920","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fkamenosuke%2F4901085049594.html","title":"\uff082\u30b1\u30fc\u30b9\u3067\u9001\u6599\u7121\u6599\uff09\u4f0a\u85e4\u5712 \u7406\u60f3\u306e\u30c8\u30de\u30c8\u3000\u7d19\u30d1\u30c3\u30af\uff08200ml\u00d724\u672c\uff09\uff08\u4f0a\u85e4\u5712\uff09\uff08\u5e38\u6e29\uff09\uff08\u30c9\u30ea\u30f3\u30af\uff09","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/kamenosuke_4901085049594","createtime":"1384438539"},{"price":"9800","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fgiftbimi%2F0-1-gift-akakiri.html","title":"\u713c\u914e\u30ae\u30d5\u30c8\u8d64\u9727\u5cf6 \u4f50\u85e4\u9ea6 \u9ce5\u98fc\u3010\u8d08\u308a\u7269 \u30d7\u30ec\u30bc\u30f3\u30c8\u30ae\u30d5\u30c8\u306b\u4eba\u6c17\u3067\u3059\uff01\u3011","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/giftbimi_0-1-gift-akakiri","createtime":"1384438539"},{"price":"2600","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Ftokubaiya%2F50133.html","title":"\u30c0\u30a4\u30c9\u30fc\u3000\u30c0\u30a4\u30c9\u30fc\u30d6\u30ec\u30f3\u30c9\u30b3\u30fc\u30d2\u30fc\u3000185\uff47\u300030\u672c","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/tokubaiya_50133","createtime":"1384438539"},{"price":"2898","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Ftanomail%2F9678934.html","title":"\uff08\u307e\u3068\u3081\uff09\u30b7\u30f3\u30d3\u30fc\u30ce\u3000\u30b8\u30e3\u30ef\u30c6\u30a3\u3000\u30ec\u30c3\u30c9\u3000\uff15\uff10\uff10\uff4d\uff4c\u00d7\uff12\uff14\u672c","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/tanomail_9678934","createtime":"1384438539"},{"price":"41","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fomakase%2Fg12-0313-693m.html","title":"\u30af\u30ea\u30b9\u30bf\u30eb\u30ac\u30a4\u30b6\u30fc 500ml\u3000g12-0313-693m","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/omakase_g12-0313-693m","createtime":"1384438539"},{"price":"1812","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fkamenosuke%2F4560151629537.html","title":"\uff08\u9001\u6599\u7121\u6599\uff09 \u304a\u3044\u3057\u3044\u70ad\u9178\u6c34 \uff08500ml\u00d724\u672c\u5165\uff09\uff08\u30b5\u30c3\u30dd\u30ed\uff09\uff08\u5e38\u6e29\uff09\uff08\u30c9\u30ea\u30f3\u30af\uff09","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/kamenosuke_4560151629537","createtime":"1384438539"},{"price":"1675","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fjnl%2Fe013317h.html","title":"\u3010\u30af\u30ec\u30d9\u30ea\u30f3\u30b2\u30eb 150g\u3011","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/jnl_e013317h","createtime":"1384438539"},{"price":"2685","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fk-ztown%2F269752.html","title":"\u30af\u30e9\u30b7\u30a8 \u3057\u3087\u3046\u304c\u6e6f 12g\u00d76\u888b<9\u30bb\u30c3\u30c8>","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/k-ztown_269752","createtime":"1384438539"},{"price":"650","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fkokubuya%2Ff013.html","title":"\u65ed\u98df\u54c1\u3000\u65ed\u30dd\u30f3\u9162\u3000360ml","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/kokubuya_f013","createtime":"1384438539"},{"price":"5317","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Ftanomail%2F9671058.html","title":"\uff08\u307e\u3068\u3081\uff09\u80e1\u9ebb\u9ea6\u8336\u3000\uff11\uff2c\u30da\u30c3\u30c8\u3000\uff11\uff12\u672c\u5165 \uff08223684\uff09","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/tanomail_9671058","createtime":"1384438539"},{"price":"255","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fhazama%2Fa412120h.html","title":"\u30a8\u30ad\u30ca\u30b1\u30a2\u306e\u3069\u98f4[\u30a8\u30ad\u30ca\u30b1\u30a2\u306e\u3069\u98f4]","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/hazama_a412120h","createtime":"1384438539"},{"price":"880","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307217&va=2294857&vc_url=http%3A%2F%2Fwww.amazon.jp%2Fdp%2FB00FEAMUP4%2Fref%3Dasc_df_B00FEAMUP4887094%3Fsmid%3DA1N6HTHWYSWFUT%26tag%3DAssocID%26creative%3D9419%26creativeASIN%3DB00FEAMUP4%26linkCode%3Dasn","title":"\u5927\u585a\u88fd\u85ac \u30bd\u30a4\u30ab\u30e9 \u30aa\u30ea\u30fc\u30d6\u30aa\u30a4\u30eb\u30ac\u30fc\u30ea\u30c3\u30af\u5473 27g\u00d76\u888b","img":"http:\/\/ecx.images-amazon.com\/images\/I\/41tr%2BfdaPaL._SL160_.jpg","createtime":"1384438539"},{"price":"188","link":"http:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?vs=3035888&vp=882307085&va=2294800&vc_url=http%3A%2F%2Fstore.shopping.yahoo.co.jp%2Fhazama%2Fk418660h.html","title":"\u30b1\u30a2\u30e9\u30a4\u30b9160g[\u30b1\u30a2\u30e9\u30a4\u30b9160g]","img":"http:\/\/item.shopping.c.yimg.jp\/i\/g\/hazama_k418660h","createtime":"1384438539"}]},"updateTime":"1384438539","offsetTime":59192}}}, + // dataContent = data.content.data.contents, + // recommondData = dataContent.fashion, + // firstNavData = dataContent.fashion, + // firstNav = "fashion", + // offsetTime = { + // fashion : 384 + // } + // data.firstNav = "fashion", + + recommondCon = $("#embedShopRecommond"), + navCon = $("#embedShopNav"), + sortCon = $("#embedShopSort"), + sortLoading = $("#embed-shop-loading"), + sendingAjax = {}, + + //不停的切换tab之后,或者第一次展示时,需要显示的内容 + showWhich = $.cookie("embedshop") || firstNav, + + recommondListTpl = '
                                    • #{title}

                                      #{price}

                                    • ', + navConTpl = '#{sortName}
                                        #{offsetTime}', + navListTpl = '
                                      • #{name}|
                                      • ', + sortListTpl = '
                                      • #{num}

                                        #{title}

                                        #{price}

                                      • '; + /* + * 创建推荐区的DOM碎片 + */ + function createSlideFragment(){ + + var len = Math.min( RECOMMONDLEN, recommondData.length ), + slideData = [], + itemStr = '
                                          ', + itemId = 1; + + for( var i=0; i', + "id": itemId + } + ); + + itemId ++ ; + itemStr = '
                                            '; + } + + recommondData[i].price = _conf.character + Number(recommondData[i].price).toLocaleString(); + + recommondData[i].first = i % 4 === 0 ? "first" : ""; + + itemStr += helper.replaceTpl( recommondListTpl, recommondData[i] ); + + if( i === len-1 ){ + slideData.push( + { + "content": itemStr + '
                                          ', + "id": itemId + } + ); + } + } + + return slideData; + } + + /* + * 创建分类区DOM碎片 + */ + function createSortlistFragment(category, datas){ + + var data = datas || firstNavData; + if( !data.length ){ + return; + } + var len =Math.min( NAVCONTENTLEN, data.length ), + listFrag = '
                                            '; + + if($.isEmptyObject(data)){ + return null; + }else{ + + for(var i=0; i 0) && (result += (hour + _conf.hour)); + // (minute > 0) && (result += (minute + _conf.minute)); + // (second > 0) && (result += (second + _conf.second)); + + result = result + hour + _conf.hour + _conf.offsetTimeText; + + return result; + + } + + /* + * 显示用户最后点击的分类tab + */ + function showContent( showWhich ){ + + var curCategory = sortCon.find(".embed-shop-sort-" + showWhich); + + sortCon.children().hide(); + curCategory.show(); + + } + + /* + * 切换分类 + */ + function changeCategory( category, isClick ){ + + var content = $(".embed-shop-sort-" + category, sortCon), + tabs = navCon.find(".nav-item"), + tab = navCon.find("a[data-id='" + category + "']"); + + tabs.removeClass("current"); + tab.addClass("current"); + + if(content.length){ + showContent(category); + setOffsetTime(offsetTime[showWhich]); + + }else{ + + if(!sendingAjax[category]){ + getData(category); + } + } + + if(isClick){ + + $.cookie("embedshop", category, {expires: 1800}); + + }else{ + + bindLikeClickEvent(); + } + } + + // 用于当不是用户直接点击行为(cookie)进行的tab切换,但用户在该区域中有操作时,发送一次统计 + function bindLikeClickEvent(){ + + sortCon.one("click", ".embed-shop-sort-item", function(){ + + var category = $(this).attr("data-id"); + sendLog("categorytab", category + "tab"); + }); + } + + function bindEvent(){ + + navCon.on("click", ".nav-item", function(event){ + + var clickedCategory = $(this).attr("data-id"); + + changeCategory(clickedCategory, true); + + showWhich = clickedCategory; + }); + } + + function bindLog(){ + + recommondCon.on("click", ".embed-shop-recommond-list", function(){ + + sendLog("recommond", "conent"); + }); + + navCon.on("click", ".nav-item", function(){ + + var category = $(this).attr("data-id"); + sendLog("categorytab", category + "tab"); + }); + + sortCon.on("click", ".embed-shop-sort-item", function(){ + + var category = $(this).attr("data-id"); + sendLog("categoryContent", category + "content"); + }); + } + + /* + */ + function sendLog( position, sort ){ + + UT.send({ + modId : "embedshop", + position : position, + sort : sort + }); + } + + function init(){ + + offsetTime[firstNav] = data.content.data.offsetTime; + + // 渲染推荐区并启动轮播 + renderRecommondAndslide(); + + // 渲染导航区 + renderNav(); + + // 渲染分类区 + renderCategory(sortCon, firstNav); + + // 根据cookie切换到相应的tab,如果没有cookie切换到第一个 + changeCategory(showWhich); + + // 显示出来需要展示的category + + showContent(showWhich); + + bindEvent(); + + bindLog(); + + }; + + init(); + +} )( jQuery, window); + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-shop/shop.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-shop/shop.tpl new file mode 100755 index 000000000..05380a14a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/save-shop/shop.tpl @@ -0,0 +1,280 @@ +<%*****该模板是生成日本购物内容json文件的模板*****%> + +
                                            +
                                            +
                                            + +
                                            +
                                            +
                                            + +
                                            +
                                            + +
                                            +
                                            + +<%script%> + + conf.embedlv2 = { + loadingTime: <%$body.embedlv2sortsite.loadingTime|default:'2500'%>, + defaultShow:"<%$body.embedlv2sortsite.defaultShow%>", + navData: {} + }; + + <%foreach $body.embedlv2sortsite.navData as $navItem%> + conf.embedlv2.navData["<%$navItem.id%>"] = <%json_encode($navItem)%>; + <%/foreach%> + + conf.embedShopSortsite = { + slideDir : "<%$body.embedlv2sortsite.shopData.slideDir%>", + sortName : "<%$body.embedlv2sortsite.shopData.sortName%>", + autoDuration : "<%$body.embedlv2sortsite.shopData.autoDuration%>", + scrollDuration : "<%$body.embedlv2sortsite.shopData.scrollDuration%>", + defaultShow : "<%$body.embedlv2sortsite.shopData.defaultShow%>", + character : "<%$body.embedlv2sortsite.shopData.character%>", + hour : "<%$body.embedlv2sortsite.shopData.hour%>", + minute : "<%$body.embedlv2sortsite.shopData.minute%>", + second : "<%$body.embedlv2sortsite.shopData.second%>", + offsetTimeText : "<%$body.embedlv2sortsite.shopData.offsetTimeText%>", + noLv2 : "<%$body.embedlv2sortsite.shopData.noLv2%>", + sortItem : {} + }; + <%foreach $body.embedlv2sortsite.shopData.sortItem as $sortItem%> + conf.embedShopSortsite.sortItem["<%$sortItem.id%>"] = <%json_encode($sortItem)%>; + <%/foreach%> + + require.async("home:widget/embed-lv2-sortsite/shop/shop.js"); + + +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/shop/shop.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/shop/shop.tpl new file mode 100755 index 000000000..e9e4dac65 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/shop/shop.tpl @@ -0,0 +1,31 @@ +<%script%> + conf = conf || {}; + conf.sortArea = conf.sortArea || {}; + conf.sortArea.shopOpt = { + slideDir : "<%$body.sortAreaContainer.shop.slideDir%>", + sortName : "<%$body.sortAreaContainer.shop.sortName%>", + autoDuration : "<%$body.sortAreaContainer.shop.autoDuration%>", + scrollDuration : "<%$body.sortAreaContainer.shop.scrollDuration%>", + defaultShow : "<%$body.sortAreaContainer.shop.defaultShow%>", + character : "<%$body.sortAreaContainer.shop.character%>", + hour : "<%$body.sortAreaContainer.shop.hour%>", + minute : "<%$body.sortAreaContainer.shop.minute%>", + second : "<%$body.sortAreaContainer.shop.second%>", + offsetTimeText : "<%$body.sortAreaContainer.shop.offsetTimeText%>", + noLv2 : "<%$body.sortAreaContainer.shop.noLv2%>", + sortItem : {}, + tabId : "<%$tab.id%>" + }; + <%foreach $body.sortAreaContainer.shop.sortItem as $sortItem%> + conf.sortArea.shopOpt.sortItem["<%$sortItem.id%>"] = <%json_encode($sortItem)%>; + <%/foreach%> + + require.async( ["home:widget/sort-area/create-content-async.js","common:widget/ui/jquery/jquery.js"], function( CreateContent, $ ){ + $( "#sortArea" ).on( "sortArea.tabClicked_<%$tab.id%>", function(){ + var defaultData = <%json_encode( $body.sortAreaContainer.shopContent )%>; + /**defaultData,支持配置数据**/ + new CreateContent( "<%$tab.id%>", null, defaultData ); + } ); + conf.sortArea.clildModuleReady["<%$tab.id%>"] = "true"; + } ); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort-area-nav-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort-area-nav-async.js new file mode 100755 index 000000000..a1f755820 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort-area-nav-async.js @@ -0,0 +1,111 @@ +/** + * 处理有快速导航的情况(有快速导航就不会有tab) + * 由于该部分并不是重要且复杂的模块,在重构时对其方法没有进行更细致的拆分。 + * @author chenliang + * @email chenliang08@baidu.com + * @time 2013/12/28 +**/ +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"); + +function SortAreaNav(){ + var that = this; + + $.cookie( "supportCookie", true ); + that.supportCookie = !!jQuery.cookie( "supportCookie" ); + + that.opt = conf.sortArea; + that.mod = $( "#" + that.opt.id ); + that.navOpt = that.opt.sortAreaNav.opt; + that.sortsites = that.mod.find( ".sortsite" ); + that.container = that.mod.find( ".sortsites-tabs-container" ); + that.bubble = that.container.find( ".bubble-like" ); + that.refreshBtn = that.container.find( ".sortsites-tabs-refresh" ); + that.tabLists = that.container.find( ".tab-lists" ); + that.init(); +} + +SortAreaNav.prototype = { + init : function(){ + var that = this; + if( that.container.length < 1 ) return; + // console.log( !$.cookie( "sortsiteBubble" ) ); + if( !!that.navOpt.showBubble && !$.cookie( "sortsiteBubble" ) ){ + that.showBubble(); + } + that.bindEvent(); + }, + bindEvent : function(){ + var that = this; + that.refreshBtn.on( "click", function(){ + that.changeList(); + } ); + that.tabLists.on( "click", ".tab-item", function(){ + var thisItem = this; + // 重构过程中没有对该部分的逻辑进行细分,该方法处理了重定位、该点击对应的分类区样式改变以及发统计。 + that.changeStatus( thisItem ); + } ); + that.bubble.on( "click", "i", function(){ + that.hideBubble(); + $.cookie( "sortsiteBubble", 1, {expires: 2000} ); + } ); + $( document.body ).on( "mousedown", function(){ + that.sortsites.removeClass("select"); + } ); + }, + showBubble : function(){ + this.bubble.css( "display", "block" ); + }, + hideBubble : function(){ + this.bubble.hide(); + }, + changeList : function(){ + var that = this, + tabList = that.tabLists, + listLength = -parseInt( tabList.css( "height" ), 10 ), + top = parseInt( tabList.css( "top" ), 10 ) - 30; + UT.send( { + modId : "sortsites", + position : "sortsitesTabRefresh", + type: "click" + } ); + top = ( top == listLength ) ? 0 : top; + top == 0 && tabList.css( "top", "30px" ); + !tabList.is( ":animated" ) && tabList.animate( {"top" : top + "px"} ); + }, + changeStatus : function( item ){ + var that = this, + itemIndex = $( item ).attr( "item-index" ), + itemOffSet = 0, + body = $( "body" ), + win = $( window ), + // isHeadCeiled = body.hasClass( "header-fixed" ), + isSearchboxCeiled = body.hasClass( "header-fixed-up" ); + //itemOffSet = (parseInt((index+1)/2,10)-1)*260+420; + UT.send({ + position: "sortsitesTabItem", + modId: "sortsites", + type: "click", + modIndex: itemIndex + }); + that.sortsites.removeClass( "select" ); + that.sortsites.each( function(){ + var $this = $( this ); + if( itemIndex == $this.attr( "log-index" ) ){ + itemOffSet = $this.offset().top; + $this.addClass( "select" ); + return false; + } + } ); + if( that.navOpt.newHeader && that.navOpt.isCeiling === "1" ){ + if( that.navOpt.ceilingMore == "1" && !isSearchboxCeiled ){ + win.scrollTop( itemOffSet - ( parseInt( that.navOpt.paddingTop1 ) || 140 ) ); + }else{ + win.scrollTop( itemOffSet - ( parseInt( that.navOpt.paddingTop ) || 45 ) ); + } + }else{ + win.scrollTop( itemOffSet - 50 ); + } + } +}; +module.exports = SortAreaNav; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort-area-tab-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort-area-tab-async.js new file mode 100755 index 000000000..d4fa8499e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort-area-tab-async.js @@ -0,0 +1,367 @@ +/** + * 处理有tab的情况(有tab就不会有快速导航) + * @author chenliang + * @email chenliang08@baidu.com + * @time 2013/12/25 +**/ +var $ = require("common:widget/ui/jquery/jquery.js"), + UT = require("common:widget/ui/ut/ut.js"), + helper = require("common:widget/ui/helper/helper.js"), + message = require("common:widget/ui/message/src/message.js"); + +function SortArea(){ + var that = this; + + $.cookie( "supportCookie", true ); + that.supportCookie = !!jQuery.cookie( "supportCookie" ); + + that.opt = conf.sortArea; + that.tabOpt = that.opt.sortAreaTab; + that.mod = $( "#" + that.opt.id ); + that.tabs = that.mod.find( ".tabs" ); + that.tabList = that.tabs.find( ".tab-item" ); + that.container = that.mod.find( ".container" ); + that.content = that.container.find( ".content" ); + that.loadingFlower = that.container.find( ".loading" ); + // PM配置特殊字段(强制切换到某tab) > cookie > PM配置 > 默认(默认展示第一个tab) + that.shouldShow = that.opt.forceShow || ( that.supportCookie && $.cookie( "sortTab" ) ) || that.opt.defaultShow || that.tabList.eq( 0 ).attr( "data-id" ); + that.sendingAjax = {}; + // 获取到的页面片段会存放到这里。会造成内存浪费吗?有必要吗? + // that.dataCache = {}; + that.init(); +} + +SortArea.prototype = { + /** + * 入口(根据不同情况进行初始化) + **/ + init : function(){ + var that = this, + // 用户是否来自特殊渠道 + isFromSpecialTn = that.opt.spcTn && that.checkTn(), + spcTnShowWhich = that.opt.spcTnShowWhich, + isCurrentTab; + + // 先绑定统计事件,再绑定业务事件。不要调整顺序,否则统计会出错 + that.bindLog(); + that.bindEvent(); + // 如果来自特殊tn号,自动打开PM配置的tab,并自动重新定位 + if( isFromSpecialTn && spcTnShowWhich ){ + // 特殊tn > cookie + that.shouldShow = spcTnShowWhich; + // DOM ready之后再重新定位,减少因搜索框focus导致的重定位失效 + $( function(){ + that.relocation(); + } ); + } + // 应该显示的是已经是正在显示的 + isCurrentTab = that.tabList.filter( "." + that.shouldShow ).hasClass( "current" ); + if( !isCurrentTab ){ + that.changeTab( that.shouldShow, false ); + } + }, + /** + * 为tab绑定事件 + **/ + bindEvent : function(){ + var that = this; + that.tabs.on( "click", ".tab-item", function(){ + var thisTab = $( this ), + tab = that.shouldShow = thisTab.attr( "data-id" ), + isCurrentTab = thisTab.hasClass( "current" ), + thisTabOpt = that.tabOpt[tab]; + // 如果用户点击的是当前tab,并且有相应的二级页,新窗口打开二级页 + if( isCurrentTab ){ + if( !thisTabOpt.noLv2 ){ + that.toLv2Page( tab, thisTabOpt.lv2Url ); + } + }else{ + that.changeTab( tab, true ); + that.relocation(); + $.cookie( "sortTab", tab, { expires : 1800 } ); + } + } ); + }, + /** + * 处理tab的样式切换,同时触发内容切换 + * @param tab{string} + * @param isClick{boolean} 是否用户点击 + */ + changeTab : function( tab, isClick ){ + var that = this; + that.tabList.removeClass( "current" ); + that.tabList.filter( "." + tab ).addClass( "current" ); + + if( !isClick ){ + // 如果用户对默认切换到的内容区有操作,模拟一次tab切换(没有进行真正的tab切换,只是为了发送一条统计信息)(排除第一个tab(分类区)) + that.content.not( ":first" ).filter( "." + tab ).one( "click", function(){ + that.tabList.filter( "." + tab ).trigger( "simulateClick" ); + } ); + } + + that.changeContent( tab ); + }, + /** + * 切换内容 + * @param tab{string} tab的类型(和tab模板中的data-type一致) + */ + changeContent : function( tab ){ + var that = this, + isRenderred = that.render( tab ), + timer; + that.hideContents(); + that.showLoadingFlower(); + // that.hideLoadingFlower不能放到always中,因为always中的方法是放到done或fail中的代码执行之后执行 + $.when( isRenderred ) + .done( function(){ + that.hideLoadingFlower(); + that.showContent( that.shouldShow ); + } ) + .fail( function(){ + that.hideLoadingFlower(); + // do something else + } ); + // 如果是需要调用createContent-async.js的情况,例如日本购物 + timer = setInterval( function(){ + if( that.opt.clildModuleReady[tab] === "true" ){ + that.mod.trigger( "sortArea.tabClicked_" + tab ); + clearInterval( timer ); + }else if( that.opt.clildModuleReady[tab] === "false" ){ + clearInterval( timer ); + } + }, 16 ); + }, + /** + * 渲染内容,但不显示 + * @param tab{string} + */ + render : function( tab ){ + var that = this, + deferred = $.Deferred(), + content = that.content.filter( "." + tab ), + gotData = null, + isRenderred = content.hasClass( "renderred" ), + data; + // 如果渲染了,直接标记渲染成功 + if( isRenderred ){ + deferred.resolve(); + }else{ + // 如果没有渲染,先去获取数据 + gotData = that.getData( tab ); + $.when( gotData ) + // 如果获取成功 + .done( function( data ){ + // data = that.dataCache[tab]; + // 如果数据为空,标记渲染失败 + if( $.isEmptyObject( data ) ){ + deferred.reject(); + }else{ + content.html( data.html ); + helper.globalEval( data.script ); + content.addClass( "renderred" ); + deferred.resolve(); + } + } ) + .fail( function(){ + deferred.reject(); + } ); + } + return deferred.promise(); + }, + /** + * 获取数据 + * @param tab{string} + */ + getData : function( tab ){ + var that = this, + deferred = $.Deferred(), + thisTabOpt = that.tabOpt[tab], + timeout = thisTabOpt.timeout, + updataTime = thisTabOpt.updateTime, + url = thisTabOpt.api ? thisTabOpt.api : thisTabOpt.url, + success = function( data ){ + // that.dataCache[tab] = data; + deferred.resolve( data ); + that.sendingAjax[tab] = false; + }, + error = function(){ + deferred.reject(); + that.sendingAjax[tab] = false; + }; + // // 如果缓存中已经有数据,直接返回 + // if( that.dataCache[tab] ){ + // deferred.resolve(); + // return; + // }; + that.sendingAjax[tab] = true; + // 为了防止api长时间获取不到数据影响用户体验。设置超时时间,使api在一定时间内失败,从而去取静态资源 + timeout = ( ( url === thisTabOpt.api ) && timeout ) ? parseInt( timeout ) : 0; + $.ajax( { + url : that.setTimeStamp( url, updataTime ), + dataType : "json", + timeout : timeout, + cache : true + } ) + .done( function( data ){ + success( data ); + } ) + .fail( function(){ + // 如果刚刚是访问api失败,则这次去取静态文件 + if( url != thisTabOpt.url ){ + $.ajax( { + url : that.setTimeStamp( thisTabOpt.url ), + dataType : "json", + cache : true + } ) + .done( function( data ){ + success( data ); + } ) + .fail( function(){ + error(); + } ); + }else{ + error(); + } + } ); + return deferred.promise(); + }, + /** + * 显示shouldShow的内容 + * @param tab{string} + */ + showContent : function( tab ){ + var that = this; + that.content.filter( "." + tab ).show(); + }, + /** + * 隐藏content中的所有内容 + * @param tab{string} + */ + hideContents : function( tab ){ + var that = this; + that.content.hide(); + }, + /** + * 隐藏菊花 + */ + showLoadingFlower : function(){ + var that = this; + that.loadingFlower.show(); + }, + /** + * 显示菊花 + */ + hideLoadingFlower : function(){ + var that = this; + that.loadingFlower.hide(); + }, + /** + * 点击当前tab时,如果该tab有二级页,跳转到相应二级页,否则不进行跳转 + * @param tab{string} + * @param lv2Url{string} 如果有这个参数,说明二级页url和tab id不一致,使用lv2Url,否则使用tab id + */ + toLv2Page : function( tab, lv2Url ){ + lv2Url = lv2Url ? lv2Url : tab; + window.open( "/" + lv2Url + "?from=hao123_tab" ); + }, + /* + * 是否来自指定的渠道 + * PM会配置一个以|分割的字符串,用来区分多个渠道 + */ + checkTn : function(){ + var that = this, + spcTn = that.opt.spcTn, + arr = spcTn.split("|"), + urlParamTn = ( helper.getQuery() )["tn"], + bool = false; + + if( !urlParamTn ) return bool; + for(var i=0, len=arr.length; i +<%style%> +<%if $head.dir=='ltr'%> + @import url('/widget/sort-area/ltr/ltr.css?__inline'); +<%else%> + @import url('/widget/sort-area/rtl/rtl.css?__inline'); +<%/if%> +<%/style%> + +<%*为两种布局抽样时暂时添加隐藏tab功能,以后会去掉*%> +<%if !empty($body.sortAreaTab) && $body.sortAreaTab.isHidden !=="true"%> + <%foreach $body.sortAreaTab.tabs as $key => $mod%> + <%if empty($mod.isHidden)%> + <%$newSortAreaTab[]=$mod%> + <%/if%> + <%/foreach%> + <%$body.sortAreaTab.tabs=$newSortAreaTab%> +<%/if%> + + + +<%script%> + require.async( "common:widget/ui/jquery/jquery.js", function( $ ){ + conf = conf || {}; + conf.sortArea = conf.sortArea || {}; + $.extend( conf.sortArea, <%json_encode( $body.sortArea )%> ); + conf.sortArea.id = "sortArea"; + + <%***********data属性用于框架和子模块的数据传递,目前仅日本购物用到*************%> + conf.sortArea.data = conf.sortArea.data || {}; + + <%**********如果有tab,加载tab需要的cms数据并请求相应的的js************%> + <%if !empty($body.sortAreaTab) && $body.sortAreaTab.isHidden !=="true"%> + conf.sortArea.sortAreaTab = conf.sortArea.sortAreaTab || {}; + <%foreach $body.sortAreaTab.tabs as $tab%> + conf.sortArea.sortAreaTab["<%$tab.id%>"] = <%json_encode( $tab )%>; + <%/foreach%> + + + <%***重定位时同页头吸顶有冲突,需要监控页头是否已经是新版***%> + conf.sortArea.newHeader = "<%$body.headerTest.widget%>"; + conf.sortArea.isCeiling = "<%$body.headerTest.isCeiling%>"; + conf.sortArea.ceilingMore = "<%$body.headerTest.ceilingMore%>"; + + require.async( "home:widget/sort-area/sort-area-tab-async.js", function( SortArea ){ + new SortArea(); + } ); + + <%**********如果快速导航,加载tab需要的cms数据并请求相应的的js************%> + <%elseif !empty($body.sortAreaNav) && $body.sortAreaNav.isHidden !=="true"%> + require.async( "home:widget/sort-area/sort-area-nav-async.js", function( SortAreaNav ){ + new SortAreaNav(); + } ); + <%/if%> + } ); +<%/script%> \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/btn-active-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/btn-active-bg.png new file mode 100755 index 000000000..3297d0358 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/btn-active-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/btn-normal-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/btn-normal-bg.png new file mode 100755 index 000000000..3a7eb421a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/btn-normal-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/i-onesort-big.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/i-onesort-big.png new file mode 100755 index 000000000..eefb4acc4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/i-onesort-big.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-ltr-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-ltr-green.png new file mode 100755 index 000000000..a7c715f03 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-ltr-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-ltr.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-ltr.png new file mode 100755 index 000000000..c5ca37bcf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-ltr.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-rtl-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-rtl-green.png new file mode 100755 index 000000000..9c0172b93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-rtl-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-rtl.png new file mode 100755 index 000000000..c58073d26 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-back-bg-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-ltr-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-ltr-green.png new file mode 100755 index 000000000..779b4fb42 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-ltr-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-ltr.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-ltr.png new file mode 100755 index 000000000..5fae7a660 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-ltr.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-rtl-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-rtl-green.png new file mode 100755 index 000000000..320a3a383 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-rtl-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-rtl.png new file mode 100755 index 000000000..7d10ef790 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-front-bg-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-middle-bg-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-middle-bg-green.png new file mode 100755 index 000000000..3c45776b0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-middle-bg-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-middle-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-middle-bg.png new file mode 100755 index 000000000..ac95ddbc7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/img/tips-middle-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr-tab.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr-tab.css new file mode 100755 index 000000000..ff1c9ed4e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr-tab.css @@ -0,0 +1,93 @@ +/*新版样式*/ +.mod-sort-area .box-sort{ + overflow: hidden; + border-top: none; + padding: 5px; + background-color: #fafcfc; +} +.mod-sort-area .sortsite{ + white-space: nowrap; + overflow: hidden; + border: none; + background: #fafcfc; + margin-top: 0px !important; +} +.mod-sort-area .sortsite dt{ + height: 30px; + line-height: 30px; + border: 1px solid #e7e9ea; + border-right:none; + margin-bottom: 10px !important; + color: #23C098; + font-size: 14px; + overflow: hidden; + position: static; + background:url(../img/btn-normal-bg.png?__sprite) repeat-x; +} +.mod-sort-area .sortsite dt:hover{ + border-bottom: 1px solid #cfd0d1; + -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + box-shadow: 0 1px 2px rgba(0,0,0,0.2); +} +.mod-sort-area .sortsite dt:active{ + background-position: 0 -31px; +} +.mod-sort-area .sortsite dt.dt-right{ + border-right: 1px solid #e7e9ea; +} +.mod-sort-area .sortsite a{ + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.mod-sort-area .sortsite dt a{ + _margin-right: 20px; + font-weight: 600; + padding-left: 10px; + color: #555555; + text-indent: 0px; + _width: 89%; +} +.mod-sort-area .sortsite dt .more-content{ + float: right; + margin-right: 10px; + font-weight: 400; + color: #3dc094; +} +.mod-sort-area .sortsite dd{ + overflow: hidden; + border-left: none; + border-left: 1px dashed #eaebeb; +} +.mod-sort-area .sortsite dd a{ + color:#595959; + line-height:31px; + height:31px; + width:93%; + padding-left:10px; + border-left:3px solid #fafafc; + text-indent: 0px; +} +.mod-sort-area .sortsite dd a:hover{ + background:#e8eaeb; + border-left: 3px solid #00ac73; +} +.mod-sort-area .sortsite dd.dd-left{ + border-left: none; +} +.mod-sort-area .sortsite_more{ + font-family: Verdana; + text-align: right; + text-indent: 0; + background: #F9FAFA; + position: absolute; + right: 0px; + top: 0; + float: right; +} +.mod-sort-area .sortsites-tabs-container{ + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr.css new file mode 100755 index 000000000..e650ca720 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr.css @@ -0,0 +1,89 @@ +/*****/ +div .mod-sort-area{ + margin-top: 0px; +} +/*旧版样式*/ +.mod-sort-area .box-sort { + overflow: hidden; + margin-right: -10px; +} +.mod-sort-area .sortsite{ + white-space: nowrap; + overflow: hidden; + border: 1px solid #E3E5E6; + border-bottom: 1px solid #dcddde; + background: #fafcfc; +} +.mod-sort-area .sortsite dt{ + height: 30px; + line-height: 30px; + border-bottom: 1px solid #edeff0; + color: #23C098; font-size: 14px; + overflow: hidden; + position: relative; + background: url(../img/btn-normal-bg.png?__sprite) repeat-x; +} +.mod-sort-area .sortsite dt:hover{ + border-bottom: 1px solid #cfd0d1; + -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + box-shadow: 0 1px 2px rgba(0,0,0,0.2); +} +.mod-sort-area .sortsite a:hover{ + text-decoration: none; +} +.mod-sort-area .sortsite dt:active{ + background-position: 0 -31px; +} +.mod-sort-area .sortsite a{ + display:block; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; +} +.mod-sort-area .sortsite dt a{ + _margin-right: 20px; + font-weight: 600; + padding-left: 10px; + color: #49b18e; + text-indent: 0px; + _width: 89%; +} +.mod-sort-area .sortsite dt a:hover{ + text-decoration: underline; +} +.mod-sort-area .sortsite dt .more-content{ + float: right; + margin-right: 10px; + font-weight: 400; + color: #3dc094; +} +.mod-sort-area .sortsite dd{ + overflow: hidden; + border-left: 1px solid #fff; + border-right: 1px solid #fff; +} +.mod-sort-area .sortsite dd a{ + color: #595959; + line-height: 31px; + height: 31px; + width: 93%; + padding-left: 10px; + border-left: 3px solid #fafafc; + text-indent: 0px; +} +.mod-sort-area .sortsite dd a:hover{ + background: #e8eaeb; + border-left: 3px solid #00ac73; +} +.mod-sort-area .sortsite_more{ + font-family: Verdana; + text-align: right; + text-indent: 0; + background: #F9FAFA; + position: absolute; + right: 0px; + top: 0; + float: right; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr.more.css new file mode 100755 index 000000000..bdaa64109 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/ltr/ltr.more.css @@ -0,0 +1,76 @@ +.mod-sort-area .box-onesort-big {position: relative;} +.mod-sort-area div.box-onesort-big dd a{width: 242px;color:#a9a9a9;} +.mod-sort-area .box-onesort-big .link-name{font-weight: bold;} +.mod-sort-area .box-onesort-big dd a.have-pre-icon{width: 222px;} +.mod-sort-area .box-onesort-big .link-name{color: #595959;} +.mod-sort-area .box-onesort-big .link-description {margin-left: 10px;font-size: 12px;font-weight: normal;} +.mod-sort-area .box-onesort-big .i-sort-big {display: block;position: absolute;right: 25px;bottom: 20px;} + +/*cool sort big image*/ +.mod-sort-area .box-onesort-big .i-sort-big{background-image: url("../img/i-onesort-big.png");} +.mod-sort-area .i-sort-big.i-sort-games {width: 71px;height: 54px;background-position: -54px -243px;} +.mod-sort-area .i-sort-big.i-sort-gameweb {width: 61px;height: 56px;background-position: 0 -63px;} +.mod-sort-area .i-sort-big.i-sort-image {width: 63px;height: 63px;background-position: 0px 0px;} +.mod-sort-area .i-sort-big.i-sort-tv {width: 59px;height: 56px;background-position: -63px -297px;} +.mod-sort-area .i-sort-big.i-sort-movie {width: 53px;height: 60px;background-position: 0px -119px;} +.mod-sort-area .i-sort-big.i-sort-tieba {width: 61px;height: 61px;background-position: -62px -180px;} +.mod-sort-area .i-sort-big.i-sort-bank {width: 63px;height: 57px;background-position: 0px -296px;} +.mod-sort-area .i-sort-big.i-sort-music {width: 63px;height: 63px;background-position: -63px 0px;} +.mod-sort-area .i-sort-big.i-sort-menhu {width: 61px;height: 56px;background-position: -61px -63px;} +.mod-sort-area .i-sort-big.i-sort-sports {width: 54px;height: 54px;background-position: 0px -242px;} +.mod-sort-area .i-sort-big.i-sort-software {width: 60px;height: 60px;background-position: -53px -119px;} +.mod-sort-area .i-sort-big.i-sort-shopping {width: 62px;height: 63px;background-position: 0px -179px;} + + +/*新版 可配置气泡*/ +.mod-sort-area .confAbleRed, +.mod-sort-area .confAbleRed em, +.mod-sort-area .confAbleRed span, +.mod-sort-area .confAbleRed i, +.mod-sort-area .confAbleGreen, +.mod-sort-area .confAbleGreen em, +.mod-sort-area .confAbleGreen span, +.mod-sort-area .confAbleGreen i{ + display: inline-block; + *display: inline; + *zoom:1; + color: #fff; + vertical-align: middle; + height: 15px; +} +.mod-sort-area .confAbleRed em, +.mod-sort-area .confAbleGreen em{ + float: left; + width: 8px; + +} +.mod-sort-area .confAbleRed i, +.mod-sort-area .confAbleGreen i{ + width: 5px; + float: left; + +} +.mod-sort-area .confAbleRed span, +.mod-sort-area .confAbleGreen span{ + float: left; + line-height: 14px; + font-size: 11px; +} +.mod-sort-area .confAbleRed em{ + background: url(../img/tips-front-bg-ltr.png?__sprite); +} +.mod-sort-area .confAbleGreen em{ + background: url(../img/tips-front-bg-ltr-green.png?__sprite); +} +.mod-sort-area .confAbleRed i{ + background: url(../img/tips-back-bg-ltr.png?__sprite); +} +.mod-sort-area .confAbleGreen i{ + background: url(../img/tips-back-bg-ltr-green.png?__sprite); +} +.mod-sort-area .confAbleRed span{ + background: url(../img/tips-middle-bg.png?__sprite) repeat-x; +} +.mod-sort-area .confAbleGreen span{ + background: url(../img/tips-middle-bg-green.png?__sprite) repeat-x; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl-tab.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl-tab.css new file mode 100755 index 000000000..9b4f85069 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl-tab.css @@ -0,0 +1,93 @@ +/*有tab的样式*/ +.mod-sort-area .box-sort { + overflow: hidden; + border-top: none; + padding: 5px; + background-color: #fafcfc; +} +.mod-sort-area .sortsite{ + white-space: nowrap; + overflow: hidden; + border: none; + background: #fafcfc; + margin-top: 0px !important; +} +.mod-sort-area .sortsite dt{ + height: 30px; + line-height: 30px; + border: 1px solid #e7e9ea; + border-left: none; + margin-bottom: 10px !important; + color: #23C098; + font-size: 14px; + overflow: hidden; + background: url(../img/btn-normal-bg.png?__sprite) repeat-x; +} +.mod-sort-area .sortsite dt:hover{ + border-bottom: 1px solid #cfd0d1; + -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + box-shadow: 0 1px 2px rgba(0,0,0,0.2); +} +.mod-sort-area .sortsite dt:active{ + background: url(../img/btn-normal-bg.png?__sprite) repeat-x; + background-position: 0 -31px; +} +.mod-sort-area .sortsite dt.dt-left{ + border-left: 1px solid #e7e9ea; +} +.mod-sort-area .sortsite a{ + display:block; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; +} +.mod-sort-area .sortsite dt a{ + _margin-left: 20px; + font-weight: 600; + padding-right: 10px; + color: #555555; + text-indent: 0px; + _width: 89%; +} +.mod-sort-area .sortsite dt .more-content{ + float: left; + margin-left: 10px; + font-weight: 400; + color: #3dc094; +} +.mod-sort-area .sortsite dd{ + overflow: hidden; + border-left: none; + border-right: 1px dashed #eaebeb; +} +.mod-sort-area .sortsite dd a{ + color: #595959; + line-height:31px; + height:31px; + width:100%; + padding-right: 3px; + border-right: 3px solid #fafafc; + text-indent: 0px; +} +.mod-sort-area .sortsite dd a:hover{ + background:#e8eaeb; + border-right: 3px solid #00ac73; +} +.mod-sort-area .sortsite dd.dd-right{ + border-right: none; +} +.mod-sort-area .sortsite_more{ + font-family: Verdana; + text-align: right; + text-indent: 0; + background: #F9FAFA; + position: absolute; + right: 0px; + top: 0; + float: right; +} +.mod-sort-area .sortsite .link-name{ + margin-right: 7px; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl.css new file mode 100755 index 000000000..f6a1ac3e1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl.css @@ -0,0 +1,97 @@ +/*****/ +div .mod-sort-area{ + margin-top: 0px; +} +/** 分类导航区旧版样式 */ +.mod-sort-area .box-sort { + overflow: hidden; + margin-left: -10px; +} +.mod-sort-area .sortsite{ + white-space: nowrap; + overflow: hidden; + border: 1px solid #E3E5E6; + border-bottom:1px solid #dcddde; + background: #fafcfc; +} +.mod-sort-area .sortsite dt{ + height: 30px; + line-height: 30px; + border-bottom: 1px solid #EDEFF0; + color: #23C098; + font-size: 14px; + overflow: hidden; + position: relative; + background: url(../img/btn-normal-bg.png?__sprite) repeat-x; +} +.mod-sort-area .sortsite dt:hover{ + border-bottom: 1px solid #cfd0d1; + -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + box-shadow: 0 1px 2px rgba(0,0,0,0.2); +} +.mod-sort-area .sortsite a:hover{ + text-decoration: none; +} +.mod-sort-area .sortsite dt:active{ + background: url(../img/btn-active-bg.png?__sprite) repeat-x; +} +.mod-sort-area .sortsite a{ + display:block; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; +} +.mod-sort-area .sortsite dt a{ + _margin-left: 20px; + font-weight: 600; + padding-right: 10px; + color: #49b18e; + text-indent: 0px; + _width: 89%; +} +.mod-sort-area .sortsite dt a:hover{ + text-decoration: underline; +} +.mod-sort-area .sortsite dt .more-content{ + float: left; + margin-left: 10px; + font-weight: 400; + color: #3dc094; +} +.mod-sort-area .sortsite dd{ + overflow: hidden; + border-left:1px solid #fff; + border-right:1px solid #fff; +} +.mod-sort-area .sortsite dd a{ + color: #595959; + line-height:31px; + height:31px; + width:100%; + padding-right: 3px; + border-right: 3px solid #fafafc; + text-indent: 0px; +} +.mod-sort-area .sortsite dd a:hover{ + background:#e8eaeb; + border-right: 3px solid #00ac73; +} +.mod-sort-area .sortsite_more{ + font-family: Verdana; + text-align: right; + text-indent: 0; + background: #F9FAFA; + position: absolute; + right: 0px; + top: 0; + float: right; +} +.mod-sort-area .sortsite .link-name{ + margin-right:7px +} +.mod-sort-area .sortsites-tabs-container{ + display: none; +} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl.more.css new file mode 100755 index 000000000..557892c07 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/rtl/rtl.more.css @@ -0,0 +1,145 @@ +.mod-sort-area .box-onesort-big { + position: relative; +} +.mod-sort-area div.box-onesort-big dd a{ + width: 242px; + color:#a9a9a9; +} +.mod-sort-area .box-onesort-big .link-name{ + font-weight: bold; +} +.mod-sort-area .box-onesort-big dd a.have-pre-icon{ + width: 222px; +} +.mod-sort-area .box-onesort-big .link-name{ + color: #595959; +} +.mod-sort-area .box-onesort-big .link-description{ + margin-right: 10px; + font-size: 12px; + font-weight: normal; +} +.mod-sort-area .box-onesort-big .i-sort-big { + display: block; + position: absolute; + left: 25px; + bottom: 20px; +} + +/*cool sort big image*/ +.mod-sort-area .box-onesort-big .i-sort-big{ + background-image: url("../img/i-onesort-big.png"); +} +.mod-sort-area .i-sort-big.i-sort-games { + width: 71px; + height: 54px; + background-position: -54px -243px; +} +.mod-sort-area .i-sort-big.i-sort-gameweb { + width: 61px; + height: 56px; + background-position: 0 -63px; +} +.mod-sort-area .i-sort-big.i-sort-image { + width: 63px; + height: 63px; + background-position: 0px 0px; +} +.mod-sort-area .i-sort-big.i-sort-tv { + width: 59px; + height: 56px; + background-position: -63px -297px; +} +.mod-sort-area .i-sort-big.i-sort-movie { + width: 53px; + height: 60px; + background-position: 0px -119px; +} +.mod-sort-area .i-sort-big.i-sort-tieba { + width: 61px; + height: 61px; + background-position: -62px -180px; +} +.mod-sort-area .i-sort-big.i-sort-bank { + width: 63px; + height: 57px; + background-position: 0px -296px; +} +.mod-sort-area .i-sort-big.i-sort-music { + width: 63px; + height: 63px; + background-position: -63px 0px; +} +.mod-sort-area .i-sort-big.i-sort-menhu { + width: 61px; + height: 56px; + background-position: -61px -63px; +} +.mod-sort-area .i-sort-big.i-sort-sports { + width: 54px; + height: 54px; + background-position: 0px -242px; +} +.mod-sort-area .i-sort-big.i-sort-software { + width: 60px; + height: 60px; + background-position: -53px -119px; +} +.mod-sort-area .i-sort-big.i-sort-shopping { + width: 62px; + height: 63px; + background-position: 0px -179px; +} + +/*可配置气泡颜色和文案*/ +.mod-sort-area .confAbleRed, +.mod-sort-area .confAbleRed em, +.mod-sort-area .confAbleRed span, +.mod-sort-area .confAbleRed i, +.mod-sort-area .confAbleGreen, +.mod-sort-area .confAbleGreen em, +.mod-sort-area .confAbleGreen span, +.mod-sort-area .confAbleGreen i{ + display: inline-block; + *display: inline; + *zoom:1; + color: #fff; + vertical-align: middle; + height: 15px; +} +.mod-sort-area .confAbleRed em, +.mod-sort-area .confAbleGreen em{ + float: right; + width: 8px; + +} +.mod-sort-area .confAbleRed i, +.mod-sort-area .confAbleGreen i{ + width: 5px; + float: right; + +} +.mod-sort-area .confAbleRed span, +.mod-sort-area .confAbleGreen span{ + float: right; + line-height: 14px; + font-size: 11px; +} +.mod-sort-area .confAbleRed em{ + background: url(../img/tips-front-bg-rtl.png?__sprite); +} +.mod-sort-area .confAbleGreen em{ + background: url(../img/tips-front-bg-rtl-green.png?__sprite); +} +.mod-sort-area .confAbleRed i{ + background: url(../img/tips-back-bg-rtl.png?__sprite); +} +.mod-sort-area .confAbleGreen i{ + background: url(../img/tips-back-bg-rtl-green.png?__sprite); +} +.mod-sort-area .confAbleRed span{ + background: url(../img/tips-middle-bg.png?__sprite) repeat-x; +} +.mod-sort-area .confAbleGreen span{ + background: url(../img/tips-middle-bg-green.png?__sprite) repeat-x; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/sort-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/sort-async.js new file mode 100755 index 000000000..312561760 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/sort-async.js @@ -0,0 +1,64 @@ +var $ = require('common:widget/ui/jquery/jquery.js'), + UT = require('common:widget/ui/ut/ut.js'), + helper = require("common:widget/ui/helper/helper.js"), + hex_md5 = require('common:widget/ui/md5/md5.js'); + +!function() { + //api数据介入 + if(!conf.sortArea.apiIntervention.length){ + return; + } else { + getApiParam(); + } + + function getApiParam(){ + + var category = [], + params = "?act=contents&app=gensimple&country="+conf.country+"&category=#{category}&num=#{num}"; + + $("dl.sortsite dt").each(function(i){ + var $this = $(this); + $this.attr("apiCategory") && category.push({"apiCategory":$this.attr("apiCategory"),"num":$this.attr("apiNum"),"index":i}); + + }); + + for (var i = 0; i < category.length; i++) { + var param = ""; + + param = helper.replaceTpl(params,{"category":category[i].apiCategory,"num":category[i].num || "5"}); + getApiData(param,category[i].apiCategory,category[i].index); + + } + } + + function getApiData( param,category,index ){ + $.ajax({ + url:conf.apiUrlPrefix+param, + dataType: "jsonp", + async:false, + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(param,16), + cache: false, + + success:function(result){ + renderSortsiteApiData({apiData:result.content.data.contents[category],index:index}); + }, + error:function(){ + + } + }); + } + + function renderSortsiteApiData( result ){ + var el = $("dl.sortsite").eq(result.index); + + el.find("dd").each(function(i){ + if( i >= result.apiData.length){ + return false; + } + var $this = $(this); + $this.find("a").attr("href",result.apiData[i].url); + $this.find(".link-name").text(result.apiData[i].name); + }); + } +}(); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/sort.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/sort.tpl new file mode 100755 index 000000000..7b55cae03 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/sort/sort.tpl @@ -0,0 +1,96 @@ +<%style%> + <%if $head.dir=='ltr'%> + <%*****如果是tab的形式就引入新版样式*******%> + <%if !empty($body.sortAreaTab) && empty($body.sortAreaTab.isHidden)%> + @import url(/widget/sort-area/sort/ltr/ltr-tab.css?__inline"); + <%*****如果是没有tab的形式就引入老版样式*******%> + <%else%> + @import url('/widget/sort-area/sort/ltr/ltr.css?__inline'); + <%/if%> + <%else%> + <%if !empty($body.sortAreaTab) && empty($body.sortAreaTab.isHidden)%> + @import url(/widget/sort-area/sort/rtl/rtl-tab.css?__inline"); + <%else%> + @import url('/widget/sort-area/sort/rtl/rtl.css?__inline'); + <%/if%> + <%/if%> +<%/style%> + +<%if $head.dir=='ltr'%> + <%require name="home:widget/sort-area/sort/ltr/ltr.more.css"%> +<%else%> + <%require name="home:widget/sort-area/sort/rtl/rtl.more.css"%> +<%/if%> + +
                                            + + <%assign var=sortIndex value=-1%> + <%assign var=logIndex value=0%> + + <%foreach $body.coolSort.list as $listValue%> + <%if empty($listValue.isHidden)%> + + <%$logIndex = $logIndex +1%> + <%if !empty($listValue.bigSize)%> + <%$sortIndex = $sortIndex + 2%> + <%else%> + <%$sortIndex = $sortIndex + 1%> + <%/if%> +
                                            +
                                            <%else%><%if $head.dir=='rtl'%>s-mlm<%else%>s-mrm<%/if%><%/if%> s-mtm s-pbs sortsite" log-mod="sortsites" log-index="<%$logIndex%>" > + <%if $sortIndex > 7%> + + <%/if%> +
                                            + <%if $sortIndex > 7%> + + <%/if%> +
                                            + <%/if%> + <%/foreach%> +
                                            + +<%script%> + conf.sortArea = conf.sortArea || {}; + conf.sortArea["apiIntervention"] = "<%$body.coolSort.apiIntervention%>" || ""; + require.async('home:widget/sort-area/sort/sort-async.js'); + + conf.sortArea.clildModuleReady = conf.sortArea.clildModuleReady || {}; + conf.sortArea.clildModuleReady["<%$tab.id%>"] = "true"; +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-apps.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-apps.png new file mode 100755 index 000000000..cbd20936e Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-apps.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-game.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-game.png new file mode 100755 index 000000000..cfbab79b9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-game.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-home.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-home.png new file mode 100755 index 000000000..6e349f004 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-home.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-image.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-image.png new file mode 100755 index 000000000..9222ea0c5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-image.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-movie.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-movie.png new file mode 100755 index 000000000..a3b22766c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-movie.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-news.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-news.png new file mode 100755 index 000000000..c57ef3413 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-news.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-shop.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-shop.png new file mode 100755 index 000000000..2b0844c13 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/icon-shop.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-bg-arrow.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-bg-arrow.png new file mode 100755 index 000000000..d33db2730 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-bg-arrow.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-bg.png new file mode 100755 index 000000000..1bb9d3a8c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-current-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-current-bg.png new file mode 100755 index 000000000..a9fbb2f16 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-current-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-hover-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-hover-bg.png new file mode 100755 index 000000000..754b8bae5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/img/tab-hover-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/ltr/ltr.css new file mode 100755 index 000000000..df6e185d7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/ltr/ltr.css @@ -0,0 +1,247 @@ +/**tabs***/ +.mod-sort-area .tabs{ + position: relative; + visibility: visible !important; +} +.mod-sort-area .tab-item{ + height: 29px; + position: relative; + float: left; + box-shadow: 1px 0px 0px #279973; + background: url(../img/tab-bg.png?__sprite) repeat-x\9; + background-image:-moz-linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(51,194,149)), to(rgb(47,188,138))); + background-image:-webkit-linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background-image:-o-linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background-image:-ms-linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background-image:linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#33c295,endColorstr=#2fbc8a,GradientType=1)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33c295,endColorstr=#2fbc8a,GradientType=1) DXImageTransform.Microsoft.Alpha(enabled=false);*/ +} +.mod-sort-area .tab{ + line-height: 29px; + cursor: pointer; + text-align: center; + height: 29px; + color: #fff; + /*overflow: hidden;*/ + padding: 0 6.21%; + transform: perspective(2px) rotateX(-0.6deg); + -ms-transform: perspective(2px) rotateX(-0.6deg); + -webkit-transform: perspective(2px) rotateX(-0.6deg); + backface-visibility: hidden; +} +.mod-sort-area .tab .icon { + display: inline-block; + *display: inline; + *zoom: 1; + width: 25px; + height: 29px; + margin-right: 5%; + vertical-align: middle; +} +.mod-sort-area .tab-item .border{ + display: block\9; + position: absolute\9; + width: 1px\9; + height: 29px\9; + left: 0\9; + top: 0\9; + background-color: #5fcfaa; +} +.mod-sort-area .tab .text{ + white-space: nowrap; + display: inline-block; + *display: inline; + *zoom:1; + visibility: visible; + text-shadow:1px 0px 1px 1px rgba(0,0,0,.5); +} +/**同CMS配置耦合在一起,如何解决?***/ +.mod-sort-area .tabs .tab-item{ + border-radius: 7px 7px 0 0; + transform: perspective(2px) rotateX(0.6deg); + -ms-transform: perspective(2px) rotateX(0.6deg); + -webkit-transform: perspective(2px) rotateX(0.6deg); + backface-visibility: hidden; +} +.mod-sort-area .tabs .first-tab{ + border-top-left-radius: 3px; + transform: perspective(2px) rotateX(0.4deg); + -ms-transform: perspective(2px) rotateX(0.4deg); + -webkit-transform: perspective(2px) rotateX(0.4deg); + backface-visibility: hidden; + -webkit-transform-origin-x: left; + transform-origin-x: left; + -ms-transform-origin: left; + -moz-transform-origin:left; +} +.mod-sort-area .tabs .last-tab{ + border-top-right-radius: 3px; + transform: perspective(2px) rotateX(0.4deg); + -ms-transform: perspective(2px) rotateX(0.4deg); + -webkit-transform: perspective(2px) rotateX(0.4deg); + backface-visibility: hidden; + -webkit-transform-origin-x: right; + transform-origin-x: right; + -ms-transform-origin: right; + -moz-transform-origin: right; +} +.mod-sort-area .tab-first{ + transform: perspective(2px) rotateX(-0.4deg); + -ms-transform: perspective(2px) rotateX(-0.4deg); + -webkit-transform: perspective(2px) rotateX(-0.4deg); + backface-visibility: hidden; + -webkit-transform-origin-x: left; + transform-origin-x: left; + -ms-transform-origin: left; + -moz-transform-origin: left; +} +.mod-sort-area .tab-last{ + transform: perspective(2px) rotateX(-0.4deg); + -ms-transform: perspective(2px) rotateX(-0.4deg); + -webkit-transform: perspective(2px) rotateX(-0.4deg); + backface-visibility: hidden; + -webkit-transform-origin-x: right; + transform-origin-x: right; + -ms-transform-origin: right; + -moz-transform-origin: right; +} +.mod-sort-area .tabs .sort .icon{ + background: url(../img/icon-home.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .news .icon{ + background: url(../img/icon-news.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .image .icon{ + background: url(../img/icon-image.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .movie .icon{ + background: url(../img/icon-movie.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .games .icon{ + background: url(../img/icon-game.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .shop .icon{ + background: url(../img/icon-shop.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .video .icon{ + background: url(../img/icon-movie.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .apps .icon{ + background: url(../img/icon-apps.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .tab-item:hover .border, +.mod-sort-area .tabs .tab-item.current .border, +.mod-sort-area .tabs .tab-item:hover + .tab-item .border, +.mod-sort-area .tabs .tab-item.current + .tab-item .border{ + display: none; +} +.mod-sort-area .tabs .tab-item:hover{ + cursor: pointer; + background: url(../img/tab-hover-bg.png?__sprite) repeat-x\9; + background-image:-moz-linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(49,191,143)), to(rgb(39,154,115))); + background-image:-webkit-linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + background-image:-o-linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + background-image:-ms-linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + background-image:linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#31bf8f,endColorstr=#279a73,GradientType=1)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#31bf8f,endColorstr=#279a73,GradientType=1);*/ +} +.mod-sort-area .tabs .tab-item.current{ + z-index: 6!important; + background: url(../img/tab-current-bg.png?__sprite) repeat-x; + background-image:-moz-linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(33,151,112)), to(rgb(44,172,130))); + background-image:-webkit-linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + background-image:-o-linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + background-image:-ms-linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + background-image:linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#219770,endColorstr=#2cac82,GradientType=1)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#219770,endColorstr=#2cac82,GradientType=1);*/ +} +.mod-sort-area .tabs .tab-item.current .arrow{ + position: absolute; + display: block; + width: 8px; + height: 4px; + top: 29px; + right: 50%; + margin-right: -2px; + background: url(../img/tab-bg-arrow.png?__sprite) no-repeat; + z-index: 1; +} +.mod-sort-area .tab-last-arrow{ + -webkit-transform-origin-x: left; + transform-origin-x: left; + -ms-transform-origin-x: left; + -moz-transform-origin:left; + backface-visibility: hidden; + transform: perspective(2px) rotateX(8.4deg); + -ms-transform: perspective(2px) rotateX(8.4deg); + -webkit-transform: perspective(2px) rotateX(8.4deg); +} +.mod-sort-area .tabs .tab-item:hover .icon{ + animation-name: sortAreaTabIconShake; + animation-duration: 0.12s; + animation-timing-function: ease-in-out; + animation-iteration-count: 3; + + -moz-animation-name: sortAreaTabIconShake; + -moz-animation-duration: 0.12s; + -moz-animation-timing-function: ease-in-out; + -moz-animation-iteration-count: 3; + + -webkit-animation-name: sortAreaTabIconShake; + -webkit-animation-duration: 0.12s; + -webkit-animation-timing-function: ease-in-out; + -webkit-animation-iteration-count: 3; + + -o-animation-name: sortAreaTabIconShake; + -o-animation-duration: 0.12s; + -o-animation-timing-function: ease-in-out; + -o-animation-iteration-count: 3; + + -ms-animation-name: sortAreaTabIconShake; + -ms-animation-duration: 0.12s; + -ms-animation-timing-function: ease-in-out; + -ms-animation-iteration-count: 3; +} +@keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +@-webkit-keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +@-moz-keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +@-o-keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +@-ms-keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +.mod-sort-area .tabs .tab-item.current:hover .icon{ + animation-name: unSortAreaTabIconShake; + -moz-animation-name: unSortAreaTabIconShake; + -webkit-animation-name: unSortAreaTabIconShake; + -o-animation-name: unSortAreaTabIconShake; + -ms-animation-name: unSortAreaTabIconShake; +} +@keyframes unSortAreaTabIconShake {} +@-webkit-keyframes unSortAreaTabIconShake {} +@-moz-keyframes unSortAreaTabIconShake {} +@-o-keyframes unSortAreaTabIconShake {} +@-ms-keyframes unSortAreaTabIconShake {} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/rtl/rtl.css new file mode 100755 index 000000000..fe7fd76de --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/rtl/rtl.css @@ -0,0 +1,238 @@ +/**tabs***/ +.mod-sort-area .tabs{ + position: relative; + visibility: visible !important; +} +.mod-sort-area .tab-item{ + position: relative; + float: right; + box-shadow: -1px 0px 0px #279973; + background-image:-moz-linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(51,194,149)), to(rgb(47,188,138))); + background-image:-webkit-linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background-image:-o-linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background-image:-ms-linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background-image:linear-gradient(top, rgb(51,194,149), rgb(47,188,138)); + background: url(../img/tab-bg.png?__sprite) repeat-x\9; + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#33c295,endColorstr=#2fbc8a,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#33c295,endColorstr=#2fbc8a,GradientType=0);*/ +} +.mod-sort-area .tab{ + line-height: 29px; + cursor: pointer; + text-align: center; + height: 29px; + color: #fff; + /*overflow: hidden;*/ + padding: 0 10px; + transform: perspective(2px) rotateX(-0.6deg); + -ms-transform: perspective(2px) rotateX(-0.6deg); + -webkit-transform: perspective(2px) rotateX(-0.6deg); +} +.mod-sort-area .tab .icon { + display: inline-block; + *display: inline; + *zoom: 1; + width: 25px; + height: 29px; + margin-left: 10px; + vertical-align: middle; +} +.mod-sort-area .tab-item .border{ + display: block\9; + position: absolute\9; + width: 1px\9; + height: 29px\9; + right: 0\9; + top: 0\9; + background-color: #5fcfaa\9; +} +.mod-sort-area .tab .text{ + white-space: nowrap; + display: inline-block; + *display: inline; + *zoom:1; + visibility: visible; +} +/**同CMS配置耦合在一起,如何解决?***/ +.mod-sort-area .tabs .tab-item{ + border-radius: 7px 7px 0 0; + transform: perspective(2px) rotateX(0.6deg); + -ms-transform: perspective(2px) rotateX(0.6deg); + -webkit-transform: perspective(2px) rotateX(0.6deg); +} +.mod-sort-area .tabs .first-tab{ + border-top-left-radius: 3px; + -webkit-transform-origin-x: right; + transform-origin-x: right; + -ms-transform-origin-x: right; + -moz-transform-origin:right; + transform: perspective(2px) rotateX(0.4deg); + -ms-transform: perspective(2px) rotateX(0.4deg); + -webkit-transform: perspective(2px) rotateX(0.4deg); +} +.mod-sort-area .tabs .last-tab{ + border-top-right-radius: 3px; + -webkit-transform-origin-x: left; + transform-origin-x: left; + -ms-transform-origin-x: left; + -moz-transform-origin:left; + transform: perspective(2px) rotateX(0.4deg); + -ms-transform: perspective(2px) rotateX(0.4deg); + -webkit-transform: perspective(2px) rotateX(0.4deg); +} +.mod-sort-area .tab-first{ + -webkit-transform-origin-x: right; + transform-origin-x: right; + -ms-transform-origin-x: right; + -moz-transform-origin:right; + transform: perspective(2px) rotateX(-0.4deg); + -ms-transform: perspective(2px) rotateX(-0.4deg); + -webkit-transform: perspective(2px) rotateX(-0.4deg); +} +.mod-sort-area .tab-last{ + -webkit-transform-origin-x: left; + transform-origin-x: left; + -ms-transform-origin-x: left; + -moz-transform-origin:left; + transform: perspective(2px) rotateX(-0.4deg); + -ms-transform: perspective(2px) rotateX(-0.4deg); + -webkit-transform: perspective(2px) rotateX(-0.4deg); +} +.mod-sort-area .tabs .sort .icon{ + background: url(../img/icon-home.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .news .icon{ + background: url(../img/icon-news.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .image .icon{ + background: url(../img/icon-image.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .movie .icon{ + background: url(../img/icon-movie.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .games .icon{ + background: url(../img/icon-game.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .shop .icon{ + background: url(../img/icon-shop.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .video .icon{ + background: url(../img/icon-movie.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .apps .icon{ + background: url(../img/icon-apps.png?__sprite) no-repeat 0 0; +} +.mod-sort-area .tabs .tab-item:hover .border, +.mod-sort-area .tabs .tab-item.current .border, +.mod-sort-area .tabs .tab-item:hover + .tab-item .border, +.mod-sort-area .tabs .tab-item.current + .tab-item .border{ + display: none; +} +.mod-sort-area .tabs .tab-item:hover{ + cursor: pointer; + background: url(../img/tab-hover-bg.png?__sprite) repeat-x\9; + background-image:-moz-linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(49,191,143)), to(rgb(39,154,115))); + background-image:-webkit-linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + background-image:-o-linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + background-image:-ms-linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + background-image:linear-gradient(top, rgb(49,191,143), rgb(39,154,115)); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#31bf8f,endColorstr=#279a73,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#31bf8f,endColorstr=#279a73,GradientType=0);*/ +} +.mod-sort-area .tabs .tab-item.current{ + z-index: 6!important; + background: url(../img/tab-current-bg.png?__sprite) repeat-x\9; + background-image:-moz-linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(33,151,112)), to(rgb(44,172,130))); + background-image:-webkit-linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + background-image:-o-linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + background-image:-ms-linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + background-image:linear-gradient(top, rgb(33,151,112), rgb(44,172,130)); + /*-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#219770,endColorstr=#2cac82,GradientType=0)"; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#219770,endColorstr=#2cac82,GradientType=0);*/ +} +.mod-sort-area .tabs .tab-item.current .arrow{ + position: absolute; + display: block; + width: 8px; + height: 4px; + top: 29px; + left: 50%; + margin-left: -2px; + background: url(../img/tab-bg-arrow.png?__sprite) no-repeat; + z-index: 1; +} +.mod-sort-area .tab-last-arrow{ + -webkit-transform-origin-x: right; + transform-origin-x: right; + -ms-transform-origin-x: right; + -moz-transform-origin:right; + transform: perspective(2px) rotateX(6.6deg); + -ms-transform: perspective(2px) rotateX(6.6deg); + -webkit-transform: perspective(2px) rotateX(6.6deg); +} +.mod-sort-area .tabs .tab-item:hover .icon{ + animation-name: sortAreaTabIconShake; + animation-duration: 0.12s; + animation-timing-function: ease-in-out; + animation-iteration-count: 3; + + -moz-animation-name: sortAreaTabIconShake; + -moz-animation-duration: 0.12s; + -moz-animation-timing-function: ease-in-out; + -moz-animation-iteration-count: 3; + + -webkit-animation-name: sortAreaTabIconShake; + -webkit-animation-duration: 0.12s; + -webkit-animation-timing-function: ease-in-out; + -webkit-animation-iteration-count: 3; + + -o-animation-name: sortAreaTabIconShake; + -o-animation-duration: 0.12s; + -o-animation-timing-function: ease-in-out; + -o-animation-iteration-count: 3; + + -ms-animation-name: sortAreaTabIconShake; + -ms-animation-duration: 0.12s; + -ms-animation-timing-function: ease-in-out; + -ms-animation-iteration-count: 3; +} +@keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +@-webkit-keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +@-moz-keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +@-o-keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +@-ms-keyframes sortAreaTabIconShake { + 0% {margin-top: 0px;} + 50% {margin-top: -3px;} + 100% {margin-top: 0px;} +} +.mod-sort-area .tabs .tab-item.current:hover .icon{ + animation-name: unSortAreaTabIconShake; + -moz-animation-name: unSortAreaTabIconShake; + -webkit-animation-name: unSortAreaTabIconShake; + -o-animation-name: unSortAreaTabIconShake; + -ms-animation-name: unSortAreaTabIconShake; +} +@keyframes unSortAreaTabIconShake {} +@-webkit-keyframes unSortAreaTabIconShake {} +@-moz-keyframes unSortAreaTabIconShake {} +@-o-keyframes unSortAreaTabIconShake {} +@-ms-keyframes unSortAreaTabIconShake {} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/tab.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/tab.tpl new file mode 100755 index 000000000..8a67a1c74 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sort-area/tab/tab.tpl @@ -0,0 +1,22 @@ +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="home:widget/sort-area/tab/ltr/ltr.css"%> +<%else%> + <%require name="home:widget/sort-area/tab/rtl/rtl.css"%> +<%/if%> + \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/btn-normal-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/btn-normal-bg.png new file mode 100755 index 000000000..bda10145b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/btn-normal-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/i-onesort-big.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/i-onesort-big.png new file mode 100755 index 000000000..74fd9eec9 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/i-onesort-big.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/i-sortsites-tabs.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/i-sortsites-tabs.png new file mode 100755 index 000000000..035858154 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/img/i-sortsites-tabs.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/ltr/bigsize.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/ltr/bigsize.css new file mode 100755 index 000000000..040a0d04d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/ltr/bigsize.css @@ -0,0 +1,214 @@ +.box-onesort-big { + position: relative; +} +.box-onesort-big dt a{ + padding-left: 10px; + color: #49b18e; + text-indent: 0px; +} +.box-onesort-big dd a{ + width: 242px; + padding-left: 10px; + border-left: 3px solid #fafafc; + font-weight: bold; + text-indent: 0px; +} +.box-onesort-big dd a:hover{ + border-left: 3px solid #00ac73; +} +.box-onesort-big dd a span { + margin-left: 10px; + font-size: 12px; + color: #a9a9a9; + font-weight: normal; +} +.box-onesort-big dt a span{ + float: right; + margin-right: 10px; + font-weight: 400; + color: #3dc094; +} +.box-onesort-big i.i-sort-big { + display: block; + position: absolute; + right: 25px; + bottom: 20px; + background-image: url("../img/i-onesort-big.png"); +} +.i-sort-big.i-br-games { + width: 71px; + height: 54px; + background-position: -54px -243px; +} +.i-sort-big.i-br-gameweb { + width: 61px; + height: 56px; + background-position: 0 -63px; +} +.i-sort-big.i-br-image { + width: 63px; + height: 63px; + background-position: 0px 0px; +} +.i-sort-big.i-br-tv { + width: 59px; + height: 56px; + background-position: -63px -297px; +} +.i-sort-big.i-br-movie { + width: 53px; + height: 60px; + background-position: 0px -119px; +} +.i-sort-big.i-br-tieba { + width: 61px; + height: 61px; + background-position: -62px -180px; +} +.i-sort-big.i-br-bank { + width: 63px; + height: 57px; + background-position: 0px -296px; +} +.i-sort-big.i-br-music { + width: 63px; + height: 63px; + background-position: -63px 0px; +} +.i-sort-big.i-br-menhu { + width: 61px; + height: 56px; + background-position: -61px -63px; +} +.i-sort-big.i-br-sports { + width: 54px; + height: 54px; + background-position: 0px -242px; +} +.i-sort-big.i-br-software { + width: 60px; + height: 60px; + background-position: -53px -119px; +} +.i-sort-big.i-br-shopping { + width: 62px; + height: 63px; + background-position: 0px -179px; +} + +.sortsites-tabs-container{ + position: relative; + overflow: visible; +} +.sortsites-tabs,ul.block_sep{ + width: 708px; + height: 30px; + line-height: 30px; + background:url(../img/btn-normal-bg.png?__sprite) repeat-x; + margin-top: 10px; + font-size: 12px; + padding-top: 2px; + overflow: hidden; +} +.sortsites-tabs i,.sortsites-tabs-container i{ + display: inline-block; + height: 20px; + width: 23px; + margin-bottom: -3px; + background-image:url(../img/i-sortsites-tabs.png?__sprite); + background-repeat: no-repeat; +} +.sortsites-tabs a:hover{ + color: #49B18E; + text-decoration: underline; +} +.sortsites-tabs .tab-lists{ + position: relative; + width: 55%; + float: left; + padding-left: 10px; + top:0px; +} +.sortsites-tabs .tab-lists li{ + float: left; + min-width: 21%; + max-width: 33%; + height: 30px; + text-align: center; +} +.sortsites-tabs .tab-lists a:hover{ + text-decoration: none; +} +.sortsites-tabs .tab-item{ + display: inline-block; + width: 100%; + text-overflow:ellipsis; + white-space:nowrap; + overflow: hidden; +} +.sortsites-tabs-refresh{ + float: right; + padding-right: 5px; +} +.sortsites-tabs-refresh i{ + background-position: -84px 1px; + margin-bottom: -4px; +} +.sortsites-tabs-description{ + float: left; + padding-left: 15px; + font-weight: bold; + margin-right: -16px; +} +.sortsites-tabs-description i{ + background-position: -61px 1px; +} +.sortsites-tabs-container .bubble-like{ + position: absolute; + display: none; + bottom: 30px; + left: -10px; + background-image:url(../img/i-sortsites-tabs.png?__sprite); + background-repeat: no-repeat; + background-position: 0 -20px; + height: 33px; + min-width: 230px; + z-index: 9; + font-weight: bold; + color: white; + padding-left: 20px; + padding-top: 2px; +} +.sortsites-tabs-container .bubble-like i{ + background-position: -119px 2px; + margin-bottom: -3px; + margin-left: 3px; +} +.sortsites-tabs-container i.i-hover{ + background-position: -146px 2px; + margin-bottom: -3px; + margin-left: 3px; + cursor: pointer; +} + +.sortsite_sep{ + border-left: 1px solid #E6E6E6; + display: block; + float: left; + height: 14px; + line-height: 6px; + margin-left: -1px; + margin-top: 8px; + position: relative; + z-index: 0; +} +ul.block_sep { + background-repeat: repeat-y; + display: block; + height: 100%; + left: 10px; + position: absolute; + top: -10px; + width: 1px; + z-index: 1; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/ltr/ltr.css new file mode 100755 index 000000000..cd2b5db75 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/ltr/ltr.css @@ -0,0 +1,20 @@ + + +/** 分类导航区样式*/ +.box-sort {overflow: hidden;} +.sortsite dd a{color: #595959;} +.sortsite{ white-space: nowrap; overflow: hidden; border: 1px solid #E3E5E6; border-bottom:1px solid #dcddde; background: #fafcfc;} +.sortsite dt{ height: 30px; line-height: 30px; border-bottom: 1px solid #edeff0; color: #23C098; font-size: 14px; overflow: hidden; position: relative; background:url(../img/btn-normal-bg.png?__sprite) repeat-x;} +.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +.sortsite a:hover{text-decoration: none;} +.sortsite dt.click{background-position: 0 -31px;} +.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.sortsite dt a{ color: #00B075; _margin-right: 20px; font-weight: 600; text-indent: 8px; _width: 89%;} +/*.sortsite dt .arrow_r{ right: 8px; top: 2px; font-style: normal; font-size: 24px; line-height: 1;cursor:pointer;}*/ +.sortsite dt .arrow_r{ width: 0; height: 0; border: 5px dashed transparent; border-left: 5px solid #3dc094; right: 4px; top: 10px; overflow: hidden;} +.sortsite dd{ overflow: hidden;border-left:1px solid #fff;border-right:1px solid #fff;} +.sortsite dd a{ display:block; overflow:hidden; line-height:31px; height:31px; width:100%; text-indent: 8px;} +.sortsite dd a:hover{ background:#f1f2f3;} +.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} +.sortsite.select{border-color: #FF8C00;border-width:1px 2px;margin-top: -10px;margin-bottom: --10px;} +@import url('/widget/sortsite-bigsize/ltr/bigsize.css?__inline'); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/ltr/ltr.more.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/rtl/rtl.css new file mode 100755 index 000000000..ca51e1102 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/rtl/rtl.css @@ -0,0 +1,18 @@ + + +/** 分类导航区样式 */ +.box-sort {overflow: hidden;} +.sortsite dd a{color: #595959;} +.sortsite{ white-space: nowrap; overflow: hidden; border: 1px solid #E3E5E6; border-bottom:1px solid #dcddde; background: #fafcfc;} +.sortsite dt{ height: 30px; line-height: 30px; border-bottom: 1px solid #EDEFF0; color: #23C098; font-size: 14px; overflow: hidden; position: relative; background:url(../img/btn-normal-bg.png?__sprite) repeat-x;} +.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +.sortsite a:hover{text-decoration: none;} +.sortsite dt.click{background-position: 0 -31px;} +.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.sortsite dt a{ color: #00B075; _margin-left: 20px; font-weight: 600; text-indent: 8px; _width: 89%;} +.sortsite dt .arrow_r{ width: 0; height: 0; border: 5px dashed transparent; border-right: 5px solid #3dc094; left: 4px; top: 10px; overflow: hidden;} +/*.sortsite dt .arrow_r{ left: 8px; top: 2px; font-style: normal; font-size: 24px; line-height: 1;cursor:pointer;}*/ +.sortsite dd{ overflow: hidden;border-left:1px solid #fff;border-right:1px solid #fff;} +.sortsite dd a{ display:block; overflow:hidden; line-height:31px; height:31px; width:100%; text-indent: 8px;} +.sortsite dd a:hover{ background:#e8eaeb;} +.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/rtl/rtl.more.css new file mode 100755 index 000000000..ca51e1102 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/rtl/rtl.more.css @@ -0,0 +1,18 @@ + + +/** 分类导航区样式 */ +.box-sort {overflow: hidden;} +.sortsite dd a{color: #595959;} +.sortsite{ white-space: nowrap; overflow: hidden; border: 1px solid #E3E5E6; border-bottom:1px solid #dcddde; background: #fafcfc;} +.sortsite dt{ height: 30px; line-height: 30px; border-bottom: 1px solid #EDEFF0; color: #23C098; font-size: 14px; overflow: hidden; position: relative; background:url(../img/btn-normal-bg.png?__sprite) repeat-x;} +.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +.sortsite a:hover{text-decoration: none;} +.sortsite dt.click{background-position: 0 -31px;} +.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.sortsite dt a{ color: #00B075; _margin-left: 20px; font-weight: 600; text-indent: 8px; _width: 89%;} +.sortsite dt .arrow_r{ width: 0; height: 0; border: 5px dashed transparent; border-right: 5px solid #3dc094; left: 4px; top: 10px; overflow: hidden;} +/*.sortsite dt .arrow_r{ left: 8px; top: 2px; font-style: normal; font-size: 24px; line-height: 1;cursor:pointer;}*/ +.sortsite dd{ overflow: hidden;border-left:1px solid #fff;border-right:1px solid #fff;} +.sortsite dd a{ display:block; overflow:hidden; line-height:31px; height:31px; width:100%; text-indent: 8px;} +.sortsite dd a:hover{ background:#e8eaeb;} +.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/sortsite-bigsize.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/sortsite-bigsize.js new file mode 100755 index 000000000..c66848cbe --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/sortsite-bigsize.js @@ -0,0 +1,78 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); + +// for the title's effects of sort sites area +!function(){ + //($(".tab-lists").css("height")=="120px") && $(".tab-lists li").css("width","33%"); + !$.cookie("sortsiteBubble") && $(".bubble-like").show(); +}(); +$(".sortsite dt").on({ + mouseenter: function () { + $(this).addClass("hover"); + }, + mouseleave: function () { + $(this).removeClass("hover"); + $(this).removeClass("click"); + }, + mousedown: function () { + $(this).addClass("click"); + }, + mouseup: function () { + $(this).removeClass("click"); + } +}); + +//icon click log +$(".box-onesort-big .i-sort-big").on("click", function(){ + var logIndex = $(this).prev("dl").attr("log-index"); + UT.send({ + position: "links", + sort: "icon", + ac: "b", + url: location.href, + modId: "sortsites", + modIndex: logIndex + }); +}); +//tab换组,循环关系 +$(".sortsites-tabs-refresh").click(function(e){ + e.preventDefault(); + var tabList = $(this).parent().find(".tab-lists"), + listLength = -parseInt(tabList.css("height"),10), + top = parseInt(tabList.css("top"),10)-30; + UT.send({ + position: "sortsitesTabRefresh", + modId: "sortsites", + type: "click" + }); + top = (top == listLength)?0:top; + !tabList.is(":animated") && tabList.animate({"top":top+"px"}); + +}); +//根据itemIndex来确定需要跳转的分类区 +$(".tab-item").click(function(e){ + e.preventDefault(); + var index = +$(this).attr("item-index"), + itemIndex = (parseInt((index+1)/2,10)-1)*260+420, + win = window; + UT.send({ + position: "sortsitesTabItem", + modId: "sortsites", + type: "click", + modIndex: index + }); + $(win).scrollTop(itemIndex); + $(".sortsite").removeClass("select").eq(index-1).addClass("select"); +}); +$(".bubble-like i").on({ + mouseenter: function () { + $(this).addClass("i-hover"); + }, + mouseleave: function () { + $(this).removeClass("i-hover"); + }, + click:function(){ + $(this).parent().hide(); + $.cookie("sortsiteBubble",1, {expires: 2000}); + } +}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/sortsite-bigsize.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/sortsite-bigsize.tpl new file mode 100755 index 000000000..0d02f45a9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-bigsize/sortsite-bigsize.tpl @@ -0,0 +1,49 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/sortsite-bigsize/ltr/ltr.css"%> <%else%> <%require name="home:widget/sortsite-bigsize/rtl/rtl.css"%> <%/if%> +
                                            +
                                            + <%$body.coolSortTest.bubbleLike%> + +
                                            +
                                            + + + <%$body.coolSortTest.tabDescription%> + + + + + <%$body.coolSortTest.refreshDescription%> + +
                                            +
                                            + + <%script%> + require.async('home:widget/sortsite-bigsize/sortsite-bigsize.js'); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/img/btn-normal-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/img/btn-normal-bg.png new file mode 100755 index 000000000..bda10145b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/img/btn-normal-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/img/i-onesort-big.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/img/i-onesort-big.png new file mode 100755 index 000000000..eefb4acc4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/img/i-onesort-big.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/ltr/ltr.css new file mode 100755 index 000000000..1464b8ec1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/ltr/ltr.css @@ -0,0 +1,38 @@ +/** 分类导航区样式*/ +.box-sort {overflow: hidden;} +.sortsite{ white-space: nowrap; overflow: hidden; border: 1px solid #E3E5E6; border-bottom:1px solid #dcddde; background: #fafcfc;} +.sortsite dt{ height: 30px; line-height: 30px; border-bottom: 1px solid #edeff0; color: #23C098; font-size: 14px; overflow: hidden; background:url(../img/btn-normal-bg.png?m=x) repeat-x;} +.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +.sortsite a:hover{text-decoration: none;} +.sortsite dt.click{background-position: 0 -31px;} +.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.sortsite dt a{_margin-right: 20px; font-weight: 600; padding-left: 10px;color: #49b18e;text-indent: 0px; _width: 89%;} +.sortsite dt a:hover{text-decoration: underline;} +.sortsite dt a span{float: right;margin-right: 10px;font-weight: 400;color: #3dc094;} +.sortsite dd{overflow: hidden;border-left:1px solid #fff;border-right:1px solid #fff;} +.sortsite dd a{color:#595959;line-height:31px; height:31px; width:93%; padding-left:10px;border-left:3px solid #fafafc;text-indent: 0px;} +.sortsite dd a:hover{ background:#e8eaeb;border-left: 3px solid #00ac73;} +.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} + +.box-onesort-big {position: relative;} +.box-onesort-big dd a{width: 242px;color:#a9a9a9;} +.box-onesort-big .link-name{font-weight: bold;} +.box-onesort-big dd a.have-pre-icon{width: 222px;} +.box-onesort-big .link-name{color: #595959;} +.box-onesort-big .link-description {margin-left: 10px;font-size: 12px;font-weight: normal;} +.box-onesort-big .i-sort-big {display: block;position: absolute;right: 25px;bottom: 20px;} + +/*cool sort big image*/ +.box-onesort-big .i-sort-big{background-image: url("../img/i-onesort-big.png");} +.i-sort-big.i-sort-games {width: 71px;height: 54px;background-position: -54px -243px;} +.i-sort-big.i-sort-gameweb {width: 61px;height: 56px;background-position: 0 -63px;} +.i-sort-big.i-sort-image {width: 63px;height: 63px;background-position: 0px 0px;} +.i-sort-big.i-sort-tv {width: 59px;height: 56px;background-position: -63px -297px;} +.i-sort-big.i-sort-movie {width: 53px;height: 60px;background-position: 0px -119px;} +.i-sort-big.i-sort-tieba {width: 61px;height: 61px;background-position: -62px -180px;} +.i-sort-big.i-sort-bank {width: 63px;height: 57px;background-position: 0px -296px;} +.i-sort-big.i-sort-music {width: 63px;height: 63px;background-position: -63px 0px;} +.i-sort-big.i-sort-menhu {width: 61px;height: 56px;background-position: -61px -63px;} +.i-sort-big.i-sort-sports {width: 54px;height: 54px;background-position: 0px -242px;} +.i-sort-big.i-sort-software {width: 60px;height: 60px;background-position: -53px -119px;} +.i-sort-big.i-sort-shopping {width: 62px;height: 63px;background-position: 0px -179px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/rtl/rtl.css new file mode 100755 index 000000000..59e890dd1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/rtl/rtl.css @@ -0,0 +1,43 @@ + + +/** 分类导航区样式 */ /*此为抽样,有些看似无用的东西实际上是为了覆盖全量*/ +div.box-sort {overflow: hidden; margin-left: 10px; border: 1px solid #e3e5e6; border-top: none; padding: 5px; background-color: #fafcfc;} +dl.sortsite{ white-space: nowrap; overflow: hidden;border: none;background: #fafcfc; margin-top: 0 !important; margin-left: 0 !important;} +dl.sortsite dt{ height: 30px; line-height: 30px; border: 1px solid #e7e9ea; border-left:none; margin-bottom: 10px !important; color: #23C098; font-size: 14px; position: static; overflow: hidden; background:url(../img/btn-normal-bg.png?m=x) repeat-x;} +dl.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +dl.sortsite a:hover{text-decoration: none;} +dl.sortsite dt.click{background-position: 0 -31px;} +dl.sortsite dt.dt-left{border-left: 1px solid #e7e9ea;} +dl.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +dl.sortsite dt a{_margin-left: 20px; font-weight: 600; padding-right: 10px;color: #555555;text-indent: 0px; _width: 89%;} +dl.sortsite dt a:hover{text-decoration: none;} +dl.sortsite dt a span{float: left;margin-left: 10px;font-weight: 400;color: #3dc094;} +dl.sortsite dd{ overflow: hidden;border-left: none; border-right: 1px dashed #eaebeb;} +dl.sortsite dd a{color: #595959;line-height:31px; height:31px; width:100%; padding-right: 3px;border-right: 3px solid #fafafc;text-indent: 0px;} +dl.sortsite dd a:hover{ background:#e8eaeb;border-right: 3px solid #00ac73;} +dl.sortsite dd.dd-right{border-right: none;} +dl.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} +dl.sortsite .link-name{margin-right: 7px;} + +.box-onesort-big {position: relative;} +.box-onesort-big dd a{width: 242px;color:#a9a9a9;} +.box-onesort-big .link-name{font-weight: bold;} +.box-onesort-big dd a.have-pre-icon{width: 222px;} +.box-onesort-big .link-name{color: #595959;} +.box-onesort-big .link-description{margin-right: 10px;font-size: 12px;font-weight: normal;} +.box-onesort-big .i-sort-big {display: block;position: absolute;left: 25px;bottom: 20px;} + +/*cool sort big image*/ +.box-onesort-big .i-sort-big{background-image: url("../img/i-onesort-big.png");} +.i-sort-big.i-sort-games {width: 71px;height: 54px;background-position: -54px -243px;} +.i-sort-big.i-sort-gameweb {width: 61px;height: 56px;background-position: 0 -63px;} +.i-sort-big.i-sort-image {width: 63px;height: 63px;background-position: 0px 0px;} +.i-sort-big.i-sort-tv {width: 59px;height: 56px;background-position: -63px -297px;} +.i-sort-big.i-sort-movie {width: 53px;height: 60px;background-position: 0px -119px;} +.i-sort-big.i-sort-tieba {width: 61px;height: 61px;background-position: -62px -180px;} +.i-sort-big.i-sort-bank {width: 63px;height: 57px;background-position: 0px -296px;} +.i-sort-big.i-sort-music {width: 63px;height: 63px;background-position: -63px 0px;} +.i-sort-big.i-sort-menhu {width: 61px;height: 56px;background-position: -61px -63px;} +.i-sort-big.i-sort-sports {width: 54px;height: 54px;background-position: 0px -242px;} +.i-sort-big.i-sort-software {width: 60px;height: 60px;background-position: -53px -119px;} +.i-sort-big.i-sort-shopping {width: 62px;height: 63px;background-position: 0px -179px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/sortsite-embedlv2-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/sortsite-embedlv2-async.js new file mode 100755 index 000000000..18549a25a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/sortsite-embedlv2-async.js @@ -0,0 +1,11 @@ +// for the title's effects of sort sites area +var $ = require('common:widget/ui/jquery/jquery.js'); +$(".box-sort").on( "mouseenter", "dt", function(){ + $(this).addClass("hover"); + }) + .on( "mouseleave", "dt", function(){ + $(this).removeClass("hover click"); + }) + .on( "mousedown mouseup", "dt", function(){ + $(this).toggleClass("click"); + }); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/sortsite-embedlv2.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/sortsite-embedlv2.tpl new file mode 100755 index 000000000..0c32ab6dc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-embedlv2/sortsite-embedlv2.tpl @@ -0,0 +1,67 @@ +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/sortsite-embedlv2/ltr/ltr.css"%> <%else%> <%require name="home:widget/sortsite-embedlv2/rtl/rtl.css"%> <%/if%> +
                                            + + <%assign var=sortIndex value=-1%> + <%assign var=logIndex value=-1%> + + <%foreach $body.coolSort.list as $listValue%> + <%if empty($listValue.isHidden)%> + + <%$logIndex = $logIndex +1%> + <%if !empty($listValue.bigSize)%> + <%$sortIndex = $sortIndex + 2%> + <%else%> + <%$sortIndex = $sortIndex + 1%> + <%/if%> + +
                                            + + <%if $sortIndex > 7%> + + <%/if%> + +
                                            + <%/if%> + <%/foreach%> + +
                                            + <*script*> + require.async('home:widget/sortsite-embedlv2/sortsite-embedlv2-async.js'); + <*/script*> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-lazyload/img/btn-normal-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-lazyload/img/btn-normal-bg.png new file mode 100755 index 000000000..bda10145b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-lazyload/img/btn-normal-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-lazyload/sortsite-lazyload.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-lazyload/sortsite-lazyload.tpl new file mode 100755 index 000000000..14330870a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite-lazyload/sortsite-lazyload.tpl @@ -0,0 +1,31 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/sortsite/ltr/ltr.css"%> <%else%> <%require name="home:widget/sortsite/rtl/rtl.css"%> <%/if%> + + +
                                            + <%foreach $body.coolSort.list as $listValue%> +
                                            + <%if $listValue@index > 7%> + + <%/if%> +
                                            + <%/foreach%> +
                                            + <%script%> + require.async('home:widget/sortsite/sortsite.js'); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/btn-normal-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/btn-normal-bg.png new file mode 100755 index 000000000..bda10145b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/btn-normal-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/i-onesort-big.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/i-onesort-big.png new file mode 100755 index 000000000..eefb4acc4 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/i-onesort-big.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/i-sortsites-tabs.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/i-sortsites-tabs.png new file mode 100755 index 000000000..ddb954744 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/i-sortsites-tabs.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-ltr-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-ltr-green.png new file mode 100755 index 000000000..a7c715f03 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-ltr-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-ltr.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-ltr.png new file mode 100755 index 000000000..c5ca37bcf Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-ltr.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-rtl-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-rtl-green.png new file mode 100755 index 000000000..9c0172b93 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-rtl-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-rtl.png new file mode 100755 index 000000000..c58073d26 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-back-bg-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-ltr-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-ltr-green.png new file mode 100755 index 000000000..779b4fb42 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-ltr-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-ltr.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-ltr.png new file mode 100755 index 000000000..5fae7a660 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-ltr.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-rtl-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-rtl-green.png new file mode 100755 index 000000000..320a3a383 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-rtl-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-rtl.png new file mode 100755 index 000000000..7d10ef790 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-front-bg-rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-middle-bg-green.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-middle-bg-green.png new file mode 100755 index 000000000..3c45776b0 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-middle-bg-green.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-middle-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-middle-bg.png new file mode 100755 index 000000000..ac95ddbc7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/img/tips-middle-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr-sortsite-embedlv2.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr-sortsite-embedlv2.css new file mode 100755 index 000000000..c5283132b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr-sortsite-embedlv2.css @@ -0,0 +1,21 @@ + + +/** 分类导航区样式*/ +div.box-sort {overflow: hidden; border: 1px solid #e3e5e6; border-top: none; padding: 5px; background-color: #fafcfc;} +dl.sortsite{ white-space: nowrap; overflow: hidden; border: none; background: #fafcfc;margin-top: 0 !important; margin-right: 0 !important;} +dl.sortsite dt{ height: 30px; line-height: 30px; border: 1px solid #e7e9ea; border-right:none; margin-bottom: 10px !important; color: #23C098; font-size: 14px; overflow: hidden; position: static; background:url(../img/btn-normal-bg.png?__sprite) repeat-x;} +dl.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +dl.sortsite a:hover{text-decoration: none;} +dl.sortsite dt.click{background-position: 0 -31px;} +dl.sortsite dt.dt-right{border-right: 1px solid #e7e9ea;} +dl.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +dl.sortsite dt a{_margin-right: 20px; font-weight: 600; padding-left: 10px;color: #555555;text-indent: 0px; _width: 89%;} +dl.sortsite dt a:hover{text-decoration: none;} +dl.sortsite dt .more-content{float: right;margin-right: 10px;font-weight: 400;color: #3dc094;} +dl.sortsite dd{overflow: hidden;border-left:none;border-left: 1px dashed #eaebeb;} +dl.sortsite dd a{color:#595959;line-height:31px; height:31px; width:93%; padding-left:10px;border-left:3px solid #fafafc;text-indent: 0px;} +dl.sortsite dd a:hover{ background:#e8eaeb;border-left: 3px solid #00ac73;} +dl.sortsite dd.dd-left{border-left: none;} +dl.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} + +.sortsites-tabs-container{ display: none;} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr.css new file mode 100755 index 000000000..9564be715 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr.css @@ -0,0 +1,63 @@ + + +/** 分类导航区样式*/ +.box-sort {overflow: hidden;} +.sortsite{ white-space: nowrap; overflow: hidden; border: 1px solid #E3E5E6; border-bottom:1px solid #dcddde; background: #fafcfc;} +.sortsite dt{ height: 30px; line-height: 30px; border-bottom: 1px solid #edeff0; color: #23C098; font-size: 14px; overflow: hidden; position: relative; background:url(../img/btn-normal-bg.png?__sprite) repeat-x;} +.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +.sortsite a:hover{text-decoration: none;} +.sortsite dt.click{background-position: 0 -31px;} +.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.sortsite dt a{_margin-right: 20px; font-weight: 600; padding-left: 10px;color: #49b18e;text-indent: 0px; _width: 89%;} +.sortsite dt a:hover{text-decoration: underline;} +.sortsite dt .more-content{float: right;margin-right: 10px;font-weight: 400;color: #3dc094;} +.sortsite dd{overflow: hidden;border-left:1px solid #fff;border-right:1px solid #fff;} +.sortsite dd a{color:#595959;line-height:31px; height:31px; width:93%; padding-left:10px;border-left:3px solid #fafafc;text-indent: 0px;} +.sortsite dd a:hover{ background:#e8eaeb;border-left: 3px solid #00ac73;} +.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} + +.sortsites-tabs-container{ display: none;} + +/*新版 可配置气泡*/ +.confAbleRed, .confAbleRed em, .confAbleRed span, .confAbleRed i, +.confAbleGreen, .confAbleGreen em, .confAbleGreen span, .confAbleGreen i{ + display: inline-block; + *display: inline; + *zoom:1; + color: #fff; + vertical-align: middle; + height: 15px; +} +.confAbleRed em, .confAbleGreen em{ + float: left; + width: 8px; + +} +.confAbleRed i, .confAbleGreen i{ + width: 5px; + float: left; + +} +.confAbleRed span, .confAbleGreen span{ + float: left; + line-height: 14px; + font-size: 11px; +} +.confAbleRed em{ + background: url(../img/tips-front-bg-ltr.png?__sprite); +} +.confAbleGreen em{ + background: url(../img/tips-front-bg-ltr-green.png?__sprite); +} +.confAbleRed i{ + background: url(../img/tips-back-bg-ltr.png?__sprite); +} +.confAbleGreen i{ + background: url(../img/tips-back-bg-ltr-green.png?__sprite); +} +.confAbleRed span{ + background: url(../img/tips-middle-bg.png?__sprite) repeat-x; +} +.confAbleGreen span{ + background: url(../img/tips-middle-bg-green.png?__sprite) repeat-x; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr.more.css new file mode 100755 index 000000000..8363ffe7a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/ltr/ltr.more.css @@ -0,0 +1,45 @@ +.sortsites-tabs-container{display:block !important;} +div.sortsites-tabs-container{*display:none !important;} + +/*分类区快速导航栏*/ +.sortsite.select{border-color: #FF8C00;border-width:1px 2px;} +.sortsites-tabs-container{position: relative;overflow: visible;margin-top: 10px;*display:none;} +.sortsites-tabs{width: 708px;height: 30px;line-height:30px;background-image:url(../img/btn-normal-bg.png?__sprite);background-repeat: repeat-x;margin-top: 10px;font-size: 12px;padding-top: 2px;overflow: hidden;border-left: 1px solid #E3E5E6;border-right:1px solid #E3E5E6;} +.sortsites-tabs i,.sortsites-tabs-container i{display: inline-block;height: 20px;width: 23px;margin-bottom: -3px;background-image:url(../img/i-sortsites-tabs.png);background-repeat: no-repeat;} +.sortsites-tabs a:hover{color: #49B18E;text-decoration: underline;} +.sortsites-tabs .tab-lists{position: relative;min-width: 55%;max-width:55%;float: left;top:0;} +.sortsites-tabs .tab-lists li{float: left;min-width:21%;max-width: 33%;height: 30px;text-align: center;padding: 0 1px;} +.sortsites-tabs .tab-lists a:hover{text-decoration: none;} +.sortsites-tabs .tab-item{display: inline-block;width: 100%;text-overflow:ellipsis;white-space:nowrap;overflow: hidden;} +.sortsites-tabs-refresh{float: right;padding-right: 8px;} +.sortsites-tabs-refresh i{background-position: -84px 1px;margin-bottom: -4px;margin-right: 5px;} +.sortsites-tabs-description{position: relative;float: left; padding-left: 15px;font-weight: bold;} +.sortsites-tabs-description i{background-position: -61px 1px;} +.sortsites-tabs-container .bubble-like{position: absolute;display: none;bottom: 30px;left: -10px;background-image:url(../img/i-sortsites-tabs.png);background-repeat: no-repeat;background-position: 0 -20px;height: 33px;min-width: 230px;z-index: 9;font-weight: bold;color: white;padding-left: 20px;padding-top: 2px;} +.sortsites-tabs-container .bubble-like i{background-position: -119px 2px;margin-bottom: -3px;margin-left: 3px;} +.sortsites-tabs-container i.i-hover{background-position: -146px 2px;margin-bottom: -3px;margin-left: 3px;cursor: pointer;} +.sortsite_sep{border-left: 1px solid #E6E6E6;display: block;float: left;height: 14px;line-height: 6px;margin-left: -1px;margin-top: 8px;position: relative;z-index: 0;} +ul.block_sep {background-image:url(../img/btn-normal-bg.png?__sprite);background-repeat: repeat-y;display: block;height: 100%;left: 0px;position: absolute;top: -10px;width: 1px;z-index: 1;} + +.box-onesort-big {position: relative;} +div.box-onesort-big dd a{width: 242px;color:#a9a9a9;} +.box-onesort-big .link-name{font-weight: bold;} +.box-onesort-big dd a.have-pre-icon{width: 222px;} +.box-onesort-big .link-name{color: #595959;} +.box-onesort-big .link-description {margin-left: 10px;font-size: 12px;font-weight: normal;} +.box-onesort-big .i-sort-big {display: block;position: absolute;right: 25px;bottom: 20px;} + +/*cool sort big image*/ +.box-onesort-big .i-sort-big{background-image: url("../img/i-onesort-big.png");} +.i-sort-big.i-sort-games {width: 71px;height: 54px;background-position: -54px -243px;} +.i-sort-big.i-sort-gameweb {width: 61px;height: 56px;background-position: 0 -63px;} +.i-sort-big.i-sort-image {width: 63px;height: 63px;background-position: 0px 0px;} +.i-sort-big.i-sort-tv {width: 59px;height: 56px;background-position: -63px -297px;} +.i-sort-big.i-sort-movie {width: 53px;height: 60px;background-position: 0px -119px;} +.i-sort-big.i-sort-tieba {width: 61px;height: 61px;background-position: -62px -180px;} +.i-sort-big.i-sort-bank {width: 63px;height: 57px;background-position: 0px -296px;} +.i-sort-big.i-sort-music {width: 63px;height: 63px;background-position: -63px 0px;} +.i-sort-big.i-sort-menhu {width: 61px;height: 56px;background-position: -61px -63px;} +.i-sort-big.i-sort-sports {width: 54px;height: 54px;background-position: 0px -242px;} +.i-sort-big.i-sort-software {width: 60px;height: 60px;background-position: -53px -119px;} +.i-sort-big.i-sort-shopping {width: 62px;height: 63px;background-position: 0px -179px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl-sortsite-embedlv2.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl-sortsite-embedlv2.css new file mode 100755 index 000000000..40d4e865f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl-sortsite-embedlv2.css @@ -0,0 +1,20 @@ + + +/** 分类导航区样式 */ /*此为抽样,有些看似无用的东西实际上是为了覆盖全量*/ +div.box-sort {overflow: hidden;border: 1px solid #e3e5e6; border-top: none; padding: 5px; background-color: #fafcfc;} +dl.sortsite{ white-space: nowrap; overflow: hidden;border: none;background: #fafcfc; margin-top: 0 !important; margin-left: 0 !important;} +dl.sortsite dt{ height: 30px; line-height: 30px; border: 1px solid #e7e9ea; border-left:none; margin-bottom: 10px !important; color: #23C098; font-size: 14px; position: static; overflow: hidden; background:url(../img/btn-normal-bg.png?__sprite) repeat-x;} +dl.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +dl.sortsite a:hover{text-decoration: none;} +dl.sortsite dt.click{background-position: 0 -31px;} +dl.sortsite dt.dt-left{border-left: 1px solid #e7e9ea;} +dl.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +dl.sortsite dt a{_margin-left: 20px; font-weight: 600; padding-right: 10px;color: #555555;text-indent: 0px; _width: 89%;} +dl.sortsite dt a:hover{text-decoration: none;} +dl.sortsite dt .more-content{float: left;margin-left: 10px;font-weight: 400;color: #3dc094;} +dl.sortsite dd{ overflow: hidden;border-left: none; border-right: 1px dashed #eaebeb;} +dl.sortsite dd a{color: #595959;line-height:31px; height:31px; width:100%; padding-right: 3px;border-right: 3px solid #fafafc;text-indent: 0px;} +dl.sortsite dd a:hover{ background:#e8eaeb;border-right: 3px solid #00ac73;} +dl.sortsite dd.dd-right{border-right: none;} +dl.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} +dl.sortsite .link-name{margin-right: 7px;} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl.css new file mode 100755 index 000000000..e5a3675fc --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl.css @@ -0,0 +1,63 @@ + + +/** 分类导航区样式 */ +.box-sort {overflow: hidden;} +.sortsite{ white-space: nowrap; overflow: hidden; border: 1px solid #E3E5E6; border-bottom:1px solid #dcddde; background: #fafcfc;} +.sortsite dt{ height: 30px; line-height: 30px; border-bottom: 1px solid #EDEFF0; color: #23C098; font-size: 14px; overflow: hidden; position: relative; background:url(../img/btn-normal-bg.png?__sprite) repeat-x;} +.sortsite dt.hover{border-bottom: 1px solid #cfd0d1; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); -o-box-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 1px 2px rgba(0,0,0,0.2);} +.sortsite a:hover{text-decoration: none;} +.sortsite dt.click{background-position: 0 -31px;} +.sortsite a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.sortsite dt a{_margin-left: 20px; font-weight: 600; padding-right: 10px;color: #49b18e;text-indent: 0px; _width: 89%;} +.sortsite dt a:hover{text-decoration: underline;} +.sortsite dt .more-content{float: left;margin-left: 10px;font-weight: 400;color: #3dc094;} +.sortsite dd{ overflow: hidden;border-left:1px solid #fff;border-right:1px solid #fff;} +.sortsite dd a{color: #595959;line-height:31px; height:31px; width:100%; padding-right: 3px;border-right: 3px solid #fafafc;text-indent: 0px;} +.sortsite dd a:hover{ background:#e8eaeb;border-right: 3px solid #00ac73;} +.sortsite_more{ font-family: Verdana; text-align: right; text-indent: 0; background: #F9FAFA; position: absolute; right: 0px; top: 0; float: right;} +.sortsite .link-name{margin-right:7px} +.sortsites-tabs-container{ display: none;} + +/*新版 可配置气泡*/ +.confAbleRed, .confAbleRed em, .confAbleRed span, .confAbleRed i, +.confAbleGreen, .confAbleGreen em, .confAbleGreen span, .confAbleGreen i{ + display: inline-block; + *display: inline; + *zoom:1; + color: #fff; + vertical-align: middle; + height: 15px; +} +.confAbleRed em, .confAbleGreen em{ + float: right; + width: 8px; + +} +.confAbleRed i, .confAbleGreen i{ + width: 5px; + float: right; + +} +.confAbleRed span, .confAbleGreen span{ + float: right; + line-height: 14px; + font-size: 11px; +} +.confAbleRed em{ + background: url(../img/tips-front-bg-rtl.png?__sprite); +} +.confAbleGreen em{ + background: url(../img/tips-front-bg-rtl-green.png?__sprite); +} +.confAbleRed i{ + background: url(../img/tips-back-bg-rtl.png?__sprite); +} +.confAbleGreen i{ + background: url(../img/tips-back-bg-rtl-green.png?__sprite); +} +.confAbleRed span{ + background: url(../img/tips-middle-bg.png?__sprite) repeat-x; +} +.confAbleGreen span{ + background: url(../img/tips-middle-bg-green.png?__sprite) repeat-x; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl.more.css new file mode 100755 index 000000000..36c75e9c8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/rtl/rtl.more.css @@ -0,0 +1,47 @@ +.sortsites-tabs-container{display:block !important; } +div.sortsites-tabs-container{*display:none !important;} + +/*分类区快速导航栏*/ +.sortsite.select{border-color: #FF8C00;border-width:1px 2px;} +.sortsites-tabs-container{position: relative;overflow: visible;*display:none;} +.sortsites-tabs{width: 708px;height: 30px;line-height: 30px;background:url(../img/btn-normal-bg.png?__sprite) repeat-x;margin-top: 10px;font-size: 12px;padding-top: 2px;overflow: hidden;} +.sortsites-tabs i,.sortsites-tabs-container i{display: inline-block;height: 20px;width: 23px;margin-bottom: -3px;background-image:url(../img/i-sortsites-tabs.png);background-repeat: no-repeat;} +.sortsites-tabs a:hover{color: #49B18E;text-decoration: underline;} +.sortsites-tabs .tab-lists{position: relative;min-width: 55%;max-width:55%;float: right;padding-left: 10px;top:0px;} +.sortsites-tabs .tab-lists li{float: right;min-width: 21%;max-width: 33%;height: 30px;text-align: center;padding: 0 1px;} +.sortsites-tabs .tab-lists a:hover{text-decoration: none;} +.sortsites-tabs .tab-item{display: inline-block;width: 100%;text-overflow:ellipsis;white-space:nowrap;overflow: hidden;} +.sortsites-tabs-refresh{float: left;padding-right: 8px;} +.sortsites-tabs-refresh i{background-position: -84px 1px;margin-top: 4px;margin-right: 5px;float: left;display: inline-block;} +.sortsites-tabs-description{position: relative;float: right;padding-right: 15px;font-weight: bold;margin-left: -1px;margin-top: -1px;} +.sortsites-tabs-description i{background-position: -169px 1px;} +.sortsites-tabs-container .bubble-like{position: absolute;display: none;bottom: 30px;right: -40px;background-image:url(../img/i-sortsites-tabs.png);background-repeat: no-repeat;background-position: 0 -20px;height: 33px;min-width: 230px;z-index: 9;font-weight: bold;color: white;padding-top: 2px;} +.sortsites-tabs-container .bubble-like i{background-position: -119px 2px;margin-bottom: -2px;margin-left: 3px;float: right;} +.sortsites-tabs-container .bubble-like span{float: left;margin-top: 5px;margin-left: 10px;display: inline-block;} +.sortsites-tabs-container i.i-hover{background-position: -146px 2px;margin-bottom: -3px;margin-left: 3px;cursor: pointer;} +.sortsite_sep{border-left: 1px solid #E6E6E6;display: block;float: right;height: 14px;line-height: 6px;margin-left: -1px;margin-top: 8px;position: relative;z-index: 0;} +ul.block_sep {background:url(../img/btn-normal-bg.png?__sprite);background-repeat: repeat-y;display: block;height: 100%;right: 1px;position: absolute;top: -10px;width: 1px;z-index: 1;} +.sortsite .link-name{margin-right: 7px;} + +.box-onesort-big {position: relative;} +div.box-onesort-big dd a{width: 242px;color:#a9a9a9;} +.box-onesort-big .link-name{font-weight: bold;} +.box-onesort-big dd a.have-pre-icon{width: 222px;} +.box-onesort-big .link-name{color: #595959;} +.box-onesort-big .link-description{margin-right: 10px;font-size: 12px;font-weight: normal;} +.box-onesort-big .i-sort-big {display: block;position: absolute;left: 25px;bottom: 20px;} + +/*cool sort big image*/ +.box-onesort-big .i-sort-big{background-image: url("../img/i-onesort-big.png");} +.i-sort-big.i-sort-games {width: 71px;height: 54px;background-position: -54px -243px;} +.i-sort-big.i-sort-gameweb {width: 61px;height: 56px;background-position: 0 -63px;} +.i-sort-big.i-sort-image {width: 63px;height: 63px;background-position: 0px 0px;} +.i-sort-big.i-sort-tv {width: 59px;height: 56px;background-position: -63px -297px;} +.i-sort-big.i-sort-movie {width: 53px;height: 60px;background-position: 0px -119px;} +.i-sort-big.i-sort-tieba {width: 61px;height: 61px;background-position: -62px -180px;} +.i-sort-big.i-sort-bank {width: 63px;height: 57px;background-position: 0px -296px;} +.i-sort-big.i-sort-music {width: 63px;height: 63px;background-position: -63px 0px;} +.i-sort-big.i-sort-menhu {width: 61px;height: 56px;background-position: -61px -63px;} +.i-sort-big.i-sort-sports {width: 54px;height: 54px;background-position: 0px -242px;} +.i-sort-big.i-sort-software {width: 60px;height: 60px;background-position: -53px -119px;} +.i-sort-big.i-sort-shopping {width: 62px;height: 63px;background-position: 0px -179px;} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/sortsite-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/sortsite-async.js new file mode 100755 index 000000000..b88b9632b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/sortsite-async.js @@ -0,0 +1,143 @@ +// for the title's effects of sort sites area +var $ = require('common:widget/ui/jquery/jquery.js'), + UT = require('common:widget/ui/ut/ut.js'), + helper = require("common:widget/ui/helper/helper.js"), + hex_md5 = require('common:widget/ui/md5/md5.js'); + +$(".box-sort").on( "mouseenter", "dt", function(){ + $(this).addClass("hover"); + }) + .on( "mouseleave", "dt", function(){ + $(this).removeClass("hover click"); + }) + .on( "mousedown mouseup", "dt", function(){ + $(this).toggleClass("click"); + }); + +!function(){ + //api数据介入 + conf.sortsite.apiIntervention.length && getApiParam(); + + function getApiParam(){ + + var category = [], + params = "?act=contents&app=gensimple&country="+conf.country+"&category=#{category}&num=#{num}"; + + $("dl.sortsite dt").each(function(i){ + var $this = $(this); + $this.attr("apiCategory") && category.push({"apiCategory":$this.attr("apiCategory"),"num":$this.attr("apiNum"),"index":i}); + + }); + + for (var i = 0; i < category.length; i++) { + var param = ""; + + param = helper.replaceTpl(params,{"category":category[i].apiCategory,"num":category[i].num || "5"}); + getApiData(param,category[i].apiCategory,category[i].index); + + } + } + + function getApiData( param,category,index ){ + $.ajax({ + url:conf.apiUrlPrefix+param, + dataType: "jsonp", + async:false, + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(param,16), + cache: false, + + success:function(result){ + renderSortsiteApiData({apiData:result.content.data.contents[category],index:index}); + }, + error:function(){ + + } + }); + } + + function renderSortsiteApiData( result ){ + var el = $("dl.sortsite").eq(result.index); + + el.find("dd").each(function(i){ + if( i >= result.apiData.length){ + return false; + } + var $this = $(this); + $this.find("a").attr("href",result.apiData[i].url); + $this.find(".link-name").text(result.apiData[i].name); + }); + } + + //($(".tab-lists").css("height")=="120px") && $(".tab-lists li").css("width","33%"); + if(!$(".sortsites-tabs-container").length){ return;} + conf.sortsite.show && !$.cookie("sortsiteBubble") && $(".bubble-like").show(); + + //tab换组,循环关系 + $(".sortsites-tabs-refresh").click(function(e){ + e.preventDefault(); + var tabList = $(this).parent().find(".tab-lists"), + listLength = -parseInt(tabList.css("height"),10), + top = parseInt(tabList.css("top"),10)-30; + UT.send({ + position: "sortsitesTabRefresh", + modId: "sortsites", + type: "click" + }); + top = (top == listLength)?0:top; + top == 0 && tabList.css("top","30px"); + !tabList.is(":animated") && tabList.animate({"top":top+"px"}); + }); + //根据itemIndex来确定需要跳转的分类区 + $(".tab-item").click(function(e){ + e.preventDefault(); + var itemIndex = $(this).attr("item-index"), + itemOffSet = 0, + body = $( "body" ), + win = $( window ), + // isHeadCeiled = body.hasClass( "header-fixed" ), + isSearchboxCeiled = body.hasClass( "header-fixed-up" ); + //itemOffSet = (parseInt((index+1)/2,10)-1)*260+420; + UT.send({ + position: "sortsitesTabItem", + modId: "sortsites", + type: "click", + modIndex: itemIndex + }); + $(".sortsite").removeClass("select"); + $("dl.sortsite").each(function(){ + var $this = $(this); + if(itemIndex == $this.attr("log-index")){ + itemOffSet = $this.offset().top; + $this.addClass("select"); + return false; + } + }); + if( that.navOpt.newHeader && that.navOpt.isCeiling === "1" ){ + if( that.navOpt.ceilingMore == "1" && !isSearchboxCeiled ){ + win.scrollTop( itemOffSet - ( parseInt( that.navOpt.paddingTop1 ) || 140 ) ); + }else{ + win.scrollTop( itemOffSet - ( parseInt( that.navOpt.paddingTop ) || 45 ) ); + } + }else{ + win.scrollTop( itemOffSet - 50 ); + } + // $(window).scrollTop(itemOffSet-50); + + }); + $(".bubble-like i").on({ + mouseenter: function () { + $(this).addClass("i-hover"); + }, + mouseleave: function () { + $(this).removeClass("i-hover"); + }, + click:function(){ + $(this).parent().hide(); + $.cookie("sortsiteBubble",1, {expires: 2000}); + } + }); + $(document.body).on("mousedown",function(){$(".sortsite").removeClass("select");}); + +}(); + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/sortsite.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/sortsite.tpl new file mode 100755 index 000000000..adf8e7d39 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/sortsite/sortsite.tpl @@ -0,0 +1,135 @@ +<%style%> +<%if $head.dir=='ltr'%> + <%if !empty($body.embedlv2sortsite) && $body.embedlv2sortsite.isHidden !== "true"%> + @import url(/widget/sortsite/ltr/ltr-sortsite-embedlv2.css?__inline"); + <%else%> + @import url('/widget/sortsite/ltr/ltr.css?__inline'); + <%/if%> + +<%else%> + <%if !empty($body.embedlv2sortsite) && $body.embedlv2sortsite.isHidden !== "true"%> + @import url(/widget/sortsite/rtl/rtl-sortsite-embedlv2.css?__inline"); + <%else%> + @import url('/widget/sortsite/rtl/rtl.css?__inline'); + <%/if%> +<%/if%> +<%/style%> + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> + <%require name="home:widget/sortsite/ltr/ltr.css"%> +<%else%> + <%require name="home:widget/sortsite/rtl/rtl.css"%> +<%/if%> + + <%if !empty($body.coolSort.tabDescription)%> +
                                            +
                                            + <%$body.coolSort.bubbleLike%> + +
                                            +
                                            + + + <%$body.coolSort.tabDescription%> + + + + + <%$body.coolSort.refreshDescription%> + +
                                            +
                                            + <%/if%> + +
                                            <%if $head.dir=='rtl' || !empty($head.sideBeLeft)%>s-mlm<%else%>s-mrm<%/if%><%/if%>" monkey="sortsites" <%if !empty($body.embedlv2sortsite.defaultShow) && $body.embedlv2sortsite.defaultShow !== "home"%>style="display:none;"<%/if%>> + + <%assign var=sortIndex value=-1%> + <%assign var=logIndex value=0%> + + <%foreach $body.coolSort.list as $listValue%> + <%if empty($listValue.isHidden)%> + + <%$logIndex = $logIndex +1%> + <%if !empty($listValue.bigSize)%> + <%$sortIndex = $sortIndex + 2%> + <%else%> + <%$sortIndex = $sortIndex + 1%> + <%/if%> + +
                                            + +
                                            <%else%><%if $head.dir=='rtl' || !empty($head.sideBeLeft)%>s-mlm<%else%>s-mrm<%/if%><%/if%> s-mtm s-pbs sortsite" log-mod="sortsites" log-index="<%$logIndex%>"> + <%if $sortIndex > 7%> + + <%/if%> +
                                            + <%if $sortIndex > 7%> + + <%/if%> + +
                                            + <%/if%> + <%/foreach%> + +
                                            + + <%script%> + conf.sortsite = { + show:"<%$body.coolSort.showBubble%>", + paddingTop:"<%$body.coolSort.paddingTop%>", + paddingTop1:"<%$body.coolSort.paddingTop1%>", + newHeader:"<%$body.headerTest.widget%>", + isCeiling:"<%$body.headerTest.isCeiling%>", + ceilingMore:"<%$body.headerTest.ceilingMore%>", + apiIntervention:"<%$body.coolSort.apiIntervention%>" || "" + }; + require.async('home:widget/sortsite/sortsite-async.js'); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-active.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-active.png new file mode 100755 index 000000000..80d691a7a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-active.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-disable.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-disable.png new file mode 100755 index 000000000..8aa582fd1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-disable.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-hover.png new file mode 100755 index 000000000..46828d23c Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-normal.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-normal.png new file mode 100755 index 000000000..d072ebd01 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-btn-normal.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-bg-n.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-bg-n.png new file mode 100755 index 000000000..7075ccc34 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-bg-n.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-bg.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-bg.png new file mode 100755 index 000000000..ba24c55e2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-bg.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-default.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-default.png new file mode 100755 index 000000000..10a029f7a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/fb-share-default.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/ltr/ltr.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/ltr/ltr.flow.css new file mode 100755 index 000000000..29d468f3f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/ltr/ltr.flow.css @@ -0,0 +1 @@ +@import url('/widget/speed-test/flow/speed-test.flow.css?__inline'); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/rtl/rtl.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/rtl/rtl.flow.css new file mode 100755 index 000000000..29d468f3f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/rtl/rtl.flow.css @@ -0,0 +1 @@ +@import url('/widget/speed-test/flow/speed-test.flow.css?__inline'); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/speed-test.flow.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/speed-test.flow.css new file mode 100755 index 000000000..2dfcf9c3e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/flow/speed-test.flow.css @@ -0,0 +1,51 @@ +.flow-on .speed-test, +.flow-on .speed-test_show, +.flow-on .speed-test_panel, +.flow-on .speed-test .speed-test_control, +.flow-on .speed-test--result .speed-test_result { + background-image: url(../panel-box-wide.jpg); +} +.flow-on .speed-test{ + background-position: 0 0; + /*width: 300px;*/ +} +.flow-on .speed-test_panel { + /*width: 300px;*/ +} +.flow-on .speed-test_needle { + left: 67px; +} +.flow-on .speed-test_chart_wrap { + left: 60px; +} +.flow-on .speed-test_bandwidth, +.flow-on .mod-magicbox .speed-test_bandwidth, +.flow-on #sidetoolbarContainer .speed-test_bandwidth{ + left: 71px; +} +.flow-on .speed-test--result .speed-test_result { + /*width: 300px;*/ +} +.flow-on .speed-test--result .speed-test_result_more { + left: 6px; +} +.flow-on .speed-test--result .speed-test_result_down { + margin-left: 57px; +} +.flow-on .mod-magicbox .speed-test, +.flow-on .mod-magicbox .speed-test_panel, +.flow-on .mod-magicbox .speed-test_control, +/*.flow-on .mod-magicbox .speed-test_result_more,*/ +.flow-on .mod-magicbox .speed-test_show, +.flow-on .mod-magicbox .speed-test--jp .speed-test--result .speed-test_result, +.flow-on #sidetoolbarContainer .speed-test, +.flow-on #sidetoolbarContainer .speed-test_panel, +.flow-on #sidetoolbarContainer .speed-test_control, +.flow-on #sidetoolbarContainer .speed-test .speed-test_control, +.flow-on #sidetoolbarContainer .speed-test--cover .speed-test_control, +.flow-on #sidetoolbarContainer .speed-test--error .speed-test_control, +/* .flow-on #sidetoolbarContainer .speed-test_result_more, */ +.flow-on #sidetoolbarContainer .speed-test_show, +.flow-on #sidetoolbarContainer .speed-test--result .speed-test_result{ + background-image: url(../panel-box-wide.jpg); +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/i_speedtest.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/i_speedtest.png new file mode 100755 index 000000000..4386a6953 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/i_speedtest.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/ltr/ltr.css new file mode 100755 index 000000000..9f22245fe --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/ltr/ltr.css @@ -0,0 +1,682 @@ +.speed-test_panel, +.speed-test_control, +.speed-test_result_more, +.speed-test_show, +.speed-test--result .speed-test_result{ + background: url(../panel.jpg); +} + +.speed-test_needle { + background: url(../needle.png); +} + +.speed-test_panel { + background-color: #DEE6E6; + border-bottom: 1px solid #F0F2F3; + position: relative; + overflow: hidden; + /*width: 240px;*/ + width: 100%; + height: 195px; + -ms-transition: height .3s ease-out; + -webkit-transition: height .3s ease-out; + -moz-transition: height .3s ease-out; + -o-transition: height .3s ease-out; + transition: height .3s ease-out; +} + +.speed-test_needle { + width: 92px; + height: 20px; + position: absolute; + left: 37px; + top: 102px; + transform: rotate(6deg); + transform-origin: 90% 42%; + -ms-transform: rotate(6deg); + -ms-transform-origin: 90% 42%; + -webkit-transform: rotate(6deg); + -webkit-transform-origin: 90% 42%; + -moz-transform: rotate(6deg); + -moz-transform-origin: 90% 42%; + -o-transform: rotate(6deg); + -o-transform-origin: 90% 42%; + -ms-transition: -ms-transform .3s ease-out; + -webkit-transition: -webkit-transform .3s ease-out; + -moz-transition: -moz-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; +} + +.speed-test_chart_wrap { + width: 85px; + height: 27px; + position: absolute; + left: 30px; + top: 150px; + background: #fff; + overflow: hidden; + display: none\0; + *display: none; + -moz-box-shadow: 1px 1px 1px #999 inset; + -webkit-box-shadow: 1px 1px 1px #999 inset; + box-shadow: 1px 1px 1px #999 inset; +} + +.speed-test_chart_wrap canvas { + position: absolute; + bottom: 0; +} + +.speed-test_bandwidth { + width: 54px; + position: absolute; + display: inline-block; + top: 129px; + left: 37px; + *left: 34px; + color: #fff; + -webkit-text-size-adjust: none; + font: 11px "courier new",Tahoma; + letter-spacing: 4px; + text-align: right; +} + +.speed-test_hide { + width: 25px; + height: 25px; + position: absolute; + top: 0; + right: 0; + text-decoration: none; +} + +.speed-test_control { + height: 61px; + background-color: #16A462; + background-position: 0 -233px; + color: #fff; + text-shadow: 1px 2px 1px #009E69; + position: relative; +} + +.speed-test_btn { + width: 95px; + height: 25px; + line-height: 25px; + float: right; + _display: inline; + position: relative; + z-index: 1; + margin: 24px 8px 0 0; + border: 1px solid #009E69; + text-align: center; + text-shadow: none; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background-image: -moz-linear-gradient(top,#fefefe 0,#dde4ec 100%); + background-image: -webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#fefefe),color-stop(1,#dde4ec)); + background-image: -webkit-linear-gradient(top,#fefefe 0,#dde4ec 100%); + background-image: -o-linear-gradient(top,#fefefe 0,#dde4ec 100%); + background-image: -ms-linear-gradient(top,#fefefe 0,#dde4ec 100%); + background-image: linear-gradient(top,#fefefe 0,#dde4ec 100%); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fffefefe, endColorstr=#ffdde4ec, GradientType=0)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fffefefe, endColorstr=#ffdde4ec, GradientType=0); +} + +.speed-test_btn a { + width: 100%; + height: 25px; + text-decoration: none; + color: #333; + font: bold 13px Tahoma; + display: inline-block; + cursor: pointer; + vertical-align: top; + line-height: 25px; +} + +.speed-test_start { + position: relative; +} + +.speed-test_progress { + width: 0; + height: 25px; + overflow: hidden; + position: absolute; + left: 0; + background-image: -moz-linear-gradient(top,#fbad7e 0,#f87d33 100%); + background-image: -webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#fbad7e),color-stop(1,#f87d33)); + background-image: -webkit-linear-gradient(top,#fbad7e 0,#f87d33 100%); + background-image: -o-linear-gradient(top,#fbad7e 0,#f87d33 100%); + background-image: -ms-linear-gradient(top,#fbad7e 0,#f87d33 100%); + background-image: linear-gradient(top,#fbad7e 0,#f87d33 100%); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fffbad7e, endColorstr=#fff87d33, GradientType=0)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fffbad7e, endColorstr=#fff87d33, GradientType=0); +} + +.speed-test_result { + position: absolute; + bottom: 0; + left: 0; +} + +.speed-test_result em { + width: 90px; + height: 33px; + margin-right: 3px; + font-style: normal; + font: 24px Tahoma; + display: inline-block; + overflow: hidden; + text-align: right; + vertical-align: bottom; +} + +.speed-test_result span { + min-width: 30px; + font-style: italic; + font-size: 11px; + position: absolute; + bottom: 5px; +} + +.speed-test_result_more { + /*width: 240px;*/ + width: 100%; + height: 32px; + background-position: 0 -195px; + display: none; + position: relative; + top: -20px; + padding-top: 17px; +} + +.speed-test_ip { + width: 100px; + position: absolute; + right: 0; + top: 8px; + z-index: 9; + -webkit-text-size-adjust: none; + font: 11px Tahoma; + display: inline-block; +} + +.speed-test_show { + width: 100%; + height: 19px; + background-position: 0 -356px; + cursor: pointer; + display: none; +} + +.speed-test_info { + width: 115px; + height: 52px; + line-height: 1.1; + font-size: 15px; + margin-left: 7px; + margin-top: 5px; + z-index: 10; + font-family: tahoma; + display: none; + position: absolute; + background: #00B075; +} + +.speed-test--cover .speed-test_panel { + height: 0; +} + +.speed-test--cover .speed-test_result { + display: none; +} + +.speed-test--cover .speed-test_control { + background-position: 0 -296px; +} + +.speed-test--hide .speed-test_panel { + height: 0; +} + +.speed-test--hide .speed-test_show { + display: block; +} + +.speed-test--result .speed-test_result_more { + display: block; +} + +.speed-test--result .speed-test_chart_wrap { + z-index: 9; + top: auto; + bottom: 0; + left: 141px; +} + +.speed-test--error .speed-test_info { + display: inline-block; + font-size: 12px; +} + +.speed-test_ip,.speed-test_showtime,.speed-test_result_t,.speed-test_result_info { + display: none; +} + +.speed-test_result_t { + padding-left: 70px; + height: 30px; + line-height: 30px; + text-shadow: none; +} + +.speed-test_hide { + z-index: 9; +} + +.speed-test--result .speed-test_result { + background-position: 0 -389px; + /*width: 240px;*/ + width: 100%; + height: 255px; +} + +.speed-test--result .speed-test_result_more { + background: 0; +} + +.speed-test_result_info { + color: #474748; + text-shadow: none; + line-height: 30px; + padding-left: 10px; + padding-top: 5px; +} + +.speed-test_result_info a { + color: #474748; + text-decoration: underline; +} + +.speed-test_result_info li { + background: url(../i_speedtest.png) -38px 3px no-repeat; + padding-left: 12px; +} + +.speed-test_ip { + color: #474748; + text-shadow: none; + width: 120px; + line-height: 18px; + left: 10px; + bottom: 10px; + top: auto; +} + +.speed-test_ip p { + color: #999; +} + +.speed-test_ip span { + font-style: normal; + position: static; +} + +.speed-test--result em { + font-size: 18px; +} + +.speed-test--result .speed-test_result_more { + width: 100px; + top: 15px; + padding-top: 17px; + float: left; + left: -10px; +} + +.speed-test--result .speed-test_result span { + top: 69px; +} + +.speed-test--result .speed-test_result_more span { + top: 23px; +} + +.speed-test--result .speed-test_result_bandwidth { + top: 0; +} + +.speed-test--result .speed-test_result_down { + margin-left: 15px; + margin-top: 32px; +} + +.speed-test_faster em { + width: auto; + bottom: -5px; + position: relative; + color: #ff1f19; + font-weight: bold; +} + +.speed-test_grade span { + position: relative; + top: auto!important; + bottom: -5px; + left: 10px; +} + +.speed-test_grade i { + background: url(../i_speedtest.png) 0 0; + width: 22px; + height: 26px; + display: inline-block; + margin-right: 3px; +} + +.speed-test--result .speed-test_btn { + border-color: #ccc; +} + +.speed-test--result .speed-test_chart_wrap { + display: none; +} + +.speed-test--result .speed-test_result_t,.speed-test--result .speed-test_ip,.speed-test--result .speed-test_showtime,.speed-test--result .speed-test_result_info { + display: block; +} + +.speed-test_result_more{ background: none;} + +/*jp*/ +.speed-test--jp .speed-test_panel, +.speed-test--jp .speed-test_control, +.speed-test--jp .speed-test_result_more, +.speed-test--jp .speed-test_show, +.speed-test--jp .speed-test--result .speed-test_result{ + background-image: url(../panel-jp.jpg); +} +/*.speed-test--jp .speed-test--result .speed-test_result { + background: url(../panel-jp.jpg) 0 -389px; +} + +.speed-test--jp .speed-test_control { + background-position: 0 -296px; +} +.speed-test--jp .speed-test--result .speed-test_control { + background-position: 0 -233px; +} + +*/ +.speed-test--jp .speed-test_result_more{ + background: none; +} + +/*image ad in result panel*/ +.speed-test_result_info .speed-test_imagead{ + margin-right: 10px; + border-top: 1px solid #e5e6e6; + border-bottom: 1px solid #f3f4f7; + background: none; + padding-left: 0; +} +.speed-test_imagead-inner{ + padding-top: 6px; + padding-left: 12px; + border-top: 1px solid #f3f4f7; + border-bottom: 1px solid #e5e6e6; + overflow: hidden; +} +.speed-test-adpic{ + float: left; + width: 63px; + height: 69px; +} +.speed-test-adtext{ + overflow: hidden; + zoom: 1; + padding-left: 15px; + padding-top: 3px; + line-height: 1.4; +} +.speed-test-addesc, +.speed-test-adlink{ + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + width: 100%; + /* word-wrap: break-word;*/ + word-break: break-all; + display: inline-block; +} +.speed-test_result_info .speed-test-adlink{ + color: #01ad82; + padding-bottom: 7px; + padding-top: 4px; + display: block; + text-decoration: none; +} +.speed-test-adlink:hover, +.speed-test-adlink:hover .arrow_r{ + text-decoration: underline; +} + +/*显示模块*/ +.side-mod-preload-speed-test{ + border:0!important; + background: transparent!important; +} +.side-mod-preload-speed-test > *{ + visibility: visible!important; +} + +/*facebook share button*/ +.speed-test_fbshare{ + height: 37px; + margin-top: 15px; + text-align: center; + display:none; +} +.speed-test--result .speed-test_fbshare{ + display: block; +} +.speed-test_fbshare .ui-o{ + width: 36px; + height: 36px; + display: none; +} +.speed-test_fbsharebtn{ + display: inline-block; + height: 100%; + outline: 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + vertical-align: middle; +} +.speed-test_fbshare strong{ + padding: 0 21px 0 16px; + font-size: 20px; + font-weight: normal; + line-height: 37px; + float: right; + text-shadow: none; +} +.speed-test_fbshare i{ + background: url(../fb-btn-normal.png?__sprite); + width: 37px; + height: 37px; + display: inline-block; +} +.speed-test_fbsharebtn:hover i{ + background: url(../fb-btn-hover.png?__sprite); +} +.speed-test_fbsharebtn:active i{ + background: url(../fb-btn-active.png?__sprite); +} +.gradient-bg-darkblue { + color: #fff; + font-weight: 600; + text-align: center; + background-color: #7d94d5; + background-image: -moz-linear-gradient(top,#7d94d5,#425fb0 100.0%); + background-image: -webkit-linear-gradient(top,#7d94d5,#425fb0 100.0%); + background-image: -o-linear-gradient(top,#7d94d5,#425fb0 100.0%); + background-image: -ms-linear-gradient(top,#7d94d5,#425fb0 100.0%); + background-image: linear-gradient(top,#7d94d5,#425fb0 100.0%); + border:none; +} +a.gradient-bg-darkblue{ + color: #fff; +} +.gradient-bg-darkblue:hover { + background-color: #8ca2e2; + background-image: -moz-linear-gradient(top,#8ca2e2,#5571c1 100.0%); + background-image: -webkit-linear-gradient(top,#8ca2e2,#5571c1 100.0%); + background-image: -o-linear-gradient(top,#8ca2e2,#5571c1 100.0%); + background-image: -ms-linear-gradient(top,#8ca2e2,#5571c1 100.0%); + background-image: linear-gradient(top,#8ca2e2,#5571c1 100.0%); + /* -webkit-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); + -moz-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); + -o-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); + -ms-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); + box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); */ +} +.gradient-bg-darkblue:active { + background-color: #5572c2; + background-image: -moz-linear-gradient(top,#3b58a8,#5572c2 100.0%); + background-image: -webkit-linear-gradient(top,#3b58a8,#5572c2 100.0%); + background-image: -o-linear-gradient(top,#3b58a8,#5572c2 100.0%); + background-image: -ms-linear-gradient(top,#3b58a8,#5572c2 100.0%); + background-image: linear-gradient(top,#3b58a8,#5572c2 100.0%); +} +.speed-test_fbshare-disable, +.speed-test_fbshare-disable:hover, +.speed-test_fbshare-disable:active{ + background: #c0c0c0; + cursor: default; +} +.speed-test_fbshare-disable i, +.speed-test_fbshare-disable:hover i, +.speed-test_fbshare-disable:active i{ + background: url(../fb-btn-disable.png?__sprite); +} + +/*speedtest in magicbox*/ +.mod-magicbox .speed-test, +.mod-magicbox .speed-test_show, +.mod-magicbox .speed-test_panel, +.mod-magicbox .speed-test .speed-test_control, +.mod-magicbox .speed-test--result .speed-test_result, +#sidetoolbarContainer .speed-test, +#sidetoolbarContainer .speed-test_show, +#sidetoolbarContainer .speed-test_panel, +#sidetoolbarContainer .speed-test .speed-test_control, +#sidetoolbarContainer .speed-test--result .speed-test_result, +.mod-custom-sidebar .speed-test, +.mod-custom-sidebar .speed-test_show, +.mod-custom-sidebar .speed-test_panel, +.mod-custom-sidebar .speed-test .speed-test_control, +.mod-custom-sidebar .speed-test--result .speed-test_result{ + background-image: url(../panel-box.jpg); +} + +.mod-magicbox .speed-test, +#sidetoolbarContainer .speed-test, +.mod-custom-sidebar .speed-test{ + background-position: 0 0; + padding-top: 15px; + /*margin-left: -2px;*/ + margin-top:-1px; + /*width: 240px;*/ + width: 100%; +} + +.mod-magicbox .speed-test_panel, +.mod-custom-sidebar .speed-test_panel, +#sidetoolbarContainer .speed-test_panel{ + background-position: 0 -14px; + padding-bottom: 17px; + height: 195px; +} +.mod-magicbox .speed-test .speed-test_control, +.mod-custom-sidebar .speed-test .speed-test_control, +#sidetoolbarContainer .speed-test .speed-test_control{ + background-position: 0 -266px; + height: 72px; +} +.mod-magicbox .speed-test--cover .speed-test_control, +.mod-custom-sidebar .speed-test--cover .speed-test_control, +#sidetoolbarContainer .speed-test--cover .speed-test_control{ + /*background-image: url(../panel-box.jpg);*/ + background-position: 0 -339px; +} +.mod-magicbox .speed-test_bandwidth, +.mod-custom-sidebar .speed-test_bandwidth, +#sidetoolbarContainer .speed-test_bandwidth{ + left: 41px; +} +.mod-magicbox .speed-test_info, +.mod-custom-sidebar .speed-test_info, +#sidetoolbarContainer .speed-test_info{ + height: 52px; + margin-top: 13px; + margin-left: 10px; +} +.mod-magicbox .speed-test_btn, +.mod-custom-sidebar .speed-test_btn, +#sidetoolbarContainer.speed-test_btn{ + margin-top:32px; +} +.mod-magicbox .speed-test_hide, +.mod-custom-sidebar .speed-test_hide, +.#sidetoolbarContainer .speed-test_hide{ + display:none; +} +.mod-magicbox .speed-test_result, +.mod-custom-sidebar .speed-test_result, +#sidetoolbarContainer .speed-test_result{ + margin-bottom:5px; +} +.mod-magicbox .speed-test--result .speed-test_result, +.mod-custom-sidebar .speed-test--result .speed-test_result, +#sidetoolbarContainer .speed-test--result .speed-test_result{ + background-position: 0 -427px; + height: 300px; + margin-bottom:0; +} +.mod-magicbox .speed-test--result .speed-test_result_more, +.mod-custom-sidebar .speed-test--result .speed-test_result_more, +#sidetoolbarContainer .speed-test--result .speed-test_result_more{ + background: 0; +} +/*jp*/ +.mod-magicbox .speed-test--jp .speed-test, +.mod-magicbox .speed-test--jp .speed-test_panel, +.mod-magicbox .speed-test--jp .speed-test_control, +.mod-magicbox .speed-test--jp .speed-test_result_more, +.mod-magicbox .speed-test--jp .speed-test_show, +.mod-magicbox .speed-test--jp .speed-test--result .speed-test_result, +#sidetoolbarContainer .speed-test--jp .speed-test, +#sidetoolbarContainer .speed-test--jp .speed-test_panel, +#sidetoolbarContainer .speed-test--jp .speed-test_control, +#sidetoolbarContainer .speed-test--jp .speed-test_result_more, +#sidetoolbarContainer .speed-test--jp .speed-test_show, +#sidetoolbarContainer .speed-test--jp .speed-test--result .speed-test_result, +.mod-custom-sidebar .speed-test--jp .speed-test, +.mod-custom-sidebar .speed-test--jp .speed-test_panel, +.mod-custom-sidebar .speed-test--jp .speed-test_control, +.mod-custom-sidebar .speed-test--jp .speed-test_result_more, +.mod-custom-sidebar .speed-test--jp .speed-test_show, +.mod-custom-sidebar .speed-test--jp .speed-test--result .speed-test_result{ + background-image: url(../panel-box-jp.jpg); +} +.mod-magicbox .speed-test--jp .speed-test--result .speed-test_result_more, +.mod-custom-sidebar .speed-test--jp .speed-test--result .speed-test_result_more, +#sidetoolbarContainer .speed-test--jp .speed-test--result .speed-test_result_more{ + background: 0; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/needle.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/needle.png new file mode 100755 index 000000000..80c0f4a2b Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/needle.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box-jp.jpg b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box-jp.jpg new file mode 100755 index 000000000..8dfcad921 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box-jp.jpg differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box-wide.jpg b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box-wide.jpg new file mode 100755 index 000000000..128719c81 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box-wide.jpg differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box.jpg b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box.jpg new file mode 100755 index 000000000..e110f4daa Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-box.jpg differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-jp.jpg b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-jp.jpg new file mode 100755 index 000000000..441ec0d02 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-jp.jpg differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-wide.jpg b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-wide.jpg new file mode 100755 index 000000000..87cf3cd95 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel-wide.jpg differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel.jpg b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel.jpg new file mode 100755 index 000000000..aa3074036 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/panel.jpg differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/rtl/rtl.css new file mode 100755 index 000000000..9b810c729 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/rtl/rtl.css @@ -0,0 +1,648 @@ +.speed-test_panel, +.speed-test_control, +.speed-test_result_more, +.speed-test_show, +.speed-test--result .speed-test_result{ + background: url(../panel.jpg); +} + +.speed-test{ direction: ltr;} + +.speed-test_needle { + background: url(../needle.png); +} + +.speed-test_panel { + background-color: #DEE6E6; + border-bottom: 1px solid #F0F2F3; + position: relative; + overflow: hidden; + /*width: 240px;*/ + width: 100%; + height: 195px; + -ms-transition: height .3s ease-out; + -webkit-transition: height .3s ease-out; + -moz-transition: height .3s ease-out; + -o-transition: height .3s ease-out; + transition: height .3s ease-out; +} + +.speed-test_needle { + width: 92px; + height: 20px; + position: absolute; + left: 37px; + top: 102px; + transform: rotate(6deg); + transform-origin: 90% 42%; + -ms-transform: rotate(6deg); + -ms-transform-origin: 90% 42%; + -webkit-transform: rotate(6deg); + -webkit-transform-origin: 90% 42%; + -moz-transform: rotate(6deg); + -moz-transform-origin: 90% 42%; + -o-transform: rotate(6deg); + -o-transform-origin: 90% 42%; + -ms-transition: -ms-transform .3s ease-out; + -webkit-transition: -webkit-transform .3s ease-out; + -moz-transition: -moz-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; +} + +.speed-test_chart_wrap { + width: 85px; + height: 27px; + position: absolute; + left: 30px; + top: 150px; + background: #fff; + overflow: hidden; + display: none\0; + *display: none; + -moz-box-shadow: 1px 1px 1px #999 inset; + -webkit-box-shadow: 1px 1px 1px #999 inset; + box-shadow: 1px 1px 1px #999 inset; +} + +.speed-test_chart_wrap canvas { + position: absolute; + bottom: 0; + left:0; +} + +.speed-test_bandwidth { + width: 54px; + position: absolute; + display: inline-block; + top: 129px; + left: 37px; + *left: 34px; + color: #fff; + -webkit-text-size-adjust: none; + font: 11px "courier new",Tahoma; + letter-spacing: 4px; + text-align: right; +} + +.speed-test_hide { + width: 25px; + height: 25px; + position: absolute; + top: 0; + right: 0; + text-decoration: none; +} + +.speed-test_control { + height: 61px; + background-color: #16A462; + background-position: 0 -233px; + color: #fff; + text-shadow: 1px 2px 1px #009E69; + position: relative; +} + +.speed-test_btn { + width: 95px; + height: 25px; + line-height: 25px; + float: right; + _display: inline; + position: relative; + z-index: 1; + margin: 24px 8px 0 0; + border: 1px solid #009E69; + text-align: center; + text-shadow: none; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background-image: -moz-linear-gradient(top,#fefefe 0,#dde4ec 100%); + background-image: -webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#fefefe),color-stop(1,#dde4ec)); + background-image: -webkit-linear-gradient(top,#fefefe 0,#dde4ec 100%); + background-image: -o-linear-gradient(top,#fefefe 0,#dde4ec 100%); + background-image: -ms-linear-gradient(top,#fefefe 0,#dde4ec 100%); + background-image: linear-gradient(top,#fefefe 0,#dde4ec 100%); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fffefefe, endColorstr=#ffdde4ec, GradientType=0)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fffefefe, endColorstr=#ffdde4ec, GradientType=0); +} + +.speed-test_btn a { + width: 100%; + height: 25px; + text-decoration: none; + color: #333; + font: bold 13px Tahoma; + display: inline-block; + cursor: pointer; + vertical-align: top; + line-height: 25px; +} + +.speed-test_start { + position: relative; +} + +.speed-test_progress { + width: 0; + height: 25px; + overflow: hidden; + position: absolute; + left: 0; + background-image: -moz-linear-gradient(top,#fbad7e 0,#f87d33 100%); + background-image: -webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#fbad7e),color-stop(1,#f87d33)); + background-image: -webkit-linear-gradient(top,#fbad7e 0,#f87d33 100%); + background-image: -o-linear-gradient(top,#fbad7e 0,#f87d33 100%); + background-image: -ms-linear-gradient(top,#fbad7e 0,#f87d33 100%); + background-image: linear-gradient(top,#fbad7e 0,#f87d33 100%); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fffbad7e, endColorstr=#fff87d33, GradientType=0)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fffbad7e, endColorstr=#fff87d33, GradientType=0); +} + +.speed-test_result { + position: absolute; + bottom: 0; + left: 0; + text-align: left; +} + +.speed-test_result em { + width: 90px; + height: 33px; + margin-right: 3px; + font-style: normal; + font: 24px Tahoma; + display: inline-block; + overflow: hidden; + text-align: right; + vertical-align: bottom; +} + +.speed-test_result span { + min-width: 30px; + font-style: italic; + font-size: 11px; + position: absolute; + bottom: 5px; +} + +.speed-test_result_more { + /*width: 240px;*/ + width: 100%; + height: 32px; + background-position: 0 -195px; + display: none; + position: relative; + top: -20px; + padding-top: 17px; +} + +.speed-test_ip { + width: 100px; + position: absolute; + right: 0; + top: 8px; + z-index: 9; + -webkit-text-size-adjust: none; + font: 11px Tahoma; + display: inline-block; +} + +.speed-test_show { + width: 100%; + height: 19px; + background-position: 0 -356px; + cursor: pointer; + display: none; +} + +.speed-test_info { + width: 115px; + height: 52px; + line-height: 1.1; + font-size: 15px; + margin-left: 7px; + margin-top: 5px; + z-index: 10; + font-family: tahoma; + display: none; + position: absolute; + background: #00B075; +} + +.speed-test--cover .speed-test_panel { + height: 0; +} + +.speed-test--cover .speed-test_result { + display: none; +} + +.speed-test--cover .speed-test_control { + background-position: 0 -296px; +} + +.speed-test--hide .speed-test_panel { + height: 0; +} + +.speed-test--hide .speed-test_show { + display: block; +} + +.speed-test--result .speed-test_result_more { + display: block; +} + +.speed-test--result .speed-test_chart_wrap { + z-index: 9; + top: auto; + bottom: 0; + left: 141px; +} + +.speed-test--error .speed-test_info { + display: inline-block; + font-size: 12px; +} + +.speed-test_ip,.speed-test_showtime,.speed-test_result_t,.speed-test_result_info { + display: none; +} + +.speed-test_result_t { + padding-left: 70px; + height: 30px; + line-height: 30px; + text-shadow: none; +} + +.speed-test_hide { + z-index: 9; +} + +.speed-test--result .speed-test_result { + background-position: 0 -389px; + /*width: 240px;*/ + width: 100%; + height: 255px; +} + +.speed-test--result .speed-test_result_more { + background: 0; +} + +.speed-test_result_info { + color: #474748; + text-shadow: none; + line-height: 30px; + padding-left: 10px; + padding-top: 5px; +} + +.speed-test_result_info a { + color: #474748; + text-decoration: underline; +} + +.speed-test_result_info li { + background: url(../i_speedtest.png) -38px 3px no-repeat; + padding-left: 12px; +} + +.speed-test_ip { + color: #474748; + text-shadow: none; + width: 120px; + line-height: 18px; + left: 10px; + bottom: 10px; + top: auto; +} + +.speed-test_ip p { + color: #999; +} + +.speed-test_ip span { + font-style: normal; + position: static; +} + +.speed-test--result em { + font-size: 18px; +} + +.speed-test--result .speed-test_result_more { + width: 100px; + top: 15px; + padding-top: 17px; + float: left; + left: -10px; +} + +.speed-test--result .speed-test_result span { + top: 69px; +} + +.speed-test--result .speed-test_result_more span { + top: 23px; +} + +.speed-test--result .speed-test_result_bandwidth { + top: 0; +} + +.speed-test--result .speed-test_result_down { + margin-left: 15px; + margin-top: 32px; +} + +.speed-test_faster em { + width: auto; + bottom: -5px; + position: relative; + color: #ff1f19; + font-weight: bold; +} + +.speed-test_grade span { + position: relative; + top: auto!important; + bottom: -5px; + left: 10px; +} + +.speed-test_grade i { + background: url(../i_speedtest.png) 0 0; + width: 22px; + height: 26px; + display: inline-block; + margin-right: 3px; +} + +.speed-test--result .speed-test_btn { + border-color: #ccc; +} + +.speed-test--result .speed-test_chart_wrap { + display: none; +} + +.speed-test--result .speed-test_result_t,.speed-test--result .speed-test_ip,.speed-test--result .speed-test_showtime,.speed-test--result .speed-test_result_info { + display: block; +} + +.speed-test_result_more{ background: none;} + +.speed-test_result_info li { + text-align: right; + padding-left: 0; + padding-right: 12px; + background: none; +} + +.speed-test_result_info { + padding-left: 0; + padding-right: 10px; +} + +.speed-test_grade span { + margin-right: 10px; +} +/*image ad in result panel*/ +.speed-test_result_info .speed-test_imagead{ + margin-left: 10px; + border-top: 1px solid #e5e6e6; + border-bottom: 1px solid #f3f4f7; + background: none; + padding-right: 0; +} +.speed-test_imagead-inner{ + padding-top: 6px; + padding-right: 12px; + border-top: 1px solid #f3f4f7; + border-bottom: 1px solid #e5e6e6; + overflow: hidden; +} +.speed-test-adpic{ + float: right; + width: 63px; + height: 69px; +} +.speed-test-adtext{ + overflow: hidden; + zoom: 1; + padding-right: 15px; + padding-top: 3px; + line-height: 1.4; +} +.speed-test-addesc, +.speed-test-adlink{ + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + width: 100%; + /*word-wrap: break-word;*/ + word-break: break-all; +} +.speed-test_result_info .speed-test-adlink{ + color: #01ad82; + padding-bottom: 7px; + padding-top: 4px; + display: block; + text-decoration: none; +} +.speed-test-adlink:hover, +.speed-test-adlink:hover .arrow_r{ + text-decoration: underline; +} + +/*显示模块*/ +.side-mod-preload-speed-test{ + border:0!important; + background: transparent!important; +} +.side-mod-preload-speed-test > *{ + visibility: visible!important; +} + +/*facebook share button*/ +.speed-test_fbshare{ + height: 37px; + margin-top: 15px; + text-align: center; + display:none; +} +.speed-test--result .speed-test_fbshare{ + display: block; +} +.speed-test_fbshare .ui-o{ + width: 36px; + height: 36px; + display: none; +} +.speed-test_fbsharebtn{ + display: inline-block; + height: 100%; + outline: 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + vertical-align: middle; +} +.speed-test_fbshare strong{ + padding: 0 21px 0 16px; + font-size: 20px; + font-weight: normal; + line-height: 37px; + float: right; + text-shadow: none; +} +.speed-test_fbshare i{ + background: url(../fb-btn-normal.png?__sprite); + width: 37px; + height: 37px; + display: inline-block; +} +.speed-test_fbsharebtn:hover i{ + background: url(../fb-btn-hover.png?__sprite); +} +.speed-test_fbsharebtn:active i{ + background: url(../fb-btn-active.png?__sprite); +} +.gradient-bg-darkblue { + color: #fff; + font-weight: 600; + text-align: center; + background-color: #7d94d5; + background-image: -moz-linear-gradient(top,#7d94d5,#425fb0 100.0%); + background-image: -webkit-linear-gradient(top,#7d94d5,#425fb0 100.0%); + background-image: -o-linear-gradient(top,#7d94d5,#425fb0 100.0%); + background-image: -ms-linear-gradient(top,#7d94d5,#425fb0 100.0%); + background-image: linear-gradient(top,#7d94d5,#425fb0 100.0%); + border:none; +} +a.gradient-bg-darkblue{ + color: #fff; +} +.gradient-bg-darkblue:hover { + background-color: #8ca2e2; + background-image: -moz-linear-gradient(top,#8ca2e2,#5571c1 100.0%); + background-image: -webkit-linear-gradient(top,#8ca2e2,#5571c1 100.0%); + background-image: -o-linear-gradient(top,#8ca2e2,#5571c1 100.0%); + background-image: -ms-linear-gradient(top,#8ca2e2,#5571c1 100.0%); + background-image: linear-gradient(top,#8ca2e2,#5571c1 100.0%); + /* -webkit-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); + -moz-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); + -o-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); + -ms-box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); + box-shadow: 1px 1px 2px 0 rgba(0,0,0,0.3); */ +} +.gradient-bg-darkblue:active { + background-color: #5572c2; + background-image: -moz-linear-gradient(top,#3b58a8,#5572c2 100.0%); + background-image: -webkit-linear-gradient(top,#3b58a8,#5572c2 100.0%); + background-image: -o-linear-gradient(top,#3b58a8,#5572c2 100.0%); + background-image: -ms-linear-gradient(top,#3b58a8,#5572c2 100.0%); + background-image: linear-gradient(top,#3b58a8,#5572c2 100.0%); +} +.speed-test_fbshare-disable, +.speed-test_fbshare-disable:hover, +.speed-test_fbshare-disable:active{ + background: #c0c0c0; + cursor: default; +} +.speed-test_fbshare-disable i, +.speed-test_fbshare-disable:hover i, +.speed-test_fbshare-disable:active i{ + background: url(../fb-btn-disable.png?__sprite); +} + +/*speedtest in magicbox*/ +.mod-magicbox .speed-test, +.mod-magicbox .speed-test_show, +.mod-magicbox .speed-test_panel, +.mod-magicbox .speed-test .speed-test_control, +.mod-magicbox .speed-test--result .speed-test_result, +.mod-custom-sidebar .speed-test, +.mod-custom-sidebar .speed-test_show, +.mod-custom-sidebar .speed-test_panel, +.mod-custom-sidebar .speed-test .speed-test_control, +.mod-custom-sidebar .speed-test--result .speed-test_result, +#sidetoolbarContainer .speed-test, +#sidetoolbarContainer .speed-test_show, +#sidetoolbarContainer .speed-test_panel, +#sidetoolbarContainer .speed-test .speed-test_control, +#sidetoolbarContainer .speed-test--result .speed-test_result{ + background-image: url(../panel-box.jpg); +} +.mod-magicbox .speed-test, +.mod-custom-sidebar .speed-test, +#sidetoolbarContainer .speed-test{ + background-position: 0 0; + padding-top: 15px; + /*margin-left: -2px;*/ + margin-top:-1px; + /*width: 240px;*/ + width: 100%; +} +.mod-magicbox .speed-test_panel, +.mod-custom-sidebar .speed-test_panel, +#sidetoolbarContainer .speed-test_panel{ + background-position: 0 -14px; + padding-bottom: 17px; + height: 195px; +} +.mod-magicbox .speed-test .speed-test_control, +.mod-custom-sidebar .speed-test .speed-test_control, +#sidetoolbarContainer .speed-test .speed-test_control{ + background-position: 0 -266px; + height: 72px; +} +.mod-magicbox .speed-test--cover .speed-test_control, +.mod-custom-sidebar .speed-test--cover .speed-test_control, +#sidetoolbarContainer .speed-test--cover .speed-test_control{ + /*background-image: url(../panel-box.jpg);*/ + background-position: 0 -339px; +} +.mod-magicbox .speed-test_bandwidth, +.mod-custom-sidebar .speed-test_bandwidth, +#sidetoolbarContainer .speed-test_bandwidth{ + left: 41px; +} +.mod-magicbox .speed-test_info, +.mod-custom-sidebar .speed-test_info, +#sidetoolbarContainer .speed-test_info{ + height: 52px; + margin-top: 13px; + margin-left: 10px; +} +.mod-magicbox .speed-test_btn, +.mod-custom-sidebar .speed-test_btn, +#sidetoolbarContainer.speed-test_btn{ + margin-top:32px; +} +.mod-magicbox .speed-test_hide, +.mod-custom-sidebar .speed-test_hide, +.#sidetoolbarContainer .speed-test_hide{ + display:none; +} +.mod-magicbox .speed-test_result, +.mod-custom-sidebar .speed-test_result, +#sidetoolbarContainer .speed-test_result{ + margin-bottom:5px; +} +.mod-magicbox .speed-test--result .speed-test_result, +.mod-custom-sidebar .speed-test--result .speed-test_result, +#sidetoolbarContainer .speed-test--result .speed-test_result{ + background-position: 0 -427px; + height: 300px; + margin-bottom:0; +} +.mod-magicbox .speed-test--result .speed-test_result_more, +.mod-custom-sidebar .speed-test--result .speed-test_result_more, +#sidetoolbarContainer .speed-test--result .speed-test_result_more{ + background: 0; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/speed-test.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/speed-test.tpl new file mode 100755 index 000000000..fa58bbd98 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/speed-test/speed-test.tpl @@ -0,0 +1,117 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/speed-test/ltr/ltr.css"%> <%else%> <%require name="home:widget/speed-test/rtl/rtl.css"%> <%/if%> + + + + <%if isset($body.speedTest)%> + +
                                            dir="<%$dir%>"<%/if%> class="speed-test speed-test--cover" id="speedTest" log-mod="speedtest"> +
                                            +
                                            +
                                            + +
                                            + +
                                            +
                                            +
                                            + + + +
                                            +
                                            +
                                            N/AMbp/s
                                            + N/AKB/s + +
                                              +
                                            • เกรด
                                            • +
                                            • เร็วกว่า 64.8%ของผู้ใช้ไทย
                                            • + <%if !empty($body.speedTest.imageAd)%> + <%*image ad*%>
                                            • + <%else%> + <%*text ad*%>
                                            • + <%/if%> +
                                            + <%if !empty($body.speedTest.facebookShare)%> + + <%/if%> +
                                            IP:

                                            +
                                            +   +
                                            +
                                            + + <%script%> + require.async('common:widget/ui/jquery/jquery.js',function($){ + //#speedTest + //两种载入条件:onload 或者 用户鼠标移到这个模块区域; 这里自定义事件 + $(window).one('e_go.speed',function(){ + require.async(['home:widget/ui/speed-test/speed-test.js'], function(speedTestInit) { +// console.log('INIT go.speed'); + var el = $("#speedTest")[0]; + speedTestInit({ + // jsUrl: "speedtest.js", +// jsUrl: "/static/widget/home/speed-test/speed-test.js", + phpUrl: "<%$body.speedTest.phpUrl%>", + // phpUrl: "/api/spd.php", + userip: "<%$sysInfo.userip%>", +// getIpUrl: "http://jsonip.com", + getSize: 5e5, + postSize: 1e5, + dialQueue: [0, 1, 5, 10, 20, 30, 50, 75, 100], + angleMax: 235, + getSizeFallback: 1e5, + postSizeFallback: 5e4, + getTimes: 3, + postTimes: 0, + fixResult: 1, + remainder: 1, + testTimeout: 6e4, + textDefault: "<%$body.speedTest.textDefault%>", + textStart: "<%$body.speedTest.textStart%>", + textLoading: "<%$body.speedTest.textLoading%>", + textTesting: "<%$body.speedTest.textTesting%>", + textError: "<%$body.speedTest.textError%>", + tplTitle: "<%$body.speedTest.tplTitle%>", + speedColumn: "<%$body.speedTest.speedColumn%>", + tplTime: "<%$body.speedTest.tplTime%>", + tplShare: '<%$html.speedTestShare|default:""%>', + tplImageAd: '<%$html.speedTestImageAd|default:""%>', + imageAd: <%json_encode($body.speedTest.imageAd)%>, + <%if !empty($body.speedTest.facebookShare)%> + fbShare: <%json_encode($body.speedTest.facebookShare)%>, + <%/if%> + tplGrade: "<%$body.speedTest.tplGrade%>", + tplFaster: "<%$body.speedTest.tplFaster%>" + }, el); + }); + }); + if(!$("#sideMagicBox #speedTest").length){ + $(window).load(function(){ + $(window).trigger('e_go.speed'); + // console.log('window load'); + }); + $('#speedTest').one('mouseenter',function(){ + $(window).trigger('e_go.speed'); + // console.log('#speedTest mouseenter'); + }); + } + }); + + <%/script%> + <%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/translate/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/translate/ltr/ltr.css new file mode 100755 index 000000000..c66497e65 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/translate/ltr/ltr.css @@ -0,0 +1,74 @@ +.mod-translate-container{ + margin: 8px 8px 0; +} +.mod-translate-container { + position: relative; +} +.translate-submit{ + height:30px; + width:100%; + background:#5DB285; + cursor: pointer; + margin-bottom: 15px; + margin-top: 5px; + color: white; + border: 0; + border-radius: 5px; + font-size: 17px; + font-weight: bold; + position: relative; + top: 3px; +} +.mod-translate-text{ + color:#5a5a5a; + font-size:15px; +} +.pickLanguage { + height: 24px; + padding-left: 5px; + padding-right: 25px; + width: 112px; +} +.mod-translate .charts_more{ + color: #00b075; +} +.pick_language { + width: 100%; + height: 26px; + margin-bottom: 10px; + margin-top: 10px; +} +.translate_note_info { + color: #BCBCBC; + cursor: text; + position: absolute; + top:98px; + left: 9px; +} +.translate_content_wrapper{ + border: 1px solid #ccc; + padding-top: 3px; + padding-left:3px; + margin-top: 10px; + background: #fff; +} +.translate_content { + border: 0; + width: 100%; + height: 120px; +} +.color_red { + border:1px solid red; +} +.subBtn_color{ + background:-webkit-gradient(linear, 0 0, 0 100%, from(#51A274), to(#65B38D)); + background:-moz-linear-gradient(top, #51A274,#65B38D) +} + +/*显示模块*/ +.side-mod-preload-translate{ + +} +.side-mod-preload-translate > *{ + visibility: visible!important; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/translate/translate.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/translate/translate.tpl new file mode 100755 index 000000000..95136b0f4 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/translate/translate.tpl @@ -0,0 +1,51 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/translate/ltr/ltr.css"%> <%else%> <%require name="home:widget/translate/rtl/rtl.css"%> <%/if%> +
                                            +
                                            +
                                            + <%$body.translate.language%>: +
                                            + +
                                            + <%$body.translate.content%>: +
                                            + + + +
                                            + <%$body.translate.defaultInfo%> + +
                                            + + +
                                            +
                                            + <%$body.translate.moreInfo%> +
                                            + <%script%> + require.async('common:widget/ui/jquery/jquery.js',function($){ + $(window).one("e_go.translate", function () { + require.async(['home:widget/ui/translate/translate.js'],function(translate){ + translate(); + }); + }); + if(!$("#sideMagicBox #translate").length){ + $(window).trigger("e_go.translate"); + } + }); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/trigger-flow/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/trigger-flow/ltr/ltr.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/trigger-flow/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/trigger-flow/rtl/rtl.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/trigger-flow/trigger-flow.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/trigger-flow/trigger-flow.tpl new file mode 100755 index 000000000..93abadfe7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/trigger-flow/trigger-flow.tpl @@ -0,0 +1,5 @@ +<%if $head.dir=='ltr'%> + <%require name="home:widget/trigger-flow/ltr/ltr.css"%> +<%else%> + <%require name="home:widget/trigger-flow/rtl/rtl.css"%> +<%/if%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/img/i-channel3.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/img/i-channel3.png new file mode 100755 index 000000000..7fc2bbdac Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/img/i-channel3.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/img/i-channel7.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/img/i-channel7.png new file mode 100755 index 000000000..b49dbef6f Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/img/i-channel7.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/ltr/ltr.css new file mode 100755 index 000000000..e27572560 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/ltr/ltr.css @@ -0,0 +1,104 @@ +.mod-tvlive{ + position: relative; +} +.mod-tvlive .mod-side { + padding-bottom: 0; +} +.mod-magicbox .mod-tvlive .mod-side { + border: 0; +} +.mod-tvlive a{ + display: block; +} +.tvlive-channel{ + height: 36px; + line-height: 36px; + border-bottom: 1px solid #fff; + padding: 0 13px; +} +.tvlive-channel .thaitv3,.tvlive-channel .ch7{ + display: inline-block; + width: 24px; + height: 24px; + border: 1px solid #c7c7c7; + background-color: #e9e9e9; + background-repeat: no-repeat; + vertical-align: middle; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + margin-right: 9px; + position:relative; +} +.tvlive-channel .thaitv3{ + background-image:url(../img/i-channel3.png?__sprite); +} +.tvlive-channel .ch7{ + background-image:url(../img/i-channel7.png?__sprite); +} +.tvlive-channel:hover .tvlive-mask{ + background: rgb(34,26,18); + background: rgba(0,0,0,0.6); + position: absolute; + left: 0; + width: 100%; + height: 100%; +} +.tvlive-channel:hover .tvlive-mask .icon{ + background: url(/static/widget/home/charts/i-charts_24.png) -45px 0 no-repeat; + display: inline-block; + height: 20px; + width: 20px; + position: absolute; + top: 50%; + left: 50%; + margin-top: -10px; + margin-left: -10px; +} +.tvlive-content{ + border-top: 1px solid #dcdcdc; + background: #e7e7e7; + padding: 3px 13px 8px; + font-size: 0; + border-bottom: 1px solid #fff; +} +.tvlive-program{ + height: 14px; + padding-top: 3px; + margin-bottom: 4px; + border-bottom: 1px solid #e7e7e7; +} +.tvlive-content .cur{ + color: #00ac72; +} +.tvlive-content .cur:hover{ + border-bottom: 1px solid #00ac72; +} +.tvlive-content .cur .tvlive-name/*,.tvlive-program:hover .tvlive-name*/{ + font-weight: 600; +} +.tvlive-time{ + display: inline-block; + width: 36.85%; + font-size: 12px; + font-weight: 600; + vertical-align: middle; + padding-right: 2.38%; +} +.tvlive-name{ + display: inline-block; + width: 60.76%; + font-size: 12px; + vertical-align: middle; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +/*显示模块*/ +.side-mod-preload-tvlive{ + +} +.side-mod-preload-tvlive > *{ + visibility: visible!important; +} diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/rtl/rtl.css new file mode 100755 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/tvlive.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/tvlive.tpl new file mode 100755 index 000000000..4e1dbc15b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/tvlive/tvlive.tpl @@ -0,0 +1,50 @@ + + +<%* 声明对ltr/rtl的css依赖 *%> +<%if $head.dir=='ltr'%> <%require name="home:widget/tvlive/ltr/ltr.css"%> <%else%> <%require name="home:widget/tvlive/rtl/rtl.css"%> <%/if%> +
                                            + + <%$head.apiError%> + + <%$body.tvlive.moreText%> +
                                            + <%script%> + conf.tvlive = { + channel: <%json_encode($body.tvlive.channel)%>, + showNum: "<%$body.tvlive.showNum%>" + }; + require.async('common:widget/ui/jquery/jquery.js',function($){ + $(window).one("e_go.tvlive", function (e,data) { + require.async(['home:widget/ui/tvlive/tvlive.js'],function(tvlive){ + tvlive(data); + }); + }); + if(!$("#sideMagicBox #sideTvlive").length){ + $(window).trigger("e_go.tvlive"); + } + }); + <%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/anchorside/anchorside.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/anchorside/anchorside.js new file mode 100755 index 000000000..d321e6ea3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/anchorside/anchorside.js @@ -0,0 +1,163 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +require('common:widget/ui/jquery/jquery.cookie.js'); + +//window.Gl || (window.Gl = {}); +//back to top button +var anchorside = function () { + var el = $(".mod-anchorside").find(".guid-item"), + win = $(window), + _conf = conf.anchorside, + list = _conf.list; + + // send log for new-to-old homepage + !function(){ + try { + if(window.localStorage) { + if(localStorage.getItem("homeSwitch") == "from-new") { + UT.send({ + type:"click", + ac:"b", + position:"switch-to-old", + modId:"anchorside" + }); + localStorage.removeItem("homeSwitch"); + } + } + } catch(e) { + } + }(); + + el.hover( + function(){ + var $this = $(this), + index = $this.index(), + data = list[index], + image = data.icon_hover_url?data.icon_hover_url:data.defaultIconHoverUrl; + + //isfold表示icon是否需要展开 + !data.isFold && $this.width(data.divWidth).find(".guid-description").show(); + $this.find("i").css("backgroundImage","url("+image+")"); + + }, + function(){ + var $this = $(this), + index = $this.index(), + data = list[index], + image = data.icon_url?data.icon_url:data.defaultIconUrl; + !data.isFold && $this.width( data.size||46).find(".guid-description").hide(); + $this.find("i").css("backgroundImage","url("+image+")"); + + } + ); + el.on("click",function(){ + $(".g-area-lazyload").lazyload({triggerAll:true}); + + var that = $( this ), + curListOpt = list[that.index()], + anthorMod = curListOpt.anthorMod, + curPosTop = win.scrollTop(); + if(that.hasClass("gotonew")){ + //log request can not be sent successfully, it is canceled by the following reload action. so use localstorage instead. + try { + if(window.localStorage) { + localStorage.setItem("homeSwitch", "from-old"); + } + } catch(e) { + } + // 非普通链接类型,为抽样使用 + if(!that.hasClass("normallink")){ + $.cookie("sample_channel_flattest", null); + setTimeout(function(){ + window.location.reload(); + },0); + } + }else if( !that.hasClass("backtop") ){ + // 如果有配置anthorMod字段(需要被定位的模块) + if( anthorMod ){ + var $anchorMod = $( anthorMod ), + paddingTop = 0, + timer; + // 判断需要需要给头部留出多少距离 + if( _conf.newHeader && _conf.isCeiling === "1" ){ + if( _conf.ceilingMore == "1" && !$( "body" ).hasClass( "header-fixed-up" ) ){ + paddingTop = parseInt( _conf.paddingTop1 ) || 140; + }else{ + paddingTop = parseInt( _conf.paddingTop ) || 35; + } + } + timer = setInterval( function(){ + if( !$anchorMod.length ){ + $anchorMod = $( anthorMod ); + }else{ + offsetTop = $anchorMod.offset().top; + // win.scrollTop( offsetTop - paddingTop ); + scrollAnimate( offsetTop - paddingTop ); + clearInterval( timer ); + } + }, 100 ); + }else{ + // win.scrollTop( 3000 ); + scrollAnimate( $( document ).height() ); + } + + UT.send({ + type:"click", + ac:"b", + position:"bottom", + sort: that.attr( "data-type" ), + modId:"anchorside" + }); + } + else{ + scrollAnimate( 0 ); + // win.scrollTop(0); + UT.send({ + type:"click", + ac:"b", + position:"top", + modId:"anchorside" + }); + } + + /** + * @param curPos{number} 当前滚动条距离顶端的距离 + * @param toPos{number} 需要滚动的位置距离顶端的距离 + */ + // function scrollAnimate( curPos, toPos ){ + // var timer, + // times = curListOpt.scrollTime / 16, + // step = ( toPos - curPos ) / times, + // tempPos = curPos; + + // timer = setInterval( function(){ + // console.log( ~~(new Date()) ); + // times --; + // tempPos += step; + // win.scrollTop( tempPos ); + + // if( times < 1 ){ + // win.scrollTop( toPos ); + // clearInterval( timer ); + // } + + // }, 16 ); + // } + function scrollAnimate( toPos ){ + var scrollTime = parseInt( curListOpt.scrollTime ); + if( scrollTime ){ + $( "html, body" ).animate( { + scrollTop : toPos + "px" + }, scrollTime ); + }else{ + win.scrollTop( toPos ); + } + }; + }); + + $(window).on("scroll", function () { + win.scrollTop()>=900?$(".backtop").css("display","block"):$(".backtop").css("display","none"); + }); +} + +module.exports = anchorside; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/astro/astro.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/astro/astro.js new file mode 100755 index 000000000..3aca7438b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/astro/astro.js @@ -0,0 +1,243 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var time = require("common:widget/ui/time/time.js"); +var helper = require("common:widget/ui/helper/helper.js"); +require('common:widget/ui/jquery/jquery.cookie.js'); + +var sideAstro = function(){ + var date = { + "TODAY": 0, + "TOMORROW": 1 + }, + errorTimeout, + isInitted = false, + astroError = $('#astro-error'), + astroWrapper = $('.mod-astro'), + astroPanel = astroWrapper.find('dl'), + chartsMore = astroWrapper.find('.charts_more'), + astroData = {}, + curDateIndex = date["TODAY"],//current date + curAstroName,//current astro + descLineHeight = parseInt($(".astro-desc").css("line-height")), + truncConfig = conf.sideAstro.multiTruncate, + minDescHeight = truncConfig.minLineNum * descLineHeight, + maxDescHeight = truncConfig.maxLineNum * descLineHeight, + win = $(window); + //get local scale date from the top userbar , use a regexp to remove the useless part + showError = function(){ + astroWrapper.css('height' , '300px'); + chartsMore.hide(); + astroPanel.hide(); + astroError.show(); + }, + + hideError = function(){ + astroWrapper.css('height' , 'auto'); + astroPanel.show(); + // chartsMore.show(); + chartsMore.css("display","block"); + astroError.hide(); + }, + + getToday = function(){ + time.getTime(function(){ + var today = time.getForm(); + $("#astroDateBox").html(""+helper.replaceTpl(conf.sideAstro.todayReg,today)); + }); + }, + //get the whole astro data from api interface + getAjaxData = function(){ + var ajaxSucceed = false; + showError(); + + var params = "?app=star&act=contents&country="+conf.country; + $.ajax({ + url: conf.apiUrlPrefix + params, + //url: "http://api.ghk.hao123.com:8088/api.php?app=star&act=contents&country=br", + //url: "/static/web/base/js/astro.json", + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + cache: false, + error: function(XMLHttpRequest, textStatus, errorThrown){ + }, + success: function(data) { + if(data.content && data.content.data){ + ajaxSucceed = true; + hideError(); + astroData = data.content.data; + // delete old cookie if existed, TODO: remove later + $.cookie("sideAstro") && $.cookie('sideAstro', null); + //init astro panel from cookie or default value + var astroCookie = $.cookie.get("astro"), + firstAstroIndex; + firstAstroIndex = astroCookie ? astroCookie : 0; + changeAstro($(".astro-list li:eq("+firstAstroIndex+")")); + bindEvents(); + } + } + }); + }, + //display data to content panel + displayData = function(dateIndex,AstroName){ + var thisObj,score,scoreIcons,data; + if(dateIndex != curDateIndex || AstroName != curAstroName){ + curDateIndex = dateIndex; + curAstroName = AstroName?AstroName:curAstroName; + data = astroData[dateIndex][curAstroName]; + $(".astro-panel > li:eq("+curDateIndex+")").show().siblings().hide(); + $(".astro-luck:eq("+curDateIndex+") li").each(function(){ + //$(".astro-luck:visible li").each(function(){ + thisObj = $(this); + score = data[thisObj.attr("class").replace("astro-luck_","")]; + scoreIcons = thisObj.children("i"); + scoreIcons.slice(0,score).addClass("sel").end().slice(score).removeClass("sel"); + }); + $(".astro-desc:eq("+curDateIndex+")").each(function(){ + //$(".astro-desc:visible").each(function(){ + thisObj = $(this); + var thisP = thisObj.children("p:eq(0)"), + thisP2 = thisP.next(), + txt = data["forecast"]; + thisP.text(txt); + thisObj.addClass("astro-desc_s"); + thisObj.find(".i-pointer_up").removeClass("i-pointer_up"); + thisP.show(); + thisP2.hide(); + //muitiline truncate + if(thisP.height() > minDescHeight){ + thisP2.text(txt); + if(thisP2.height() > maxDescHeight){ + thisP2.text(txt.slice(0,truncConfig.maxCharNum)+"..."); + } + thisP.text(txt.slice(0,truncConfig.minCharNum)+"..."); + }else{ + thisObj.find(".i-pointer").hide(); + } + }); + if(data["more_url"]){ + $(".charts_more",".mod-astro").attr('href',data["more_url"]); + }; + } + }, + //change astro + changeAstro = function(obj){ + var newAstroName = obj.children().eq(0).attr("astro_name"), + newAstroIndex = obj.index(), + astroIco = $(".astro_ico"), + astroClass = astroIco.attr("class"); + if(newAstroName != curAstroName){ + if(astroClass.indexOf("astro_ico_") != -1){ + astroIco.attr("class",astroClass.replace(/astro_ico_\d+/g,"astro_ico_"+newAstroIndex)); + }else{ + astroIco.addClass("astro_ico_"+newAstroIndex); + } + + $(".astro_name").text(newAstroName); + $(".astro_period").text(obj.children().eq(1).text()); + displayData(curDateIndex,newAstroName); + $.cookie.set("astro",newAstroIndex); + /*if(!!$.cookie("sideAstro") || newAstroIndex != 0){ + multicookie.writeCookie("sideAstro","astro",newAstroIndex); + //$.cookie("sideAstro","astro="+newAstroIndex,{expires: 2000}); + }*/ + + } + }, + /*multiTruncate = function(obj,divH){ + while (obj.outerHeight() > divH) { + obj.text(obj.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "...")); + }; + },*/ + init = function(){ + if(!isInitted){ + getToday(); + this.astroList = $(".astro-list"); + $("body").append(this.astroList); + this.listTrigger = $(".astro_period,.astro-head .i-pointer,.astro_name"); + } + isInitted = true; + getAjaxData(); + }, + sendStat = function(ac){ + var utObj = { + type:"click", + level:1, + modId:"astro", + position:"links", + country:conf.country + }; + if(ac) { + utObj.ac = "b"; + } + UT.send(utObj); + }, + bindEvents = function(){ + var thisObj = this; + $("#panel-astro .close,#panel-astro .charts_more").click(function(){ + sendStat(); + }); + $(".astro-head").on("click",".astro_period,.i-pointer,.astro_name",function(){ + var astroHead = $(".astro-head"), + offset = astroHead.offset(); + thisObj.astroList.css({ + "left": conf.dir === "ltr" ? offset.left + astroHead.width() - thisObj.astroList.outerWidth() : offset.left, + "top": offset.top + 27 + }); + thisObj.astroList.toggle(); + if(thisObj.astroList.is(":visible")){ + $(".astro-head .i-pointer").addClass("i-pointer_up"); + win.one("scroll", function() { + thisObj.astroList.hide(); + $(".astro-head .i-pointer").removeClass("i-pointer_up"); + }); + }else { + $(".astro-head .i-pointer").removeClass("i-pointer_up"); + } + }); + $(".astro-list li").mousedown(function(){ + changeAstro($(this)); + sendStat(true); + }); + $(document).on("mousedown", function(e) { + var el = e.target; + if(thisObj.astroList.is(":visible") && el !== thisObj.listTrigger[0] && el !== thisObj.listTrigger[1] && el !== thisObj.listTrigger[2] && !jQuery.contains(thisObj.listTrigger[0], el) && !jQuery.contains(thisObj.listTrigger[1], el) && !jQuery.contains(thisObj.listTrigger[2], el)){ + thisObj.astroList.hide(); + $(".astro-head .i-pointer").removeClass("i-pointer_up"); + } + }); + $(".astro-tab li").click(function(){ + $(this).addClass("cur").siblings().removeClass("cur"); + displayData($(this).index()); + sendStat(true); + }); + $(".astro-desc .i-pointer").click(function(){ + var thisObj = $(this); + if(thisObj.hasClass("i-pointer_up")){ + thisObj.removeClass("i-pointer_up").parent().addClass("astro-desc_s"); + thisObj.siblings("p:eq(0)").show().next().hide(); + }else{ + thisObj.addClass("i-pointer_up").parent().removeClass("astro-desc_s"); + thisObj.siblings("p:eq(0)").hide().next().show(); + } + sendStat(true); + }); + + + }; + + astroError.click(function(e){ + e.preventDefault(); + clearTimeout(errorTimeout); + errorTimeout = setTimeout(function(){ + init(); + },200); + }); + + init(); +}; +/*if($("#sideAstro:visible").length){ + window.sideAstro(); +}*/ +module.exports = sideAstro; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/bus/bus.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/bus/bus.js new file mode 100755 index 000000000..830cfad78 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/bus/bus.js @@ -0,0 +1,170 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); + +var bus = function() { + var handleTime = function() { + var time = new Date(); + var year = time.getFullYear(); + var month = time.getMonth(); + var nMonth = time.getMonth()+1; + var day = time.getDate(); + var hour = time.getHours(); + var dateArray = []; + var yearArray = []; + var html; + var yMonth = $('#ym'); + var nMon = nMonth.toString(); + if(nMon.charAt(1)==''){ + nMon='0'+nMon; + } + var nDay = day.toString(); + if(nDay.charAt(1)==''){ + nDay = '0'+nDay; + } + var nHour = hour.toString(); + if(nHour.charAt(1)==''){ + nHour = '0' + nHour; + } + var y_m = year+""+nMon; + var min = time.getMinutes(); + var nMin = min.toString(); + if(nMin.charAt(1)==''){ + nMin = '0'+ nMin + } + //return nMin + for(var i=0;i<8;i++) { + if(month<=12){ + dateArray.push(month); + yearArray.push(year); + month++; + }else{ + month=1; + year+=1; + } + }; + var nDateArray = []; + var tmp; + for(var i=0;i'+yearArray[i]+'年'+nDateArray[i]+'月'; + }; + yMonth.html(html); + $("#ym option[value="+y_m+"]").attr("selected",true); + $("#d option[value="+nDay+"]").attr("selected",true); + $("#hh option[value="+nHour+"]").attr("selected",true); + $("#m1 option[value="+nMin.charAt(0)+"]").attr("selected",true); + $("#m2 option[value="+nMin.charAt(1)+"]").attr("selected",true); + }; + + + var bindEvents = function() { + var oSubmit = $(".bus-submit"); + var oFrom = $(".from-position"); + var oTo = $(".to-position"); + var oExchange = $(".bus-info-r"); + oExchange.click(function(){ + var from = oFrom.val(); + var to = oTo.val(); + if(from!='' || to!=''){ + if(from!=''&&to==''){ + oFrom.prev().show(); + oTo.prev().hide(); + }else if(from==''&&to!=''){ + oTo.prev().show(); + oFrom.prev().hide(); + } + oFrom.val(to); + oTo.val(from); + } + var tmpFrom = oFrom.val(); + var tmpTo = oTo.val(); + if(tmpFrom=='' && tmpTo!=''){ + oFrom.addClass('color_red'); + oTo.removeClass('color_red'); + } + if(tmpTo=='' && tmpFrom!=''){ + oTo.addClass('color_red'); + oFrom.removeClass('color_red'); + } + }); + oSubmit.click(function(){ + if(oFrom.val()=='' || oTo.val()=='') { + if(oFrom.val()==''){ + oFrom.addClass('color_red'); + } + if(oTo.val()==''){ + oTo.addClass('color_red'); + } + return false; + + }else{ + return true; + } + }); + oFrom.keydown(function(){ + $(this).removeClass('color_red'); + }) + oTo.keydown(function(){ + $(this).removeClass('color_red'); + }) + oSubmit.mouseover(function(){ + $(this).addClass('subBtn_color') + }).mouseout(function(){ + $(this).removeClass('subBtn_color') + }); + $(".bus-note-info").click(function(){ + var _this = $(this); + _this.hide(); + _this.siblings("input").focus(); + }); + $("#mod-side-bus .from-position, #mod-side-bus .to-position").each(function(){ + var thisVal=$(this).val(); + if(thisVal!=""){ + $(this).siblings("span").hide(); + }else{ + } + + $(this).focus(function(){ + $(this).siblings("span").hide(); + }).blur(function(){ + var val=$(this).val(); + var _this = $(this); + if(val!=""){ + _this.siblings("span").hide(); + }else{ + _this.siblings("span").show(); + } + }); + }); + }; + + + var handleStatics = function() { + $(".bus-submit,.from-position,.to-position,.via-position,.radio-type,.exchange,.charts_more").on("click",function(e) { + var utObj = { + "type": "click", + "modId": "bustransfer", + "position": "links" + }; + if ($(e.target).hasClass('charts_more')) { + utObj.ac = "b"; + } + UT && UT.send(utObj); + }) + $("#ym,#d,#hh,#m1,#m2,.order_items").on("change",function() { + UT && UT.send({"type": "click","ac":"b","modId":"bustransfer","position":"links"}); + }); + }; + var init = function() { + handleTime(); + bindEvents(); + handleStatics(); + }; + init(); +} + +module.exports = bus; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/charts/charts.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/charts/charts.js new file mode 100755 index 000000000..666abe8a5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/charts/charts.js @@ -0,0 +1,293 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var cycletabs = require("common:widget/ui/cycletabs/cycletabs.js"); +var helper = require( 'common:widget/ui/helper/helper.js' ); +var sideCharts = function(item){ + var menu = $(".charts_menu"), + menuItem = menu.find('a'), + menuLength = menuItem.length, + defaultMenuItem = menuItem.eq(0), + contentItem = $(".charts_content"), + ListWrapper = $(".mod-charts .chartslist"), + /*topArrow = $(".mod-charts .top-arrow"), + bottomArrow = $(".mod-charts .bottom-arrow"),*/ + config = conf.charts, + scrollbar = [], + getAjaxCharts = function(obj){ + var menutype = obj.attr("menutype"), + subtype = obj.attr("subtype"), + numPerRequest = obj.attr("rqnum"), + index = menuItem.index(obj), + curContent = contentItem.eq(index), + curListWrapper = ListWrapper.eq(index), + ajaxSucceed = false; + + menuItem.removeClass("cur"); + obj.addClass("cur"); + contentItem.hide(); + curContent.show(); + if(!curContent.find("li").length){ + var params = "?app="+menutype+"&act=contents&country="+conf.country+(subtype?"&type="+subtype:"")+"&num="+numPerRequest; + $.ajax({ + /*url: "/static/web/base/js/charts.json",*/ + //url: conf.apiUrlPrefix+"?app=video&act=contents&country="+conf.country+"&num="+numPerRequest, + url: conf.apiUrlPrefix + params, + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + cache: false, + error: function(XMLHttpRequest, textStatus, errorThrown){ + //console.log(textStatus+"-"+errorThrown); + // curContent.find(".charts_error").show(); + }, + success: function(data) {//此处会用到start参数 + if(data.content && data.content.data){ + curContent.find(".charts_error").hide(); + var type = parseInt(data.message.showType), + data = data.content.data, + length = data.length, + html = "", + curList = curListWrapper.find("ul"), + dataSort = "side"+menutype+(subtype?"["+subtype+"]":""), + offerid=""; + for(var i=0;i3?" charts-order_grey":"")+"'>"+(i+1)+""+data[i].music+"
                                            "+data[i].artist+""; + + }else{ + html += "
                                          • "+(i+1)+""+data[i].music+"
                                            "+data[i].artist+"
                                          • "; + } + + }else{ + var rev_title; + if(conf.dir == "rtl"){ + if(/^[\w\s()]*$/g.test(data[i].title)) + rev_title = 1; + } + if(i%2) + html += "
                                          • "; + else + html += "
                                          • "; + html += "..."+data[i].title+"
                                          • "; + } + offerid = ""; + } + /*if(data.moreLink){ + curList.next('.charts_more').attr("href") = data.moreLink; + }*/ + curList.append(html); + require.async("common:widget/ui/scrollable/scrollable.js", function(){ + scrollbar[index] = curList.scrollable({ + autoHide: false, + onScroll: function(){ // lazyload images + var listItem = curListWrapper.find("img"); + listItem.each(function(){ + var $this = $(this); + if($this.position().top - 30 <= curListWrapper.outerHeight()){ + $this.attr("src",$this.attr("original-src")); + } + }); + } + }); + }); + //load the first 6 images + curList.find("img:lt(6)").each(function(){ + var $this = $(this); + $this.attr("src",$this.attr("original-src")); + }); + /*if(curList.height() > curListWrapper.height()){ + curListWrapper.css("overflow-y","auto"); + topArrow.eq(index).show(); + bottomArrow.eq(index).show(); + //curContent.find(".scroll-arrow").show(); + }*/ + } + } + }); + if(!ajaxSucceed) curContent.find(".charts_error").show(); + }else{ + scrollToTop(index); + } + + }, + scrollToTop = function(index){ + scrollbar[index].goTo({y:0}); + /*obj.scrollTop(0); + topArrow.addClass("disabled"); + bottomArrow.removeClass("disabled");*/ + }, + getItemObj = function(type){ + type = type + '-charts'; + // return menuItem.filter("[menutype='" + type + "']").parent(); + //var a = menuItem.parent().filter("[log-mod='" + type+ "']").find('a'); + return menuItem.parent().filter("[log-mod='" + type+ "']").find('a'); + }; + + //当锚点定位初始化时要传出item值 + if(item){ + defaultMenuItem = getItemObj(item); + } + //init + function initContent( elem ){ + var type = elem.attr( "type" ); + if( conf.charts[type+"Data"] ){ + getConfigedCharts( elem, conf.charts[type+"Data"] ); + }else{ + getAjaxCharts(elem); + } + } + function getConfigedCharts( elem ){ + var slider = new cycletabs.NavUI(); + var type = elem.attr( "type" ); + var data = conf.charts[type+"Data"]; + var config = conf.charts[type+"Config"]; + var index = menuItem.index(elem); + var curContent = contentItem.eq(index); + var curListWrapper = ListWrapper.eq(index); + var containerHtml = '
                                            '; + var listHtml = '' + + '#{tips}' + + '#{tipsHtml}' + + ''; + var htmlData = []; + menuItem.removeClass("cur"); + elem.addClass("cur"); + contentItem.hide(); + curContent.show(); + curContent.find(".charts_error").hide(); + curListWrapper.html( containerHtml ); + for( var i=0; i

                                            ' + data[i].tips + '

                                            ' : ""; + + htmlData.push({ + 'content': helper.replaceTpl(listHtml, data[i]), + 'id': i+1 + }); + } + // console.log(htmlData); + // console.log(htmlData); + var options = { + offset: 0, + navSize: 1, + itemSize: 220, + autoScroll: config.autoScroll, + autoScrollDirection: config.slideDir, + autoDuration: config.autoDuration, + scrollDuration: config.scrollDuration, + quickSwitch: false, + containerId: curContent.find(".container"), + data: htmlData, + dir: conf.dir, + defaultId: 1 + }; + slider.init( options ); + if( data.length < 2 ){ + curContent.find( ".ui-nav .ctrl" ).hide(); + } + } + initContent( defaultMenuItem ); + if(config.isLoop){ + /*loop switch tab*/ + var tabIndex = 0, + loop = setInterval(function(){ + initContent(menuItem.eq(tabIndex)); + tabIndex= ++tabIndex>=menuLength ? 0 : tabIndex; + },config.loopSpeed); + contentItem.hover( + function(){ + clearInterval(loop); + }, + function(){ + loop = setInterval(function(){ + initContent(menuItem.eq(tabIndex)); + tabIndex= ++tabIndex>=menuLength ? 0 : tabIndex; + },config.loopSpeed); + } + ); + }/*else{ + getAjaxCharts(defaultMenuItem); + }*/ + /*bottomArrow.click(function(){ + var list = $(".mod-charts .chartslist:visible"); + list.scrollTop(list.scrollTop()+30); + }); + topArrow.click(function(){ + var list = $(".mod-charts .chartslist:visible"); + list.scrollTop(list.scrollTop()-30); + }); + + ListWrapper.scroll(function(){ + var list = $(".mod-charts .chartslist:visible"), + listItem = list.find("img"); + list.scrollTop() == 0 ? + topArrow.addClass("disabled"): + topArrow.removeClass("disabled"); + (list.scrollTop() + list.height() >= list.children().height()) ? + bottomArrow.addClass("disabled"): + bottomArrow.removeClass("disabled"); + listItem.each(function(){ + var $this = $(this); + //thisImg = $this.find("img"); + if($this.position().top - 30 <= list.outerHeight()){ + //console.log($this.index()+":"+$this.position().top+":"+list.outerHeight()); + $this.attr("src",$this.attr("original-src")); + } + }); + + });*/ + + //bind events + menuItem.click(function(e){ + initContent($(this)); + e.preventDefault(); + }); + + //锚点 + $(window).on("locate.charts" , function(e , item){ + var obj = getItemObj(item); + initContent(obj); + }); + + $(".charts_error").click(function(e){ + initContent(menuItem.eq(contentItem.index($(e.target).parent()))); + e.preventDefault(); + }); + $(".charts-mode2 .charts-imgitem a").live("mouseenter",function(){ + var thisObj = $(this), + name = thisObj.children(".charts-name"), + ellipsis = thisObj.find(".ellipsis"), + outerHeight = thisObj.height(), + innerHeight = name.height(); + //lineHeight = parseInt(name.css("line-height")); + + if(innerHeight > outerHeight){ + ellipsis.show(); + //name.height(lineHeight*Math.floor(outerHeight/lineHeight)); + } + }).live("mouseleave",function(){ + var thisObj = $(this), + //name = thisObj.children(".charts-name"), + ellipsis = thisObj.find(".ellipsis"); + + if(ellipsis.is(":visible")){ + ellipsis.hide(); + //name.height('auto'); + } + }); + +}; +module.exports = sideCharts; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/cycletabs.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/cycletabs.js new file mode 100755 index 000000000..e19f65d80 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/cycletabs.js @@ -0,0 +1,772 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var helper = require('common:widget/ui/helper/helper.js'); +var cycletabs = {}; + +/** + * 一个特殊的数组,具有循环的特征。起始位会随着数据的获取而自行跳循环处理 + * @constructor + */ +cycletabs.UserLoopArray = function(){ + this.first = 0; + this.last = 0; + this.size = 0; + this.numberList = []; + this.count = 7; + this.current = 0; +}; +cycletabs.UserLoopArray.prototype = { + init: function(count, size, first){ + //初始化下标队列 + for(var i=0;i (this.count-1)){ + this.last = (this.last+1) % this.count - 1; + if(this.last < 0){ + this.last = this.count-1; + } + } + }, + /** + * 获得当前的首位下标 + */ + getFirst: function(){ + return this.first; + }, + getLast: function(){ + return this.last; + }, + getCurrent: function(){ + return this.current; + }, + getCount: function(){ + return this.count; + }, + getList: function(){ + var counter = this.size; + var arr = new Array(counter); + var i = 0; + var pointer = this.first; + while(counter){ + arr[i] = this.numberList[pointer]; + if(pointer == this.count-1){ + pointer = 0; //reset + } else { + pointer++; + } + i++; + counter--; + } + return arr; + }, + /** + * 在数可以循环的情况下,根据给定的两个index,计算前进或者后退的距离 + * @param index + * @param diffIndex + */ + getDiff: function(index, diffIndex){ + + var forwardStep = diffIndex - index; + var backwardStep = index - diffIndex; + + if(forwardStep < 0){ + forwardStep += this.count; + } + if(backwardStep < 0){ + backwardStep += this.count; + } + return { + forwardStep: forwardStep, + backwardStep: backwardStep + }; + + }, + getPrev: function(){ + var first = this.first; + first--; + if(first < 0){ + first = this.count-1; + } + return first; + }, + getNext: function(){ + var last = this.last; + last++; + if(last == this.count){ + last = 0; + } + return last; + }, + /** + * 向后一位或指定位数 + * @param {number} [step=1] 指定后退的步长 + */ + stepPrev: function(step){ + if(step == null){ + step = 1; + } + while(step){ + this.first--; + this.last--; + this.current--; + if(this.first < 0){ + this.first = this.count-1; + } + if(this.last < 0){ + this.last = this.count-1; + } + if(this.current < 0){ + this.current = this.count-1; + } + step--; + } + return { + first: this.first, + last: this.last, + current: this.current, + list: this.getList() + } + }, + /** + * 向前一位或指定位数 + * @param {number} [step=1] 指定前进的步长 + */ + stepNext: function(step){ + if(step == null){ + step = 1; + } + while(step){ + this.first++; + this.last++; + this.current++; + if(this.first == this.count){ + this.first = 0; + } + if(this.last == this.count){ + this.last = 0; + } + if(this.current == this.count){ + this.current = 0; + } + step--; + } + return { + first: this.first, + last: this.last, + current: this.current, + list: this.getList() + } + }, + debug: function(){ + return [ + ' first:', this.first, + ' last:', this.last, + ' current:', this.current, + ' prev:', this.getPrev(), + ' next:', this.getNext(), + ' arr:', '[',this.getList().join('|'),']' + ].join(''); + } +}; +/** + * =功能= + * 这个是一个纯JS的Nav UI控件。有以下特征: + * 单元数是固定的、单元的轮换是循环的、单元间的切换需要有动画效果 + * 有左、右箭头,控制Nav的左右切换。 + * Nav单元,可以被点击进行选中,则Nav进行切换 + * =实现思路= + * Nav自身由1+size的大小构成,其中的第一个,方便形成动画效果(暂不考虑数据<=1+size的情况,后面走特殊流程) + * 由json数据,进行初始化:根据展现的current和offset,算得实际dom中的first单元,渲染DOM结构,完成选中效果,并最后完成第一次的展现 + * 当next时,则将新展现的last追加到Nav元素列表中,将first那个单元收缩(=>width:0px)产生动画,最后将first从DOM中移除 + * 当prev时,则将新展现的first的前一个(即不可见的占位)补充到Nav元素最前边(width:0),然后展开(=>width:WIDTH px),最后移除原来的last + * 当select选中某个元素时,如果是当前元素,忽略;如果是前面的元素,则循环的执行后移操作;如果是后面的元素,则循环的执行前移操作。 + * @constructor + */ +cycletabs.NavUI = function(){ + /* + //功能接口:[动画、选中、左右箭头+移动] + //switchPrev + //switchNext + //switchTo [移动到特定单元] + //--movePrev + //--moveNext + //_scrollPrev + //_scrollNext + //事件: + //e-nav-arrow-prev-click + //e-Nav-arrow-next-click + //e-nav-item-click + //UI效果类: + //.ui-nav-hover + // .prev-hover/active/normal .arrow-prev + // .next-hover/active/normal .arrow-next + + //.nav-item + //.nav-item-hover + //.nav-item-active + //.nav-item-current + */ + // this.minIndex = 1; //数据最小下标(一般是0) + // this.maxIndex = 6; //数据最大下标(一般是total) + // this.firstIndex = 0; //当前展现的首位的index + // this.lastIndex = 0; //当前展现末位的index + // this.currentIndex = 2; //当前指向的ITEM索引 + this.indexObj = new cycletabs.UserLoopArray(); //用于记录当前的指针循环 + //以下为UI默认效果,这里不处理 + // this.loopView = true; //循环浏览; 默认循环 + this.ITEM_SIZE = 100; //(px) + this.Nav_SIZE = 3; //显示单元数 + this.CURRENT_OFFSET = 1; //偏移显示(居中) + this.dataList = []; + this.$itemList = []; + this.containerId = ''; + this.$listContainer = null; + this.$container = null; + // 标识,本身是否需要循环 + this.needLoop = false; + this._scrollDuration = 300; //500ms + this._isScrolling = false; //用于标识Nav处理动画状态 + this._autoScrollDirection = 'forward'; //自动滚动方向 + + this.idKey = 'id'; //ITEM的唯一标识(非index) + + //自动滚动的逻辑 + this._timerAutoScroll = null; + this._autoDuration = 1000; + this._autoScroll = false; + this.dir = 'ltr'; + this.direction = 'h'; //todo 声明UI的横向还是纵向放置 + this.DIR_KEY_CONFIG = { //修正ltr/rtl的文字方向+横纵向的影响 + 'h-ltr':{ + 'BACKWARD':'right' //后退向右 + ,'FORWARD':'left' //前进向左 + ,'SIZE': 'width' + }, + 'h-rtl': { + 'BACKWARD':'left' //前进向左 + ,'FORWARD':'right' //前进向右 + ,'SIZE': 'width' + }, + 'v': { + 'BACKWARD':'bottom' + ,'FORWARD':'top' + ,'SIZE': 'height' + } + }; + this.DIR_KEY = null; //修正rtl/ltr的动作方向差异; 默认是 left/right => right/left + this.quickSwitch = false; //是否显示快速跳转 + this.completeLi = false; //完整li模板 +}; +cycletabs.NavUI.prototype = { + + /** + * 根据给定的数据,生成需要的DOM结构 + * @param {Object} config 配置参数 + * @config {Array} data + * @config {string} [idKey='id'] item数据的唯一标识 + * @config {string|Number} defaultId typeID + * @config {number} [navSize=3] + * @config {number} itemSize + * @config {string} containerId Nav容器 + * @config {number} offset + * @config {boolean} [autoScroll=false] 是否自动滚动 + * @config {number} [autoDuration=5000] 自动滚动间隔 + * @config {string} [autoScrollDirection='forward'] {'backward','forward'} + * @config {number} [scrollDuration=300] 单次滚动动画用时 + * @config {string} [dir='ltr'] {'ltr','rtl'} + */ + init: function(config){ + var that = this; + /** + * @type [{id:number, content:string}] 描述Nav数据结构;//Good!可以这样描述数据结构 + * @demo + * [{content:'default',id:'1'},{content:'new2',id:'2'},{content:'new3',id:'3'},{content:'new4',id:'4'},{content:'new5',id:'5'},{content:'new6',id:'6'}] + */ + var data = config.data; + that.dataList = data; + that.$itemList = new Array(data.length); + that.containerId = config.containerId; + that.$container = $(that.containerId); //cache jQueryObject + that.idKey = config.idKey || 'id'; + that.ITEM_SIZE = config.itemSize; + //fix + if(config.offset != null){ + that.CURRENT_OFFSET = config.offset; + } + var count = data.length; + count === 1 && (that.CURRENT_OFFSET = 0); + that._autoDuration = config.autoDuration || 5000; + that._scrollDuration = config.scrollDuration || 300; + that._autoScrollDirection = config.autoScrollDirection || 'forward'; + that.showTitle = config.showTitle || 0; + that.quickSwitch = config.quickSwitch || false; + that.completeLi = config.completeLi || false; + that.itemTpl = { + "completeLi": '', + "showTitle": '', + "normal": '' + }; + + //指定方向 + that.dir = config.dir || 'ltr'; + //that.direction = 'h'; //TODO,暂不支持纵向的 + + that.direction = config.direction || 'h'; + if(that.direction === 'v'){ + that.DIR_KEY = that.DIR_KEY_CONFIG[that.direction]; + }else{ + that.DIR_KEY = that.DIR_KEY_CONFIG[that.direction+'-'+that.dir]; + } + + + var defaultIndex = 0; + var defaultId = config.defaultId; + for(var i= 0,len=data.length; i', + '
                                            ', + '

                                            ', + '

                                            ', + '
                                            ', + '
                                            ', + '', + '
                                            ', + '
                                            ', + '
                                            ', + '
                                          ' + ]; + that.$container.html(strArr.join('')); + that.$container.find('.wrap').css( that.DIR_KEY.SIZE , that.ITEM_SIZE*that.Nav_SIZE ); + + //更新Nav的容器宽度 + var list = that.indexObj.getList(); + var data = that.dataList; + //构建元素;只有需要展现的才build + var $tempList = []; + for(var i= 0,len=list.length; i'+data[index].content+''].join('')); + var $item = that._getItemObj({ + idKey: idKey, + index: index, + content: data[index].content + }); + that.$itemList[index]=$item; + $tempList.push($item); + } + //strArr.push('
                                    '); // /.nav-nav-item-list /.wrap /.ui-ctrl + that.$listContainer = that.$container.find('.nav-item-list'); + $($tempList).each(function(index, item){ + that.$listContainer.append(item); + }); + if(that.quickSwitch){ + var switchStr = ""; + for(i=0,len=data.length;i'; + } + that.$container.find(".switch").html(switchStr); + } + + }, + _getItemObj: function(paramObj){ + var that = this, + tplType = "normal"; + if (that.completeLi) { + tplType = "completeLi"; + }else if(that.showTitle){ + tplType = "showTitle"; + } + return $(helper.replaceTpl(that.itemTpl[tplType],paramObj)); + }, + bindEvent: function(){ + var that = this, + $that = $(that); + var $container = $(that.containerId); + ///////FOR LOGIC ///////////////// + //UI事件 + $($container).on('click', '.prev', function(e){ + that.switchPrev(); + $that.trigger("e_click_prev"); + }).on('click','.next',function(e){ + that.switchNext(); + $that.trigger("e_click_next"); + }).on('click','.nav-item',function(e){ + var index = $(this).attr('data-index'); + that.switchTo(index); + $that.trigger("e_click_nav",[index]); + }).on('mouseenter','.nav-item',function(e){ + var index = $(this).attr('data-index'); + $that.trigger("e_hover_nav",[index]); + }).on('click', '.switch-item', function(){ + var idKey = $(this).attr('data-id'); + for(var i=0; i'+newObj.content+''); + } + //增大nav的宽,收移;动画打开,直到新的第一个见为止; 移除最后一个,同时nav恢复正常宽、定位 + //var $newItems = $(strArr.join('')); + //$newItems.find('li').css({'width':that.ITEM_SIZE+'px'}); + + var keyForward = that.DIR_KEY.FORWARD;//left + //动画实现:先将所需呈现的结点加入容器,调整容器的宽高和定位信息,保持与原来所见内容一致;再用animate函数移到最终的效果定位,最后移除旧的结点,并恢复容器的宽和定位(虽然分开执行,但是视觉上面是连贯的。结点的动画处理方式,参考的Tangram:Magic) + var confStartStyle = {}; //{'left':0, 'width': that.ITEM_SIZE*(that.Nav_SIZE+step)} + confStartStyle[keyForward] = 0; //left|right: 0px + confStartStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*(that.Nav_SIZE+step); + var confEndStyle = {}; + confEndStyle[keyForward] = -that.ITEM_SIZE*step; //left|right: -xxx px; + var confFinalStyle = {}; //{'left':0, width:that.ITEM_SIZE*that.Nav_SIZE} + confFinalStyle[keyForward] = 0; //left|right: 0; + confFinalStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*that.Nav_SIZE; + + $($tempList).each(function(index,item){ + that.$listContainer.append(item); + }); + that.$listContainer + //.append($newItems) + .css(confStartStyle) + .animate(confEndStyle, that._scrollDuration, function(){ + that.$listContainer.css(confFinalStyle); + //临时解决在size + step > count 时,动画实现bug的问题 + // + var removeCount = Math.min(step , that.dataList.length - that.Nav_SIZE); + var $oldItems = that.$listContainer.find('[data-index]').slice(0,removeCount); + // + $oldItems.remove(); + $(that).trigger('e_after_scroll'); + }); + }, + /** + * 实现前进的后退的效果,支持滚动多个单元 + * @param {number} [step=1] + * @private + */ + _scrollPrev: function(step){ + if(step == null){ + step = 1; + } + var that = this; + var indexList = that.indexObj.getList().slice(0, step); //获取前面的step个ITEM;然后从末尾到前面,这样倒插到Nav区域中 + //原有的last,要隐藏;新的first,要show + + //var strArr = []; + var $tempList = []; + for(var i= 0; i'+newObj.content+''); + $item = that._getItemObj({ + idKey: newObj[that.idKey], + index: index, + content: newObj.content + }); + //console.log(newObj); + that.$itemList[index] = $item; + $item.css( that.DIR_KEY.SIZE , that.ITEM_SIZE+'px' ); + } + $tempList.unshift($item); //从后面开始放入 + + } + //增大nav的宽,收移;动画打开,直到新的第一个见为止; 移除最后一个,同时nav恢复正常宽、定位 + //var $newFirstItems = $(strArr.join('')); + //$newFirstItems.find('li').css({'width':that.ITEM_SIZE+'px'}); + + var keyForward = that.DIR_KEY.FORWARD;//left + var confStartStyle = {}; //{'left':-that.ITEM_SIZE*step, 'width': that.ITEM_SIZE*(that.navSize+step)} + confStartStyle[keyForward] = -that.ITEM_SIZE*step; //left: -xxxpx + confStartStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*(that.Nav_SIZE+step); + var confEndStyle = {}; + confEndStyle[keyForward] = 0; //left:0px; + var confFinalStyle = {}; //{'left':0, width:that.ITEM_SIZE*that.Nav_SIZE} + confFinalStyle[keyForward] = 0; //left: 0px; + confFinalStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*that.Nav_SIZE; + + $($tempList).each(function(index,item){ + that.$listContainer.prepend(item); + }); + that.$listContainer + //.prepend($newFirstItems) + .css(confStartStyle) + .animate(confEndStyle, that._scrollDuration, function(){ + that.$listContainer.css(confFinalStyle); + var $oldItems = that.$listContainer.find('[data-index]').slice(-step); //移除旧的结点 + $oldItems.remove(); + $(that).trigger('e_after_scroll'); + }); + }, + /** + * 定位到特定的元素。 + * 首先,计算当前选中的元素(current)与目前位置的距离"targetStep",再采用“动画”的方式进行划向。 + * 但是,因为Nav本身是可循环的,向左向右都可以到达目标,如果navs的count>size,则我们采用“最短的滚动策略”,来决定向前移还是向后移。 + * @param targetIndex + */ + switchTo: function(targetIndex){ //第几个项 + var that = this; + var list = that.indexObj.getList(); + var currentIndex = list[this.CURRENT_OFFSET]; + if(currentIndex == targetIndex){ + //console.warn('currentIndex == targetIndex'); + $(that).trigger('e_toggle',{index: targetIndex}); + return ; + } + if(that._isScrolling){ + //console.warn('_isScrolling = true'); + return; + } + that._isScrolling = true; + if(that.needLoop){ + /** + * @type UserLoopArray.getDiff + */ + var diff = this.indexObj.getDiff(currentIndex, targetIndex); + if(diff.backwardStep < diff.forwardStep){ //后退更短 + that.indexObj.stepPrev(diff.backwardStep); + //note:回调,相当于一种“私有的事件”,其他人接收不到(或不需要) + //这里scroll后,需要调用 updateFocus;其实,用fire事件,这里就不用管了 + that._scrollPrev(diff.backwardStep); + } else if(diff.backwardStep >= diff.forwardStep){ //前进更短 + that.indexObj.stepNext(diff.forwardStep); + that._scrollNext(diff.forwardStep); + } + } else { + //TODO: fix this + if(currentIndex < targetIndex){ //=> forward + that.indexObj.stepNext(targetIndex-currentIndex); + } else { //backward + that.indexObj.stepPrev(currentIndex-targetIndex); + } + that._updateFocus(); + that._isScrolling = false; + } + }, + /** + * + * @param isInit + * @private + */ + _updateFocus: function(isInit){ + var that = this; + //更新聚焦元素 + var list = this.indexObj.getList(); + var currentIndex = list[this.CURRENT_OFFSET]; + that.$listContainer.find('[data-index]').removeClass('nav-item-current') + .filter('[data-index='+currentIndex+']').addClass('nav-item-current'); + + if (that.quickSwitch) { + that.$container.find(".switch .switch-item-current").removeClass("switch-item-current"); + that.$container.find(".switch .switch-item_"+(1+currentIndex)).addClass("switch-item-current"); + } + $(this).trigger('e_change',{isInit: isInit, index: currentIndex, itemObj:this.dataList[currentIndex]}); + }, + /** + * Nav可按需要,定时跳到下一张 + * @private + */ + _startAutoScroll: function(){ + var that = this; + //console.log('start auto scroll'); + that._timerAutoScroll = setInterval(function(){ + if(that._autoScrollDirection == 'forward'){ + that.switchNext(); + } else { //backward + that.switchPrev(); + } + }, that._autoDuration); + }, + _stopAutoScroll: function(){ + //console.log('stop auto scroll'); + var that = this; + clearInterval(that._timerAutoScroll); + } +}; + +module.exports = cycletabs; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/img/i-news_item.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/img/i-news_item.png new file mode 100755 index 000000000..7a03ec848 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/img/i-news_item.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/img/repeat-x.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/img/repeat-x.png new file mode 100755 index 000000000..f7e71ad0a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/img/repeat-x.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/ltr/ltr.css new file mode 100755 index 000000000..9a1afd17e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/ltr/ltr.css @@ -0,0 +1,98 @@ +.cycletabs{ + position: relative; + z-index: 1; + line-height: 27px; + height: 27px; + /**/font-size: 13px; + font-weight: 400; + color: #5a5a5a; + padding-bottom: 0; +} +.cycletabs .ui-nav { + width: 236px; + position: relative; +} +.cycletabs .ui-nav .wrap { + width: 204px; + height: 28px; + overflow: hidden; + position: relative; + left: 16px; +} +.cycletabs .ui-nav .ctrl { + position: absolute; + right: 0; + width: 100%; + height: 28px; +} +.cycletabs .ui-nav .prev, .cycletabs .ui-nav .next { + position: absolute; + z-index: 2; + height: 27px; + width: 16px; + text-indent: -9999em; + margin:0; +} +.cycletabs .ui-nav .prev { + left: 0; +} +.cycletabs .ui-nav .next { + right: 0; +} +.cycletabs .ui-nav .arrow-prev, .cycletabs .ui-nav .arrow-next { + display: block; + cursor: pointer; + width: 16px; + height: 27px; + border-bottom: 1px solid #e3e5e6; + background: url(../img/i-news_item.png) 0 -375px no-repeat; +} +.cycletabs .ui-nav .arrow-prev { + background-position: 0 -425px; +} +.cycletabs .ui-nav .arrow-next { + background-position: -25px -425px; +} +.cycletabs .ui-nav .prev-hover .arrow-prev { + background-position: 0 -475px; +} +.cycletabs .ui-nav .next-hover .arrow-next { + background-position: -25px -475px; +} +.cycletabs .ui-nav .prev-active .arrow-prev { + background-position: 0 -525px; +} +.cycletabs .ui-nav .next-active .arrow-next { + background-position: -25px -525px; +} +.cycletabs .nav-item-list { + position: absolute; + right: 0; + list-style: none; + white-space: nowrap; + padding: 0; +} +.cycletabs .nav-item { + display: inline-block; + *display: inline; + *zoom: 1; + width: 68px; + text-align: center; + background: url(../img/repeat-x.png) repeat-x 0 0; + border-right: 1px solid #e3e5e6; + border-bottom: 1px solid #e3e5e6; +} +.cycletabs .nav-item-hover { + cursor: pointer; +} +.cycletabs .nav-item-current { + background: #f5f7f7; + border-bottom:1px solid #f5f7f7; + position: relative; + bottom: -1px; + z-index: 2; + font-weight: normal; + font-size: 12px !important; + color: #00b075; + cursor: default; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/rtl/rtl.css new file mode 100755 index 000000000..b06d5b77a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/cycletabs/rtl/rtl.css @@ -0,0 +1,98 @@ +.cycletabs{ + position: relative; + z-index: 1; + line-height: 27px; + height: 27px; + /**/font-size: 13px; + font-weight: 400; + color: #5a5a5a; + padding-bottom: 0; +} +.cycletabs .ui-nav { + width: 236px; + position: relative; +} +.cycletabs .ui-nav .wrap { + width: 204px; + height: 28px; + overflow: hidden; + position: relative; + right: 16px; +} +.cycletabs .ui-nav .ctrl { + position: absolute; + right: 0; + width: 100%; + height: 28px; +} +.cycletabs .ui-nav .prev, .cycletabs .ui-nav .next { + position: absolute; + z-index: 2; + height: 27px; + width: 16px; + text-indent: -9999em; + margin:0; +} +.cycletabs .ui-nav .prev { + right: 0; +} +.cycletabs .ui-nav .next { + left: 0; +} +.cycletabs .ui-nav .arrow-prev, .cycletabs .ui-nav .arrow-next { + display: block; + cursor: pointer; + width: 16px; + height: 27px; + border-bottom: 1px solid #e3e5e6; + background: url(../img/i-news_item.png) 0 -375px no-repeat; +} +.cycletabs .ui-nav .arrow-prev { + background-position: 0 -425px; +} +.cycletabs .ui-nav .arrow-next { + background-position: -25px -425px; +} +.cycletabs .ui-nav .prev-hover .arrow-prev { + background-position: 0 -475px; +} +.cycletabs .ui-nav .next-hover .arrow-next { + background-position: -25px -475px; +} +.cycletabs .ui-nav .prev-active .arrow-prev { + background-position: 0 -525px; +} +.cycletabs .ui-nav .next-active .arrow-next { + background-position: -25px -525px; +} +.cycletabs .nav-item-list { + position: absolute; + right: 0; + list-style: none; + white-space: nowrap; + padding: 0; +} +.cycletabs .nav-item { + display: inline-block; + *display: inline; + *zoom: 1; + width: 68px; + text-align: center; + background: url(../img/repeat-x.png) repeat-x 0 0; + border-right: 1px solid #e3e5e6; + border-bottom: 1px solid #e3e5e6; +} +.cycletabs .nav-item-hover { + cursor: pointer; +} +.cycletabs .nav-item-current { + background: #f5f7f7; + border-bottom:1px solid #f5f7f7; + position: relative; + bottom: -1px; + z-index: 2; + font-weight: normal; + font-size: 12px !important; + color: #00b075; + cursor: default; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/facebook.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/facebook.js new file mode 100755 index 000000000..09d01841d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/facebook.js @@ -0,0 +1,14 @@ +/** + * FOR 性能优化 + * + * 这个文件封装了两个功能组件:FBClient,snsShare + * 不直接在页面调用这两个组件的原因是,FIS会将它们直接 编译内联到页面,这里经过封装则以库的方式依赖。 + * 下面这种写法,不能实现真正的按需加载,除非写成UI组件。FIS1.0只支持ui组件的按需加载,widget的资源跟widget走 + * + */ +var FBClient = require('home:widget/ui/facebook/fbclient.js'); +var snsShare = require('home:widget/ui/facebook/sns-share.js'); +module.exports= { + FBClient: FBClient, + snsShare: snsShare +}; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient-core.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient-core.js new file mode 100755 index 000000000..98d80764d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient-core.js @@ -0,0 +1,774 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var FBClient = require('home:widget/ui/facebook/fbclient.js'); +var TPL_CONF = require('home:widget/ui/facebook/fbclient-tpl.js'); + + + +/** + * Facebook module + * @return {[type]} [description] + */ + +var WIN = window, + DOC = document, + conf = WIN.conf.FBClient, + that = FBClient, + undef; + +// requre facebook sdk +$.ajax({ + url: conf.sdkPath, + dataType: "script", + cache: true, + success: function() { + if(!window.FB) return; + that.status.sdkLoaded = 2; + that.cache.loadedTime = new Date; + FB.init({ + appId: conf.appId + , status: conf.status + , cookie: conf.cookie + , expires : 100 + // , xfbml: conf.xfbml + , xfbml: 1 + , oauth: conf.oauth + }); + that.checkLoginStatus(function (response) { + if (response.authResponse) { + + that.autoRefresh.refresh(); + that.autoRefresh.start(); + } + }); + // that.bindEvent.call(that); + }, + error: function() { + + } +}); + +//replace string by object, like "#{name}" +String.replaceTpl || (String.prototype.replaceTpl = function(o) { + return this.replace(/#\{([^}]*)\}/mg, function(v, k) { + return v = o[k] || ""; + }); +}); + +/* +0 ==> hide +1 ==> normal stay 5s +2 ==> stay forever(except click refresh) + */ +that.showTip = function(type, tpl, data) { + var tip = that.ui.tip, + span = tip.find("span"); + tpl = type ? tpl.replaceTpl(data || {}) : ""; + span.html(tpl); + that.tipTimer && clearTimeout(that.tipTimer); + if(!type) return that.ui.tip.fadeOut(300); + that.status.login != 0 && that.ui.tip.fadeIn(300); + type === 1 + ? that.tipTimer = setTimeout(function(arguments) { + that.cache.stayTip + ? span.html(that.cache.stayTip) + : that.ui.tip.fadeOut(300) + }, conf.tipStayTime * 1000) + : that.cache.stayTip = tpl; +} + +that.valueChange = function(el, callback) { + callback && "onpropertychange" in el + ? el.onpropertychange = function(){ + window.event && callback.call(this, window.event) + } + : el.addEventListener("input", callback, false); +} + +that.bindEvent = function() { + var submitWrap = that.ui.textareaSubmit.parent(), + submitFocusClass = "fb-mod_submit_wrap--focus"; + + that.ui.btnLogin.click(function(e) { + that.ui.uiMod.addClass("fb-mod--loading"); + FB.login(function(response) { + // record facebook id + response.authResponse && response.userID && $.cookie("__FBID", response.userID, { + expires: 10*365, + path: '/' + }); + that.updateLoginStatus.call(that, response); + }, {scope: conf.permissions}); + }); + + that.ui.btnSubmit.click(function(e) { + var val = that.ui.textareaSubmit.attr("value"); + if(!/\S+/.test(val)) return that.showTip(1, conf.tplSubmitNonBlank); + that.ui.uiMod.addClass("fb-mod--submiting"); + FB.api('/me/feed', 'post', {"message": val}, function(response) { + that.ui.uiMod.removeClass("fb-mod--submiting"); + if(response.error && response.error.code == 341){ + that.showTip(1, conf.tplSubmitLimit); + } + else if (!response || response.error) { + that.showTip(1, conf.tplSubmitFailed); + } + else { + that.showTip(1, conf.tplSubmitSucceed); + that.ui.textareaSubmit.attr("value", "").blur().height(40).parent().removeClass(submitFocusClass); + that.ui.body.animate({ + scrollTop: 0 + }, function() { + that.feedRender({data: [{ + from: { + id: that.cache.userID + , name: that.cache.userName + } + , id: response.id + , type: "status" + , updated_time: new Date() + , message: val.replace(/\r/ig, '
                                    ').replace(/\n/ig, '
                                    ') + }]}, 5); + }); + } + }); + }); + + that.ui.btnRefresh.click(function(e) { + that.refresh() + }); + + that.ui.sideHome.click(function(e) { + that.refresh(); + }); + + that.checkLoginStatus(that.updateLoginStatus); + + that.ui.list.find("a").live("click", that.actionHandle); + + that.ui.list.find(".fb-mod_li").live({ + mouseenter: function(e) { + $(this).attr("data-userID") === that.cache.userID && $(this).addClass("fb-mod_li--hover"); + }, + mouseleave: function(e) { + $(this).attr("data-userID") === that.cache.userID && $(this).removeClass("fb-mod_li--hover"); + } + }); + + that.ui.textareaSubmit.on({ + focus: function() { + !submitWrap.hasClass(submitFocusClass) && submitWrap.addClass(submitFocusClass); + }, + blur: function() { + setTimeout(function() { + submitWrap.hasClass(submitFocusClass) && submitWrap.removeClass(submitFocusClass); + }, 16); + } + }); + + submitWrap.mousedown(function(e) { + var el = $(this)[0]; + if($(e.target).hasClass("fb-mod_submit")) return; + e.preventDefault + ? e.preventDefault() + : el.onbeforedeactivate = function() { + WIN.event.returnValue = false; + el.onbeforedeactivate = null; + } + }); + + !(window.ActiveXObject && !window.XMLHttpRequest) && that.ui.fakeBox[0] && that.valueChange(that.ui.textareaSubmit[0], function(e) { + var $this = $(this), + fake = that.ui.fakeBox, + maxHeight = ~~conf.postBoxMaxHeight, + height, + minHeight; + + setTimeout(function() { + fake.height(minHeight = that.status.fixed ? 16 : 40); + height = Math.min(fake.attr("value", $this.attr("value"))[0].scrollHeight, maxHeight || 100); + $this.css({"overflow": height === maxHeight ? "auto" : "hidden"}).height(Math.max(height, minHeight)); + }, 16); + }); + + that.ui.side.find("a").live("click", function() { + that.showSideStatus($(this).find("em"), ""); + }); + + that.ui.panelFriend.delegate("button", "click", function() { + + // TODO: find out the api + window.open("https://www.facebook.com/friends/requests/"); + // confirm + // alert($(this).hasClass("fb-mod_btn-confirm")) + }) +} + +that.scrollHandle = function(e) { + var $this = $(this), + fake = that.ui.fakeBox, + textarea = that.ui.textareaSubmit, + scrolltop = $this.scrollTop(); + + if(scrolltop > 20) { + textarea.height(fake.attr("value", textarea.attr("value"))[0].scrollHeight - 2); + that.ui.uiMod.addClass("fb-mod--fixed"); + that.status.fixed = 2; + /*fix the FF bug*/ + $.browser.mozilla && that.ui.uiMod.hasClass("fb-mod--fold") && that.ui.uiMod.hasClass("fb-mod--fixed") && that.ui.uiMod.removeClass("fb-mod--fixed"); + } + else { + textarea.height() < 40 && textarea.height(40); + that.ui.uiMod.removeClass("fb-mod--fixed"); + that.status.fixed = 0; + } + + /*while ff is in rtl mod , the scrollTop will be lack of 1px whick causes the page cannot trigger the fresh function */ + $.browser.mozilla && $("html").attr("dir")=="rtl" && (scrolltop = scrolltop+1); + if(!that.cache.noOldPost && that.status.scrollLoaded !== 1 && + + scrolltop >= that.ui.list.height() + that.ui.textareaSubmit.parent().parent()[0].offsetHeight - that.ui.list.parent().height() - 50) { + + that.status.scrollLoaded = 1; + that.ui.uiMod.addClass("fb-mod--pulling"); + that.streamPull(2, "/me/home", that.cache.nextPost, that.feedRender); + } +} + +// check login status +that.checkLoginStatus = function(callback) { + // FB.Event.subscribe('auth.statusChange', that.updateLoginStatus); + FB.getLoginStatus(function(response) { + // record facebook id + response.authResponse && response.userID && $.cookie("__FBID", response.userID, { + expires: 10*365, + path: '/' + }); + // that.updateLoginStatus.call(that, response); + callback && callback.call(that, response); + }); +} + +/* +0 ==> login +1 ==> logout + */ +that.updateLoginStatus = function(response) { + + //already logged + if(response.authResponse) { + that.status.login = 2; + that.accessToken = response.authResponse.accessToken; + that.cache.userID = response.authResponse.userID; + that.streamPull(0, "/me", {}, function(response) { + if(response){ + that.usrinfoRender.call(that, response); + that.ui.uiMod.removeClass("fb-mod--login"); + that.streamPull(1, "/me/home", { + access_token: that.accessToken + }, that.feedRender); + } + }); + + that.ui.btnLogout[0].onclick = function(e) { + that.logout.call(that, response); + return !1; + } + } + else { + that.status.login = 0; + that.ui.uiMod.addClass("fb-mod--login").removeClass("fb-mod--loading"); + } +} + +that.logout = function(response) { + that.clickHandle($(that.ui.sideHome), "fb-mod_side_home_cur", that.ui.panelHome); + that.ui.uiMod.addClass("fb-mod--loading"); + FB.logout(function(response) { + that.status.login = 0; + that.ui.btnLogout[0].onclick = null; + that.usrinfoRender(); + that.feedRender({data: []}, 0); + that.ui.uiMod.addClass("fb-mod--login").removeClass("fb-mod--loading"); + + // reset num + that.ui.sideFriend.html("").hide(); + that.ui.sideMessages.html("").hide(); + that.ui.sideNotifications.html("").hide(); + that.autoRefresh.stop(); + that.ui.list.empty(); + }); +} + +that.refresh = function() { + that.cache.stayTip && that.showTip(~~(that.cache.stayTip = "")); + that.ui.body.animate({ + scrollTop: 0 + }); + that.ui.liveLoader.show(); + that.streamPull(4, "/me/home", that.cache.prePost, that.feedRender); +} + +that.autoRefresh = { + timer: null, + start: function() { + that.autoRefresh.stop(); + + // me/home?limit=1&fields=id + FB.api("/me/home?limit=1&fields=id", function(response) { + if(!response || response.error || !response.data.length) return; + + // timeline add 3 hours + new Date(response.data[0]["created_time"].replace(/-/g, "/").replace(/[TZ]/g, " ").replace(/\+/g, " +")) - that.cache.loadedTime > -3600000 * 3 + && that.showSideStatus(that.ui.sideHome, conf.tplNewLabel); + }); + that.autoRefresh.timer = setInterval(function() { + that.autoRefresh.refresh(); + }, conf.refreshInterval * 1000); + }, + + refresh: function () { + var ui = that.ui; + + + that.cache.prePost && that.streamPull(3, "/me/home", that.cache.prePost + "&fields=id", function(response) { + var l = that.autoRefresh.checkLength(response); +// (key ? response.data.length : Math.max(response.data.length - that.cache.myPost, 0)); + if(l - that.cache.myPost > 0) { + that.showTip(1, conf.tplNewPosts, {n: l - that.cache.myPost}); + + // ?? + that.showSideStatus(ui.sideHome, conf.tplNewLabel); + } + }); + + + window.FB.unreadMessage = 0; + // update slide icon num + $.each({ + "friendrequests": ui.sideFriend + , "notifications": ui.sideNotifications + , "inbox": ui.sideMessages + }, that.updateSide); + }, + + checkLength: function(response, key) { + if(!response || response.error) return 0; + + var length; + length = key + ? response[key] && response[key].summary ? response[key].summary.unread_count : 0 + : response.data ? response.data.length : 0 + + return length; + }, + + stop: function() { + that.autoRefresh.timer && clearInterval(that.autoRefresh.timer); + that.autoRefresh.timer = null; + }, + + status: function() { + return !!that.autoRefresh.timer; + } +} + +that.renderSidePanel = function(name, data, tpl, panel) { + var panels = { + friendrequests: that.ui.panelFriend, + notifications: that.ui.panelNotifications, + inbox: that.ui.panelMessages + }, + + tpls = { + friendrequests: '
                                    #{name}

                                    #{info}

                                    ', + + notifications: '
                                    #{name} 

                                    #{info}

                                    #{time}

                                    ', + + inbox: '
                                    #{name} 

                                    #{info}

                                    #{time}
                                    ', + + noNewMsg: '

                                    #{noNewMsg}

                                    ' + }, + + ret = [], + + tmp = {}; + + data = (((data || {})[name]) || {}).data; + tpl = tpl || tpls[name]; + panel = panel || panels[name]; + + if(data && data.length) { + $.each(data, function(key, val) { + + // msg(inbox) + if(val.comments && val.comments.data) { + $.each(val.comments.data, function(_key, _val) { + + tmp.url = "https://www.facebook.com/messages/" + _val.from.id; + tmp.avatar = "https://graph.facebook.com/" + _val.from.id + "/picture"; + tmp.info = _val.message; + tmp.name = _val.from.name; + + tmp.time = that.timeAgo(_val.updated_time || _val.created_time); + ret.push(tpl.replaceTpl(tmp)); + }); + } + + // friend or notif + else if(val.from){ + tmp.id = val.from.id; + tmp.url = "https://www.facebook.com/" + val.from.id; + tmp.avatar = "https://graph.facebook.com/" + val.from.id + "/picture"; + tmp.name = val.from.name; + tmp.info = val.title ? val.title.replace(tmp.name, "") : ""; + // CMS + tmp.confirm = conf.tplConfirm || "Confirm"; + tmp.later = conf.tplLater || "Later"; + + tmp.time = that.timeAgo(val.updated_time || val.created_time); + ret.push(tpl.replaceTpl(tmp)); + } + }); + } + else { + ret.push(tpls.noNewMsg.replaceTpl({ + noNewMsg: conf.tplNoNewMsg || "No new messages." + })) + } + + // update render cache(stop render every request) + that.cache.panelRendered < 3 && (that.cache.panelRendered ++); + panel.html(ret.join("")); +} + +that.updateSide = function(name, el) { + var unread; + that.streamPull(3, "/me", { + "fields": name + }, function(response) { + (name === "friendrequests") && (unread = that.autoRefresh.checkLength(response, name)); + + (name === "notifications" || name === "inbox") && (unread = response[name] ? (response[name].summary || {}).unseen_count : 0) + // that.autoRefresh.checkLength(response, name) && response[name] && that.showSideStatus(el, response[name].data.length); + that.showSideStatus(el, unread); + var un = unread || 0; + window.FB.unreadMessage = window.FB.unreadMessage + un; + if(that.cache.panelRendered < 3 || !!that.status.fold) that.renderSidePanel(name, response); + }); +} + +that.showSideStatus = function(el, n) { + el[0] === that.ui.sideHome[0] && (el = el.find("em")); + el.html(n); + n ? el.show() : el.hide(); +} + +that.usrinfoRender = function(response) { + var usrinfo = response + ? TPL_CONF.tplUser.replaceTpl({name: response.name, usrId: response.id}) + : "", + avatar = response + ? TPL_CONF.tplAvavatar.replaceTpl({pId: response.id}) + : ""; + that.ui.usrinfo.html(usrinfo); + that.ui.avatar.html(avatar); + if(!response) return; + that.cache.userName = response.name; + that.cache.userID = response.id; +} +that.streamPull = function(type, api, param, callback) { + + param + "" !== param && (param = api + '/?' + that.formatQuery(param)); + + // console.log(param); + FB.api(param, function(response) { + callback && callback.call(that, response, type); + }); +} + +// 1358173295000 ==> 1358173295 +that.toUnixTime = function(str) { + return Math.round(new Date(str).getTime()/1000); +} + +that.formatQuery = function(obj) { + var arr = [], + li; + for(li in obj) obj.hasOwnProperty(li) && obj[li] !== undef && arr.push(li + "=" + obj[li]); + return arr.join("&"); +} + + +/* +api : +0 not for post +1 init +2 scroll pull +3 auto refresh +4 refresh +5 from my + +if autoRefresh param: fields=updated_time + */ +that.feedRender = function(response, type) { + if(!response || response.error) return that.showTip(1, conf.tplNetworkError); + + var i = 0, + l = response.data.length, + li, + arr = [], + temp; + + + type === 1 && that.ui.body.scroll(that.scrollHandle); + + // scroll pull: update status + type === 2 && (that.status.scrollLoaded = 2); + that.ui.uiMod.removeClass("fb-mod--loading").removeClass("fb-mod--pulling"); + that.ui.liveLoader.hide(); + that.showSideStatus(that.ui.sideHome, ""); + + if(!l) { + if(type === 2) { + that.cache.noOldPost = 1; + that.showTip(1, conf.tplNoOldPost); + } + + if(type === 1 || type === 4) { + that.showTip(1, conf.tplNoNewPost); + } + return; + } + + + // init: bind scroll event + if(type === 1) { + // cache post timestamp + // that.cache.prePost = that.toUnixTime(response.data[0]["created_time"]); + // that.cache.nextPost = that.toUnixTime(response.data[l - 1]["created_time"]); + + that.cache.prePost = response.paging.previous; + that.cache.nextPost = response.paging.next; + // that.autoRefresh.start(); + } + + // scroll: + if(type === 2) { + // cache post timestamp + + // "https://graph.facebook.com/100002343724582/home?limit=25&access_token=AAAGlLuZAFQYYBANOISQA5tyfINyjNIZBk774ABIJP2AncS3BikWjr4qqbxuj5l0ZAYIx66lt39o0FIAZBZBfU1Uabnhjo1CM7XWQdHd1IOnrUS3E1d7XM&until=1358085399" + + // that.cache.nextPost = response.paging.previous ? response.paging.previous.match(/since=(.*)[^$&]/)[1] : that.toUnixTime(response.data[l - 1]["created_time"]); + // that.cache.refreshPost = that.toUnixTime(response.data[l - 1]["created_time"]); + + that.cache.nextPost = response.paging.next; + } + + // refresh + if(type === 4) { + that.cache.prePost = response.paging.previous; + } + + if(type === 5) { + that.cache.myPost ++; + } + + + for(; i story + li.type !== "question" && arr.push(TPL_CONF.tplLi.replaceTpl({ + // id: li.application.id + id: li.id + , usrId: li.from.id + , author: li.from.name + , tplLike: conf.tplLike + , tplComment: conf.tplComment + , tplShare: conf.tplShare + , homepage: "https://www.facebook.com/" + li.from.id + , message: (li.message || li.story || "").replace(/\r/ig, '
                                    ').replace(/\n/ig, '
                                    ') + + , photo: li.type === "photo" ? '#{alt}'.replaceTpl({ + src: li.picture + , href: li.link + , alt: li.message + // , width: 300 + // Fix: image width = 1 on IE + , width: window.ActiveXObject ? "130" : "" + , height: "" + }) : "" + , video: li.type === "video" || (li.type === "link" && li.picture) ? ''.replaceTpl({ + cover: li.picture + , type: li.type + , href: li.link + , alt: li.name + , width: window.ActiveXObject ? "50" : "90" + // , height: "" + , caption: li.caption + , title: li.name + , des: li.description + }) : "" + , quote: li.type === "link" && li.application && !li.picture ? TPL_CONF.tplQuote.replaceTpl({ + href: li.link + , des: li.description + , caption: li.caption + , title: li.name + }) : "" + , time: that.timeAgo(li.updated_time) + // , time: that.timeAgo(li.created_time) + })); + } + + // console.log(that.cache.myPost) + if(type === 4 && that.cache.myPost) { + that.ui.list.find("li:lt(" + that.cache.myPost + ")").remove(); + that.cache.myPost = 0; + } + + temp = that.ui.list.html(); + + that.ui.list.html((type === 2 ? temp : "") + arr.join("") + (type === 2 ? "" : temp)); + + if(type === 5) $(that.ui.list.find("li")[0]).fadeOut().fadeIn(); +} + +// https://developers.facebook.com/docs/reference/api/post/ + +that.streamPush = function(name, description, hrefTitle, hrefLink, userPrompt){ + + FB.ui({ + method: 'stream.publish', + message: '', + + attachment: { + name: name, + caption: '', + description: (description), + href: hrefLink +        }, + +        action_links: [{ + text: hrefTitle, + href: hrefLink + }], + + user_prompt_message: userPrompt + }, function(response) { + if(response && response.post_id) { + alert('Post was published.'); + } + else { + alert('Post was not published.'); + } + }); +} + +that.actionHandle = function(e) { + var $this = $(this), + id, + uid; + // $this.hasClass("fb-mod_li_like") + // $this.hasClass("fb-mod_li_comment") + +// https://www.facebook.com/ajax/sharer/?s=22&appid=25554907596&p%5B0%5D=100002343724582&p%5B1%5D=394783520609769 + if($this.hasClass("fb-mod_li_share")) { + + /*FB.ui({ + method: 'stream.share' + , display: "dialog" + , t: "title" + }, function(response) { + console.log(response); + }); +*/ + var $wrap = $this.parent().parent().find(".fb-mod_li_actice"); + + FB.ui({ + method: "feed", + name: $wrap.find("a")[0] ? $wrap.find("a").html() : "", + // link: $wrap.parent().find("a")[2] ? $wrap.parent().find("a")[2].href : "", + link: $wrap.find("a")[0] ? $wrap.find("a").attr("href") : "", + // picture: $wrap.parent().find("img").attr("src"), + picture: "", + // picture: "http://br.hao123.com/resource/br/img/i-hot-sprite.png", + // picture: $wrap.parent().parent().find(".fb-mod_li_avatar img").attr("src"), + description: $wrap.html() + }, function(response) { + that.showTip(1, response && response.post_id ? conf.tplPublishedSucceed : conf.tplPublishedFailed); + }); + } + + if($this.hasClass("fb-mod_li_close")) { + /*FB.ui({ + method: "stream.remove" + + // session user + // , uid: "" + , post_id: $this.parent().attr("data-id") + }, function(response) { + console.log(response) + })*/ + + FB.api($this.parent().attr("data-id"), 'delete', function(response) { + if(!response || response.error) return that.showTip(1, conf.tplDeleteFailed); + that.showTip(1, conf.tplDeleteSucceed); + $this.parent().fadeOut(); + }); + } + + if($this.hasClass("fb-mod_li_like")) { + id = $this.parent().parent().parent().attr("data-id"); + uid = $this.parent().parent().parent().attr("data-userid"); + + if($this.hasClass("fb-mod_li_liked")) { + FB.api(id + '/likes', 'delete', function(response) { + if(!response || response.error) return that.showTip(1, conf.tplUnLikeFailed); + $this.html(conf.tplLike).removeClass("fb-mod_li_liked"); + }); + } + else { + FB.api(id + '/likes', 'post', function(response) { + if(!response || response.error) return that.showTip(1, conf.tplLikeFailed); + + uid === that.cache.userID + ? $this.html(conf.tplUnLike).addClass("fb-mod_li_liked") + : $this.html(conf.tplLiked || "liked").addClass("fb-mod_li_likeded") + }); + } + } +} + +that.timeAgo = function(time) { + var date = time + "" === time ? new Date(time.replace(/-/g, "/").replace(/[TZ]/g, " ").replace(/\+/g, " +")) : time, + diff = (((new Date).getTime() - date.getTime()) / 1000), + day_diff = Math.floor(diff / 86400); + + if(isNaN(day_diff) || day_diff < 0 || day_diff >= 31) return time.split(/[TZ]/)[0]; + return day_diff == 0 && ( + diff < 60 && conf.tplTimeLine_1 || + diff < 120 && conf.tplTimeLine_2 || + + // diff < 3600 && Math.floor( diff / 60 ) + conf.tplTimeLine_3 || + diff < 3600 && (/#{/.test(conf.tplTimeLine_3) + ? conf.tplTimeLine_3.replaceTpl({n: Math.floor(diff / 60)}) + : (Math.floor(diff/60) + conf.tplTimeLine_3)) || + + diff < 7200 && conf.tplTimeLine_4 || + + // diff < 86400 && Math.floor( diff / 3600 ) + conf.tplTimeLine_5) || + diff < 86400 && (/#{/.test(conf.tplTimeLine_5) + ? conf.tplTimeLine_5.replaceTpl({n: Math.floor(diff / 3600)}) + : (Math.floor( diff / 3600 ) + conf.tplTimeLine_5))) || + + day_diff == 1 && conf.tplTimeLine_6 || + day_diff < 7 && day_diff + conf.tplTimeLine_7 || + // day_diff < 31 && Math.ceil( day_diff / 7 ) + conf.tplTimeLine_8 || + time.replace(/.{5}$/, ""); +} + +module.exports = FBClient; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient-tpl.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient-tpl.js new file mode 100755 index 000000000..7f6fbee16 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient-tpl.js @@ -0,0 +1,22 @@ +/** + * from conf.facebook + * @type {{tplPlaceholder: string}} + */ +var TPL_CONF = { + // tpl + tplUser: '#{name}' + , tplAvavatar: '' + + , tplLi: '
                                  • #{author} #{message}

                                    #{photo}#{video}#{quote}
                                    #{tplLike} · #{tplShare} · #{time}
                                    ×
                                  • ' + +// , tplLiPhoto: '#{alt}' + +// , tplLiVideo: '' + + , tplQuote: '' + + , tplPlaceholder: '
                                    ' +}; + +module.exports = TPL_CONF; + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient.js new file mode 100755 index 000000000..c7096b2df --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/fbclient.js @@ -0,0 +1,343 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var FBClient = {}; +var TPL_CONF = require('home:widget/ui/facebook/fbclient-tpl.js'); +/** + * Fackbook module init function + * @return {object} [description] + */ + +var WIN = window, + DOC = document, + conf = WIN.conf.FBClient, + undef; +var UI_CONF = { +// ui el + uiMod: "#fbMod" + , uiBtnLogin: ".fb-mod_login_btn" + , uiBtnLogout: ".fb-mod_logout" + , uiBtnRefresh: ".fb-mod_refresh" + , uiSide: ".fb-mod_side" + , uiBtnClose: ".fb-mod_close" + , uiWrap: ".fb-mod_wrap" + , uiList: ".fb-mod_list" + , uiUsrinfo: ".fb-mod_usrinfo" + , uiAvatar: ".fb-mod_avatar" + , uiTextareaSubmit: ".fb-mod_submit" + , uiBtnSubmit: ".fb-mod_submit_btn" + , uiBody: ".fb-mod_body" + , uiTip: ".fb-mod_tip" + , uiSideHome: ".fb-mod_side_home" + , uiSideFriend: ".fb-mod_side_friend em" + , uiSideMessages: ".fb-mod_side_messages em" + , uiSideNotifications: ".fb-mod_side_notifications em" + , uiBodyLoader: ".fb-mod_body_loader" +}; + + + +FBClient.init = function() { + + // DOC.body.innerHTML += '
                                    '; + + var that = this, + $this = $(UI_CONF.uiMod); + + /* + ui controller + */ + that.ui = { + uiMod: $this + , side: $this.find(UI_CONF.uiSide) + , btnLogin: $this.find(UI_CONF.uiBtnLogin) + , btnLogout: $this.find(UI_CONF.uiBtnLogout) + , btnClose: $this.find(UI_CONF.uiBtnClose) + , btnRefresh: $this.find(UI_CONF.uiBtnRefresh) + , wrap: $this.find(UI_CONF.uiWrap) + , list: $this.find(UI_CONF.uiList) + , usrinfo: $this.find(UI_CONF.uiUsrinfo) + , avatar: $this.find(UI_CONF.uiAvatar) + , textareaSubmit: $this.find(UI_CONF.uiTextareaSubmit) + , btnSubmit: $this.find(UI_CONF.uiBtnSubmit) + , body: $this.find(UI_CONF.uiBody) + , tip: $this.find(UI_CONF.uiTip) + , sideHome: $this.find(UI_CONF.uiSideHome) + , sideFriend: $this.find(UI_CONF.uiSideFriend) + , sideNotifications: $this.find(UI_CONF.uiSideNotifications) + , sideMessages: $this.find(UI_CONF.uiSideMessages) + , bodyLoader: $this.find(UI_CONF.uiBodyLoader) + + , panelHome: $this.find(".fb-mod_c") + , panelFriend: $('') + , panelNotifications: $('') + , panelMessages: $('') + , bubble: $('
                                    ' + (conf.tplBubble || "NEW") + '
                                    ') + + + , placeholder: function(first, last) { + return $(TPL_CONF.tplPlaceholder.replaceTpl({first: first, + last: last + })) + } + }; + + // live loader + that.ui.liveLoader = that.ui.bodyLoader.clone(!0) + .css({"width": "370px"}) + .insertBefore(that.ui.list).hide(); + + $("body").append('
                                    '); + + that.ui.wrap.append(that.ui.panelFriend).append(that.ui.panelNotifications).append(that.ui.panelMessages); + + + // window.ActiveXObject && !window.XMLHttpRequest && + $("body").append(that.ui.fakeBox = $(that.ui.textareaSubmit[0].cloneNode(false)).css({ + "position": "absolute" + , "top" : "0" + , "left": "0" + , "right": "-10000px" + , "visibility": "hidden" + , "padding-top": "0" + , "padding-bottom": "0" + , "height": "18" //for fixed + , "width": that.ui.textareaSubmit.width() + })); + + that.supportAnimate = function(style, name) { + return 't' + name in style + || 'webkitT' + name in style + || 'MozT' + name in style + || 'OT' + name in style; + }((new Image).style, "ransition"); + + /* + status controller + 0 ==> none + 1 ==> doing + 2 ==> done + */ + that.status = { + login: 0 + , fold: 0 + , sdkLoaded: 0 + , scrollLoaded: 0 + , insertLoaded: 0 + , fixed: 0 + , eventBinded: 0 + + , bubble: 0 + }; + + // bubble + !$.cookie("fb_bubble") && (that.status.bubble = 1, that.ui.uiMod.append(that.ui.bubble)); + + /* + post status cache + */ + that.cache = { + prePost: null + , nextPost: null + , refreshPost: null + , noOldPost: 0 + , myPost: 0 + , stayTip: "" + , userID: null + , userName: "" + + , panel: that.ui.panelHome + , curSideType: "" + , panelRendered: 0 + }; + + that.ui.btnClose.mousedown(function(e) { + UT && UT.send({"type": "click", "position": "fb", "sort": that.status.fold === 0 ? "pull" : "fold","modId":"fb-box"}); + that.foldHandle.call(that, e); + }); + + $(".fb-mod_side_logo").mousedown(function(e) { + + UT && UT.send({"type": "click", "position": "fb", "sort": that.status.fold === 0 ? "pull" : "fold","modId":"fb-box"}); + that.foldHandle.call(that, e); + }); + + $(".fb-mod_side_home").mousedown(function(e) { + UT && that.status.fold === 0 && UT.send({"type": "click", "position": "fb", "sort": "pull","modId":"fb-box"}); + UT && UT.send({"type": "click", "position": "fb", "sort": "icon_home","modId":"fb-box"}); + that.status.fold === 0 && that.foldHandle.call(that, e); + that.clickHandle($(this), "fb-mod_side_home_cur", that.ui.panelHome); + }); + + $(".fb-mod_side_friend").mousedown(function(e) { + var logObj = { + "type": "click", + "position": "fb", + "sort": "icon_friend", + "modId": "fb-box" + }; + if(that.status.login !== 2) { + logObj.ac = "b"; + } + UT && UT.send(logObj); + + if(that.status.login !== 2) return false; + + that.status.fold === 0 && that.foldHandle.call(that, e); + that.clickHandle($(this), "fb-mod_side_friend_cur", that.ui.panelFriend); + }); + + $(".fb-mod_side_messages").mousedown(function(e) { + + var logObj = { + "type": "click", + "position": "fb", + "sort": "icon_messages", + "modId": "fb-box" + }; + if(that.status.login !== 2) { + logObj.ac = "b"; + } + UT && UT.send(logObj); + + if(that.status.login !== 2) return false; + that.status.fold === 0 && that.foldHandle.call(that, e); + that.clickHandle($(this), "fb-mod_side_messages_cur", that.ui.panelMessages); + }); + + $(".fb-mod_side_notifications").mousedown(function(e) { + var logObj = { + "type": "click", + "position": "fb", + "sort": "icon_notifications", + "modId": "fb-box" + }; + if(that.status.login !== 2) { + logObj.ac = "b"; + } + UT && UT.send(logObj); + + if(that.status.login !== 2) return false; + that.status.fold === 0 && that.foldHandle.call(that, e); + that.clickHandle($(this), "fb-mod_side_notifications_cur", that.ui.panelNotifications); + }); + + that.ui.btnRefresh.mousedown(function(e) { + UT && UT.send({"type": "click", "position": "fb", "sort": "refresh","modId":"fb-box"}); + }); + + $(".fb-mod_side_friend").click(function(e) { + e.preventDefault(); + }); + $(".fb-mod_side_messages").click(function(e) { + e.preventDefault(); + }); + $(".fb-mod_side_notifications").click(function(e) { + e.preventDefault(); + }); + + // 7. FB-APP的打开、收缩机制;——点击F、箭头、new三个地方打开,点击F、箭头两个地方关闭;做上新功能上线的提示图标,放cookies内; + // + // kill the feature + // that.ui.side.mouseover(function(e) { + // that.status.fold === 0 && that.foldHandle.call(that, e); + // }); + + that.ui.textareaSubmit.attr("placeholder", conf.tplSuggestText); + + // sdk loading + that.status.sdkLoaded = 1; + + /*$.ajax({ + url: that.conf.modPath, + dataType: "script", + cache: true, + success: function() { + }, + error: function() { + } + });*/ + + require.async('home:widget/ui/facebook/fbclient-core.js'); +}; + +if(window.ActiveXObject && !window.XMLHttpRequest) { + var body = DOC.body; + if(body) { + body.style.backgroundAttachment = 'fixed'; + if(body.currentStyle.backgroundImage == "none") { + body.style.backgroundImage = (DOC.domain.indexOf("https:") == 0) ? 'url(https:///)' : 'url(about:blank)'; + } + } +} + +FBClient.clickHandle = function($el, type, panel) { + var that = this, + fold = that.status.fold, + sideHome = that.ui.sideHome, + cache = that.cache; + + // fold && sideHome.removeClass(type); + cache.curSide && cache.curSide.removeClass(cache.curSideType); + $el && $el.addClass(type); + cache.curSide = $el; + cache.curSideType = type; + + cache.panel && cache.panel.hide(); + panel && panel.show(); + cache.panel = panel; +}; + +FBClient.foldHandle = function(e) { + var that = this, + fold = that.status.fold, + sdkLoaded = that.status.sdkLoaded; + + // playing animation + if(fold === 1) return; + that.status.fold = 1; + + that.clickHandle(fold ? null : that.ui.sideHome, fold ? "" : "fb-mod_side_home_cur", that.ui.panelHome); + that.status.bubble && ($.cookie("fb_bubble", 1), that.status.bubble = 0, that.ui.bubble.hide()); + + fold + ? that.ui.uiMod.removeClass("fb-mod--fixed").addClass("fb-mod--fold") + : that.ui.uiMod.removeClass("fb-mod--fold"); + + setTimeout(function() { + // fold ? sideHome.removeClass("fb-mod_side_home_cur") : that.ui.sideHome.addClass("fb-mod_side_home_cur"), that.cache.curSideType = "fb-mod_side_home_cur"; + + (that.status.fold = fold ? 0 : 2) && that.status.fixed && that.ui.uiMod.addClass("fb-mod--fixed"); + if (!that.status.eventBinded) { + if (sdkLoaded === 2) { + that.bindEvent.call(that); + that.status.eventBinded = 2; + } else { + var t = setInterval(function () { + if (that.status.sdkLoaded === 2) { + that.bindEvent.call(that); + that.status.eventBinded = 2; + clearInterval(t); + } + }, 1000); + } + } + + if(fold || sdkLoaded) return; + + !function(el) { + if($.browser.mozilla){ + el.addEventListener('DOMMouseScroll',function(e){ + el.scrollTop += e.detail > 0 ? 30 : -30; + e.preventDefault(); + }, !1); + } + else el.onmousewheel = function(e){ + e = e || WIN.event; + el.scrollTop += e.wheelDelta > 0 ? -30 : 30; + e.returnValue = false; + }; + }(that.ui.body[0]) + }, that.supportAnimate ? 300 : 0); +}; + +module.exports = FBClient; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/sns-share.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/sns-share.js new file mode 100755 index 000000000..09aa6d20d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/facebook/sns-share.js @@ -0,0 +1,112 @@ +/* + var addthis_config = + { + ui_use_css: false + }; + var addthis_share = + { + templates: { + twitter: 'twitter:check out {{url}} (from {{title}})-{{html}} ', + } + }*/ + + +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var conf = window.conf; + +var snsShare = { + data: conf.snsShare, + containterTpl: "
                                    "+ (conf.snsShare.shareWord ? conf.snsShare.shareWord : "share") + "
                                    #{innertpl}
                                    ", + shareItemTpl: "", + init: function(){ + this.html(this.data); + this.bindEvents(this.data); + }, + html: function(data){ + var shareUrl = encodeURIComponent(window.location.href), + shareImg = encodeURIComponent(window.location.protocol+'//'+window.location.host+data.content.logoSrc), + shareTitle = encodeURIComponent(data.content.title), + shareDesc = encodeURIComponent(data.content.description), + list = data.list, + type = "", + customUrl = "", + defaultUrl = "", + listHtml = ""; + for(var i = 0; i < list.length; i++){ + type = encodeURIComponent(list[i].name); + defaultUrl = "http://api.addthis.com/oexchange/0.8/forward/"+type+"/offer?url="+shareUrl; + if(list[i].customUrl){ + customUrl = list[i].customUrl.replace(/(#{shareurl}|#{sharetitle}|#{sharedesc}|#{shareimg})/g, function($0, $1) { + return { + "#{shareurl}": shareUrl, + "#{sharetitle}": shareTitle, + "#{sharedesc}": shareDesc, + "#{shareimg}": shareImg + }[$1]; + }); + }else{ + customUrl = defaultUrl; + } + if(list[i].name == "facebook"){ + customUrl = "###"; + } + listHtml += this.shareItemTpl.replace(/(#{index}|#{customurl}|#{sharetype})/g, function($0, $1) { + return { + "#{index}": list[i].className||i+1, + "#{customurl}": customUrl, + "#{sharetype}": type + }[$1]; + }); + } + + // alert(this.containterTpl.replace(/#{innertpl}/g,listHtml)); + + $(document.body).append(this.containterTpl.replace(/#{innertpl}/g,listHtml)); + $("#snsShareList").children().last().css("margin-bottom", "8px"); + }, + bindEvents: function(data){ + $("#snsShareBox a").click(function(event){ + var windowWidth = 600, + windowHeight = 330, + top = (window.screen.height - windowHeight) / 2, + left = (window.screen.width - windowWidth) / 2, + tar = event.target, + val = $(tar).attr("data-val"); + + UT && UT.send({"type": "click", "position": "sns", "sort": val,"modId":"sns"}); + + if($(this).hasClass("snsshare_button_fb")){ + FB.ui({ + method: "feed", + name: data.content.title, + link: window.location.href, + picture: window.location.protocol+'//'+window.location.host+data.content.logoSrc, + description: data.content.description + }, function(response) { + + }); + return false; + } + + window.open($(this).attr("href"),"","width="+windowWidth+",height="+windowHeight+",top="+top+",left="+left+",location=yes,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no"); + return false; + }); + + $("#snsShareBtn").mouseenter(function(){ + $(this).css("backgroundColor", "#BFCFE2"); + + var el = $('#snsShareList'), + curHeight = el.height(), + autoHeight = el.css('height', 'auto').height(); + el.height(curHeight).animate({height: autoHeight}, {queue:false,duration:300}); + }); + + $("#snsShareBox").mouseleave(function(){ + $("#snsShareBtn").css("backgroundColor", "#D4DCE6"); + $("#snsShareList").animate({height: "0px"}, {queue:false,duration:300}); + }); + } +}; + +module.exports = snsShare; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/fb-feed/fb-feed.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/fb-feed/fb-feed.js new file mode 100755 index 000000000..01f1aca33 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/fb-feed/fb-feed.js @@ -0,0 +1,143 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var helper = require('common:widget/ui/helper/helper.js'); +var FBShare = function($el,opt){ + var that = this; + that.btnFbShare = $el; + that.canDraw = opt.supportDraw && opt.supportCanvas; + that._init(opt); +}; +var fn = FBShare.prototype; +fn._init = function(opt){ + var that = this; + // 控制触发分享频率的标志位,只有为1时可以触发 + that.enableFbShare = 1; + // loading icon + that.loadingIcon = that.btnFbShare.siblings(".ui-o"); + that.opt = opt; + // init share parameters + that.shareOpt = opt.fbShare; + that.urlPrefix = window.location.protocol+'//'+ conf.host; + $.extend(true, that.shareOpt, { + service: "facebook_feed", + info: { + app_id: conf.fbAppId, + redirect_uri: that.urlPrefix+"/static/common/close.html", + landing_uri: that.urlPrefix+"/static/common/landing.html" + } + }); + // default share image + that.defaultImage = that.shareOpt.info.image; + // 支持canvas的浏览器初始化canvas + that.canDraw && that._initCanvas(); + + require.async('common:widget/ui/sns-share/sns-share.js',function(snsShare){ + // 绑定分享 + that._bindShare(); + }); +}; +// init canvas +fn._initCanvas = function(){ + var that = this, + draw = that.draw = {}, + canvasOpt = that.shareOpt.ui.canvas; + draw.canvasWidth = parseInt(canvasOpt.width,10), + draw.canvasHeight = parseInt(canvasOpt.height,10); + draw.canvas = $("")[0]; + draw.ctx = draw.canvas.getContext("2d"); + that.initComponent(draw); +}; +// init components on canvas +fn.initComponent = function(draw){ + this.opt.callback.initComponent && this.opt.callback.initComponent.call(this,draw); +}; +// draw result on canvas +fn.drawResult = function(draw,result){ + this.opt.callback.drawResult && this.opt.callback.drawResult.call(this,draw,result); +}; +// 弹出facebook对话框 & 恢复分享按钮为可用状态 +fn._startToShare = function(){ + var that = this, + opt = that.opt; + $.snsShare(that.shareOpt); + if(that.canDraw){ + that.btnFbShare.removeClass(opt.disableClass); + that.enableFbShare = 1; + that.loadingIcon.hide(); + } +}; +// 上传图片到图片服务器 +fn._uploadImage = function(dataURL){ + var that = this; + $.ajax({ + url: conf.uploadUrlPrefix, + type: "POST", + xhrFields: { + withCredentials: true + }, + progressData: false, + data: { + type: 1, + appid: 1, + data: dataURL.replace(/^[^,]*,/,"") + } + }).done(function(data){ + data = $.parseJSON(data); + if(data.errno === 1){ + that.shareOpt.info.image = data.link; + } + that._startToShare(); + }).error(function(){ + that._startToShare(); + }); +}; +// 给share按钮绑定share事件 +fn._bindShare = function(){ + var that = this, + opt = that.opt, + descTpl = that.shareOpt.info.description; + that.btnFbShare.click(function(e) { + if(that.enableFbShare){ + opt.callback.onClick && opt.callback.onClick.call(this); + if(that.canDraw){ + var winWidth = 555 + , winHeight = 382; + that.shareOpt.ui.winHandle = window.open(that.shareOpt.info.landing_uri,"new","height="+ winHeight +",innerHeight="+ winHeight +",width="+ winWidth +",innerWidth="+ winWidth +",top="+(screen.height - winHeight) / 2+",left="+(screen.width - winWidth) / 2+",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no"); + // 在当前分享窗口未弹出之前禁止再次触发分享 + that.enableFbShare = 0; + // 按钮置灰 + that.btnFbShare.addClass(opt.disableClass); + // 显示loading icon + that.loadingIcon.css("display","inline-block"); + } + + // 测速结果数据 + var result = opt.data; + // 设置分享默认图片 + that.shareOpt.info.image = (/^http/.test(that.shareOpt.info.image) ? "" : that.urlPrefix) + that.defaultImage; + // 拼分享summary文案 + that.shareOpt.info.description = helper.replaceTpl(descTpl, result) || ""; + // 支持canvas,根据测速结果画图并上传到图片服务器 + if(that.canDraw){ + var draw = that.draw; + that.drawResult(draw,result); + that._uploadImage(draw.canvas.toDataURL("image/png")); + // 不支持canvas,使用默认图片分享 + }else{ + that._startToShare(); + } + } + e.preventDefault(); + }); +}; +// jQuery plugin wraper +$.fn.extend({ + /** + * plugin + * + * @param {Object} argument comment + */ + bindFBShare: function(args) { + return new FBShare(this, args); + } +}); +// module.exports = FBShare; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/fool-day/fool-day.min.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/fool-day/fool-day.min.js new file mode 100755 index 000000000..0177903cd --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/fool-day/fool-day.min.js @@ -0,0 +1,52 @@ +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require('common:widget/ui/ut/ut.js'); +require('common:widget/ui/jquery/jquery.cookie.js'); + +var foolWorld=function(A,e,t,i,n){var o={whiteIceMan:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAABpCAMAAABvRN9KAAAAn1BMVEUAAADExMQZGRkZGRmLfGqMfWvExMQmJiY6NS4zMzPh4eHExMRCleA7OztWTkT39/f////v7+8zMzPvanoVFRUhISApKSnm5uapbwAAAADIyMjgXm2ZZgA7Ozvf39/1c4PRHST+v5zEVBjkdSvW1tbx6eqvDRGHAgPaz7+0ewC+taqqmoSbBwqLeWaWh3aAYiSxpZSHh4ekjmJrSQCAWghs8AFdAAAAD3RSTlMA/VXpM4iZIhEzMyIRmcFfHupdAAAGAElEQVRo3uyX6XKiQBSFCYugxmGZ7mYpYFxwJS6Z5P2fbW5vXEUmGkmq5sd8lpqY1NeH07ep0vjPv4RpEUJM41swCfBNetciACWA++XyCZUQwHK/OjgDqMbyDInnmqbbW84ippF68SlsMscy+8kjTeOfwPxQojF7ytGvsKiGp+9ht6Iu/Zqe8Xj3kwjBJYppQZGHqxlGnbxNp+Iy0N6/F2Q15XqN+7XRiymntz1infajsOs9th6NzhRd0d/0r5NetxcmuI6uGT56CyCEKq6iryJNv1s6QFsDAxRNMc/j8fj5gWK0m7APou8ywdNg9Dk7TVPCH0TXjnKM/hqGfgCEJSzw/ImJISmHUKbBXt4iTRk0+OXT3fldk0g5h2lWrV5eg3PC6s747nDC3YQibTlGR+6MPwQ7aVD6lSS6io7E2eie6MOhKbzqAay1HAkQ1I9vysEOeovAyMgnpR3yqq0O6wzKuW0HPWApNwR/Eaxe2Ee97Bk9BeXgll3rzVTuLcgllHXI0S42Ohvftut2UnALwL2Ws4nz0mE/BPHgtr1pZ91AKENQjuzAXgS3wrvIkELpAkrOz1UVdOAXlIG9HNxrF3PJc5OLc7W7zFyc1GmKyAFGR46NZztOo9zaXXaLUKKgiJAjBWOgF/DC/J3tLID5nCtth79st43dQ7vQylMl6ZD7vO5Yjfxm9gvEUu6I1BAbXnK0o56kauTx2BaVH7Syg16E92cLzVzIgWTrGN42sdEOYO3Kn6rsRRUGLWoGk8jlizm6oRZlTwwHnmjnSHuq9foaiuUy9FuEBaUHeK/nc5R7SuZA5UliY/WeRNglRC8yKONY25GygLr87Pe8AYuwky1EB3eSoF3631ME7JY3qNDeokT7QgbX1YAZ3LmDdkl+budfNEbZ3+xhle2Uezcyzu0Ad+sV0W7TC7e0L7vtcZXVXF6H2fO53eHuHNxXdiNXelP/Fexx21uKq4lBf6rr0hdnFbFBjm608x/z5P3H+9k8XW9rtT9VYpGlWlfdZ7AZXnhbz0+Y49mwITitXcXXm+PG5yzrvXjPxq3ooOogaTCQp3b4k785Hg91vd/vwtvRESfPr+0jbB7Z7E4b9WGYjT6OjthqAeM8PB/5TpblBrgjOuI5OT/IyDgrUY/e2ezXT4FzV3Qkv/yXUaNfxps/pZnhjqIwFIUlAWYXMSPZZLpppYRsSQgENL7/w+0pnXrDiJSL3w/jjDOfh9NrhdDW0FovEc+iXwJyjOW8mxR63ZKU+Bk+tqMeIv7RXtaReMHOig6SefWx+rMCpU0oOqN6pTZFTyg6o/pfK3alnjeYMPGFqo+VeuluZZr7/7hcqM5wNwllV4tuyN0lAkNO3fhyEgUW3Hho7Dl8ij+H3KXZ2s1jabNOOZzX/1BVlaqmC7TUyrGiLD2I3YfVnhWpB1XVtngAStVnoHuu3B0tDvcIuUMIrYVoCrvzIjrAcTST/o5x4XKxRJATMJ8tahb+E/swnwT2v5qcROXtanpFRPkOfWz1beHdRO3trho6i+eQd1f42/MTWNaJf/X3i/LIt6emuUPfv7TX3i5SfnSJzjFu9ye7mNuBzPnRMYWyv96e7I2a3AC972w+0hZRnBft9YRf8SJiFyMEzcvc7txUDH9dM1v7edlOco9JmbXrkJ0OjD81kcCndMXe0IuB4pn2tm6dm/iUPLt8bX/8mqrDxPPt64xlOfrn8si0N826vCtB5+0Zr/egvYf82u/LHjGyc+x01RToffj6Gh695+xNLLSsdHSciaTL1a00EXsXC1Wjx9F8OkTK3oED1YgrVlW65yZjf3sEwt+u0I80MvxqitV5B27eg5sYP7zGXarS0BU9jywU3oyDdNFp2pnhiw0gOp+jFNv0tKYc0m16Q9FZRHKDXUeHfeRRuHpNvXA5BvWavjf26KXWolmRDx+H/eQp9C/jm24of79h/zgNHfyLemGwG5wOb3AqsVXJJb+wwZH8HcqJsZNy5hdawn0i995mSsd4k8AYbYyRsuuTN9V0n9G/wzAMYz+OSRLzByV8Vw0Ph638B1ENadwH/UVHAAAAAElFTkSuQmCC",greenIceMan:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAA1CAMAAAAJdildAAAAWlBMVEUAAAASuX8SuX8SuX8SuX8SuX8SuX8SuX8SuX8SuX8SuX8SuX8SuX8SuX8SuX8SuX////8cvYWZ4chDyJotwY7o+PLa9euJ3cC06dd52Ldn063M8OP3/ftUzaMKDTc1AAAAD3RSTlMAIneIM+lVEf3VZpmswUS6GB/tAAAB7ElEQVRIx9WVW5KsIBBEGxCJQqHw/Zz9b/OODQRCg3ci5mvyp0M9naRVBb7+vKqWVz+GBUXE9sd0i5eoZi0T/l5V1zq/YINB1GZjcF1wJcUHXeNN7LpDwzXoFFd3vHbZgmRMa7wJvhf3dHC4iyVWElORqOQqMhf8A2/SOnrpnDlyErc0pAzJy+mpM5HXUpDBWy0ps0s4Qz8FhGNejYi6yig84HDLQxouadOoVykMUhFPDW9s//OvKtOZrFv7/vlCBu+QCGw3HtqUVF/n7YG4CHG3GLjfBKfuOSTDwO0DneBK+NUrde+vRGJHKMFd9YDyNsqjQHzjKjtgBBGTrUj4xdMYh+q9QzkHDlDFPILQ/HMga0BGRCX9nAX/3MwobKxt8Vjo9qVfvoJ/Qa2F+9NcmvbQ17L5OJtjH7txm81q+UIW9faezYJWvekL9mHXLpZ2/GCPiGKW7pw79OqmtZyGIg7rMR3rHuzPrlgb9o5izBHsd5uGlnBczS0Mfj3g9B13HTFoM2Nuu5Y26jqV+1p90INZypURYPPuPvw4T1257i/m8s6D/d90DqGrxTTbaY5+62czDf4kz4u5EP10lX/rbqdtIb1TdytnVf7c8+wZWeYhpenzN59FMK+fYP+N9zAlr/+LaKYAVCPJ61f6B6IaQZrzMOi4AAAAAElFTkSuQmCC",iceman2:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFsAAABSCAMAAAAM51hjAAAB5lBMVEUAAACQYQvCwcCcZgCibADCwcDCwcDCwcDCwcDCwcCeawXAcRfCwcDCwcDCwcCeZgCZZgCmbwDCwcDCwcCaZQCaZgCcZwCaZgDCwcCbZwDBvrqyegC1dQfCwcCaZQCbZAC1cQercgCveADubmeeZgCncQGlbgmvdwDvaHiiZgA7OzveZj87Ozs7Ozu0fACweACudQA7Ozs7OzvwbX3odFXLWhvcdDeveAA/Pz9ra2tSUlKFhYXgZHPJWBnEVBjEVBjsfza0fAB7e3uRi3+ocAD39/fv7+/7+fb////zb3/18fD38/De3t7s6eXm5uaveAChZwDl4+HlWWqtcwA7OzvW1tabXQClbADCwcD2dYT+vpvzcH/EVBincQHMzMy0fADoYXLqfDLLWRrT0MxPPifGxsbX1NDrZHTvanr9t1kkJCRdTDWXjoG8sqV4eHjv3uCZZgDXU2Pus7nDURRYWFgzMzP84czjdSphUDnFl3+pmYTxhpPn1dX92rnecSbTYyCFhYWUlJTxmKPyvsT9u5XHvbDgUmP0jnuJclRCQkKUWwGDa0u1tbX77+jnnqfxz9M8LBa8vLy1qJdJSUmmpqb+yKrgannmdoTeW2qEe2736OmsrKzcpIbwcH/ydYT6nJGaZwCudgDdBBh/AAAAcXRSTlMAEZnVIukzIhH9MxHVd2Zm/enBrFVErOmIiEREZlXBmVWZ6W531VXVIv2sM9WZd4isMyKATHe3wW7VTMGsiKxE1cGZTP3//////////////////////////////////////////////////////////ho8cp4AAAbGSURBVFjDrZkJU9pAGIYXAdtR0PE+29q70/u+75kkFDYJAULSlqugoCg4Wm3VatW2Wq320t4nP7W7a7AkBmLQZ8a4yTgPX95dknwRbJLK1nq5ByPXt1aCbWRnjT0CBdpNUS4XRcOIvWbndqlrZJGjaYpx5fFA+67tKbo+icwexaxAiw3bUHqlXaRR0S4t0F65ZbUMiXojgrxF+Q6iZlx6cPKOLWVtL1Y1PdvjEhygCKdOVhu6K3DWbpcO2XT6kwu2Ai1VNrSpjkY7jMOmiyUyMjo6CqkNqZyOXkLbzihfZeSuJ4kwemQDgcAMIzQANQejPNrui9ZtsmxdllHdIwyjLbyN5zuAjecbDdPGZXv03dRqOr3KMNCpiZvn94K9vIRDJ7GcPAnwuEObv53bGMnPkZ8MAQbSMwxDOwCm+ljnBUDw8/sAz7ehzPnDaLcjGsWT2xWNVqvXdo9OJAG0PpTKBbyZO7//4u1HT+PxLkCo4/lOPmzp3MfzOPMmf/QO+rU3GrWo3LsSeAFSagKB0UWOInimXr1+RJiOx28AAsoDcRCZw7k9AGHlo114+fBAhVNkWZbSMILWxydi/vVI4Xk8HlcSwYUSkNkGMDYpyleDw1p3BXLTWvdsOj2axYNH8acEbI4fA3ksYWJuxmZCrZ8/BfbxWjfUcdOL6TR2j4dC088R0/FQ6GbhPNVhcxUgdFSTVHibn/cbuAlwJCBSVGIoFArFp7E5dAsUEvZbsZnA85c6bTaJP7zB3Uoy0UWQx0MKF9WLq8svVRV8DprYw6fxNqy5lSWKuWkxkgk9xkxn2oGKuvBusE5zLif516jTfOUjaJ3ouwUxMo7MoV9uWX1rOxRWylZoamvJSXh6DwI1MsdxGqt70o23LJJnxn9NUrRDW7YVaLAdsOYkbd2gAXKcOpTJhZUkReSsQGGgU122JDWBjVjawv5TQEV7ROueSC4lyICdWKIQ2gu4JFmBLtawvwuosOPCPQWseObGxgYmJhaWMm68D9XX71pcti62XDhsU19RUOGsW0MyszLHKWO5UlN2CyhCoxTWTKdDFATarQf9/uXwy0SFpmxv8XvCHim8V/sIIXC0mh+DL4dfPLtHOAcK8XpbQHFaJOmQOpX/8kFU6bsXz/7cK+QI+M8BLyq7OFU5SVJHXoPkk8NYqcv+gkS93hwoRa1XqrOo5XPK+Ru4q5C6FpRkt1dqBoWcj2l0+pnYvF7vblAaS87rVX28L6Ur1cylpQVNpAUY0KSWH/EVrbs3dn1dbUWJ2IAhbejs9oA8x3y+3iLmb+/kip1KksFgrgpsAiuq3Jovotrn+5bSM/t8L/EDfjv5XiB1E9gMlmYk9+b/dr8PkVKLUzF8NrG3LhcrO9HiQupasEkOYPkBQKjMfMH2WCyV6u1NpVKxGN7DOfm+ulDbBisag8FgG9g0jVjebFF6kvfvvmI/Ifb1xfDw0ENMbH6YND4TwWAzMIGtJRcMotBJT0IYHJycHBxEAw9FDfVid++87weRL1iBKSy7kTx3yE7UedyetSbzS4oUPj//gnSbcjswSRuSB8eJkmIYCv248jyLEbdv3keOcXbTvWYjkbM6rdS7b/cxMV/qCd7FfY9Zqt68CQbDg64NDA8R9+u+vjU3Zb4bbI0sIPnCRvf7dfeU0sdWmG0uZZoef/NmKcJoGRx6mK9bOSKbTLxG5AQ4sZT5qOP+jdR/X/13Q6c5twMKEEJBp1H7MfT72d9XDx709TEKbrvJSFi2SHP59jUSI/qmmDwRM7NJ2p1i7geEV1itINaYcZPukinh/lzYenINZtz1AunS9HiCzU9Uh2iHCTXpXCl9pj5PIbMa2Yxbxm4DCk6sZ6cZN2voHujuHsiPTS0UmWPZ0uq5fkQm7640k7ehe6C/Hz2Nl1O3QzByZ7oRmXzeZtwNkGU9peXfP3z4XtZcOknrWhp6/czcptZgu6q9NIJ1mL1Wse6SQjgwkFSGJu8O9dAgFG4MzWWCIpi7VgFnkuNKzubK2Fh//4D5JUhC4XDvWpyJ7m7kNn2pIjSISO72FAV2f/jQnVwbOk26K0nh7uKIA98TZIBfR5gunMiNgRVlvP0WcCqG0OW8CXcmBEFgaSPEVlAG9UkkN1JDR5kv7kVDOVQSMR+53ahyAT9+lysvnTn8eMWyhf8dJWBxubg8EjhTtttyNPsxASGnm0dydjVwApTN0UBgcQbZhQ12TlzOBo5fBeVzPIBYnfnZk1DVzsHIcnbxxBmwFc6iwjEjM5/knkhSFKEoJiM9y7NXLhuLje2XTxwn+sWRbDY7Mzt77drdq2eBIf8AH6YFAgSYwjEAAAAASUVORK5CYII=",iceman1:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFsAAABSCAMAAAAM51hjAAACBFBMVEUAAADFxcWeYgOaZQDFxcTFxcXFxcWiYRTFxcXFxcSdZQDFxcXFxcXFxMOaXACXYwDFxcXFxcXFxcSfZwPFxcWdXwCjaACgaQSWZAGeaACYZQCZXwCWZAHFxcXFZh47OzuYYgDvaHjoZFo7OzvZbSs7Ozs7Ozs7OzuaXADzb3/wbn3JYCnHVhi7Zg4/Pz+7rpNra2uWZAGMjIzlWWrlWWrgZHPxhDnxhDnxhDmidR21mmdjY2N7e3uFhYXIXyj39/f7+vv08/Tv7+/zb3/m5ubq6+vy8vP////e3t7h4OLr6evl4+HW1tbFxcWiZgDlWWo7OzvMzMyaXAD2dYT+vpvzcH/EVBjU08/y8/LoYXLicyhOPSfrZHTvanqlawBdTDUkJCStcwCyfAancgGZZgD68O39tldFRUXv1tnDURTOXBzJWBnoejFYWFgzMzO4ml76+/vXU2O+u7XsfjNhUDnroKnws7uKgHHcpIaom4V7e3uFhYWtfBvxhpPtlJ/74crgUmO4rJa/taLY0saUlJS1tbXTyLOYZQDkfou/hGXxwMbCwL3UZCPe2dM6KROUin1zc3Ompqbw7efSvpb+yKrw3N7ganneW2q0raT91b724eT83bKdk4asrKz4jHSDa0vPzMWJclTj4d/psLb8sZbpyMzxz9P6nJH75dnukoX+vGToq4UtZ37vAAAAP3RSTlMAmUSsEekzEf0iItVmrP3pd8GIiFV3mekzVdXBd0SAN2YiOKxb1Zki1WaAt+kzbunfmenpd6x31azBrFWZwdXMPRI0AAAG6klEQVRYw7WZh1fTUBSHQ7FwWAcQBPfee29P0pjUtBltonZIKXQwRAFRNqhsUKZ7763/pPe9Vwy0BZoGP6Bp2nO+88vNe3n3HahUyFpZLBOKV2ZRy8iKfKsqiKydZphLDOtQrfkrlkudL0scy9LMpVlsgrV0eUIXe8FsQ2YdVipYhuhZVomF0JfiEaxZptWyAGoInYAom5Tn6OoEODnHVK2tAi5IIuyQfMmRZ8adgWptY5LQXV39iBFWmik2CzDJaGxqahIYE1UpFnDspLndbncP4yhY9tjAMORuZNIPnkFiJ4Wuq66uYxihKE23lUuM/a7xHYNxuKt7GIYlQyV76/aNBsc2z/PxbjcaHzE7in97+8nTp+5ca2jYbshd6gW3La4UbndTHcdgal79eX8HcXPixg2IbYQiCdx0/NiD8fEIm//cuUm41mBQDWQgNxPHUHV1Uze6gAcN1whg3n/A+DCBctNxsDA+uuHY6fFMIPPEDY9nXzZl1k1wNLolmvY+8Hg8DQ0NYN5voYyzUkLupDhkcBMgdBrke53O5G67pA54riMmBjakN+VVp5NP6mYdkvoAzJ5On5zm0iZzHGebb/VN+uDVxoO8v7OznubTfYQXCBxnt81l8lP/JDraeV7EH6T9PNmgchw/z901+GEQv3F2fcDH9B/g1vjg/bbbra3TXV2fPgzgz+H5nS6lenCdwYH+EY68tZtZ6vMkEVq1ZDz+/rD94WCGuRZC5Ng4a/3D9nt3L2L2UiYolQUHx2KeQdK2e3cvX5zLFlN9Jsjr25EyKXsoU/Lb5Pr/h3urP9FoviaEY4FF1HtNqbe4Fsxd6T9BmSuJy1W5gNnVJmeYavCzXa4XgaRmVztNC9YNZuTHXUBgvjjgR1fz4jVNc3KRmY1D23Nk9/sDgcrKQCDg96MzVCfXGFompAwzexLnt7Yx8BP8Y/e+fGm5ivD3tdEAyNN+oPAY57N64JmThV1mTUslclf2uV5jeVGaexKJJ7AYuw33Wc8DOHhf3z3kZsez0lrVsBqUAFiw+BbDjPmx29XnqqEB0ZrGUCz1YjV4CeDF8rYXlxF+V+A+/jyNfc8KuI88j0MT9SztLdj9vrb2PkMDtvEc440VNChsc+djrNZLwnz7535DvhAOGY7NgftJOPxRdxPqW64i9y+cmwTfaLRng97ncTg86tVrQnK/xu4fV2prf9LELTSvMbYQQwcBsSNdArgxWA3UtFy9++PrlSu1v+mYmx8IHTBWEo4Tw+FeGbVQ+jhB7l8gBn6/ISWB79XeUK6x5oRrDkdGVD5+oNRcIbxhwE3kUnMo08iWhOMmw6FmUWKRmzDX/bRGV9sch4KRXAMbbogdUj5zgj3efR+Z76MTogb4vPJIWerNoIMbCYWa7Zxot2O3Ln/19NVPYp5121l5TTCY8hZCdnC9oYiTxTMTmOOGV3LkWawGt11eUR4sS9ktPglFnrCA3Y6rksh0RUWHDccGd44l9eCyEA71ssSdXH67CniJ3T67mkUVBktSrXdnSBnBbh92J9rfVlW1tr4lsVno8i2KkmLwvN7IJydPgkOuJO6XFcBLZCZuaq2SYvCCSHAQufWqxOttHVNTHT6bD8wsCxu21IOfjfSKHM/Hkifa0U3kOUiN1bxMUSj4qpTcZyLNoojdBB/ICUSMQdXysQCHN4NrFKUsldlZHhxxODhdDhZi1xGmO7yQGiHgTqJEAcqWrEt2MCqB2zlnkY/hm438uRXu5UcW483HNQF1VFFKlrBbguVeBw5O5Hp2eCH0t7ZWVU2zCJ5sNDUtqq0djWra4mXPDJbIAgrunCdn7TpdFTB33iIzT8qdq2nrNS03c1TbvXi5ldwCCQUHu5OEj0eqmJqqUFkeIL3VKk2jCjULtTrzyKJuJYp6QUGXJ/F7Ozo+on6Od8LoBtZpa6n1kHkJLMo6mD5eQRA4AOxJwvMsj4CvYv2mppVQ2VCUJdxlymbcaSI5AeRJcAKcCHcSUTiai8IvuriRSQCHIhXcDhG79fg64EV4Yz3b6s3oipdwr1IANEiLsRzbdZzwMxcpb/4IW73YtMlUECW4SY7JRdAvgAQVSZXcciUahemloeA5RL6wXZTk1PdTFphc6wu1zWRyETnYkd4hAv+kBGn8cHbK7nVa1ELhSaDF/nekShKSE8Q5wKl3uNG9KWV3ZmEuTN5Cao2mbcbV3zYzju3Yr/MZ/iR1qM6908BuNRtN3kwKgq+ngG1ud13PPzv8xoAzdXjGvQNSG2Id0lrIYNrhdiP7O1lFdh2vOtxdtxPMBtmt6WN0FwRHNPY8GpdVVfUCqioPDx0+CGLjHBmFwuj2gzshPErfODPT3TN09OiF8+d2pST6C1zkqRsNhGLMAAAAAElFTkSuQmCC",hat:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAwCAMAAABpN6nPAAABSlBMVEUAAAAzMzMREREyMjIbGxswMDAUFBQMDAwpKSkfHx8pKSkaGhoiIiIYGBguLi4TExMbGxs2NjYZGRkYGBgFBQU1NTUQEBAcHBwtLS0nJyc2NTUsLCwTExMZGRkYGBgHBwcyMjIKCgo3NzcKCgo4ODgjIyM4NzcgICAEBAQqKioKCgoSEhIkDw8iIiIeHh44NzcTExMyMjIlJSUqKio4ODgzMzMaGhofHx8HBwc2NjYwMDAXFhY4NzcREREODg4uLi4UFBTTGyLTICe9ERauDxSMBQbMFhynCg2fCAqEAQFCMzO2DhPRFh2/JCrNIymSBQbFExh3Ki0YDQ44KClHIiNLAwOIAgOYBgiUJisrFhdcGx1RJyh/AADLJStzBQZoJihjAAA8BgegHSGkJy1bDQ56JSgrKysiIiIZGRkLCwsiIiIqKioLCwsbGhqzyL5qAAAAMnRSTlMAIlURETMiESIiMzNEZumZdzPVRER3iOnBiNVEwen9M5msVdUzrKz96f396enp/TP9TLlU19kAAALZSURBVEjH3dPZU9pQFMfxkFJAUTb3bdSqnc60nc4ASUhCIK0ghYoWgdZ96RKSh/z/rz3n3JvoDdria7/PfLiX3x2kv5TILcal5yUXbNvOPYvMuq5pmrYpT07SS76vqqoLpSc1K6ORhvlAN6YmIvHlIjVitBCMEU/Lc4knTCpTd5wSxt0eXXixQNfdmHvU1BUDqteRshNXpLl1zYdU7BH1IqPrCoYUD0T4XmORXBpHq9VytVrVdaJwGLn+7xEUyLFlFso8pEpwzYurmyLE5UzE7MJHy2F0Sax31b1AxWQUrSo6VGUUL6lQP4+uuoMSRGxaNK8UQ8FCqlOdI6jrlHhxEWUc+AkGhLBMIe19grrw47BSJnIQ+zKHqF4O6yLq4SrYloiWYZ0ihFK5H4QOOuooBmtNfNeS72sQUuN+kA4ddKrwjMhfSDVN11VVoHW2BsnTj1hH51uuiGjPgmzbNn2HxmDdkDkNp4yJSPM8r1arWT6fghocHII56OCQ2GvRrNkVyKtpJcoh2d8/xHrloJg4Q85D5MIKFMl+4wD7EU65JZrdLBDL1ygu+42v2H7niYPyH7KehePhej6Tg8Y+dYHj0/wLgonl8/mcbcF0MDun540v1Lmis6qr4uViLyH5rYXZRM+arVarAZ3T+ATzoomBgrZpc+jk12eoBQ3q4ZuJl0ulAjXrYbVh8zsE7PgMhjdYy+LlUixUMzuV2rDdbDaPseszfC9wIDMvIgc9UNPvrtvfIHDtu1GJhTAlmHgqbBrS3OFlG7ocukUWsTVJRPEpKGA51VdPbi9v71x8KojBmahhist1fCbrJHhiLsmIiBTPtM3wgUESJSMiQaXpeSGUnC6lpUdRyGR6XAol0kJizCSTSa4S0NQs/RMfymxUEOIxBogKqSw9iXiJhFzBQplNjotxtVm5z9uZl6AJWDY060gmUlJym8SbxU3pH4UES8jyfFKaIEb+k/4A0rsnNnwW5IcAAAAASUVORK5CYII="},a=function(A,e){A=A?-1:1;e=e||"";return"-moz-transform:"+e+" scaleX("+A+");-webkit-transform:"+e+" scaleX("+A+");-o-transform:"+e+" scaleX("+A+");transform:"+e+" scaleX("+A+");"},l="WebKitCSSMatrix"in A&&"m11"in new WebKitCSSMatrix,s=function(){var A=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=e.createElement("div"),i=A.length,n=null;while(i--){if(t.style[A[i]]!==undefined){n=A[i];break}}return n}(),c=function(){var A=this;A.opts={n:500,gravity:.5,windforce:1,windmultiplier:.5,maxspeed:5,gutter:0,color:"#fff"}},p=function(){var A=this;A.act2=[]};c.prototype={create:function(){var A=this,e=A.opts,t=Math.random()*10|0,i=Math.random()*(t/10)+e.gravity;return{color:e.color,distance:t,speed:i,x:1-(1+e.gutter)+Math.random()*A.width*(1+e.gutter),y:Math.random()*A.height,vx:0,vy:Math.random()*i+i/2,radius:(t+1)/16*3}},play:function(A){var e=A.opts,t=e.gutter,i=A.sky,o=A.stack.length,a;A.sky.clearRect(0,0,A.width,A.height);for(;a=A.stack[--o];){i.globalAlpha=(a.distance+1)/10;i.fillStyle=a.color;i.beginPath();i.arc(a.x,a.y,a.radius,0,Math.PI*2,!1);i.closePath();i.fill();i.globalAlpha=1;a.x+=a.vx;a.y+=a.vy;a.vx+e.windforce1-e.maxspeed&&(a.vx=e.windforce);if(a.y>(a.distance+1)/10*A.height)a.y=Math.random()*-a.radius*(e.n/10),a.x=1-(1+t)+Math.random()*A.width*(1+t);a.x>A.width*(1+t)&&(a.x=1-A.width*t);a.x<1-A.width*t&&(a.x=A.width*(1+t))}n(function(){A.play(A)})},wind:function(){var A=this.opts;A.windforce=A.windmultiplier*(Math.random()>.5?1:-1)},init:function(A){var e=this,t=e.opts;e.sky=A.getContext("2d");e.width=A.width;e.height=A.height;e.stack=[];while(t.n--)e.stack.push(e.create());e.play(e);setTimeout(function(){e.wind()},Math.random()*(1e3*30))}};p.prototype={stop:function(){ + + var A=this,e;foolWorld.iceman.style.cssText+="background-image:url("+o.whiteIceMan+");background-size:46px 53px;"; + + A.iceBaby.el.style.display=A.wrap.style.display="none"; + foolWorld.tipText.innerHTML=foolWorld.opts.tipText1; + + while(e=A.act2.shift()){e&&clearTimeout(e)}A.act1&&clearTimeout(A.act1);A.act3&&clearTimeout(A.act3);A.playing=false},move:function(A){return l?A.el.style[s]="translate3d("+A.x+"px,"+A.y+"px, 0)":A.el.style.cssText+="top:"+A.y+"px;left:"+A.x+"px;"},jump:function(A){var e=this,t=e.iceBaby,i=.45,o=2;return function(a){var l=arguments.callee;if(!e.playing)return;if(t.x.3){if(e.x>300)e.x=300+200*Math.random()-20;if(e.x<300)e.x=300-200*Math.random()-20}n(function(){e.el.style.cssText+="opacity:1;transition:all .5s ease-out";e.y=20*Math.random()-50;A.move(e);e.el.style.cssText+="-webkit-animation-name: fool_shark; -webkit-animation-duration: .7s; -webkit-transform-origin:55% 55%; -webkit-animation-iteration-count: 4; -webkit-animation-timing-function: ease-in;";setTimeout(function(){e.y=200+100*Math.random();A.move(e);e.el.style.cssText+="-webkit-animation-name: none;"},1e3*Math.random())})},300);A.act2.push(t)});setTimeout(function(){if(!A.playing)return;A.wrap.appendChild(A.iceBaby.el);A.iceBaby.x=A.iceBaby.x-10;A.iceBaby.y=A.iceBaby.y-53;A.move(A.iceBaby)},500);setTimeout(function(){if(!A.playing)return;A.iceBaby.el.style.cssText+=l?"-webkit-transform:translate3d(280px, 220px, 0px) rotate(-90deg);":"transform: rotate(-90deg); top: 240px; left:240px;"},700);A.act3=setTimeout(function(){if(!A.playing)return;A.endText.style.cssText+="display:block;";n(function(){A.endText.style.cssText+="-webkit-transform:scale(1);transform:scale(1);transition:all .5s ease-out;";n(function(){A.iceBaby.el.style.cssText+=l?"-webkit-transform:scale(2) translate3d(130px, 50px, 0px);":"transform: scale(2) rotate(0);top: 120px; left:250px;"});setTimeout(function(){if(!A.playing)return;A.iceBaby.el.style.cssText+=l?"-webkit-transform:scale(1) translate3d(260px, 180px, 0px);transform-origin:100% 100%;":"transform:scale(1) rotate(0);top: 180px; left:260px;";foolWorld.closeTimer=setTimeout(function(){A.stop();foolWorld.tipText.innerHTML=foolWorld.opts.tipText3},2e3)},300)})},2500)},500)})},freeze:function(){var A=this,t=[].slice.call(A.viewport.getElementsByClassName("hotsite_link")),n=e.createDocumentFragment();A.links=[];t.forEach(function(e){var t=e.cloneNode(true),o=e.getBoundingClientRect(),a=A.viewport.getBoundingClientRect(),l={el:i.cloneNode(),_x:o.left-a.left+20,_y:o.top-a.top},s;l.el.style.cssText+="top:0;z-index:10;left:0;width:77px; height:62px;position:absolute;background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABDCAMAAADu3XjyAAABa1BMVEUAAACr2f+s2v8fgNqo2P4ohdyr1/8fgNqv3P+s2v+q1/+n1/4jgtsigtsfgNofgNq15/+s2/+q1/+t3P8fgNofgNofgNqq1/8fgNofgNofgNoggdus2v+y4/9lp+Wd0vWHwe/j9/9HnORjr+tUpedstu2V0ve66v+Bt+qAw/Hr9/7X7P/j9/+y4/9hpeUjgtvb9P/G7v+Jzuy15/+O1PKh2PD///+66v/C7P++6/+e2/Xs9/3S8f/O8P/n9/+X1vHK7//X8//j9//v+v+p3/fb9P+x4/mi3faS1vPf9f/6/P675Paa2POn2/KL0O2s2P/i8/z2+//Z7/q45vvN6v6P0u6V0+7G6vrR7frO5/fz+/+13f+v3/S+5/2S0++05/+w1PPH5v+Cu+xvruc+kuAvid2r4vno9vyUwu6/6v262/+z3vdjqOYlg9vA4f+jy/COxe7d7//W7P9Om+J4s+nB3PWy4/9Wn+PG3/bwyruKAAAAMXRSTlMAZsGIiCIzEXeZVazBRFWsZhFEIv4z1dV36WaZ6dWZ/dURRMGI/enpd5nBrFVVwXfpKZnsOAAABQNJREFUWMPtmNdD2lAUh3G0lWrtsnbvvXtv5CZkTwIJGxSI4BZt1e715/cmxuy01L72e+CJ+3l+h5PDlcx/wpw6+ez51L9rTly6NnF2fm77nYGM2r/5Ll3/8HX/6+5az0I21vvx0/9gu/4BOwyFl1kOKAjDL2cvHtt2tY5lBGZVFXpoh8G+z7XJ47TdfjkwDGxb1QUIoYmaVXUH29u1sb9t2NntmdnMiS1kIaMMHfqoi191XK3yfvrCX7iuzX9ZM75tXZ/dRzyy4CEV1IM2uoZQfXlyxPadmDjY7CGD51FvcxdJSHFtS6gDD6GbuH0jTcuZs9u7DOK5Ia2XEEKNgWerIhMeUe4ajfblsT90/tr8jzWDYYflqhMNIabi2aBlQh+hY7jtS4/4tcdwQwGrFpeEXM5CqJnzbTt9CEO+Bm7f+bSIW7t1W+WYHLrYtuLbmhUYpthSEtt36srVH3ucKlQXl3I+fWyDvq2Xg1FWWvx67GGb3d7o6AI2RWBQHVoMdDEFGGeloC1nT4ZsM98QaPVzMfDDBHc8W38FJrE4bIfbN7GLWApQrUrEVkEMbHq2ShUms6iuB9uHZ17LA8wgXOBSnYFdz2aXluob+O07tY1kbLOhCpWAzVRgh4GjUFWJ7EVv8yh5Cri0VM+2aEFzFNuiXgBU+2hVnV1rEMDnrVvgEuzCPvNnVctJ9WnatV3ZQKRXm1cgtlVgZee3qhUVqxzE9aPOXfqCKMrV+QXqS7AKhXq6qqgOgIe0fDQmpw4MkRRBlEIR50izCepbEIDSxjNHzPckIm7LE6t0NdEmDF2Vb2tPBb6cSok2TL0YHYbykAJx3l/wd/cmT+S5RFuJKNBVX0UXKJAEWwvsti2LINhEm+R8Aa44s0AXQAoUN53xmWMIIrk2lnAolOkWSIfC8xFcI3mCYpNsgHAhwe9sy+E1gk9pIAxpS/Ij2cB4aJHvsziUmGAjg7b0oFOhXb6tEbGormgEW345vH+vdu1pOLbthqvx1og9Ddxxbdmw7cqG/flJx7NRA/9BcNcIiQ/IIIA4si1fi36lHlD4hBaMyo1ui11J5gf4hBgcOXZk2+NMlAmViERl8zGbmNy2bMw2+9HZGGygb2LUxqUEPRe/Iu0TGC44clLUJqW2LcaW81TyYsAWbBxHAjalNjLhHjdDOFGllKgMBUop0/Y9E+fKd2edyYG3BaJSiOO0lKA3k+6DtHMqEJWU/agykktsStDJpFvvxuExPyqheVEBQoYsptgSb/sPCRuW923cUVSyYV+pU9pGZJK4f1gFz3k24EYleYRpaBKX1rY4Dw5Pyppny8t2VOptp2t2mkyjxEmyxorRoFOJtnuEg+RFxfOiiVyrvOCiqy3AanLk4yBTbvkFN6r3Zpbn9YUQRb0A2BLPyJLoty0Z2m2SPaWiJDcHtKouxKELQOIVhddYp23jKbZHhIPG47/eNHVhIZXysKMxloJL5PAjn8y086RyvNI0aaG48HuKake2LIspvUixncMxJcViOntprmgTu7jAuym2i+fOTT69c3uvyzCdAj2CTqBV8OaP/6S+frXx4efammnqNE2XbQSbooNdVFnXh6skhclPjfQrwZlbdzY2Nz9W9nTap4+nuN5UPn1qt9+9q9Vu3Jh+iYOOyIknt2bmtjY/5ip7ptlpd9vrtuPy5Wx2bOzkyeP99jM7MTM3V7s8np0cO40d/7H5BRVUwFrZ7iR6AAAAAElFTkSuQmCC) no-repeat;font-size:0;padding-top:5px;opacity:0;";s=t.getElementsByClassName("span-hot-name")[0];t.setAttribute("title",s.innerHTML.match(/^[^<]*/));t.removeChild(s);l.el.appendChild(t);n.appendChild(l.el);A.links.push(l)});A.iceBaby={el:i.cloneNode(),x:0,y:0};A.iceBaby.el.style.cssText="position:absolute;display:none;top:0;left:0;width:91px;height:82px; background:url("+o.iceman1+") no-repeat;";A.hat=i.cloneNode();A.hat.style.cssText="position:absolute;top:-15px;left:0;width:52px;height:48px; background:url("+o.hat+") no-repeat;transition:all .3s ease-out;";A.iceBaby.el.appendChild(A.hat);foolWorld.iceman.appendChild(A.iceBaby.el);A.wrap.appendChild(n)},init:function(A,n){var o=this;o.viewport=A;o.width=A.offsetWidth;o.height=A.offsetHeight;o.viewport.style.cssText+="cursor:default;position:relative;";o.wrap=i.cloneNode();o.wrap.style.cssText+="display:none;position:absolute;top:0;"+(n.dir==="rtl"?"right":"left")+":0;width:100%;height:100%;z-index:8;background: url(data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAeAAD/4QNvaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjUtYzAxNCA3OS4xNTE0ODEsIDIwMTMvMDMvMTMtMTI6MDk6MTUgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6QUY4MTRFMkQwRDIwNjgxMTg3MUY4QTc2QkM1N0Y3NTkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTBDMkI0RkFBQzRBMTFFMzgyRDRCOUFGOEVBRjk1QTkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTBDMkI0RjlBQzRBMTFFMzgyRDRCOUFGOEVBRjk1QTkiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCMDgxNEUyRDBEMjA2ODExODcxRjhBNzZCQzU3Rjc1OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBRjgxNEUyRDBEMjA2ODExODcxRjhBNzZCQzU3Rjc1OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv/uAA5BZG9iZQBkwAAAAAH/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoXHh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoaJjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/AABEIAWYCxAMBIgACEQEDEQH/xACOAAEBAQEBAQEAAAAAAAAAAAAAAQIDBAUGAQEBAQEBAQAAAAAAAAAAAAAAAQIDBAUQAQACAQMDAQcCBQMEAwAAAAABEQIxQQMhURIEYXGRMkITBYFSodEiIxWxweHw8TMUgrJTEQEAAwAABAQFBQEBAAAAAAAAARECITFBA1ESEwRhcZGhUoEiMkJisRT/2gAMAwEAAhEDEQA/AP0vF+R58vWY5eU/byyjHw2qejnl6nkzw9ReU1nETX/yx/m8uGXjnjl+2Yn4HlNTEaT0l7PJF8I8Hg9TVcZnr90AbcwKEABRvi5MuPPHLGZiYnZ9H1XrOaMuWMcvGJ4sZiO0zWnxfLWcssuszMzpcsTiJmJno3nc5iYjq9fF+Q5eL0+XHEzOczExlPWo3erL8nyefBjFVlETyT3uafJbzzucZj6YiPgk9vMzy8Vz3dRHPwer1nrfUx6rkjDknHHGaiInp0eJrkzy5M8s8tcpuWWsxEREUzrU6mZuZ4gDTLv6nlz5MOLym6wiOvsmYXg5c+Pg5scZry8b/i4TlMxETtFQRlMRMbTqz5eFfFrzTd/B7ef13P8AY4cMcpxmpnLKNZqZiP8ARx9T6vl9R4xlP9MRHT211lxyy8oxj9sV/G0SMRHRdb1PWamgGscZyyjGNZ6Q0wgVXQAUAUIUVFWUABQGsM8sMoyxmpjeGVQe/wBJ6zly5OSc8rvGZiNomIeXP1PPyYzjnnM4zrE6MYZ5YT5Y61MfGKZZjERMzUdG53qcxFz1FBthrjynDPHLGamJiV5pnLmzmdZylhZmcpmZ1nrKVxtb4V8UUABQEFAQUBBQEFAQVBCihYihWRZjqggiiiIoCIoCAAgqCOuHqvUceM44ZzGM7PTz+v5cvT8XhnOOfWM5jXo8IzOMzMTTcb1ETFzximuTn5uX/wAmc5eyZc1Gqpm5nm9PouX7U8mXlUzhlUTNddjh5uXH0/PjjMxddffMQ8rf3MsYyxjTKr/TqzOfvX2bjdREeETH1dPU55xnx9Z8sMMeu/X+r/d6fVeonm/HcczN5eVZe+Hi5uT7vJ51XSI+EUn3J+z9rby8o+FJ5f4+MHn46i+GoYJ66iNuaxlOM3jNT7CJnHKMompjrEoA7er5Z5eac5m7bw5+TH02GGOUxEckz/8AX+bzL5TUY7RNp5YqI8GvNNzPi9frvWc3LlGF1h443jG8zEZPG1nl5ZX7Ij4RTJmIiKg1qdTMzNgDTIAAABOqxuixugguxAKSArICobCxuiAAoGwuyCBGq7ggKAACkTMaGxAoqKIKigsG4QirKEiigoACAoKC0Qs6oqAoAAAoCKAAAAACKAgqAKbgJky3OjJBKCkiIRqAJOqNTqkgiKKIACEC7e8GRUEK6WZNTozOkCoioIARqBCxETC7z7iNBWCBdveIgCgAAAAAAsbouO6BGixokLAoBOgMgKixqgs6oIAoLshsgRqu5jqfUAE6gLOyLOkAosIsAACKsIopKxoi7AiooCgCgIAKosE6rEIigKCKAAKCKAAAAAIKAgqAoADDoxIShOimwMgCGWqLOoDIqKIKgBltBGpOoIbBsDU6MTpDezM/KgyAqIsRco1jG4pvJPTEjcy0BhZ1I7oIAs6QCAKAAAAC4ouOqBCpGrQqE6CZAgCoLOkIsaTCCAKBsLsgY6n1GOq/UCTqE6gLOkB9IKLCQoLIbAAKBCyQAAoAKAKiAosCrCNIEgACgACgigAAAACCgIKgGypsoozOrSZaiMmwsaAyigiTqLOqCoiioiKAY7yiz0x96IIbLOpsouzM6S0ndFYAVlG8dGWojoSsGOjOWrWzE9ZCTb3os6oILOkIs/LAIAoAABsIC4ouOoENMw0KiSqSCAKgsaoIE6iztKALtCLsBjqv1GJ9QpOqLOqCLtIRpIKQqKIsBAKuxBCwBKCgKigKALAQIosCxqC7Is6IEiooAKAAACggoCCgIABsABsuxGhsiomSmQjJGwTqokos6oBKLOyAIqKiCmOt9kEy19xGpJiCZamy5aptILGibysaJvIrAqKyN6QzjC5aIsJf9MyzGttZfKmke9RkAQWflhF2gEAAAgFFBWVx1RcdRCNWmY1aFRJ1VJ1CUAVAAF2RY1RAX6UXYFxPqMT6hTLVFy1QRrHVCNQUVF2EWFlFFBFAVFAUAUAFgIVFFhNmoAlFlAlQUAAAFAAAFgBBUAAAlFlAWNCTERUJ0CdAZjUnVY3lFQlNlyTYCdIZan5WQEVBA0x94ZagyuOoY6gubO0tZR0Z2kVY0NyNCdQYTVViO36qixoSJloiprDM6t/SwqSgAg1PTGGVy7AgLGoIsGWoCibgIuOplG8GOoEatMxq0LCJOqpOoSixujX0iMgKCz3RY0pBF2RdoBrHRndrHRncVctUXLVAWFnVFnYARYEVYRYFAkAVFBQAUAFVFRVhY0ZhuOhJCSE6gCooAAKAAoAEqSioAqIKAk6I1OjIqxpYsaIgJOipsCTokai7KiSk6Qs6JOwH0stdaZAJBUI6dUmFnShFZI1JRUb2Y2lvZnaUUjQnWCNCdYBnddFSewEM57Ns5dZiAlJ+VlvL5WFSUAVFxjqZarj3ZnVAXHujXaOwJrIQSCAKLE7ToY9JJ1MdUFhUjdUVEnVUnVSUan5WWstIEZAUCOkgBOq7QbE6Qg1jozGrWOjMairlqi5aoCrsixpIAAii1NIK0iwgCooKACgAqwiwijezEatkkJqEACooAAKCgAsagbhAioAoACE6IuSRqiqixugCbKmwIkrHdFQ2SdWo0ZAjSUXaWQCNRdI94jM9ZAjUCdLZbYkVuNEncxJ0DokaEkaEgkpM10WZr3sKjozPS5+DTGU9UWT6GW/pYVJQARuOkMNzpPwYIWVjUvpMmke82iAElUEAFFy1MdVy6xZjqnRepG6pjuqCJOqpOqkpGq5amOpOoiAKAALHYnSEWdIQajRmNWtmY1FXLVFy1QFXHVCAaxi5WcpMY6zLILcyEALBIoIqKCgAoAKsIqKsarKQSCmsG1ESAqSoCooFKgiixoi7Ki7IbQIobhOqgRqEIGRpHvSdSewEaBGgAkaBGgJKAqGyLOiAQy1jPX3pIIZduyx0i2QEVBFMu6QoqY6rOks6S3OgQzGhJGhIM5apGq5asqjoxPzNRNwz9SLKz8rDc/LLCpKLjqjWO8iJOhEXJlrS6QKmsqkdwCUAQAUbieiRFTJGlGM9K7IpjoqY6KgMzq0zOqwSuPSJllqemNMiACgAA1tEMr2QanRmNYanRmNYFXLVFnVBFABuPlZa+lkWVWGWsewG0LCTpBACgCrDLW3vQJCdQFEUVuNE3WNGQWJVF29wLHWEIWe4CobgoEopC7pHcjVRZQBFJQ3BZ0WNEJ0RUjW0XSPeijWyE6IgEaSEAyR3CeyobSy1tLILGqTHWiNV9oJPbsyqCCSqALHZldvcBLUaJJGgqQToqToDOWqRquSY6qnVtiPmbZjWUUn5ZYbnSWFSUajSGW/9ghI7pK7Wkd5A9nYkSRABQABrEx3WePk48qzxnGfbFHdFTHRUx0VAZnVpI1UTJFnrKCAEdwNhY0lAGuzLW8AuWjOOq5aJjqL1WdUJ1BFEWAbnpEM7rkTtIso1jqy1jqELOkJCz8qAoQAsdV39yR0i1jSUUEVUFRYQbZWUFlSEUFWOybe5AVTWDcFBBV2ISdV2AEBFJRZFI1WUxWenVBJnqgio1sizoiKEBAJ7WVmbRUNkXZAI1XJI7rOoMosoqCACESANR2ISJ/guyKSk6LE3CToDOWyY6rlpCY6qnVtnHdZ06Jjoik6Sw3OksRFrCSRFy1PUjXoTNQDMzc0ewjp1IEJ0RZQABQAB+lyxxyisoiY7S83L+O9NyXUeEzvj/J6h4I1Mcpp9Kc51ziJfJ5PxfNh/45jkj4S8mfHnx5VnjOM9pin6FM8MM4rPGMo7TFuue/Mc4tx17fM/xmn52UnpHvfX5vxfDn145njntrDweo9B6ni6+PnjG+PV1z3M66183Dfa3npfxh5QHVyFnSII6yk6oLGkosaSgDUfMy1HzSEGSY6rlqY6i9UnUAQWNYRY1gGskjRckieos8xrFmWsAhb/AKUX6UQkhauUhqeke0CZ+EL9LKztACoKKsI1iikiTqsAAAsLLLUaUBC7stbgKkkihJGoIAAG0BsDUaJPXoaQyigSKizoE6IihAQDISiouyGyAsz/AAJ/1RZ0iQSUVkQRUUAARrZlY0kIXHQlMdGqmekIrGWkGO7rj6T1PJEePHl+vT/V24/xnqfq8cffP8kneY5zDUY3PLMvLOiY6PoR+K5J15Ij3RLWP4mIjry/w/5Z9XHi16Pc8HzdpZ9kPqf4nH/9Z+H/ACz/AIitOT4x/wAnq48Sex3PD7vnx0hjWfY+hn+K5q/pzxn4w45/jfV4x0w8o9kwsdzE/wBoZntbj+svJM2sNZcPLhP9eGWPvhmW/kxVc0AVAAAAH6YB899MAAABx5vR+n5/nwi/3R0l8/n/ABPJj14cvOP2z0l9Ybz3NZ5T+ksb7WNc44+MPzmfHycVxnjOOXaWH6TPj4+THx5MYyjtLw8/4njy68OXjP7Z6w7Z7+Z/lwefft9R/H93/Xyo0lHbm9Lz8Ef3MZiL1jrHxcXaJieMcXCYmOExRDcayxGrcbhDOWq4pOpjpIgIoCxqi46wDWWzLWTIsrrHuawZhrHWgXaUjVY3ZhBrpj7yDLVIBY1JnqsaTKAKiqDcdIZjVZ0RUWEBFVAVVQBr2m6RKgEkkgRoGyAoAC4stQSQZShOqAuse4jVIldwWUJEUSAhRmQlBFnSEWdkECflhF2FGZVJEQUjHLKaxicp7QCI9nF+N58+udcce3rPwezi/Hen4+uUTnPt0+DGu7iOt/J0z2N66V83ycOLk5JrDGcp9kPXxfjObKP65jCJ/WX1McccYrGIiO0K5a7+p5RTvn2+Y/lPm+zycX430+HzXnPt/wCHpw4+PD5MYx90NDlOtTzmZds4znlEQAIoAAAAABr0lx5PR+m5fm44vvHSf4OwRMxymiYiecW+by/h8Z68OdezL+cPFzei9Tw9csJnH90dYffHXPe3HP8Ac469vieX7fk/MrXS33ef0Ppubrlj45fux6S8HqPxnNxxfF/cxj9J+DtnvZ1/n5uG+xvP+o+DwC+OXl41PlpVdR0cafpRmy3gfTaGbLBoZssGhmywaGbLBqYiYqesdnj5/wAZ6flucf7eXfHT4PVZaxqc8ppNZzqK1Fvi83471HDN154/ux/k4R0h+htx5vS8HN8+NZfujpLtnvz/AGj9YefXt455n9JfBWNJe3m/F8uHXinzjtpLyZYZYROOcTjPaXeNZ1yl59Y1mf3RTCoqsjWOqYxM6RczpD18P471GdTlHhHfLX4JrURzmms51qeEW8uWqPr8f4z0+PXOZzn4R/B6cOHi4/kwjH3Q5T38xyiZdo9tqecxH3fEw9L6jP5ePKfbVPRh+N9TPWYjH3z/ACfWstie/rpEQ6R7bEc5mXzsfxWd3lyRHui24/E4b8k/pD3WWx6u/FuOz2/B5P8AF8O+WU/D+S/4z0/fL4vVZaepv8pX0u3+MPN/jfT1X9XxT/Gen75fF6rLPU3+Unpdv8YeSfxfDtllHwYy/Fx9PJ8Ye6y19Xfik9nt/i+bP43mx0nHL+Dlyek9RjrhMx7Ov+j69ltR3tdalmfb4nlcPhTExNTFT7R9zLDDOKyxjL3xbz5+g9PnpE4T7G478dYpz17bXSYl8wevk/HcuPXCYyjtpLzZ8fJxzWeM4+91jeZ5S5axrPOJhlUFYWGmYd+P0nNn1rxjvKTMRzmms5meUW5E7Pdh6Hij55nKfhDvjx8WHy4xH6Oc97Mcot2jsannMQ+X9vkynpjM+6F+xzfsy+D61lsevPg1/wCePyl8icM8fmxmPfDL7NuefDw5/NhE+3SVjv8AjCT7fw19Xy4W+lvZn6HCY/t5V7J6vNy+n5eOOuNx3jq6RvOuUueu3vPOPo5T3DZG3NViWVxCCdRJ1UBIDEEQnUEJPeTqa0KTFJ9Ltx+l5+SOmNR3no9PH+OiI/uZ37Mf5sz3MxzlvPa3rlH1fPejj9H6jl0x8Y75dH0uPg4eL5MYie+suluWu/8AjH1dc+3/ACn6PJxfjOPHryZTnPaOkPXhx8fHFYYxjHsLLcta1rnLvnGc8opoZstlpoZssGhmywaGbLBoZssGhmywaGbLBoZssGhmywaGbLBfHHy8qjy0uuolgMWWxZbVM23ZbFllFt2WxZZRbdlsWWUW3ZbFllFt2WxZZRbdlsWWUW3bPJhx8kePJjGUe1LWLnQObxcv4zCevDl4z+2esMcP4vlyy/vTGGMdusy+nERC236u6q2PQ7czdfoxw+n4eGK48Yie+/xdEstzm54y6RERwjgolloqiWWCiWWCiWWCiWWCiWWCiWWCiWWCkxExUxce1LLBw5PRcGfWI8J9n8nGPx0xl/VlePs1e2y247m4irc57WJm6cePi4+L5canvu6Ws1OqTj2S75tRFcILLYm41LC27LYssotuy2LLKLbstiyyi0z4eLPrljF946S8+fof2ZfpL02W1G9RylnWMa5w8GXpefH6b93VjwzjXGY/R9Ky2/WnrEOc9jPSZfLm7H0+nY6doX1vh92fQ/19nzKlrDj5JjpjM/o+j0Wz1vgvoR+X2fOj0vPl9Ne/o64+gz+rKI93V7LLZnu6+ENR2MRzuXHH0PDHXKZy/g7YcfHh8mMQWWxOtTzmW4zmOURDdlsWWlNW3ZbFllFt2WxZZRbdlsWWUW3ZbFllFt2WxZZRbdlsWWUW3ZbFllFt2WxZZRbdlsWWUW3ZbFllFt2WxZZRbdlsWWUW3YxYUWxZbnZbVM26WW52WUW6WW52WUW6WW52WUW6WW52WUW6WW52tlFt2WmOGU+yHXHGMdPiipjhvl8G0stlpbLSywWy0ssFstLLBbLSywWy0ssFstLLBbLSywWy0ssFstLLBbLSywWy0ssFstLLBbLSywVJwifYWWDE45R7WbdbSYxnWFtKc7LWeP8AbP6SxMZRrCo1ZbHklrSW6WW52WUW6WW52WUW6WW52WUW6WW52WUW6WW52WUW6WW52WUW6WW52WUW6WW52vkUW3ZbFrEZTtKK1ZaeGfZft5d4OBxLLPtZd4PtZd4OBxLLPt5d4ScM+xwOK2WxPlGsSnkpbpZbnZZSW6WW52WUW6WW52WUW6WW52WUW6WW52WUW6WW52WUW6WOdhRbpPDG00zPDnt1ejxPFLlqnlnDONYlnq9nieN6lp5XjOr1/axnaE+zh2WzyvL1Xq9P2MOy/Zw7FweWXl6kY5TpFvXHHjGkQvilnleaOHKdZp0x48cdOs95dfE8UtaZ6nVrxPEVnqdWvE8RGBvxPEGBvxTxBkaooGRqigZFooEFooEFooEFooELWigQKKACigLLACyxAWy0AWy0AWy0ASePCdq9znPDP0z8XUW5SnnnHONYZt6knHGdYtbKee0t3nhwn2MzwRtkXCVLnZbf/r5fuT7GXeFuCpZstv7GXeD/ANef3FwVLFluscEbzKxw4R3lLgqXGyLnR6I48I0iGqLKeeOPOdmo4ct5p2Etac44cd5mWowwjZoRaOmwAAtFAgtFAgtFAlpOOM6w1RQOU8MbTTE8eUbXHsemjxW5KeToPVPHjlrDE8HYtKcRueOY1PBUY6J0dPA8Aczo6eB4BTmN+B4AwN+ID2eJ4t1JTDox4ni3QDPiUsxlcTE9N4L61/uCUeLXWuknUGaKakuAZ8SuuiwXHcDxSluO5FyB4p4qvUGfE8WqkqQYopup3lK6gzRTVTdyUDHieLdFCMeJ4t0Uox4ni3RQOdHi3S0Dn4ni3RQMeJ4t0UDHini6UUDn4ni6UlA50U6UlA50U6eKeIjnRTp4niDnRTfieIMUU34niDFFN+J4gxRTfiUDFFN+JQMUU3R4gzRTXiviDFFN0UDFFN0UDFFN0UDNFNUUKzRTVLQMUU3RQMUU3RQMUtNUUDNLS0te0GaKaooGaWmqKBmrZnjjbo60UFOE8cweLvUJ4xJZTh4ni7eCeJaU5eKeLt4x3PFbKcfEdvELKdbguEsuGWlQuC4BeiVE7dTyTy/QFqFqGPMnOQboqGPJnynf4A69EuHLykuY79QduiecOUzOmyXOldPYDt5xsnnDlGU1UHWZi9gdfOP+TyjVyuY9t/wLnvoDr5daTyib9jnvFrMz+gOkZJ5fqzcblg3Elxuzf/UGu1A1a2z12XqCifqAoWlgoWWAUdTqBokxa+wBKkppLBKKWyyxKSmrCxmimkLEpKaKBmimqKlUZopqpKkGaKWjoCUUXHcsCik8vYl+wG6Kc/Kex5Zdgbo6Ofnl2PLLaIB06HRy88+0JPJntEA7dBw+7ydon3JPLy3pBQ9A4Ry8k+z9D7nJOsdCh3HDzzj2rHJmDsOX3MzzkHW0uHPyyIyncV0s6seW262g11Llny9jUZAnkvksZWdOwHkeRUHjOwL5QeUM+OfZKz7T8AdLS3OZyhPOQdbS2POScp7KNeUrcseU9jy9gN3Ix5T2EHbxg8WgGfE8WgGfFPFsBjwPBsBjwPBsBjwTwdAHPwPtugDn9uD7fbo6AOf2/afbdEBn7Z9uGgGfCN18YUBKgpQEopQEqBaKBnp2GqSgSy1ooEsi1ooEsuezVFQDNyzc3tXvdKgqAc7ntH+pcfz/AOpb8TxhKHO5rpce3ouuPW+nub8YPGFGblmZnap/WXTxhaBjqf1dv1bqCoBmLXqtQUCQKAFQAJUdjxjsoCeOPY8IUBnwg8IaAZ8IPCGgGPtwfbhsBj7cH2obAY+1BPHE7NgMfbg+3Dag5/bg+3DogOfhCfbj9XWigcfDuePV1ooHLx/7jr4wVAMVGy9OzXjC1AJClFAAAHjHYATwx7J9vG2gGfCD7cNAMfbgbAUAAABFAEUBFRQBABUAUQAAAVAAD3AAAAAAAAAAAAAAAAdQAALLQ6dgUAAAFQAFRQAQFEUARQAAAAEUAABFQBRAAAAAAAAAAAALADr2AAAAIvc6gqAAACgAioAoACKgAEAAAAoIWABN0AJEzpuvVJtQAKACgA6gAAAAAAAAAAAFlgAAJSoBSooAAAAAAAAB1FBBUBQARRAUABFQADcFQAAAAAAATrGv6CzeyWClCAtAAnU6qAn6rBSUC0JU9wF6pM7blyRf6Ada9ooAAAAAAAABPtAAAAAAAAAAAAAAOoAdUADqoAAAHUAQAFQAEADqvUAAAQAFUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA6gBF0dQAi16gAAAAAAD//2Q==) no-repeat;";t.style.cssText="position:absolute;top:0;left:0;pointer-events:none;";t.width=o.width;t.height=o.height;o.wrap.appendChild(t);A.appendChild(o.wrap);(new c).init(t);o.freeze();var a=e.createElement("style");a.type="text/css";a.appendChild(e.createTextNode("@-webkit-keyframes fool_shark {0% { top: 4px; left: 1px;} 10% { top: 1px; left: 3px;} 20% {top: 3px; left: 5px;} 30% { top: 2px; left: 2px; 40% { top: 4px; left: 5px} 50% { top: 2px; left: 3px;} 60% { top: 1px; left: 1px;} 70% { top: 3px; left: 3px; 80% { top: 4px; left: 5px;} 90% { top: 2px; left: 1px;} 100% { top: 0; left: 0;}"));e.getElementsByTagName("head")[0].appendChild(a);o.endText=i.cloneNode();o.endText.style.cssText="display:none;background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcUAAAC4CAMAAACl1AcdAAAAUVBMVEUAAAA6luaMfWsAfegukOMQg+U6luYxgsoljOYdiORcVEvh4eHExMQhid86luYAfeje08UukOMMg+f///+voY4diOTMwrOLemd1VBKbiXDq6erIm9oBAAAADXRSTlMAiIjpVXesETPBMjOZKaBTuAAACbNJREFUeNrs28uO2zAMhWEFtUfWQipOgXn/V62Yy8iunCa2SUVM+K+z8odDe4DWWZZlWdZq3k+5IXfKfa12ooZc/qX33lkvz5MZcYW0IcRlIYRxzLKTobbLk1zlth+RAtKtkPeah2qgEnk/VXZ8iGm1fH4H42TprJeqZBFLAJ3c0TT385XtCSLiuZ8b5ma+MVR+7RGBWFpimuX/Ir/q4UoiAo8NzfLpPO0vlhIljrjZsLa0G1sA68fLXy2DI4alT59lBdhyisCD3xnlTsAyEnnEwzOs+6gDOw0FkGGKfIhAPN4HjNJPaxOUnyKEDetRujetHNEHpSSNuNPw089rEXwchBGBY580n7nJckWfSxqRa4YfJEmC20JjRCCKFxR/8fghxO2JIgKNDUsqX5PTGHcFScTGhvVx1QRJI9xbQ0TEF6TkLUlvwv1BDhHNZ6j1LTmN8ViCiJ0Ydn5b6Y4eDVKIQEeGlzqEJEKGpBD7M+wP0o8hsgR5xH4Iu4KkFXIlgwh0OMNZL//YIUK+IILYueHGr9bOCXMyiN0bnguTe0VEyBvYEdUYUs+8Ijv7u3AtCcQ+P2nuFQbXLC9ByDfFMjxAywxLdwfZ98vwmsAUFRpSK29IDZf0EtgRVRrmglum4pJeY0YElBrGOLpFnX+TLgIzop5PmqrBXdM1Q4oZUekMz03ukq4ZUuBDVG4YI32l6pshxYmo2zBGx94UonwHptjBv8Fgz3EXYpsMsRS0KsIQS/yKv2OTDHHW6Lj7FVsEQ5w1OO7G79ggQ5w3Oe78nygfDHGedzl9J9UQF7mcvpMKQ1zkcvpOqiEuCu6cspMKQ1x0UdR2Ug1x2egoZScVhjivKKo6qWl7vfwPNpnSyVGqTqpNsVJMif7uV3VSDXHtiZy8c07PSYUhrinSHBWdVEOsSpe+vJqTCkO8/0gmVsSvH0VDbFCiuOc4pfR9O6l9Kb4nItKsgWuI9LiuYzTEBiWKd45DOtej4psikuKigWGI1O2kGmKL0r8FzzHEn5Pak+LbIsZUdzowxJBKpGiIf9k7oxzHQRiATgUp5GM9MpLvf9WVZ7ulCYlrBkJImneEPj030KhuAizhC0OMI7UjiyeWyBZr5ehgCoZLYhsQmCo53mBOTxbPLFH4WDJvyD2k0AEk0g/hle+UMIGYPx0BAr4kRAZDLxZxJi76yiZ1u79SkLi7ghCZ0JFEohVxxvCqaMZaz7iUxyLxgRnH0ZgVozv5BBmfc85Pod0tIiLrm3lja5Z1Fa89/rE6dbqDTWDKcvSwCobdJP6zF2bqxD3e5UYnPhvKhLdYfYgpO1icxWdabgaOu3XNRGYH73WKOVoQoZYSESf6GtiTbXKbTVwiaLCKELcfqajzx/q++oFlvrrcQiWCitFJIbYZqbg6P5/+xqHXVTDR5RYqEZTchJvvRhalAM1whL0hvAHNbKAS9PjsEBmkqhJTgeZwGwtfVVIDi0KODpSE2hbjCDUHXm9XUyVBFj65cGtmEZ8JHl7gZMDWMEmQx80l5/xGIxUR/yd4BoERZ6PJFhZjji6m2CbGZ4LnXKXt7GiiySKL+hgZfwclodzgCRNcMDk8TNK218vxv+JzgkQqN9jvsrPaTf4mSczLcI4dVTFeDeZt38pNEtTY6DA3yFDwPfhZBuMxxGQkSaDj7qUpUHmkssIPNhiT1IokbYYy/l4vxkeE3a9vbYHXzVYqyVAfZLgiLJ2tVGLxJhShD5JIo/AR4cEuRbfHDW+KpNIM5ScdfYx0RSjAOQoiUZlhaZBBo/AzjoS/wH0z6yJRdb4vD5JIVMj09PN8Z9gocfGptWKG8l1AEBUy5utihTF99fX912KaYXmQQVbIXPNUMVCXJisVPtHojx5EgsJrpGYM1DRI0p/vC590MCwd7ZlrpOYN1DRIEjKsHGRYzPAaqX/ZORfdRmEgihrEYkKirFHcwcP/f+j6kiyPBqi1YpyNwxGl6UONlKM5gCsSwG+wIfJrfkYjQDEmdVMhKNTBAtWmRXicSFQilLOkoqTrnNRBeFBHmuuIkkBPzlIxhtuog/CgjkyLKhlU0DvE/Zrrt38ey2+hQR3vaG48C1eJEkEFDQI+o/F8DVqPpC7zay4NXNcReQln0q4/0ByzuEDVXAOQTCqCGs4hEfzL3TCySS0jPH2tkudpGOIm9RpMqdVhcRVdvjCpVYSY6s9Y8alel9Qy/F6sw+JeWS3VzgTH9N0t6jzPL7fzWUmiy5cktQqN6btbrFtL3Q3IeqzCkxohqDuuwev/wKLOLRz2dB18io1lFj+pYe/58PYWdc7m9oSQSF1GTmoVMvsJWMzZYhaf6YbAvt3LOpIFntW8+XHRS2Rruq4z3bNLutRa7YzOYib1M9bb7hIfdFMeA2mILhc8UudYa3LRJj+V/+tDIpsFiPz2fTrPcS4eiyhBRUzToJdIZgXqmZoUOMuRTWr6MVWqHiVax2sq7SjyHKd1EZ4kU8lQ8zCJ7MisgbYKrAoU8mOSpR5ToNshp84R9cIswVr/gKw1BjtPZ7zJXSUiq9JJTT2md9phAJ2HDPu9JewwnPje/QdIbi6wDlDJJlUvxzSlQQS5NXcsZDEkQh739owldhZSYZFrNUW2eZXcHz+l5hDr4MNhka3zKglba7BnY/xX+GhR2lbJoEu5pCZ8iTijZnoE9W9CW8LmjVoIJOxcH1QlRSWVVJ1+TB/kDImYPFQU9Hvb9k4fGmGxVmLoTCapWeJnNd8PjcRk2BpmYxlKyX8mBpadw2+0ShJ9kric+4SYTjRu4O4SKVeyFPsnVad7ifiMzsn8ABHXShid7R2/4jNiOj1R3YZarcSpdk7qKcn1tj/t21FugzAQhGHHirpg8xAJxODc/6DFpU2kpEqrGAG7nu8KI1Y/RHlROOOv0y0uBQe14OlxpaSWY3qfccjG2dOSwxfvNiEf653AczXH9IeE4DMAKT0NOo5J3Eaa1Y5ga/sV8RWPPGJ6XNS77ZzWOali9XvbP2BZMdwe0eCz4LZyP6tSeFDNvyL+tSLE7apZ4aS2dR7TTIBhBrczOZWeVKmoah4FYCnS3UlbdlKbSo9p5g+zonPnindYY8V0iBWpcMUa/t9s2DESlYpXPEKiUgk5UNyQ/hcNel9gohrARLXAA0xU9TwT1QAgMW60E8aNAYFxYwBXtMADjBv1uKIFHmCiqgckJqp6QGLcaPedqPz+plpg3BjAuLGAK1rgASaqegCYqOphSvyJWDvBlJio6mFi3CgXY38ZRq6oWuyz68i40Sv2N9GRUrHnjPpxRRti1l1nnSPd5iE7PotERERERG/5BE1khw7ZUL5ZAAAAAElFTkSuQmCC) no-repeat; position: absolute; top:70px;left:100px;width:453px;height:184px;color:#fff;padding-top:20px;-webkit-transform:scale(0);transform:scale(0);"; +o.endText.innerHTML='

                                    '+n.bannerText+"

                                    ";o.wrap.appendChild(o.endText)}};return{init:function(A,n){ + + n=n||{};var l=this,s,c=e.getElementById("searchGroupTabs");if(!t||e.documentMode==9&&n.dir==="rtl")return;l.opts=n;l.iceman=i.cloneNode();l.iceman.style.cssText="width: 46px; height: 53px; position: absolute; top: 40px; "+(n.dir=="rtl"?"right":"left")+": -200px; z-index:11;cursor: pointer;background:url("+o.whiteIceMan+") no-repeat;background-size:46px 53px;";if(l.opts.dir==="rtl")l.iceman.style.cssText+=a(1);l.TipWrap=i.cloneNode();l.TipWrap.style.cssText="width:auto;height:22px; line-height: 22px; padding: 0 15px;position:absolute;top:20px;left:50px;white-space: normal;cursor: default; border: 1px solid #00AC72; border-left:none;background:#fff;white-space: nowrap;";l.iceman.appendChild(l.TipWrap);l.tipText=e.createElement("span");if(l.opts.dir==="rtl")l.tipText.style.cssText+="display:inline-block;"+a(1);l.tipText.innerHTML=n.tipText1;l.TipWrap.innerHTML='';l.TipWrap.appendChild(l.tipText);c&&c.appendChild(l.iceman);$.cookie.get("foolWorldTip") == 1 && (l.tipText.parentNode.style.display="none");A&&(s=new p).init(A,n);var r=function(){if(s.playing)return false;l.tipText.innerHTML=n.tipText2;clearTimeout(l.closeTimer);s.wrap.style.display="block";l.iceman.style.cssText+="background-image:url("+o.greenIceMan+");background-size:46px 53px;";s.playing=true;s.links.map(function(A){A.y=-150;A.el.style.opacity="0";s.move(A)});s.endText.style.cssText+="-webkit-transform: scale(0);transform: scale(0);transition:none;diplay:none;";s.play(s)};n.autoPlay=="1"&&setTimeout(function(){r()},2e3);n.tipTextTimeout&&setTimeout(function(){l.tipText.parentNode.style.display="none"},n.tipTextTimeout*1e3); + + $(".hotsite-tabs a").on("click", function(e) { + if(e.target.id === "hotsiteTab") { + l.iceman.style.display = "block"; + } + else { + l.iceman.style.display = "none"; + s.playing && s.stop(); + } + }); + + l.iceman.addEventListener("click",function(A){var e=A.target.tagName; + + if(e==="P")return; + + if(e==="EM"){ + $.cookie.set("foolWorldTip",1); + l.tipText.parentNode.style.display="none"; + + UT.send({"type": "click", + "sort": s.playing ? "2" : "1", + "position":"close_tip", + "modId":"foolDay" + }); + } + if(e==="DIV"){ + UT.send({"type": "click", + "sort": s.playing ? "2" : "1", + "position":"iceman", + "modId":"foolDay" + }); + + s.playing + ? + s.stop() + :r() + }},!1)}}}(window,document,function(A){return A.getContext&&A.getContext("2d")?A:!1}(document.createElement("canvas")),document.createElement("DIV"),window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(A){setTimeout(A,1e3/60)});module.exports=foolWorld; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/football/football.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/football/football.js new file mode 100755 index 000000000..72779bb3c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/football/football.js @@ -0,0 +1,693 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var helper = require("common:widget/ui/helper/helper.js"); +var dateTool = require("common:widget/ui/date/date.js"); +require("common:widget/ui/jquery/widget/jquery.lazyload/jquery.lazyload.js"); +var message = require("common:widget/ui/message/src/message.js"); + +/** + * 足球模块 + * @author wangmingfei + * @constructor + * @this {football} + */ +var football = function(args){ + var that = this; + // const + that.CONST_ALL_TYPE = "all"; + // dom + that.footballWrapper = $("#sideFootball"); + that.footballPanel = that.footballWrapper.find(".mod-side"); // api error handle use + that.moreLink = that.footballWrapper.find('.charts_more'), // api error handle use + that.footballError = $("#football-error"); // api error handle use + that.footballListWrappers = that.footballWrapper.find(".football-game-list-wrapper"); + that.footballLists = that.footballWrapper.find(".football-game-list"); + that.footballUpArrow = $("#footballUpArrow"); // up arrow + that.footballDownArrow = $("#footballDownArrow"); // down arrow + // tpl + that.liTpl = "
                                  • #{typeName}#{startTime}#{statusName}
                                    "; + that.aTpl = "
                                  • #{typeName}#{startTime}#{statusName}
                                    "; + that.scrore = "#{homeScore} - #{awayScore}"; + that.homeImgTpl = "#{homeImg}#{homeName}"; + that.awayImgTpl = "#{awayName}#{awayImg}
                                    "; + that.homeTpl = "#{homeName}"; + that.awayTpl = "#{awayName}
                                  • "; + that.liTail =""; + that.aTail =""; + that.tabTpl = "#{dateText}#{date}"; + that.noDataTpl = "

                                    #{noDataText}

                                    "; + //config + that.config = conf.football; + // data cache + that.opt = {}; + that.opt.date = []; // cache date + that.opt.data = {}; // cache game data by date and type dimentions: data = {"date1":{"type1":[{},...,{}],...,"typen":[]},...,"daten":{}} + that.opt.start = {}; // cache start index by date and type dimentions for calculating init position of game list + that.opt.total = {}; // cache array length by date and type dimentions for looping + that.opt.type = []; // cache type data by date and type dimentions + that.opt.status = that.config.gameState; // map of game status and its local name + // others + that.step = 59; // height of one single game section + that.hasTypeList = false; // whether game type list has initialised + that.ajaxSucceed = false; // store ajax state, used for error condition + that.curGameType = that.CONST_ALL_TYPE; // store the current game type chosen, init to "all" + that.canResetType = false; // whether typelist can reset(only when date is changed) + //与其它模块通信信道 + that.messageChannel = args.messageChannel; + // init action + that.initAfterGetNow(); +}; + +/** + * make sure the first init action is executed after obtaining Gl.serverNow + * + * @this {football} + */ +football.prototype.initAfterGetNow = function(){ + var that = this, + loop = 0, + timer = setInterval(function(){ + if(Gl.serverNow || loop > 4){ // try 5 times at most until Gl.serverNow is obtained, if failed, get client time instead + that.now = Gl.serverNow || new Date(); + that.curGameDate = dateTool.format("yyyy-MM-dd",that.now); // store the current date chosen: init to current date + that.formDateTabs(); + that.init(that.curGameDate,that.curGameType); + that.bindEvents(); + clearInterval(timer); + } + loop++; + },1000); +}; + +/** + * get date tabs + * + * @this {football} + */ +football.prototype.formDateTabs = function(){ + var that = this, + html = "", + dateStr, + dateVal; + for(var i=0,len=that.config.gameDate.length;i" : "", + awayImg: li.away.logo ? "" : "", + url: li.url && li.url.length ? li.url.trim() : "" + }; + type == that.CONST_ALL_TYPE && that.opt.data[date][li.type].push(tmp); // if type is all, also cache the classified data since we've already got the full list of games on that date, + that.opt.data[date][type].push(tmp); + } +}; + +/** + * get game data by date and type dimentions from local cache + * + * @this {football} + * @param {string} date The date index + * @param {string} type The type index + * @return {array} The game data of specified date and type + */ +football.prototype.getDataByDayType = function(date,type){ + var that = this; + return that.opt.data[date][type]; +}; + +/** + * get total data by date and type dimentions from local cache + * + * @this {football} + * @param {string} date The date index + * @param {string} type The type index + * @return {number} The total number of game data of a specified date and type + */ +football.prototype.getTotalByDayType = function(date,type){ + return this.opt.total[date][type]; +}; + +/** + * set total data by date and type dimentions + * + * @this {football} + * @param {string} date The date index + * @param {string} type The type index + * @param {number} val The total number of game data of a specified date and type + */ +football.prototype.setTotalByDayType = function(date,type,val){ + //this.opt.data[date][type] = this.opt.data[date][type] || {}; + this.opt.total[date][type] = val; +}; + +/** + * get start data by date and type dimentions + * + * @this {football} + * @param {string} date The date index + * @param {string} type The type index + * @return {array} The start index of game data of a specified date and type + */ +football.prototype.getStartByDayType = function(date,type){ + return this.opt.start[date][type]; +}; + +/** + * set start data by date and type dimentions + * + * @this {football} + * @param {string} date The date index + * @param {string} type The type index + * @param {number} val The start index of game data of a specified date and type + */ +football.prototype.setStartByDayType = function(date,type,val){ + this.opt.start[date] || (this.opt.start[date] = {}); + this.opt.start[date][type]= val; +}; + +/** + * get type data by date dimention + * + * @this {football} + * @param {string} date The date index + * @return {object} The type data(key-value list) of a specified date + */ +football.prototype.getTypelistByDay = function(date){ + return this.opt.type[date]; +}; + +/** + * set type data by date and type dimentions + * + * @this {football} + * @param {string} date The date index + * @param {object} data type data(key-value list) of a specified date + */ +football.prototype.setTypelistByDay = function(date,data){ + this.opt.type = this.opt.type || []; + this.opt.type[date] = data; +}; + +/** + * whether game data of a specified date and type exists + * + * @this {football} + * @param {string} date The date index + * @param {string} type The type index + * @return {boolean} Returning false means that date has no such type of game + */ +football.prototype.existDataByDayType = function(date,type){ + var that = this; + return that.getDataByDayType(date,type) && that.getDataByDayType(date,type).length +}; + +/** + * request data from api and handle different situations, such like typelist is null or typelist is not null but gamelist is null + * + * @this {football} + * @param {string} date The date index + * @param {string} type The type index + */ +football.prototype.requestApi = function(date,type){ + var that = this, + params = "?app=soccer&act=contents"+(type!=that.CONST_ALL_TYPE?"&type="+type:"")+"&date="+date+"&country="+conf.country; + $.ajax({ + url: conf.apiUrlPrefix + params, + // url: "/static/home/widget/football/data_"+date+".json", + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + // jsonpCallback: "ghao123_b61ba78e22bb999a", + cache: false + }).done(function(data){ + // hide ajax error notice + that.ajaxSucceed = true; + that.hideError(); + if(data.content.data.typelist.length){ // has type data, then create type list + // get type and game basic data + var typeData = data.content.data.typelist, + gameData = data.content.data.gamelist; + // format type data and creat type list + that.formTypeData(date,typeData); + that.formTypeList(date,type); + + if(gameData.length){ // has game data then get formatting data and append to page + that.setStartByDayType(date,type,-1); + that.setDataByDayType(date,type,gameData); + that.setTotalByDayType(date,type,gameData.length); + that.appendData(date,type); + }else{ // game data is empty, then display "no data of this type" information + that.appendNoData(data,type,that.config.noTypeText); + $.each(that.getTypelistByDay(date),function(i,v){ + if(v.id === type){ + type = v.name; + } + }); + that.footballPanel.find(".dropdown-input").text(type); + } + }else{ // type data is empty , then display "no data of this date" information + that.appendNoData(data,type,that.config.noDataText); + that.hideTypelist(); + } + }); + if(!that.ajaxSucceed) that.showError(); +}; + +/** + * request data from local cache + * + * @this {football} + * @param {string} date The date index + * @param {string} type The type index + */ +football.prototype.requestLocal = function(date,type){ + var that = this; + that.formTypeList(date,type); + if(that.existDataByDayType(date,type)){ + that.setStartByDayType(date,type,-1); + that.appendData(date,type); + }else{ + that.appendNoData(data,type,that.config.noTypeText); + } + +}; + +/** + * append game data to list and move it to the proper position + * + * @this {football} + * @param {string} date The date index + * @param {string} type The date index + */ +football.prototype.appendData = function(date,type){ + var that = this, + html = "", + data = that.getDataByDayType(date,type); + for(var i=0,j=0;li=data[i];i++){ + // [find init position]: find the first inprogress index, if not any, find the first notstarted instead + if(li.status == "inprogress" || li.status == "notstarted"){ + if(that.getStartByDayType(date,type) == -1){ + that.setStartByDayType(date,type,j); + } + } + if(type == that.CONST_ALL_TYPE || (type && li.type == type)){ + var imgLTpl = li.homeImg ? that.homeImgTpl : that.homeTpl, + imgRTpl = li.awayImg ? that.awayImgTpl : that.awayTpl, + tpl = li.url.length ? that.aTpl + imgLTpl + that.scrore + imgRTpl + that.aTail : that.liTpl + imgLTpl + that.scrore + imgRTpl + that.liTail; + html += helper.replaceTpl(tpl,li); + j++; + } + } + // [find init position]: if there's not any inprogress or notstarted game, then get the last index + if(that.getStartByDayType(date,type) == -1){ + that.setStartByDayType(date,type,j); + } + that.appendTplToPanel(html,$.inArray(date,that.opt.date)); + //lazyload team icon + $(".football-game-icon",that.footballWrapper).lazyload({ + container: $("#footballGameLists"), + imgClass:"football-img-lazyload", + autoFireEvent: null, + event: "clickArrow.football" + }); +}; + +/** + * append no data notice if there's no such type of game data or no games at all on that date + * + * @this {football} + * @param {string} date The date index + * @param {string} type The date index + * @param {string} text The content of no data notice + */ +football.prototype.appendNoData = function(date,type,text){ + var that = this; + var html = helper.replaceTpl(that.noDataTpl,{noDataText:text}); // if the selected type returns no data, then show "No data" notice + that.appendTplToPanel(html,$.inArray(date,that.opt.date)); + that.hideArrow(); +}; + +/** + * append assembled tpl to the right panel section + * + * @this {football} + * @param {string} tpl The assembled tpl to be appended + * @param {string} panelIndex The index of content panel to append to + */ +football.prototype.appendTplToPanel = function(tpl,panelIndex){ + var that = this; + that.footballLists.eq(panelIndex).html(tpl).css("top",0); + that.showArrow(); + that.footballListWrappers.hide().eq(panelIndex).show(); + that.moveToCurrent(); +}; + +/** + * arrow buttons' move action + * + * @this {football} + * @param {number} direction Move direction: up => 1; down => -1 + * @param {number} pace Pace number for clicking arrow once + */ +football.prototype.move = function(direction,pace){ + var that = this, + curIndex = $.inArray(that.curGameDate,that.opt.date), + curPanel = that.footballLists.eq(curIndex), + liLength = that.footballLists.eq(curIndex).children().length, + height = (liLength < 3 ? 3 : liLength) * that.step, //tackle with a problem when pre-loading on hover event. can't use "height = that.footballLists.eq(that.curIndex).height()", because it's hidden when preloading on hover event + bottomBorder = -height + 3 * that.step, + topValue = parseInt(curPanel.css("top"),10) + direction * pace * that.step; + + topValue = that.adjustOnBorder(topValue,bottomBorder); // adjust the top value + curPanel.css("top",topValue); // move the list to the new position + that.changeArrowStatus(topValue,bottomBorder); // change button status if the list comes to the border + $("#footballGameLists").trigger("clickArrow.football"); +}; + +/** + * move the list to the proper position: generally to the first "inprogress" game, if not any to the first "notstarted" game instead, if still not any to the last "finished" game + * + * @this {football} + */ +football.prototype.moveToCurrent = function(){ + var that = this; + that.move(-1,that.getStartByDayType(that.curGameDate,that.curGameType)); +}; + +/** + * if the list comes to the top/bottom border, adjust its top value to avoid overflowing + * + * @this {football} + * @param {number} topValue The newly calculated top value of game list + * @param {object} bottomBorder The top value when game list reaching its bottom + * @return {number} The adjusted top value of game list + */ +football.prototype.adjustOnBorder = function(topValue,bottomBorder){ + var that = this; + if(topValue > 0){ + topValue = 0; + }else if(topValue < bottomBorder){ + topValue = bottomBorder; + } + return topValue; +}; + +/** + * change top/bottom arrow status if the list comes to the top/bottom border + * + * @this {football} + * @param {number} topValue The current top value of game list + * @param {object} bottomBorder The top value when game list reaching its bottom + */ +football.prototype.changeArrowStatus = function(topValue,bottomBorder){ + var that = this; + if(topValue == 0){ + that.footballUpArrow.addClass("football-arrow-disable"); + }else{ + that.footballUpArrow.hasClass("football-arrow-disable") && that.footballUpArrow.removeClass("football-arrow-disable"); + } + if(topValue == bottomBorder){ + that.footballDownArrow.addClass("football-arrow-disable"); + }else{ + that.footballDownArrow.hasClass("football-arrow-disable") && that.footballDownArrow.removeClass("football-arrow-disable"); + } +}; + +/** + * make arrows invisible + * + * @this {football} + */ +football.prototype.hideArrow = function(){ + var that = this; + that.footballUpArrow.css("visibility","hidden"); + that.footballDownArrow.css("visibility","hidden"); +}; + +/** + * make arrows visible + * + * @this {football} + */ +football.prototype.showArrow = function(){ + var that = this; + that.footballUpArrow.css("visibility","visible"); + that.footballDownArrow.css("visibility","visible"); +}; + +/** + * hide type dropdown list + * + * @this {football} + */ +football.prototype.hideTypelist = function(){ + this.typelist && this.typelist.newSelector.hide(); +}; + +/** + * show type dropdown list + * + * @this {football} + */ +football.prototype.showTypelist = function(){ + this.typelist.newSelector.show(); +}; + +/** + * refresh action, always request api + * + * @this {football} + */ +football.prototype.refresh = function(date,type){ + var that = this; + clearTimeout(that.errorTimeout); + that.errorTimeout = setTimeout(function(){ + that.ajaxSucceed = false; + that.requestApi(date,type); + },200); +}; + +/** + * show ajax error notice + * + * @this {football} + */ +football.prototype.showError = function(){ + var that = this; + that.footballWrapper.css('height' , '300px'); + that.footballPanel.hide(); + that.moreLink.hide(); + that.footballError.show(); +}; + +/** + * hide ajax error notice + * + * @this {football} + */ +football.prototype.hideError = function(){ + var that = this; + that.footballWrapper.css('height' , 'auto'); + that.footballPanel.show(); + that.moreLink.show(); + that.footballError.hide(); +}; + +/** + * send statistic action + * + * @this {football} + */ +football.prototype.sendStat = function(ac){ + var utObj = { + type:"click", + level:1, + modId:"football", + country:conf.country + }; + if(ac) { + utObj.ac = "b"; + } + UT.send(utObj); +}; + +module.exports = football; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/gold/gold.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/gold/gold.js new file mode 100755 index 000000000..e68a61d12 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/gold/gold.js @@ -0,0 +1,138 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var helper = require("common:widget/ui/helper/helper.js"); +var gold = function(){ + var scrollArrows = $(".mod-gold .scroll-arrow"), + priceListWrapper = $(".gold-price"), + priceList = $("#goldPriceList"), + priceTags = $(".gold-icon"), + errorTimeout, + goldError = $("#gold-error"), + goldWrapper = $('.mod-gold'), + goldPanel = goldWrapper.find('.mod-side'), + chartsMore = goldWrapper.find('.charts_more'), + goldTpl = "
                                    #{title}
                                    #{buyText}#{buy}#{sellText}#{sell}
                                    ", + html = "", + maxLength, + sendStat = function(){ + UT.send({ + type:"click", + level:1, + modId:"gold", + position:"links", + country:conf.country + }); + }, + bindEvents = function(){ + var topArrow = $(".mod-gold .top-arrow"), + bottomArrow = $(".mod-gold .bottom-arrow"); + //下拉列表滚动条事件 + topArrow.addClass("disabled"); + bottomArrow.removeClass("disabled"); + if(maxLength > 3){ + scrollArrows.show(); + } + topArrow.click(function(event){ + //var thisList = $(this).siblings("dl"); + priceListWrapper.scrollTop(priceListWrapper.scrollTop()-24); + event.preventDefault(); + sendStat(); + }); + bottomArrow.click(function(event){ + //var thisList = $(this).siblings("dl"); + priceListWrapper.scrollTop(priceListWrapper.scrollTop()+24); + event.preventDefault(); + sendStat(); + }); + /*priceListWrapper.scroll(function(e){ + var thisObj = $(this); + thisObj.scrollTop() == 0 ? + topArrow.addClass("disabled"): + topArrow.removeClass("disabled"); + (thisObj.height() + thisObj.scrollTop() == priceList.height()) ? + function(){ + bottomArrow.addClass("disabled"); + }(): + bottomArrow.removeClass("disabled"); + sendStat(); + });*/ + $(".mod-gold .charts_more").click(function(){ + sendStat(); + }) + }, + + showError = function(){ + goldWrapper.css('height' , '300px'); + chartsMore.hide(); + goldPanel.hide(); + goldError.show(); + }, + + hideError = function(){ + goldWrapper.css('height' , 'auto'); + goldError.hide(); + goldPanel.show(); + // chartsMore.show(); + chartsMore.css("display","block"); + }, + + init = function(){ + /*TO BE REMOVEDconf.country = "th";*/ + var ajaxSucceed = false; + var params = "?app=gold&act=contents&country="+conf.country; + $.ajax({ + //url: "/widget/home/gold/data.json", + url: conf.apiUrlPrefix + params, + dataType: "jsonp", + jsonp: "jsonp", + //jsonpCallback: "ghao123_d251a1d7fc7a0ef5", + jsonpCallback: "ghao123_" + hex_md5(params,16), + cache: false, + error: function(XMLHttpRequest, textStatus, errorThrown){ + }, + success: function(data , textStatus){ + if(data.content && data.content.data){ + ajaxSucceed = true; + hideError(); + data = data.content.data; + maxLength = data.length; + for(var i in data){ + data[i].buyText = conf.gold.buyText; + data[i].sellText = conf.gold.sellText; + if(i == maxLength -1){ + html += helper.replaceTpl(goldTpl,data[i]).replace("
                                    ","
                                    "); + }else{ + html += helper.replaceTpl(goldTpl,data[i]); + } + } + priceList.html(html); + require.async("common:widget/ui/scrollable/scrollable.js", function(){ + priceList.scrollable({ + autoHide: false, + onScroll: function(){ + sendStat(); + } + }); + }); + bindEvents(); + } + } + }); + if(!ajaxSucceed){ + showError(); + } + }; + + goldError.click(function(e){ + e.preventDefault(); + clearTimeout(errorTimeout); + errorTimeout = setTimeout(function(){ + init(); + },200); + }); + + + init(); +}; +module.exports = gold; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/hospital/hospital.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/hospital/hospital.js new file mode 100755 index 000000000..e439e0cb0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/hospital/hospital.js @@ -0,0 +1,88 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var helper = require('common:widget/ui/helper/helper.js'); + +var hospital = function() { + var bindEvents = function() { + // var $hosp = $('#sideHospitle'), + // $checkbox = $('.checkbox-item',$hosp), + // $radio = $('.radio-item',$hosp), + var $searchBtn = $('#searchBtn'); + + // $checkbox.on('click',function(){ + // var checkboxID = '#' + $(this).attr('for'), + // $checkboxItem = $(checkboxID); + + // if( $(this).hasClass('checkbox-checked') ){ + // $(this).removeClass('checkbox-checked'); + // $checkboxItem.prop('checked',true); + // }else{ + // $(this).addClass('checkbox-checked'); + // $checkboxItem.prop('checked',false); + // } + // }); + // $radio.on( 'click', function(){ + // var radioID = '#' + $(this).attr('for'), + // $radioItem = $(radioID), + // radioName = $radioItem.attr('name'); + + // if( !$(this).hasClass('radio-checked') ){ + // $.each( $radio, function( i,item ){ + // var _item = $(item); + // if( _item.prev().attr('name') == radioName ){ + // _item.removeClass('radio-checked'); + // $radioItem.prop('checked',false); + // } + // }); + // $(this).addClass('radio-checked'); + // $radioItem.prop('checked',true); + // } + // }); + $searchBtn.on( 'click', function(){ + var utObj = { + "type": "click", + "modId": "hospital" + }; + UT && UT.send(utObj); + }); + }; + var placeholderFix = function(){ + //ie浏览器不支持placeholder fix + var $inputbox = $('#sideHospitle').find('.inputbox'), + $searchArea = $('#search-area'), + $searchKeyword = $('#search-keyword'), + supportPlaceholder = ('placeholder' in document.createElement('input')), + placeholderTpl = ''; + + if (!supportPlaceholder) { + var note1Tpl = '', + note2Tpl = ''; + + note1Tpl = note1Tpl + helper.replaceTpl(placeholderTpl,{"note":conf.hospital.note1}); + note2Tpl = note2Tpl + helper.replaceTpl(placeholderTpl,{"note":conf.hospital.note2}); + $searchArea.append(note1Tpl); + $searchKeyword.append(note2Tpl); + + var $plLabel = $('#sideHospitle').find('.placeholder-iefix'); + $inputbox.on({ + focus: function() { + $(this).next().hide(); + }, + blur: function() { + $(this).val() == "" && $(this).next().show(); + } + }); + $plLabel.on('click', function(){ + $(this).prev().focus(); + }); + } + }; + + var init = function() { + bindEvents(); + placeholderFix(); + }; + init(); +}; + +module.exports = hospital; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-news_item.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-news_item.png new file mode 100755 index 000000000..20524dfc6 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-news_item.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-news_item.psd b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-news_item.psd new file mode 100755 index 000000000..ddca7bebd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-news_item.psd differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom-disable.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom-disable.png new file mode 100755 index 000000000..a51fd32ca Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom-disable.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom-hover.png new file mode 100755 index 000000000..26baac197 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom.png new file mode 100755 index 000000000..3a9334fc2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-bottom.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top-disable.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top-disable.png new file mode 100755 index 000000000..b53777407 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top-disable.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top-hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top-hover.png new file mode 100755 index 000000000..d6ba00b89 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top-hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top.png new file mode 100755 index 000000000..54e0e4ad1 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/img/i-scroll-arrow-top.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/brLottery.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/brLottery.js new file mode 100755 index 000000000..08550b76d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/brLottery.js @@ -0,0 +1,101 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var helper = require('common:widget/ui/helper/helper.js'); + +var BrLottery = function(){ + var that = this; + that.conf = conf.lottery; + // 每个table的模板 + that.tableTpl = "
                                    #{name}
                                    #{drawText}:#{drawValue}#{date}
                                    #{result}
                                    "; + that._init(); +}; + +// 是否已经发送了滚动统计 +BrLottery.hasSendScrollLog = false; + +BrLottery.prototype._init = function(){ + var params = "?app=lottery&act=result&country=" + conf.country, + that = this; + $.ajax({ + url: conf.apiUrlPrefix + params, + // url: "/static/home/widget/lottery/data.json", + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + // jsonpCallback: "ghao123_d251a1d7fc7a0ef5", + cache: false + }).done(function(data){ + that.data = data.content.data; + if(that.data && that.data.length){ + that._render(); + } + }); +}; +BrLottery.prototype._render = function(){ + var that = this, + typelist = that.conf.type, + html = "", + lotteryList = $("#brLotteryList"); + // 拼html + $.each(that.data,function(i,v){ + var type = typelist[v.id]; + html += helper.replaceTpl(that.tableTpl,{ + color: i%2 ? "red" : "green", + name: type.name, + url: type.url, + drawText: that.conf.drawText, + drawValue: v.draw, + date: v.date, + result: that._styleResult(v.result,type.showType) + }); + }); + // 插到页面 + lotteryList.html(html); + // 绑定滚动条 + require.async("common:widget/ui/scrollable/scrollable.js",function(){ + lotteryList.scrollable({ + autoHide: false, + onScroll: function(){ + if(!BrLottery.hasSendScrollLog){ + UT.send({ + modId: "lottery", + type: "click", + position: "scrollrole" + }); + BrLottery.hasSendScrollLog = true; + } + } + }); + }); +}; +// 根据不同的显示类别showType得到不同的开奖结果模板 +BrLottery.prototype._styleResult = function(result,showType){ + var str = ""; + switch(showType) + { + // 一行一个 + case "1": + $.each(result,function(i,v){ + str += (v + "
                                    "); + }); + break; + // 一行五个 + case "2": + $.each(result,function(i,v){ + str += (v + " "); + i%5 == 4 && (str += "
                                    "); + }); + break; + // 一行六个 + case "3": + $.each(result,function(i,v){ + str += (v + " "); + i%6 == 5 && (str += "
                                    "); + }); + break; + } + return str; +}; + +module.exports = BrLottery; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/thLottery.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/thLottery.js new file mode 100755 index 000000000..e0c32df73 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/thLottery.js @@ -0,0 +1,344 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); + +var datePicker = $("#datepicker"); +var dateList = $("#datelist"); +var listTrigger = $("#datepicker,#datepicker + .lottery-trigger"); +var lotteryNum = $("#lotteryNum"); +var lotteryNumDefault = lotteryNum.val(); +var lotterySearch = $("#lotterySearch"); +var lotteryTable = $("#lotteryTable"); + +//生成日期下拉列表 +var formDropdownlist = function(data){ + var listdata = data; + var html = ""; + + if(listdata.length){//下拉有数据 + for(var i=0,li;i<6&&(li=listdata[i]);i++){ + html += "
                                  • " + li + "
                                  • "; + if(!i){ + datePicker.val(li);//默认取下拉中第一个日期为当前日期 + } + } + }else{//下拉无数据 + datePicker.val(""); + } + dateList.html(html); +}; +//生成开奖信息表格 +var formResultTable = function(awardInfo){ + var html = ""; + + for(var i=0,td;td=awardInfo[i];i++){ + if(!i){ + html += "
                                    " + td.price + "
                                    " + td.code + "
                                    "; + }else{ + html += "
                                    " + td.price + "
                                    " + td.code + "
                                    "; + } + } + lotteryTable.html(html); +}; +//请求日期列表 +var requestDate = function(){ + dateLoading(); + var params = "?app=lottery&act=date&country=" + conf.country; + $.ajax({ + url: conf.apiUrlPrefix + params, + //url: "/widget/home/lottery/date.json", + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + //jsonpCallback: "jQuery1_1", + cache: false, + success: function(result) { + // if(data.content && data.content.data){ + // ajaxSucceed = true; + // hideError(); + // data = data.content.data; + // formDropdownlist(data); + // requestResult(listdata[0]); + // } + var dateTimer = loadingTimers[DATE_LOADING]; + if(dateTimer.isTimeout) { + return; //在超时情况下,即使返回数据,仍然不处理 + }else{ + //clearTimeout(cityTimer.timer); + endLoadingTimer(DATE_LOADING); + } + if(result && result.message && result.message.errNum >= 0 && result.content && result.content.data){ + var data = result.content.data; + if(($.isArray(data) && data.length === 0) || $.isEmptyObject(data)){ + stateCtrl.trigger(GET_DATE_FAILURE); + } + stateCtrl.trigger(GET_DATE_SUCCESS , [result.content.data]);//一定要加方括号 + }else{ + stateCtrl.trigger(GET_DATE_FAILURE); + } + } + }); +}; +//根据日期来请求开奖信息 +var requestResult = function(date){ + resultLoading(); + var params = "?app=lottery&act=tsearch&tdate="+date+"&country="+conf.country; + $.ajax({ + url: conf.apiUrlPrefix + params, + //url: "/widget/home/lottery/rs_"+parseInt(date)+".json", + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + //jsonpCallback: "jQuery1_1", + cache: false, + success: function(result) { + // if(data.content && data.content.data){ + // data = data.content.data; + // formResultTable(data.awardInfo); + // lotterySearch.attr("href",data.url); + // } + var resultTimer = loadingTimers[RESULT_LOADING]; + if(resultTimer.isTimeout) { + return; //在超时情况下,即使返回数据,仍然不处理 + }else{ + endLoadingTimer(RESULT_LOADING); + } + if(result && result.message && result.message.errNum >= 0 && result.content && result.content.data){ + var data = result.content.data; + if(($.isArray(data) && data.length === 0) || $.isEmptyObject(data)){ + stateCtrl.trigger(GET_RESULT_FAILURE); + } + stateCtrl.trigger(GET_RESULT_SUCCESS , [result.content.data]);//一定要加方括号 + }else{ + stateCtrl.trigger(GET_RESULT_FAILURE); + } + } + }); +}; +//初始化查询面板,在页面加载时使用 +var initPanel = function(){ + requestDate(); +}; +//绑定事件 +var bindEvents = function(){ + + //展开日期列表 + listTrigger.click(function(){ + if(dateList.is(":visible")){ + dateList.slideUp(200); + }else{ + dateList.slideDown(200); + sendLog(true); + } + }); + //收起日期列表 + $(document).on("mousedown", function(e) { + var el = e.target; + + if(dateList.is(":visible") && el !== listTrigger[0] && el !== listTrigger[1] && !jQuery.contains(listTrigger[0], el) && !jQuery.contains(listTrigger[1], el)){ + dateList.slideUp(200); + } + }); + //选择日期,开奖信息跟随日期列表联动 + dateList.on("mousedown","li",function(){ + var date = $(this).text(); + if(date != datePicker.val()){ + datePicker.val(date); + requestResult(date); + } + }); + //点击查询按钮时将用户输入的号码添加到查询url后面,忽略用户输入号码的空格 + lotterySearch.click(function(){ + var inputNum = lotteryNum.val().replace(/\s/g,""); + lotteryNum.val(inputNum); + if(inputNum.length){ + lotterySearch.attr("href",lotterySearch.attr("href").replace(/#.*$/,"")+"#"+encodeURIComponent(inputNum)); + }else{ + lotterySearch.attr("href",lotterySearch.attr("href").replace(/#.*$/,"")); + } + sendLog(true); + }); + + $("#datepicker,.mod-lottery .ui-datepicker-trigger,.mod-lottery .charts_more").click(function(){ + sendLog(true); + }); + +}; + +//发送统计数据 +var sendLog = function(ac){ + var utObj = { + type:"click", + position:"links", + modId:"lottery" + }; + if(ac) { + utObj.ac = "b"; + } + UT.send(utObj); +}; + + +/** +*以下为对盒子进行状态控制的代码 +*@author wayne +*/ +var $sideLottery = $("#sideLottery"); +var $apiErrorBtn = $sideLottery.find('.api-error');//api error btn +var stateCtrl = $({}); +var firstGet = true; +var loadingTimers = {};//对loading状态对应的timer进行管理 + +//有几个ajax请求,就有多少组状态,此处为两组,每组包括loading,timeout,success,failure四种状态 +var DATE_LOADING = 'date_loading'; +var DATE_TIME_OUT = 'date_time_out'; +var GET_DATE_SUCCESS = 'get_date_success'; +var GET_DATE_FAILURE = 'get_date_failure'; + +var RESULT_LOADING = 'result_loading'; +var RESULT_TIME_OUT = 'result_time_out'; +var GET_RESULT_SUCCESS = 'get_result_success'; +var GET_RESULT_FAILURE = 'get_result_failure'; + +var bindStateEvent = function(){ + //绑定首页的错误处理 + var events = {}; + events[DATE_LOADING] = function(){ + onDateLoading(); + }; + events[DATE_TIME_OUT] = function(){ + onDateTimeout(); + }; + events[GET_DATE_SUCCESS] = function(e , data){ + onGetDateSuccess(data); + }; + events[GET_DATE_FAILURE] = function(){ + onGetDateFailure(); + }; + events[GET_RESULT_FAILURE] = function(){ + onGetResultFailure(); + }; + events[GET_RESULT_SUCCESS] = function(e , data){ + onGetResultSuccess(data); + }; + events[RESULT_TIME_OUT] = function(){ + onResultTimout(); + }; + // events[RESULT_LOADING] = function(){ + // onResultLoading(); + // }; + stateCtrl.on(events); + + //无法连接到api,点击后重新获取数据 + $apiErrorBtn.click(function(e){ + e.preventDefault(); + refresh(); + }); +}; +//刷新 +var refresh = function(){ + requestDate(); +}; + +var onDateLoading = function(){ + if(firstGet){ + showLoadingPanel(); + } +}; + +var onDateTimeout = function(){ + if(firstGet){ + showErrorPanel(); + } +}; + +var onGetDateSuccess = function(data){ + formDropdownlist(data); + requestResult(data[0]); +}; + +var onGetDateFailure = function(){ + showErrorPanel(); +}; + +var onGetResultSuccess = function(data){ + if(firstGet){ + showSuccessPanel(); + firstGet = false; + } + formResultTable(data.awardInfo); + lotterySearch.attr("href",data.url); +}; + +var onGetResultFailure = function(){ + if(firstGet){ + showErrorPanel(); + } +}; + +var onResultTimout = function(){ + if(firstGet){ + showErrorPanel(); + } +}; + +/** +*由于jsonp无任何错误提示,所以自定义定时器,如超过指定时间仍无数据返回,则视为错误 +*@param {String}timerName 定时器句柄, 此处用loading事件名 +*@param {Number}time 定义超时的时间 +*@param {String}timeoutEvent 超时后需要发送的事件名称 +*/ +var startLoadingTimer = function(timerName , time , timeoutEvent){ + loadingTimers[timerName] = loadingTimers[timerName] || {}; //每次启动时先还原 + loadingTimers[timerName].isTimeout = false; + loadingTimers[timerName].timer = setTimeout(function(){ + stateCtrl.trigger(timeoutEvent);//发送超时事件 + loadingTimers[timerName].isTimeout = true; + }, time); +}; + +//中止定时器,当成功获取数据时调用 +var endLoadingTimer = function(timerName){ + if(loadingTimers[timerName]){ + clearTimeout(loadingTimers[timerName].timer); + loadingTimers[timerName].isTimeout = true; //设置为过期,以防止多次加载数据 + }else{ + //do nothing + } +}; + +//根据各状态调整界面显示=============================================== +var showSuccessPanel = function(){ + $sideLottery.removeClass('status-loading').addClass('status-success'); +}; + +var showErrorPanel = function(){ + $sideLottery.removeClass('status-loading').addClass('status-error'); +}; + +var showLoadingPanel = function(){ + $sideLottery.removeClass('status-error status-success').addClass('status-loading'); +}; + +//日期列表加载中封装函数 +var dateLoading = function(){ + stateCtrl.trigger(DATE_LOADING); + startLoadingTimer(DATE_LOADING , 10000 , DATE_TIME_OUT);//以后cms可配时间 +}; + +var resultLoading = function(){ + stateCtrl.trigger(RESULT_LOADING); + startLoadingTimer(RESULT_LOADING , 10000 , RESULT_TIME_OUT); +}; +//状态控制代码代码结束 +//================================================== +//初始化方法 +var init = function(){ + bindStateEvent(); + //初始化内容区 + initPanel(); + //绑定事件 + bindEvents(); +}; + +module.exports = init; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/vnLotteryBase.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/vnLotteryBase.js new file mode 100755 index 000000000..547fef3e6 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/vnLotteryBase.js @@ -0,0 +1,301 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var hex_md5 = require('common:widget/ui/md5/md5.js'); +var time = require('common:widget/ui/time/time.js'); +require('common:widget/ui/jquery/widget/jquery.ui.datepicker/jquery.ui.datepicker.js'); + + +/** +*该类主要对datePicker和cityPicker控件进行初始化和控制,同时,对彩票组件的状态进行控制 +*/ +function VnLotteryBase(){ + this._stateCtrl = $(this); //事件句柄,用于发送各类状态事件 + //this._pageType = 0; //父类为0,首页为1,二级页为2 + + //以下为事件列表, + this._CITY_LOADING = 'city_loading';//城市列表加载中 + this._CITY_TIME_OUT = 'city_timeout';//超时 + this._GET_CITY_SUCCESS = 'get_city_success';//获取城市列表成功 + this._GET_CITY_FAILURE = 'get_city_failure';//无城市数据 + + this._RESULT_LOADING = 'result_loading';//中奖结果加载中 + this._RESULT_TIME_OUT = 'result_timeout';//超时 + this._GET_RESULT_SUCCESS = 'get_result_success';//获取中奖列表成功 + this._GET_RESULT_FAILURE = 'get_result_failure';//无中奖结果 + + this._loadingTimers = {};//对于两个loading状态对应的timer进行管理 +} + + + +//初始化datapicker +VnLotteryBase.prototype._initDatePicker = function(){ + var self = this; + self._$datePicker.datepicker({ + showOtherMonths: true, + selectOtherMonths: true, + showOn: "both", + buttonText: "", + showAnim: "slideDown", + showOptions: {direction: "down"}, + dateFormat: self._conf.lottery.dateFormat, + minDate: self._conf.lottery.minDate, + maxDate: self._conf.lottery.maxDate, + hideIfNoPrevNext: true + }); + $.datepicker.setDefaults(self._conf.datepicker);//localization + //设置默认日期 + if(time.getForm().hh >= parseInt(self._conf.lottery.changeHour,10)){ + self._$datePicker.datepicker("setDate", "0");//超过设置的小时数,此时默认今日数据已经可用,取今日数据 + }else{ + self._$datePicker.datepicker("setDate", "-1");//否则取昨日数据 + } + +}; + +/** +*设置城市下拉列表 +*@param {Array}cities 城市列表 +*@param {string}default cityPicker默认显示值,如无该参数,则已cities[0]为显示值 +*/ +VnLotteryBase.prototype._setCityPicker = function(cities , defaultCity){ + var cityLi = []; + var length = cities.length; + + if(length){//下拉有数据 + //设置列表 + for(var i = 0 ; i < cities.length-1 ; i++){ + cityLi.push("
                                  • " , cities[i] , "
                                  • "); + } + var list = cityLi.join(''); + this._$cityList.html(list); + + //设置默认显示项 + if(defaultCity){ + this._$cityPicker.val(defaultCity); + }else{ + this._$cityPicker.val(cities[0]); + } + }else{ + this._$cityPicker.val(''); + this._$cityList.html(''); + // return 0;//如果列表为空,则无视defaultCity参数,直接返回 + } +}; + + +//========================================================= +//根据日期获取开奖城市列表 +VnLotteryBase.prototype._getCityByDate = function(date){ + var self = this; + self._cityLoading(); + self._setCityPicker([]);//每次请求城市列表时,现将上一次的结果清空 + var params = "?app=lottery&act=city&country="+self._conf.country+"&date="+date; + $.ajax({ + url: self._conf.apiUrlPrefix + params, + // url: "/static/home/widget/ui/lottery/city.json", + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + // jsonpCallback: "ghao123_1005831968c4d6b6", + cache: false, + success: function(result) { + var cityTimer = self._loadingTimers[self._CITY_LOADING]; + if(cityTimer.isTimeout) { + return; //在超时情况下,即使返回数据,仍然不处理 + }else{ + //clearTimeout(cityTimer.timer); + self._endLoadingTimer(self._CITY_LOADING); + } + if(result && result.message && result.message.errNum >= 0 && result.content && result.content.data){ + var data = result.content.data; + if(($.isArray(data) && data.length === 0) || $.isEmptyObject(data)){ + self._stateCtrl.trigger(self._GET_CITY_FAILURE); + }else{ + self._stateCtrl.trigger(self._GET_CITY_SUCCESS , [result.content.data]);//一定要加方括号 + } + }else{ + self._stateCtrl.trigger(self._GET_CITY_FAILURE); + } + } + }); +}; +//根据城市、日期、票号请求结果, code参数可选 +VnLotteryBase.prototype._getWinningResult = function(date, city, code){ + var self = this; + self._resultLoading(); + var params = "?app=lottery&act=search&country=" + self._conf.country + + "&code=" + (code?code:null) + "&date=" + date + "&city=" + city; + $.ajax({ + url: self._conf.apiUrlPrefix + params, + // url: "/static/home/widget/ui/lottery/result.json", + dataType: "jsonp", + jsonp: "jsonp", + jsonpCallback: "ghao123_" + hex_md5(params,16), + // jsonpCallback: "ghao123_37282f5d74ef27b3", + cache: false, + success: function(result) { + var resultTimer = self._loadingTimers[self._RESULT_LOADING]; + if(resultTimer.isTimeout){ + return; //在超时情况下,即使返回数据,仍然不处理 + }else{ + //clearTimeout(resultTimer.timer); + self._endLoadingTimer(self._RESULT_LOADING); + } + /*if(result && result.message && result.message.errNum === 0 && result.content && result.content.data){ + var data = result.content.data; + //对空数组和空对象进行判断 + if(($.isArray(data) && data.length === 0) || $.isEmptyObject(data)) { + self._stateCtrl.trigger(self._GET_RESULT_FAILURE); + } + self._stateCtrl.trigger(self._GET_RESULT_SUCCESS , [data]); + }else{ + self._stateCtrl.trigger(self._GET_RESULT_FAILURE); + }*/ + if(result && result.message && result.message.errNum >= 0 && result.content && result.content.data && result.content.data.awardInfo && result.content.data.awardInfo.length){ + var data = result.content.data; + self._stateCtrl.trigger(self._GET_RESULT_SUCCESS , [data]); + }else{ + self._stateCtrl.trigger(self._GET_RESULT_FAILURE); + } + } + }); +}; +//========================================================= + +//城市列表加载中封装函数 +VnLotteryBase.prototype._cityLoading = function(){ + this._stateCtrl.trigger(this._CITY_LOADING); + this._startLoadingTimer(this._CITY_LOADING , 10000 , this._CITY_TIME_OUT);//以后cms可配时间 +}; + +//中奖结果加载中封装函数 +VnLotteryBase.prototype._resultLoading = function(){ + this._stateCtrl.trigger(this._RESULT_LOADING); + this._startLoadingTimer(this._RESULT_LOADING , 10000 , this._RESULT_TIME_OUT); +}; + +/** +*由于jsonp无任何错误提示,所以自定义定时器,如超过指定时间仍无数据返回,则视为错误 +*@param {String}timerName 定时器句柄, 此处用loading事件名 +*@param {Number}time 定义超时的时间 +*@param {String}timeoutEvent 超时后需要发送的事件名称 +*/ +VnLotteryBase.prototype._startLoadingTimer = function(timerName , time , timeoutEvent){ + var self = this; + self._loadingTimers[timerName] = self._loadingTimers[timerName] || {}; //每次启动时先还原 + self._loadingTimers[timerName].isTimeout = false; + self._loadingTimers[timerName].timer = setTimeout(function(){ + self._stateCtrl.trigger(timeoutEvent);//发送超时事件 + self._loadingTimers[timerName].isTimeout = true; + }, time); +}; + +//中止定时器,当成功获取数据时调用 +VnLotteryBase.prototype._endLoadingTimer = function(timerName){ + var self = this; + if(self._loadingTimers[timerName]){ + clearTimeout(self._loadingTimers[timerName].timer); + self._loadingTimers[timerName].isTimeout = true; //设置为过期,以防止多次加载数据 + }else{ + //do nothing + } +}; + +//对日期选择器控件和城市选择器控件进行事件绑定 +VnLotteryBase.prototype._bindCommonEvents = function(){ + var self = this; + + //城市列表跟随日期控件联动 + self._$datePicker.change(function(){ + self._getCityByDate(self._$datePicker.val()); + }); + + //发送统计数据 + self._$datePicker.click(function(){ + self._sendLog({postion:"date",ac:"b"}); + }).next('.ui-datepicker-trigger').click(function(){ + self._sendLog({position:"date",ac:"b"}); + }); + + //展开城市列表 + self._$listTrigger.click(function(){ + if(self._$cityList.is(":visible")){ + self._$cityList.slideUp(200); + }else{ + self._$cityList.slideDown(200); + self._sendLog({position:"city",ac:"b"}); + } + }); + + //收起城市列表 + $(document).on("mousedown", function(e) { + var el = e.target; + if(self._$cityList.is(":visible") && el !== self._$listTrigger[0] + && el !== self._$listTrigger[1] && !jQuery.contains(self._$listTrigger[0], el) + && !jQuery.contains(self._$listTrigger[1], el)) + { + self._$cityList.slideUp(200); + } + }); + + //选择城市 + self._$cityList.on("mousedown",'li',function(e){ + self._$cityPicker.val($(this).text()); + }); +}; + +//发送统计数据 +VnLotteryBase.prototype._sendLog = function(extraparams){ + var self = this; + var params = { + type:"click", + // level:self._pageType, + modId:"lottery" + // country:self._conf.country + }; + for(var i in extraparams){ + params[i] = extraparams[i]; + } + UT.send(params); +}; + +/** +*设置cms配置量,以及需要用到的datePicker、cityPicker、cityList的选择器 +*/ +VnLotteryBase.prototype._setConf = function(conf){ + if(!conf) { + //console.log('arg miss'); + return; + } + this._conf = conf; + + this._$datePicker = $('#datepicker');//日期列表控件 + this._$cityPicker = $('#citypicker');//城市列表 + this._$cityList = $('#citylist'); + this._$listTrigger = $("#citypicker , #citypicker + .lottery-trigger");//城市列表的下拉小三角,触发器 +}; + +//初始化UI(抽象函数) +VnLotteryBase.prototype._setUI = function(){}; +//绑定事件(抽象函数) +VnLotteryBase.prototype._bindEvents = function(){}; +//获取数据(抽象函数) +VnLotteryBase.prototype._getData = function(){}; +//刷新,重新获取数据 +VnLotteryBase.prototype.refresh = function(){}; + +/** +*通用的初始化函数 +*@param {Object|Array} conf 包含cms配置量,以及需要用到的datePicker、cityPicker、cityList的选择器 +*/ +VnLotteryBase.prototype._init = function(conf){ + var self = this; + self._setConf(conf); + self._initDatePicker(); + self._setUI(); + self._bindEvents(); + self._getData(); +}; + +module.exports = VnLotteryBase; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/vnLotteryIndex.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/vnLotteryIndex.js new file mode 100755 index 000000000..e1f3f1468 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/lottery/vnLotteryIndex.js @@ -0,0 +1,197 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var VnLotteryBase = require('home:widget/ui/lottery/vnLotteryBase.js'); +require('common:widget/ui/scrollable/scrollable.js'); + +function VnLotteryIndex(conf){ + var self = this; + // self._firstGet = true;//只有第一次初始化失败时才进行错误处理,一旦初始化成功;之后所有ajax错误皆不予处理 + + //dom节点缓存 + self._$sideLottery = $("#sideLottery"); //module wrapper + self._$lotterySearch = $("#lotterySearch"); //查询按钮 + self._$lotteryTable = $('#lotteryTable');//中奖列表 + self._$preciseLottery = $('#preciseLottery'); + self._$apiErrorBtn = self._$sideLottery.find('.api-error');//api error btn + + //init函数必须最后调用 + self._init(conf); + +} +//继承 +VnLotteryIndex.prototype = new VnLotteryBase(); + +//ui设置相关设置 +VnLotteryIndex.prototype._setUI = function(){ + /*this._resetLotteryNum(); */ + this._$lotteryTable.scrollable({ + autoHide: false + }); +}; + +//实现获取数据的方法 +VnLotteryIndex.prototype._getData = function(){ + this._getCityByDate(this._$datePicker.val()); +}; + +//绑定事件 +VnLotteryIndex.prototype._bindEvents = function(){ + var self = this; + //通用绑定 + self._bindCommonEvents(); + + //绑定首页的错误处理 + var events = {}; + events[self._CITY_LOADING] = function(){ + self._onCityLoading(); + }; + events[self._CITY_TIME_OUT] = function(){ + self._onCityTimeout(); + }; + events[self._GET_CITY_SUCCESS] = function(e , data){ + self._onGetCitySuccess(data); + }; + //获取城市失败实际是指返回数据为空,而非连接不到服务器 + //如果连接不到服务器,则通过_TIME_OUT事件处理 + events[self._GET_CITY_FAILURE] = function(){ + self._onGetCityFailure(); + }; + events[self._GET_RESULT_SUCCESS] = function(e , data){ + self._onGetResultSuccess(data); + }; + events[self._GET_RESULT_FAILURE] = function(e , data){ + self._onGetResultFailure(); + }; + self._stateCtrl.on(events); + + //无法连接到api,点击后重新获取数据 + self._$apiErrorBtn.click(function(e){ + e.preventDefault(); + self.refresh(); + }); + + //查看结果 + self._$lotterySearch.click(function(e){ + var logParams = {}; + self._hideResultTable(); + self._getWinningResult(self._$datePicker.val().trim() , self._$cityPicker.val().trim()); + logParams["position"] = "searchbtn"; + self._sendLog(logParams); + e.preventDefault(); + }); + + self._$sideLottery.find('.charts_more').click(function(){ + self._sendLog(); + }); +}; + +//状态事件处理================================================================ +VnLotteryIndex.prototype._onCityLoading = function(){ + // if(this._firstGet){ + this._showLoadingPanel(); + // } +}; + +VnLotteryIndex.prototype._onCityTimeout = function(){ + /*if(this._firstGet){ + this._showErrorPanel(); + }else{ + this._setCityPicker([]); + }*/ + this._showCityErrorPanel() +}; + +VnLotteryIndex.prototype._onGetCitySuccess = function(data){ + this._setCityPicker(data); + // if(this._firstGet){ + this._showSuccessPanel(); + this._getWinningResult(this._$datePicker.val().trim() , this._$cityPicker.val().trim() , null); + // this._firstGet = false; + // } +}; + +VnLotteryIndex.prototype._onGetCityFailure = function(){ + /*if(this._firstGet){ + //由于当日的彩票结果可能尚未公布,所以当日结果可以为空 + var today = new Date(); + var year = today.getFullYear(); + var month = today.getMonth()+1; + var day = today.getDate(); + var pickerDate = this._$datePicker.val().split('-'); + if((day == pickerDate[0]) && (month == pickerDate[1]) && (year == pickerDate[2])){ + + }else{*/ + this._showCityErrorPanel(); + /* } + }else{ + //do nothing + } */ +}; + +VnLotteryIndex.prototype._onGetResultSuccess = function(data){ + this._setResultTable(data.awardInfo,data.winNum); + this._showResultTable(); + this._setlotteryTip(); +}; +VnLotteryIndex.prototype._onGetResultFailure = function(data){ + this._setResultTable([]); + this._showErrorPanel(); +}; + +//设置中奖列表 +VnLotteryIndex.prototype._setResultTable = function(awardInfo , winNum){ + var html = ""; + var reg; + //如果中奖,高亮显示中奖号码 + for(var i=0,td;td=awardInfo[i];i++){ + for(var j=0,no;no=winNum[j];j++){ + reg = new RegExp("(^|\\D)("+no+")($|\\D)","g"); + td.code = td.code.replace(reg,"$1$2$3"); + } + html += "" + td.price + "" + td.code + ""; + } + this._$lotteryTable.html(html); +}; + +//以下3个方法设置中奖列表ui变化 +VnLotteryIndex.prototype._showResultTable = function(){ + $("#lotteryTable,#preciseLottery").fadeTo('fast', 1); +}; + +VnLotteryIndex.prototype._hideResultTable = function(){ + $("#lotteryTable,#preciseLottery").fadeTo('fast', 0); +}; + +VnLotteryIndex.prototype._setlotteryTip = function(){ + var date = this._$datePicker.val(); + var city = this._$cityPicker.val(); + date = date.split('-').join('/'); + this._$preciseLottery.text(city + ' - ' + date); +}; + +//根据各状态调整界面显示=============================================== +VnLotteryIndex.prototype._showSuccessPanel = function(){ + this._$sideLottery.removeClass('status-bottom-loading status-bottom-error').addClass('status-success'); +}; + +VnLotteryIndex.prototype._showErrorPanel = function(){ + this._$sideLottery.removeClass('status-bottom-loading status-success').addClass('status-bottom-error'); + this._$apiErrorBtn.html(conf.lottery.apiError); +}; + +VnLotteryIndex.prototype._showCityErrorPanel = function(){ + this._$sideLottery.removeClass('status-bottom-loading status-success').addClass('status-bottom-error'); + this._$apiErrorBtn.html(conf.lottery.apiError2); +}; + +VnLotteryIndex.prototype._showLoadingPanel = function(){ + this._$sideLottery.removeClass('status-bottom-error status-success').addClass('status-bottom-loading'); +}; +//===================================================================== + +//刷新,重新获取 +VnLotteryIndex.prototype.refresh = function(){ + // this._getData(); + this._getWinningResult(this._$datePicker.val().trim() , this._$cityPicker.val().trim()); +}; + +module.exports = VnLotteryIndex; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/md5/md5.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/md5/md5.js new file mode 100755 index 000000000..7f4d572b5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/md5/md5.js @@ -0,0 +1 @@ +(function(){var e=0,t=function(e){return s(o(i(e),e.length*8))},n=function(t){try{e}catch(n){e=0}var r=e?"0123456789ABCDEF":"0123456789abcdef",i="",s;for(var o=0;o>>4&15)+r.charAt(s&15);return i},r=function(e){var t="",n=-1,r,i;while(++n>>6&31,128|r&63):r<=65535?t+=String.fromCharCode(224|r>>>12&15,128|r>>>6&63,128|r&63):r<=2097151&&(t+=String.fromCharCode(240|r>>>18&7,128|r>>>12&63,128|r>>>6&63,128|r&63));return t},i=function(e){var t=Array(e.length>>2);for(var n=0;n>5]|=(e.charCodeAt(n/8)&255)<>5]>>>n%32&255);return t},o=function(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n=1732584193,r=-271733879,i=-1732584194,s=271733878;for(var o=0;o>16)+(t>>16)+(n>>16);return r<<16|n&65535},p=function(e,t){return e<>>32-t};hex_md5=function(e,j){if(j){return e==""?e:n(t(r(e))).slice(8,24)}else{return e==""?e:n(t(r(e)))}}})();module.exports=hex_md5; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/mod-frame/mod-frame.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/mod-frame/mod-frame.css new file mode 100755 index 000000000..aa2967efa --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/mod-frame/mod-frame.css @@ -0,0 +1,21 @@ +.box-border { + border: 1px solid #e3e5e6; + border-bottom: 1px solid #d7d8d9; +} + + +/***** from wmf.css +控制一个模块的链接hover效果是加下划线还是不加下划线 +****/ +.no-hover a:hover{text-decoration:none;} +.hover a:hover{text-decoration:underline;} + +/***** from wmf.css +右三角图标的公共样式 +*/ +.arrow_r{position: absolute;font-family:Tahoma;} + + +/**/ +.ellipsis{display:none;position:absolute;bottom:5px;right:25px;width:12px;color:#fff;} + diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/notepad/notepad.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/notepad/notepad.js new file mode 100755 index 000000000..3ccd18d3b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/home/widget/ui/notepad/notepad.js @@ -0,0 +1,673 @@ +/* +* Cloud Notepad +* V1.0.0 +* +* @Frank Feng + +* todo: +* 1. cache acticle's content with $.data -- Done +* 2. statistics -- Done +* 3. login callback -- Done +* 4. comments -- Done +* 5. cursor position -- Done +* 6. saved in 3s -- Done +* 7. check save status -- Done +* 8. add a new list while create an article -- Done +* 9. delete an article then clear content area -- Done +* 10. scroll to the top of the list after clicking new note -- Done +* 11. tips when the title is empty -- Done +*/ + +var $ = require("common:widget/ui/jquery/jquery.js"); +var UT = require("common:widget/ui/ut/ut.js"); +var helper = require("common:widget/ui/helper/helper.js"); +var time = require("common:widget/ui/time/time.js"); + +require("common:widget/ui/jquery/widget/jquery.textarealimit/jquery.textarealimit.js"); + + +Gl.notepad = {}; + +var _conf = conf.notepad, + container = $('
                                    '), + loginContent = $(helper.replaceTpl(''); // /.nav-nav-item-list /.wrap /.ui-ctrl + that.$listContainer = that.$container.find('.nav-item-list'); + $($tempList).each(function(index, item){ + that.$listContainer.append(item); + }); + if(that.quickSwitch){ + var switchStr = ""; + for(i=0,len=data.length;i'; + } + that.$container.find(".switch").html(switchStr); + } + + }, + bindEvent: function(){ + var that = this, + $that = $(that); + var $container = $(that.containerId); + ///////FOR LOGIC ///////////////// + //UI事件 + $($container).on('click', '.prev', function(e){ + that.switchPrev(); + $that.trigger("e_click_prev"); + }).on('click','.next',function(e){ + that.switchNext(); + $that.trigger("e_click_next"); + }).on('click','.nav-item',function(e){ + var index = $(this).attr('data-index'); + that.switchTo(index); + $that.trigger("e_click_nav",[index]); + }).on('mouseenter','.nav-item',function(e){ + var index = $(this).attr('data-index'); + $that.trigger("e_hover_nav",[index]); + }).on('click', '.switch-item', function(){ + var idKey = $(this).attr('data-id'); + for(var i=0; i'+newObj.content+''); + }else{ + $item = $(''); + } + that.$itemList[index] = $item; + $item.css( that.DIR_KEY.SIZE , that.ITEM_SIZE+'px' ); + } + $tempList.push($item); + //strArr.push(''); + } + //增大nav的宽,收移;动画打开,直到新的第一个见为止; 移除最后一个,同时nav恢复正常宽、定位 + //var $newItems = $(strArr.join('')); + //$newItems.find('li').css({'width':that.ITEM_SIZE+'px'}); + + var keyForward = that.DIR_KEY.FORWARD;//left + //动画实现:先将所需呈现的结点加入容器,调整容器的宽高和定位信息,保持与原来所见内容一致;再用animate函数移到最终的效果定位,最后移除旧的结点,并恢复容器的宽和定位(虽然分开执行,但是视觉上面是连贯的。结点的动画处理方式,参考的Tangram:Magic) + var confStartStyle = {}; //{'left':0, 'width': that.ITEM_SIZE*(that.Nav_SIZE+step)} + confStartStyle[keyForward] = 0; //left|right: 0px + confStartStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*(that.Nav_SIZE+step); + var confEndStyle = {}; + confEndStyle[keyForward] = -that.ITEM_SIZE*step; //left|right: -xxx px; + var confFinalStyle = {}; //{'left':0, width:that.ITEM_SIZE*that.Nav_SIZE} + confFinalStyle[keyForward] = 0; //left|right: 0; + confFinalStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*that.Nav_SIZE; + + $($tempList).each(function(index,item){ + that.$listContainer.append(item); + }); + that.$listContainer + //.append($newItems) + .css(confStartStyle) + .animate(confEndStyle, that._scrollDuration, function(){ + that.$listContainer.css(confFinalStyle); + //临时解决在size + step > count 时,动画实现bug的问题 + // + var removeCount = Math.min(step , that.dataList.length - that.Nav_SIZE); + var $oldItems = that.$listContainer.find('[data-index]').slice(0,removeCount); + // + $oldItems.remove(); + $(that).trigger('e_after_scroll'); + }); + }, + /** + * 实现前进的后退的效果,支持滚动多个单元 + * @param {number} [step=1] + * @private + */ + _scrollPrev: function(step){ + if(step == null){ + step = 1; + } + var that = this; + var indexList = that.indexObj.getList().slice(0, step); //获取前面的step个ITEM;然后从末尾到前面,这样倒插到Nav区域中 + //原有的last,要隐藏;新的first,要show + + //var strArr = []; + var $tempList = []; + for(var i= 0; i'+newObj.content+''); + if(that.showTitle){ + $item = $(''); + }else{ + $item = $(''); + } + //console.log(newObj); + that.$itemList[index] = $item; + $item.css( that.DIR_KEY.SIZE , that.ITEM_SIZE+'px' ); + } + $tempList.unshift($item); //从后面开始放入 + + } + //增大nav的宽,收移;动画打开,直到新的第一个见为止; 移除最后一个,同时nav恢复正常宽、定位 + //var $newFirstItems = $(strArr.join('')); + //$newFirstItems.find('li').css({'width':that.ITEM_SIZE+'px'}); + + var keyForward = that.DIR_KEY.FORWARD;//left + var confStartStyle = {}; //{'left':-that.ITEM_SIZE*step, 'width': that.ITEM_SIZE*(that.navSize+step)} + confStartStyle[keyForward] = -that.ITEM_SIZE*step; //left: -xxxpx + confStartStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*(that.Nav_SIZE+step); + var confEndStyle = {}; + confEndStyle[keyForward] = 0; //left:0px; + var confFinalStyle = {}; //{'left':0, width:that.ITEM_SIZE*that.Nav_SIZE} + confFinalStyle[keyForward] = 0; //left: 0px; + confFinalStyle[that.DIR_KEY.SIZE] = that.ITEM_SIZE*that.Nav_SIZE; + + $($tempList).each(function(index,item){ + that.$listContainer.prepend(item); + }); + that.$listContainer + //.prepend($newFirstItems) + .css(confStartStyle) + .animate(confEndStyle, that._scrollDuration, function(){ + that.$listContainer.css(confFinalStyle); + var $oldItems = that.$listContainer.find('[data-index]').slice(-step); //移除旧的结点 + $oldItems.remove(); + $(that).trigger('e_after_scroll'); + }); + }, + /** + * 定位到特定的元素。 + * 首先,计算当前选中的元素(current)与目前位置的距离"targetStep",再采用“动画”的方式进行划向。 + * 但是,因为Nav本身是可循环的,向左向右都可以到达目标,如果navs的count>size,则我们采用“最短的滚动策略”,来决定向前移还是向后移。 + * @param targetIndex + */ + switchTo: function(targetIndex){ //第几个项 + var that = this; + var list = that.indexObj.getList(); + var currentIndex = list[this.CURRENT_OFFSET]; + if(currentIndex == targetIndex){ + //console.warn('currentIndex == targetIndex'); + $(that).trigger('e_toggle',{index: targetIndex}); + return ; + } + if(that._isScrolling){ + //console.warn('_isScrolling = true'); + return; + } + that._isScrolling = true; + if(that.needLoop){ + /** + * @type UserLoopArray.getDiff + */ + var diff = this.indexObj.getDiff(currentIndex, targetIndex); + if(diff.backwardStep < diff.forwardStep){ //后退更短 + that.indexObj.stepPrev(diff.backwardStep); + //note:回调,相当于一种“私有的事件”,其他人接收不到(或不需要) + //这里scroll后,需要调用 updateFocus;其实,用fire事件,这里就不用管了 + that._scrollPrev(diff.backwardStep); + } else if(diff.backwardStep >= diff.forwardStep){ //前进更短 + that.indexObj.stepNext(diff.forwardStep); + that._scrollNext(diff.forwardStep); + } + } else { + //TODO: fix this + if(currentIndex < targetIndex){ //=> forward + that.indexObj.stepNext(targetIndex-currentIndex); + } else { //backward + that.indexObj.stepPrev(currentIndex-targetIndex); + } + that._updateFocus(); + that._isScrolling = false; + } + }, + /** + * + * @param isInit + * @private + */ + _updateFocus: function(isInit){ + var that = this; + //更新聚焦元素 + var list = this.indexObj.getList(); + var currentIndex = list[this.CURRENT_OFFSET]; + that.$listContainer.find('[data-index]').removeClass('nav-item-current') + .filter('[data-index='+currentIndex+']').addClass('nav-item-current'); + + if (that.quickSwitch) { + that.$container.find(".switch .switch-item-current").removeClass("switch-item-current"); + that.$container.find(".switch .switch-item_"+(1+currentIndex)).addClass("switch-item-current"); + } + $(this).trigger('e_change',{isInit: isInit, index: currentIndex, itemObj:this.dataList[currentIndex]}); + }, + /** + * Nav可按需要,定时跳到下一张 + * @private + */ + _startAutoScroll: function(){ + var that = this; + //console.log('start auto scroll'); + that._timerAutoScroll = setInterval(function(){ + if(that._autoScrollDirection == 'forward'){ + that.switchNext(); + } else { //backward + that.switchPrev(); + } + }, that._autoDuration); + }, + _stopAutoScroll: function(){ + //console.log('stop auto scroll'); + var that = this; + clearInterval(that._timerAutoScroll); + } +}; + +module.exports = cycletabs; diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/i-news_item.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/i-news_item.png new file mode 100755 index 000000000..7a03ec848 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/i-news_item.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next.png new file mode 100755 index 000000000..16881d861 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_active.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_active.png new file mode 100755 index 000000000..3e20548dd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_active.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_active_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_active_rtl.png new file mode 100755 index 000000000..2880cbbd5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_active_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_hover.png new file mode 100755 index 000000000..b771507ea Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_hover_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_hover_rtl.png new file mode 100755 index 000000000..f601347c7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_hover_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_rtl.png new file mode 100755 index 000000000..4d95f6c9d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/next_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev.png new file mode 100755 index 000000000..4d95f6c9d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_active.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_active.png new file mode 100755 index 000000000..2880cbbd5 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_active.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_active_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_active_rtl.png new file mode 100755 index 000000000..3e20548dd Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_active_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_hover.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_hover.png new file mode 100755 index 000000000..f601347c7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_hover.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_hover_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_hover_rtl.png new file mode 100755 index 000000000..b771507ea Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_hover_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_rtl.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_rtl.png new file mode 100755 index 000000000..16881d861 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/prev_rtl.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/repeat-x.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/repeat-x.png new file mode 100755 index 000000000..f7e71ad0a Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/img/repeat-x.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/ltr/ltr.css new file mode 100755 index 000000000..a9582eef9 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/ltr/ltr.css @@ -0,0 +1,98 @@ +.cycletabs{ + position: relative; + z-index: 1; + line-height: 27px; + height: 27px; + /**/font-size: 13px; + font-weight: 400; + color: #5a5a5a; + padding-bottom: 0; +} +.cycletabs .ui-nav { + width: 236px; + position: relative; +} +.cycletabs .ui-nav .wrap { + width: 204px; + height: 28px; + overflow: hidden; + position: relative; + left: 16px; +} +.cycletabs .ui-nav .ctrl { + position: absolute; + right: 0; + width: 100%; + height: 28px; +} +.cycletabs .ui-nav .prev, .cycletabs .ui-nav .next { + position: absolute; + z-index: 2; + height: 27px; + width: 16px; + text-indent: -9999em; + margin:0; +} +.cycletabs .ui-nav .prev { + left: -1px; +} +.cycletabs .ui-nav .next { + right: -1px; +} +.cycletabs .ui-nav .arrow-prev, .cycletabs .ui-nav .arrow-next { + display: block; + cursor: pointer; + width: 16px; + height: 27px; + border-bottom: 1px solid #e3e5e6; + background: url(../img/i-news_item.png) 0 -375px no-repeat; +} +.cycletabs .ui-nav .arrow-prev { + background-position: 0 -425px; +} +.cycletabs .ui-nav .arrow-next { + background-position: -25px -425px; +} +.cycletabs .ui-nav .prev-hover .arrow-prev { + background-position: 0 -475px; +} +.cycletabs .ui-nav .next-hover .arrow-next { + background-position: -25px -475px; +} +.cycletabs .ui-nav .prev-active .arrow-prev { + background-position: 0 -525px; +} +.cycletabs .ui-nav .next-active .arrow-next { + background-position: -25px -525px; +} +.cycletabs .nav-item-list { + position: absolute; + right: 0; + list-style: none; + white-space: nowrap; + padding: 0; +} +.cycletabs .nav-item { + display: inline-block; + *display: inline; + *zoom: 1; + width: 68px; + text-align: center; + background: url(../img/repeat-x.png) repeat-x 0 0; + border-right: 1px solid #e3e5e6; + border-bottom: 1px solid #e3e5e6; +} +.cycletabs .nav-item-hover { + cursor: pointer; +} +.cycletabs .nav-item-current { + background: #f5f7f7; + border-bottom:1px solid #f5f7f7; + position: relative; + bottom: -1px; + z-index: 2; + font-weight: normal; + font-size: 12px !important; + color: #00b075; + cursor: default; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/ltr/ltr.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/ltr/ltr.more.css new file mode 100755 index 000000000..cc9b096e8 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/ltr/ltr.more.css @@ -0,0 +1,44 @@ +.nav-item { + float: left; +} +.nav-item-list { + position: relative; +} +.ui-nav { + overflow: hidden; + position: relative; +} +.ui-nav .prev, .ui-nav .next { + position: absolute; + top: 36px; + z-index: 20; + width: 25px; + height: 65px; + cursor: pointer; +} +.ui-nav .prev { + background: url(../img/prev.png?__sprite) no-repeat; + left: -1px; +} +.ui-nav .prev-hover { + background: url(../img/prev_hover.png?__sprite) no-repeat; +} +.ui-nav .prev-active { + background: url(../img/prev_active.png?__sprite) no-repeat; +} +.ui-nav .next { + background: url(../img/next.png?__sprite) no-repeat; + right: -1px; +} +.ui-nav .next-hover { + background: url(../img/next_hover.png?__sprite) no-repeat; +} +.ui-nav .next-active { + background: url(../img/next_active.png?__sprite) no-repeat; +} +.arrow-next, .arrow-prev { + display: none; +} +.switch { + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/rtl/rtl.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/rtl/rtl.css new file mode 100755 index 000000000..6f800989f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/rtl/rtl.css @@ -0,0 +1,98 @@ +.cycletabs{ + position: relative; + z-index: 1; + line-height: 27px; + height: 27px; + /**/font-size: 13px; + font-weight: 400; + color: #5a5a5a; + padding-bottom: 0; +} +.cycletabs .ui-nav { + width: 236px; + position: relative; +} +.cycletabs .ui-nav .wrap { + width: 204px; + height: 28px; + overflow: hidden; + position: relative; + right: 16px; +} +.cycletabs .ui-nav .ctrl { + position: absolute; + right: 0; + width: 100%; + height: 28px; +} +.cycletabs .ui-nav .prev, .cycletabs .ui-nav .next { + position: absolute; + z-index: 2; + height: 27px; + width: 16px; + text-indent: -9999em; + margin:0; +} +.cycletabs .ui-nav .prev { + right: -1px; +} +.cycletabs .ui-nav .next { + left: -1px; +} +.cycletabs .ui-nav .arrow-prev, .cycletabs .ui-nav .arrow-next { + display: block; + cursor: pointer; + width: 16px; + height: 27px; + border-bottom: 1px solid #e3e5e6; + background: url(../img/i-news_item.png) 0 -375px no-repeat; +} +.cycletabs .ui-nav .arrow-prev { + background-position: 0 -425px; +} +.cycletabs .ui-nav .arrow-next { + background-position: -25px -425px; +} +.cycletabs .ui-nav .prev-hover .arrow-prev { + background-position: 0 -475px; +} +.cycletabs .ui-nav .next-hover .arrow-next { + background-position: -25px -475px; +} +.cycletabs .ui-nav .prev-active .arrow-prev { + background-position: 0 -525px; +} +.cycletabs .ui-nav .next-active .arrow-next { + background-position: -25px -525px; +} +.cycletabs .nav-item-list { + position: absolute; + right: 0; + list-style: none; + white-space: nowrap; + padding: 0; +} +.cycletabs .nav-item { + display: inline-block; + *display: inline; + *zoom: 1; + width: 68px; + text-align: center; + background: url(../img/repeat-x.png) repeat-x 0 0; + border-right: 1px solid #e3e5e6; + border-bottom: 1px solid #e3e5e6; +} +.cycletabs .nav-item-hover { + cursor: pointer; +} +.cycletabs .nav-item-current { + background: #f5f7f7; + border-bottom:1px solid #f5f7f7; + position: relative; + bottom: -1px; + z-index: 2; + font-weight: normal; + font-size: 12px !important; + color: #00b075; + cursor: default; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/rtl/rtl.more.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/rtl/rtl.more.css new file mode 100755 index 000000000..e94c3ae2d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/cycletabs/rtl/rtl.more.css @@ -0,0 +1,44 @@ +.nav-item { + float: right; +} +.nav-item-list { + position: relative; +} +.ui-nav { + overflow: hidden; + position: relative; +} +.ui-nav .prev, .ui-nav .next { + position: absolute; + top: 36px; + z-index: 20; + width: 25px; + height: 65px; + cursor: pointer; +} +.ui-nav .next { + background: url(../img/prev_rtl.png?__sprite) no-repeat; + right: -1px; +} +.ui-nav .next-hover { + background: url(../img/prev_hover_rtl.png?__sprite) no-repeat; +} +.ui-nav .next-active { + background: url(../img/prev_active_rtl.png?__sprite) no-repeat; +} +.ui-nav .prev { + background: url(../img/next_rtl.png?__sprite) no-repeat; + left: -1px; +} +.ui-nav .prev-hover { + background: url(../img/next_hover_rtl.png?__sprite) no-repeat; +} +.ui-nav .prev-active { + background: url(../img/next_active_rtl.png?__sprite) no-repeat; +} +.arrow-next, .arrow-prev { + display: none; +} +.switch { + display: none; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/keyboard/icons.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/keyboard/icons.png new file mode 100755 index 000000000..51473b8c7 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/keyboard/icons.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/keyboard/keyboard.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/keyboard/keyboard.js new file mode 100755 index 000000000..9e6f9bb5c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/keyboard/keyboard.js @@ -0,0 +1,4 @@ +define('common:widget/ui/keyboard/keyboard.js', function(require, exports, module){ +(function(){function r(n){this.t={},this.tick=function(t,n,r){r=r!=e?r:(new Date).getTime(),this.t[t]=[r,n]},this.tick("start",t,n)}function s(){var e=this;e.Ma(),e.tc(),this.ee={0:function(t,n,r){return e.ke(t,n,r)},1:function(t,n,r){return e.le(t,n,r)},2:function(t,n,r){return e.me(t,n,r)},3:function(t,n,r){return e.ne(t,n,r)},4:function(t,n,r){return e.ie(t,n,r)},5:function(t,n,r){return e.je(t,n,r)},6:function(t,n,r){return e.yc(t,n,r)},7:function(t,n,r){return e.zc(t,n,r)}}}function o(e,t){var n=this;n.n=e,n.u=t}function u(e){var t=document.getElementsByTagName("head")[0];if(!t)return;var n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}function a(){var e=this;u(".goog-button{border-width:1px;border-style:solid;border-color:#bbb #999 #999 #bbb;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;font:normal normal normal 13px/13px Arial,sans-serif;color:#676767;text-align:middle;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,1);background:#eee;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f5f8f7));background:-moz-linear-gradient(top,#fff,#f5f8f7);filter:progid:DXImageTransform.Microsoft.Gradient(EndColorstr='#f5f8f7',StartColorstr='#ffffff',GradientType=0);cursor:pointer;margin:0;display:inline;display:-moz-inline-box;display:inline-block;*overflow:visible;padding:4px 8px 5px}a.goog-button,span.goog-button,div.goog-button{padding:4px 8px 5px}.goog-button:visited{color:#676767}.goog-button{*display:inline}.goog-button:focus,.goog-button:hover{border-color:#676767}.goog-button:active,.goog-button-active{color:#676767;background-color:#bbb;border-color:#999 #bbb #bbb #999;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f8f7),to(#fff));background-image:-moz-linear-gradient(top,#f5f8f7,#fff);filter:progid:DXImageTransform.Microsoft.Gradient(EndColorstr='#ffffff',StartColorstr='#f5f8f7',GradientType=0)}.goog-button[disabled],.goog-button[disabled]:active,.goog-button[disabled]:hover{color:#666;border-color:#ddd;background-color:#f3f3f3;background-image:none;text-shadow:none;cursor:auto}.goog-button{padding:5px 8px 4px\\9}.goog-button{*padding:4px 7px 2px}html>body input.goog-button,x:-moz-any-link,x:default,html>body button.goog-button,x:-moz-any-link,x:default{padding-top:3px;padding-bottom:2px}a.goog-button,x:-moz-any-link,x:default,span.goog-button,x:-moz-any-link,x:default,div.goog-button,x:-moz-any-link,x:default{padding:4px 8px 5px}.goog-button-fixed{padding-left:0!important;padding-right:0!important;width:100%}button.goog-button-icon-c{padding-top:1px;padding-bottom:1px}button.goog-button-icon-c{padding-top:3px\\9;padding-bottom:2px\\9}button.goog-button-icon-c{*padding-top:0;*padding-bottom:0}html>body button.goog-button-icon-c,x:-moz-any-link,x:default{padding-top:1px;padding-bottom:1px}.goog-button-icon{display:block;margin:0 auto;height:18px;width:18px}.outerbox{background-color:#ebfcf7;border-style:solid;border-color:#ceded9;border-width:1px;min-width:395px;z-index:20001}select.select-dialog{font-size:9px;height:17px;border:1px solid}table.select-dialog{border-spacing:0;padding:0}span.trigger{cursor:pointer}span.trigger-over{background-color:#99ccff;color:black}#kbd .goog-button{height:16px;*height:24px;border-style:solid;padding:3px 5px;border-color:#d3d3d3 #d3d3d3 #c3c3c3 #d3d3d3;}#kbd table{background:none;margin:0!important;border:0}#kbd td{padding:1px;background-color:transparent;border:0;color:#676767;vertical-align:middle;}#kbd form{margin:0}div.goog-button{border-style:none;padding:0}#BGK8,#BGK10,#BGK16,#BGK16.right,#BGK16.left,#BGK20,#close,#kbd-help,#kbd-cfg,#loop,#min,#max{background-repeat:no-repeat;background-image:url("+__uri("icon.png")+");}#BGK8,#BGK10,#BGK16,#BGK16.left,#BGK16.right,#BGK20{width:22px;height:17px;}#close,#kbd-help,#kbd-cfg,#loop,#min,#max{font-size:0;width:14px;height:14px}#BGK8{background-position:0 -29px}#BGK10{background-position:0 -44px}#BGK10.long{background-position:0 -44px}#BGK10.short{background-position:0 18px}#BGK16{background-position:0 -59px}#BGK16.right{background-position:0 -59px}#BGK16.left{background-position:0 -59px}#BGK16.shortleft{background-position:0 -60px}#BGK20{background-position:0 -77px}#K273{font-size:12px}#kbd_t{font:12px/12px normal normal Arial,sans-serif;width:100%}#kbd-logo{max-height:14px;border:0}.kbd-title-row{line-height:12px}#minmax{cursor:pointer;font-size:12px;display:inline-block;background-color:#ebfcf7;border:1px solid #6b90da}.kbd-button{cursor:pointer;width:14px!important;height:14px!important;border:none;display:inline-block}#kbd-cfg{background-position:0 -152px}#kbd-cfg:hover{background-position:0 -166px}#kbd-help{background-position:0 -96px}#kbd-help:hover{background-position:0 -110px}#close{background-position:0 0}#close.kbd-button-over{background-position:0 -14px}#min{background-position:0 -208px}#min.kbd-button-over{background-position:0 -222px}#max{background-position:0 -180px}#max.kbd-button-over{background-position:0 -194px}#loop{background-position:0 -124px}#loop.kbd-button-over{background-position:0 -138px}"),e.sb=0,e.tb=0,w.jc(!1),w.kc(!0),w.K(!1),w.ea(!1),w.ic(!1),w.ga(!1),w.lc(function(){e.ec(),e.fc(!1)}),e.d=new w.i([]),e.w(!0),e.oa(),A.a.ab=function(){e.oa()},e.Gd=A.a.q,A.a.q=function(){e.Gd(),e.oa()}}function f(e,t){for(var n=e.split(/\./),r=window,i=0;ie.xc?this.zc:this.yc},n.tc=function(){},n.ue=function(){var e=document.getElementById(this.Yd);e&&this.moveTo(this.Xd(e,this.height(),this.width()))},n.oa=function(){this.uc(this.yb)?this.Hc(this.Fc,this.Gc):this.ue()},n.Hc=function(e,t){var n=typeof e=="string"?document.getElementById(e):e;n&&(n=this.ee[t](n,this.height(),this.width()),this.moveTo(n),this.Ce(this.yb,e,t))},n.Ma=function(){var e=this.$d();this.ce(e),this.uc(e),this.yb=e,this.Wd=e.src,this.Vd=e.src.replace("tia_hover","tia_down"),e.onclick=q,this.ae=this.l(e);var n=document.getElementById("searchGroupInput");if(n)this.Yd=n.id,this.wc=this.l(n),this.Xd=this.Zd(this.wc,this.ae);else for(var e=document.getElementsByTagName("input"),r=0;r0?this.sb-this.tb:0,"tia.cnt":this.d.Qd(),"tia.l":this.d.Ka(),"tia.v":0}},n.Ve=function(){return{"tia.l":this.d.Ka(),"tia.v":0}},n.w=function(e){e?(this.S=new window.jstiming.Timer,this.S.name="show",this.S.tick("_sr"),this.d.zb(!0),this.S.tick("render","_sr"),this.sb=(new Date).getTime()):(this.ec(),this.d.zb(!1)),this.fc(e)},n.ec=function(){this.He(),this.tb=(new Date).getTime()},n.r=function(){return this.d.r()},n.Te=function(){this.tc();var e=this.d.r();this.w(!e),e||this.oa()},n.k=function(){this.w(!1)},n.ha=function(){this.w(!0)},n.moveTo=function(e){A.a.L(e.n,e.u)},n.height=function(){return A.a.height},n.width=function(){return A.a.width};var l={Bc:44032,Ac:4352,Cc:4449,ra:4519,Ec:21,Ua:28};l.Dc=l.Ec*l.Ua,l.Ab=["ᄀ","ᄁ","ᄀᄉ","ᄂ","ᄂᄌ","ᄂᄒ","ᄃ","ᄅ","ᄅᄀ","ᄅᄆ","ᄅᄇ","ᄅᄉ","ᄅᄐ","ᄅᄑ","ᄅᄒ","ᄆ","ᄇ","ᄇᄉ","ᄉ","ᄊ","ᄋ","ᄌ","ᄎ","ᄏ","ᄐ","ᄑ","ᄒ","ᄀᄅ"],l.Lc={"ᄄ":"ᄄ","ᄈ":"ᄈ","ᄍ":"ᄍ"};for(var c=0;c=3?e.charCodeAt(2)-l.ra:0;return String.fromCharCode((t*l.Ec+n)*l.Ua+e+l.Bc)},l.Ee=function(e){return e.replace(l.Ke,l.Me)},l.Va=function(e,t,n,r){return t+l.Lc[n]+r},l.Ge=function(e){return l.se(l.te(e)).replace(l.qe,l.Va).replace(l.oe,l.Va).replace(l.pe,l.Va).replace(l.re,l.Va)},l.Ye=function(e){return l.Ee(l.Ge(l.Fe(e.replace("",""))))};var h=!0,p=typeof unsafeWindow=="undefined"?window:unsafeWindow,d,v,m,b=document.getElementById?g:y,w={},x=0,T=0,N=0,C=0;p.yf&&(x=Event.Pe,T=Event.xf,N=Event.Pe,C=Event.zf);var k=x|T|N,L={en:"",fr:"",de:""},A={};A.userAgent=navigator.userAgent.toLowerCase(),A.Ga=A.userAgent.indexOf("msie")>0&&!window.opera,A.$=A.userAgent.indexOf("firefox")>=0;var O;if(O=A.$){var M=A.userAgent.match(/firefox\/(\d+)/);O=M&&M.length==2&&M[1]<=2}A.nd=O;var _;if(_=A.Ga){var D=A.userAgent.match(/msie (\d+)/);_=D&&D.length==2&&D[1]>=7}A.Cf=_,A.eb=A.userAgent.indexOf("applewebkit")>-1,A.Xb=A.userAgent.indexOf("windows")>-1,A.i=function(t,n,r){function i(e){var t=B!=e;return B=e,t&&P.xa(),t}function s(){for(var e=0;e')}function u(e){s(''),e&&o(e)}function a(e){o(e),s("
                                    \n")}function f(t,n,r,i,o){o=o||"",t=t.charCodeAt(0),P.ja[t]=e,t="K"+t,s('');if(n){o=P.Ia+" "+o+" ",s("=0||u>127||u<33?"&#"+u+";":i)}n=o.join(""),t(n),s('"')}A.a.I&&s(' dir="rtl"'),s("/>")}else s(""),s(" "),s(""),s("");s("")}function l(e,t){for(var n=0;n":190,"?":191},V={de:{Y:90,Z:89,"Ü":192,"Û":109,"Ý":61,";":219,"=":221,"¿":220,"Ì":59,m:191},fr:{Q:65,A:81,Z:87,W:90,"Ý":219,"º":221,M:59,"À":222,"Þ":192,"¼":77,"¾":188,"¿":190,"ß":191,"Û":109}},$={189:109,187:61,107:61,186:59},J="endefr";P.sf=i,P.Xc=function(e){P.C=e,P.Aa(),A.a.aa()},P.qb=function(){return A.a.Qc&&A.a.c&&A.a.Gb()},P.Dd=function(){var e=P.b.O?z:U;P.pb="",H=['
                                    '],u(),l(e[0]),f("\b","",48),u(36),P.b.O?(l(e[1]),P.qb()?f("\n","",36):a(36)):l(e[1],1.5),u(),f("","",48),l(e[2]),P.b.O?P.qb()?f("\n","",24,1,"short"):a(24):P.qb()?f("\n","",48,1,"long"):a(48),u(),P.b.O?f("","",36,1,"shortleft"):f("","",60,1,"left"),l(e[3]),f("","",60,1,"right"),A.a.Rc&&(u(),f("đ","Alt+Ctrl",72),f(" "," ",236),f("đ","Alt+Ctrl",72)),s("
                                    "),P.pb=H.join("")},P.Wc=function(){return J.indexOf(P.C)+P.F.join("")},P.Nc=function(e){if(e){var t=e.charCodeAt(0)-48,e=e.substring(e.length-2);P.C=J.substring(t,t+2),P.p(e)}else P.p(R?R.z():"??")},P.mf=function(){return function(e){A.a.p(e.id)}},P.Za=function(e){R=e},P.p=function(e){var t;e&&(t=n[e]||n[e.toUpperCase()]||n[e.substring(0,2).toUpperCase()],P.wa=e),t?P.b&&P.b.z()==e||t.Bd()&&A.a.ba(t):(P.wa=R?R.z():"??",A.a.ba(R))},P.Aa=function(){var e=P.C=="en"?"":L[P.C];if(P.b)A.a.Fb(P.b.kb(),P.b.Ad(),e);else{var t="(loading...)";A.a.Fb(t,t,e)}},P.ba=function(e){if(P.b!=e){c(),P.b=e,P.Aa(),P.xa();for(var e=e.z(),t=0;tA.a.Sc&&P.F.shift()}},P.Oc=function(){P.Aa(),A.a.Eb(P.pb)},P.Ia="goog-button goog-button-fixed",A.userAgent.indexOf("linux");var Q=A.userAgent.indexOf("mac")>-1;P.lb=function(e){return P.b&&P.b.bc?P.b.lb(e):{Ya:e}};var G={back:1,Ya:""},Y={K8:function(){c();var e=G;P.Ja++,A.a.ya(e)},K10:function(){A.a.Uc(),c()},K16:function(){F=!F,y((B&1)!=1)},K20:function(){i(B^2),A.a.f()},K273:function(){b()}};P.Cd=function(e,t){var n=P.lb(e.value);P.Ja++,A.a.ya(n);if(typeof t!="boolean"||!t)y(!1),i(B&-13)},P.$a=function(){for(var e in P.ja){var t="K"+e;if(e.charCodeAt(0)<58){var n=document.getElementsByName(t);P.ja[e]=n;for(var r=0;rP.za*1.1||t.3?P.Ed(t):!1}},P.kf=function(){return P.b&&P.b.ac?P.b.ac[(B&2)==2?"l":""]:""},P.xa=function(){if(P.b){var e=P.b.zd(((B&1)==1?"s":"")+((B&12)==12?"c":"")+((B&2)==2?"l":"")),t=m(20);t&&g(t,(B&2)==2);if(t=v(16))g(t[0],(B&1)==1),g(t[1],(B&1)==1);if(t=v(273))g(t[0],(B&12)==12),g(t[1],(B&12)==12);if(e)for(var n in e)if(t=e[n],typeof t=="string"){var r=m(n.charCodeAt(0));r&&(r.value=t?t:" ")}}};var Z={" ":function(){A.a.Hb()},Q:function(){A.a.Db()}},et=S(function(e){if(!O())return!0;P.ob++;var t=E(e);return t==16&&y(!1),F=j=!1,t==17&&i(B&-5),t==18&&i(B&-9),t==224||B&16?(i(B&-17),!0):e.ctrlKey&&!e.altKey||e.R&k?(e.R&x&&b(!1),!0):(I=!1,t==20&&(i(B^2),A.a.f()),!1)});P.rf=et;var tt=S(function(e){var t=E(e);if(B&4&&!(B&8)&&t>20)return B!=4?t=!1:(t=String.fromCharCode(t),(t=Z[t])?(t(),t=!0):t=!1),e.returnValue=!t;e&&(e.keyCode==17||e.ctrlKey||e.R&T)&&i(B|4);if(!O())return e.returnValue=!0;P.mb++,j=!0;var n=e.target||e.srcElement;if(n)try{n.onfocus()}catch(r){}if(t==20)return e.returnValue=!0;if(t==224||B&16)return i(B|16),e.returnValue=!0;if(e.R&x)return b(!!(e.R&x)),e.returnValue=!0;(t==18||e&&(e.altKey||e.R&N))&&i(B|8);if(t==16)return e.returnValue=y(!0);t==13&&(t=10);if(Q&&A.$){q=t;if(q==107)q=0;else if(q==13||q==10)q=10;if(q==0)return e.returnValue=!1}return e.returnValue=M(e,t,n)});P.pf=tt;var nt=S(function(e){if(!O())return!0;if(A.$&&!e.of)return!0;P.nb++;if(Q&&A.$){var t=e.target||e.srcElement;if(t)try{t.onfocus()}catch(n){}if(q==0){var r=String.fromCharCode(E(e));if(r in X)return e.returnValue=M(e,X[r],t);A.a.ya(r)}}return B&16?!0:B==4?!0:j||!I?j=!1:O()&&q!=20&&(e=m(q))?(I?c():(e.onclick(!0),I=!1),!1):(c(),j=!1,!0)});P.qf=nt;var rt,it=S(function(e){return e=e.target||e.srcElement,e==A.a.c&&(rt=_(e)),!0}),st=S(function(e){return e=e.target||e.srcElement,e==A.a.c&&rt&&(e=_(e),(rt.start!=e.start||rt.cc!=e.cc)&&c()),!0});P.va=function(){d.onkeyup!=et&&(d.onkeyup=et),d.onkeydown!=tt&&(d.onkeydown=tt),d.onkeypress!=nt&&(d.onkeypress=nt),d.onmousedown!=it&&(d.onmousedown=it),d.onmouseup!=st&&(d.onmouseup=st)}},A.Ca=function(e,t,n){var r=document.createElement("div");return r.className="kbd-button kbd-button-out",r.id=t,r.appendChild(document.createTextNode(e)),n&&(r.onclick=n),r.onmouseover=function(){r.className="kbd-button kbd-button-over"},r.onmouseout=function(){r.className="kbd-button kbd-button-out"},r},A.gb=function(e,t){t.className="select-dialog",e.className="trigger",e.onmouseover=function(){e.className="trigger trigger-over"},e.onmouseout=function(){e.className="trigger"};var n=this,r=A.Ca("","close",function(){n.k(),A.a.f()}),i=document.createElement("table"),s=document.createElement("tbody");i.cellSpacing="0",i.cellPadding="0",i.appendChild(s),i.className="select-dialog";var o=e.parentNode.clientWidth||e.parentNode.width,u=r.clientWidth||r.width;o&&(i.style.width=Math.max(o-5,0),u)&&(t.style.width=Math.max(o-u-20,0)),o=document.createElement("tr"),s.appendChild(o),s=document.createElement("td"),o.appendChild(s),u=document.createElement("td"),o.appendChild(u),s.appendChild(t),u.appendChild(r),this.Pa=i;var a=t.onchange;t.onchange=function(){n.k(),a&&a()},e.onclick=function(){n.ha()},this.Pa.style.display="none",this.rc=e,e.parentNode.insertBefore(this.Pa,e)},A.gb.prototype.ha=function(){this.rc.style.display="none",this.Pa.style.display=""},A.gb.prototype.k=function(){this.Pa.style.display="none",this.rc.style.display=""},A.nc=function(e,t){return t==e?e:e.indexOf("=0?e:['',e,""].join("")},A.Mb=function(e){function t(e){if(e.indexOf(":")>0){var t=e.split(/:/),e=t[0].split(/,/),n=t[1];i.wb=t[t.length>2?2:1]}else e=e.split(/,/);i.id=e[0],u=e.length>1?e[1]:i.id,a=A.nc(i.wb,n)}function n(e){var t=i.O?"À1234567890m=QWERTYUIOPÛÝÜASDFGHJKL;ÞâZXCVBNM¼¾¿":"À1234567890m=QWERTYUIOPÛÝÜASDFGHJKL;ÞZXCVBNM¼¾¿",n;for(n in e){var r=e[n],s=n.split(/,/);s.join(",")!=n&&s.push("");var o={};if(r){for(var u in r)if(u!=""){var a=r[u];if(typeof a=="string")if(u.length==1)o[u.charAt(0)]=a;else for(var l=0;l0&&t.push("  "),t.push(A.Id(r,"s2"+n,"_kbdS2('"+n+"');")))}return t.join("")}},i.Ad=function(){return i.Pd||i.kb()},i.z=function(){return u},i.Ma=function(e){e.is102Keyboard&&(i.O=!0),e.mappings&&(n(e.mappings),e.capslock&&(i.ac=e.capslock),e.view2char&&(c=e.view2char),i.pc(),i.Ma=i.Bd=P(!0),i.bc=!0,i.Mc=function(){return e.direction=="rtl"})},i.zd=function(e){return f[e]},i.lb=function(e){return c[e]&&(e=c[e]),l?i.Nd(e):e},i.pc=function(){i.e=[{j:"",o:-1,H:"",X:0,h:""}]},i.Nd=function(e){for(var t=0;t-1&&(r=r.slice(0,n.o)+i.U+r.slice(n.o)),n=i.Od(r,n.H);if(n.back>-1)break}if(t==i.e.length){for(t=0;te.X?n.back=e.h.length+n.back-e.X:(t=e.j.length-e.X,r=e.j.length-n.back,n.V=e.j.slice(t,r)+n.V,n.back=e.h.length);for(t=0;te.h.length?(e.X+=n.back-e.h.length,e.h=n.V):(r=e.h.length-n.back,e.h=e.h.slice(0,r),e.h+=n.V);return t=n.vb.indexOf(i.U),e=n.vb.replace(i.U,""),i.oc({j:e,o:t,H:"",X:0,h:""}),{back:n.back,Ya:n.V}},i.oc=function(e){i.e.push(e),i.Ld(),i.Md()},i.Ld=function(){for(var e=0;e-1?1:0,o=o.length-a-t.length,n=n.replace(r,u),r=n.slice(s.index),n=n.replace(i.U,"")+i.U,n={back:o,V:r,vb:n}}else n={back:-1,V:t,vb:n};return n},i.yd=function(){i.pc()},t(e.id),e.mappings&&i.Ma(e)};var H={en:"QWERTY",fr:"AZERTY",de:"QWERTZ"};A.Id=function(e,t,n){return['",e,""].join("")};var B="vMmh";A.Qe=function(){function e(){var e=d.createElement("div"),t=e.style;return t.visibility="hidden",e.innerHTML='
                                    ',e.setAttribute("id","kbd"),e.className="outerbox",m.appendChild(e),e}function n(){function e(){if(i==0){if(w.od()){var e=A.Ea();if(!e)return!1}A.Ga?f.ld(d.getElementsByTagName("iframe")):A.nd||(f.jb(window,"_kbdWF"),f.ud())}return i=(i+1)%10,r||(f.vd(),f.wd(),y.Nc(),r=!0),y.Ib()}function t(){p.setTimeout(t,e()?130:1300)}d=p.document,v=d.documentElement,m=d.body;var n=b("kbd");n&&E(n,d);var r=!1,i=0;t(),e()}function r(){var e=b("kbd_t");return e&&(f.Yb(e),b("kbd_ta").onclick=function(e){if(!u()){if(A.N){var t=A.N();t&&(t.bb=!1,t.r()&&a("v"))}else a("v");e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},o()),e}function i(){var e=r();e&&(f.jd||M>1)&&(e.innerHTML=f.gd(),e=b("kbd_oem"),A.Xb&&e&&A.a.fb)&&(e.innerHTML=H[y.C])}function s(){var e=b("kbd_minmax");if(!(e.childNodes.length>0)){var t;t=A.a.K?A.Ca("",f.g=="v"?"max":"min",function(){f.Hb()}):A.Ca("","close",function(){f.k()}),e.appendChild(t)}}function o(){if(A.Xb&&A.a.fb){var e=b("kbd_oem");e.title="Click to setup the physical keyboard layout.";if(e.parentNode.childNodes.length==1){var t=document.createElement("select");if(A.eb){var n=document.createElement("optgroup");n.label="Native Layout";for(var r in H)n.appendChild(new Option(H[r],r));t.appendChild(n)}else for(r in H)t.options.add(new Option(H[r],r));t.selectedIndex=0,t.onchange=function(){y.Xc(t.value),f.f()},A.eb&&(t.onfocus=function(){A.a.ib=!0},t.onblur=function(){A.a.ib=!1}),new A.gb(e,t)}}}function u(){return"vM".indexOf(f.g)>=0}function a(e){f.db(e),f.aa()}var f=this,l,c,g,y,x={},T=1,N=1,C=1;f.ia=!1,f.ib=!1,f.ad=function(){return f.ib},f.n=-1;var k=f.u=-1,L=-1;f.scrollX=0,f.scrollY=0,f.Ob=!0,f.hf="left",f.s=0,f.D=0,f.Kb="h",f.g="h",f.$c="h",f.Ha={};var O=[],M=0;f.Sc=1,f.gf="black",f.linkColor="blue",f.bgColor="#ebfcf7",f.bf="#ebfcf7",f.Qb="",f.Pb="",f.scale=1,f.sd=A.Ga?"absolute":"fixed",f.jd=!0,f.Vb=!1,f.hb=t,f.Rb="",f.Rc=!0,f.Qc=!0,f.pd=!1,f.ga=!1,f.fb=!0,f.K=!0,f.ea=!1,f.Jb=function(e){for(var t in e){var n=t.charAt(0)=="_"?t.substring(1):t;e.hasOwnProperty(t)&&typeof f[n]!="undefined"&&(f[n]=e[t])}},f.ef=function(e){f.hb=e},f.Zb=[function(){function t(){A.rd(),n&&n()}l=e(),f.hb&&f.hb(l),y||(y=f.d=new A.i(x,f.Ha,g)),f.d.Cb=f.scale,c=l.style,c.position=f.sd,A.rd=function(){f.Tb()?f.ab():f.q()};var n=p.onresize;t!=n&&(p.onresize=t),y.Oc(),f.ba(g,!0),f.aa=function(){var e=d,t=y.Wc()+"-",n;n=Math.floor(2e3*f.s)*4804+Math.floor(1200*f.D)*4+B.indexOf(f.g);var r=[];if(n<=0)n="0";else{for(;n>0;){var i=n%62;r.push(String.fromCharCode(i+(i<10?48:i<36?55:61))),n=Math.floor(n/62)}n=r.reverse().join("")}e.cookie="KBD="+(t+n)+";expires=July 19, 2051"};if(c.position=="absolute"){A.onscroll=function(){f.scrollX=v&&v.scrollLeft,f.scrollX||(f.scrollX=m.scrollLeft),f.scrollY=v&&v.scrollTop,f.scrollY||(f.scrollY=m.scrollTop),f.L(f.n,f.u)};var r=p.onscroll,i=function(){p.onscroll=function(){A.onscroll(),r&&r()}};r!=p.onscroll&&(p.onscroll=i)}}],f.vd=function(){for(var e=0;et){t=n;break e}}else t=-1;e.width=t,T=f.fd()-f.width,N=f.I?0:T,C=f.ed()-f.height,k=Math.floor(T*(f.I?f.s:1-f.s)+.5),L=Math.floor(C*(1-f.D)+.5)},f.aa=function(){},f.jb=function(e,t){if(e){var n=e.onfocus;n?n.toString().indexOf(t)<0&&(e.onfocus=function(){p[t](e),n()}):e.onfocus=function(){p[t](e)}}},f.ud=function(){var e=window.onblur;e?e.toString().indexOf("_kbdWB")<0&&(window.onblur=function(){p._kbdWB(),e()}):window.onblur=function(){p._kbdWB()}},f.Ea=function(e){for(var t=!1,n=0;nt?r.substring(0,i-t):"";e.value=o+n+r.substring(s,r.length),t=i+n.length-t,e.blur(),e.focus(),e.setSelectionRange(t,t),A.$&&window.cd&&(t=document.createEvent("KeyEvents"),t.Wb("keypress",!0,!0,window,!1,!1,!1,!1,0,32),e.dispatchEvent(t),t=document.createEvent("KeyEvents"),t.Wb("keypress",!0,!0,window,!1,!1,!1,!1,8,0),e.dispatchEvent(t))}else e.value=r.length'+(f.Rb||t)+"",i()},f.gd=function(){return f.xd},f.$a=function(){y.$a()},f.Lb=function(e){if(O.length==2||e&&O.length>1){var e=b("kbd-loop"),t=A.Ca("","loop",function(){f.Db()});f.df=t,e.appendChild(t)}},f.dd=function(e){var t="";A.a.ea&&(t='');var n="";return A.a.Da&&(n=''),['
                                    ',t,'',n,'
                                    ',e,"
                                    "].join("")},f.Eb=function(e){f.jf=""+Math.floor(12*f.scale)+"px";var t=b("kbd_0");t&&(t.innerHTML=f.dd(e),s(),f.Lb(!0),i(),f.$a())},f.Sb=function(){f.v();var e=f.s,t=f.D;f.s=Math.min(1,(f.I?f.n:T-f.n)/T),f.D=Math.min(1,1-f.u/C),e!=f.s&&t!=f.D&&f.aa()},f.L=function(e,t){f.n=Math.min(T,Math.max(0,e)),f.u=Math.min(C,Math.max(0,t)),c.right=""+Math.floor(T-f.n-f.scrollX)-5+"px",c.bottom=""+Math.floor(C-f.u-f.scrollY)+"px"},f.q=function(){f.v();for(var e=3;e-->0&&(k!=f.n||L!=f.u);)f.L(k,L),f.v()},f.Vc=function(){f.g!="h"&&f.q()},f.Tb=function(){f.v();var e=Math.abs(N-f.n)+Math.abs(C-f.u);return e<90},f.ab=function(){f.s=f.D=0,f.v(),f.L(N,C),f.q(),f.Sb()},f.Hb=function(){if(u())f.k();else if(f.g=="M")if(A.N){var e=A.N();e&&(e.bb=!0,e.r()&&a("m"))}else a("m");else f.ha()},f.Ba="v",f.Bb=u,f.cb=function(){f.ia=!1},f.va=function(){!f.ia&&u()&&(y.va(),f.ia=!0 +)},f.Tc=function(){return f.ia},f.ff=function(){},f.db=function(e){if(y){if("hm".indexOf(e||f.g)>=0){if(f.g=e,f.cb(),f.f(),f.g=="h"){c.visibility="hidden";return}}else y.xa();e=="M"&&!f.Ob&&(e="v"),f.g=e,y.Aa();var t=b("kbd_mka");t&&(t.style.display=e=="v"?"block":"none",f.q(),f.va(),y.za=1,y.Ib(!0),f.f(),c.visibility="visible")}},f.wd=function(){f.db(f.Kb)},f.J=function(){a(f.K?"m":"h")},f.k=function(){f.J(),b("kbd_ta").onclick=t,f.Ba=u(),A.a.Fa&&A.a.Fa()},f.bd=function(){if(A.N){var e=A.N();e&&e.bb?a("m"):a("v")}else a("v")},f.ha=function(){a("v"),f.Ba=u(),A.a.Fa&&A.a.Fa()}},A.a=new A.Qe,p._kbdHide=function(){A.a.J()},A.Ea=function(){var e=A.a.Ea(d.getElementsByTagName("textarea")),t=A.a.Ea(d.getElementsByTagName("input"));return e||t},A.a.Td=function(t){var n=A.a.Nb("-",new A.Mb(t));n.kb=n.Fd({}),A.a.Za(n),A.a.Jb({Ob:!1,$c:"h",Qb:t.Qb||"▲",Pb:t.Pb||"▼",Rb:e})},p._kbdS2=function(e){A.a.p(e)},A.a.Af=!0,A.a.sa=!1,A.a.$b="move",A.a.Yb=function(e){var t=this;e.onmousedown=function(e){return t.Be=d.onmousemove,d.onmousemove=function(e){return t.ze(e||p.event)},t.Ae(e||p.event),!1},e.onmouseup=function(){t.Ic(),d.onmousemove=t.Be},e.onblur=function(){t.Ic()}},A.a.Bf=function(e){var t=this;t.D=Math.floor(e%1201)/1200,t.s=Math.floor(e/1201)/2e3,t.q(),t.Tb()&&t.ab()},A.a.Ic=function(){var e=this;e.sa&&(e.Sb(),e.va(),e.sa=!1)},A.a.Ae=function(e){var t=this;t.ve=e.clientX-t.left(),t.we=e.clientY-t.top(),t.sa=!0},A.a.ze=function(e){var t=this;return t.sa&&t.L(e.clientX-t.ve-t.scrollX,e.clientY-t.we-t.scrollY),!t.sa},w.De=!1,w.na=!0,w.Oa=!0,w.sc=!0,w.jc=function(e){w.na=e},w.Df=function(e){w.sc=e},w.Ff=function(e){w.Oa=e},w.od=function(){return w.Oa},w.kc=function(e){A.a.Vb=e},w.ub=function(e){if(e in w.Xa||w.Wa[e])return e==e.toUpperCase()&&(e=w.Xa[e]),e;throw e+" is not a supported layout."},w.xb=t,w.Ef=function(e){w.xb=e},w.Ze=function(t){A.a.q=function(){A.a.v();var n=t(A.a.height,A.a.width);typeof n.x!=e&&typeof n.y!=e&&(A.a.L(n.x,n.y),A.a.v())}},w.We=function(e){return e=w.ub(e),w.Wa[e]},w.Rd=function(e){typeof e=="string"&&(e=document.getElementById(e));if(e&&e.id){if(!w.Oa)return e.id;if(w.qc(e))return e.id}return t},w.qc=function(e){var t=e.nodeName.toLowerCase();return t=="textarea"||t=="input"&&e.type.toLowerCase()=="text"},w.la=[],w.qa={},w.La=[],w.xe=function(){return A.a.c},w.gc=function(e){var t=w.qa[e];t?typeof t=="object"&&w.loadme(t):(w.qa[e]="loading",e=w.De+e+".js",t=document.createElement("script"),t.src=e,document.body.appendChild(t))},w.Na=function(e,t){for(var n=0;n0&&A.a.Yc("-"),typeof e[0]=="object")for(var r=e,e=[],i=0;i0)for(i in e)s=w.ub(e[i]),w.gc(s);if(!n||n.length==0)if(w.P=this,!A.a.c)A.a.c=document.activeElement;this.Hd(n),w.La.push(this);for(i=0;i0&&this.rb(e[0])},w.i.prototype.Hd=function(e){for(var t in e){var n=w.Rd(e[t]);if(n&&(this.ma.push(n),w.la[n]&&w.la[n].Na(n),w.la[n]=this,!A.a.c)){var r=document.activeElement;if(r)if(w.Oa){if(w.qc(r)&&r.id!=n)continue}else if(r.id!=n)continue;A.a.c=document.getElementById(n)}}},w.ka="",w.loadme=function(e){var t=e.id;w.qa[t]=e,A.a.Td(e),w.sc&&A.a.Jb({Kb:"v"}),w.ka||A.a.Zc();for(var n in w.La)w.La[n].Ud(t);A.a.Lb(),w.xb&&w.xb(t),w.ka=t},n=w.i.prototype,n.fe=function(){if(w.P)return!0;var e=w.xe();if(e)for(var t=0;t=0;t--)if(this.pa[t]==e){this.b=e,this.fe()&&this.vc(e),this.pa=this.pa.slice(t+1);break}},n.Na=function(e){w.Na(this.ma,e),this.ma.length==0&&w.Na(w.La,this)},n.Ka=function(){return w.P?A.a.b||w.ka:this.b||A.a.b||w.ka},n.rb=function(e){e=w.ub(e),e in w.qa&&typeof w.qa[e]=="object"?(this.b=e,this.vc(e)):(this.pa.push(e),w.gc(e))},n.Qd=function(){return this.hc},n.r=function(){return A.a.Bb()},n.Xe=function(){return!!A.a.d},n.zb=function(e){A.a.Ba=e,this.w(e)},n.w=function(e){e?(this.hc++,A.a.bd()):A.a.J()},w.ea=function(e){A.a.ea=e},w.ga=function(e){A.a.ga=e},w.Da=function(e){A.a.Da=e},w.lc=function(e){A.a.Fa=e},w.$e=function(e){A.a.Ub=e},w.ic=function(e){A.a.fb=e},w.K=function(e){A.a.K=e},w.hangulTransform=function(e){return l.Ye(e)},p._kbdSI=function(e){if(e&&e!=A.a.c&&A.a.d&&e.className!=A.a.d.Ia){var n=w.P||w.la[e.id];n?(A.a.c=e,n.rb(n.Ka()),n.w(A.a.Ba)):(A.a.c=t,w.na?A.a.J():(A.a.cb(),A.a.f()))}},p._kbdIF=function(){w.na&&(A.a.c=t,A.a.J())},p._kbdWB=function(){w.na&&(!A.eb||!A.a.ad())&&(A.a.c=t,A.a.J())},p._kbdWF=function(){w.na&&document.activeElement&&document.activeElement.onfocus&&document.activeElement.onfocus()},A.N=function(){var e;return A.a.c&&A.a.c.id&&(e=w.la[A.a.c.id]),e?e:w.P},f("google.elements.keyboard.Keyboard",w.i),f("google.elements.keyboard.Keyboard.prototype.getLayout",w.i.prototype.Ka),f("google.elements.keyboard.Keyboard.prototype.setLayout",w.i.prototype.rb),f("google.elements.keyboard.Keyboard.prototype.isVisible",w.i.prototype.r),f("google.elements.keyboard.Keyboard.prototype.isReady",w.i.prototype.Xe),f("google.elements.keyboard.Keyboard.prototype.setVisible",w.i.prototype.zb),f("google.elements.keyboard.setVisibilityChangeCallback",w.lc),f("google.elements.keyboard.setLayoutChangeCallback",w.$e),f("google.elements.keyboard.getLayoutName",w.We),f("google.elements.keyboard.setAutoHide",w.jc),f("google.elements.keyboard.setSendShiftKeyUpEventUponInput",w.kc),f("google.elements.keyboard.enableGoogleLogo",w.ea),f("google.elements.keyboard.helpLink",w.ga),f("google.elements.keyboard.cfgLink",w.Da),f("google.elements.keyboard.enableKeyCodeScheme",w.ic),f("google.elements.keyboard.enableMinMaxMode",w.K),f("google.elements.keyboard.hangulTransform",w.hangulTransform),f("google.elements.keyboard.loadme",w.loadme),f("google.elements.keyboard.setHomePositionCallback",w.Ze),f("google.elements.keyboard.LayoutName",w.Wa),f("google.elements.keyboard.LayoutCode",w.Xa),w.Xa={ALBANIAN:"sq",ARABIC:"ar",ARMENIAN_EASTERN:"hy_east",ARMENIAN_WESTERN:"hy_west",BASQUE:"eu",BELARUSIAN:"be",BENGALI_INSCRIPT:"bn_inscript",BENGALI_PHONETIC:"bn_phone",BOSNIAN:"bs",BRAZILIAN_PORTUGUESE:"pt_br",BULGARIAN:"bg",BULGARIAN_PHONETIC:"bg_phone",CATALAN:"ca",CHEROKEE:"chr",CROATIAN:"hr",CZECH:"cs",CZECH_QWERTZ:"cs_qwertz",DANISH:"da",DARI:"prs",DUTCH:"nl",DEVANAGARI_PHONETIC:"deva_phone",ENGLISH:"en",ESTONIAN:"et",ETHIOPIC:"ethi",FINNISH:"fi",FRENCH:"fr",GALICIAN:"gl",GEORGIAN_QWERTY:"ka_qwerty",GEORGIAN_TYPEWRITER:"ka_typewriter",GERMAN:"de",GREEK:"el",GUJARATI_INSCRIPT:"gu_inscript",GUJARATI_PHONETIC:"gu_phone",GURMUKHI_INSCRIPT:"guru_inscript",GURMUKHI_PHONETIC:"guru_phone",HEBREW:"he",HINDI:"hi",HUNGARIAN_101:"hu_101",ICELANDIC:"is",ITALIAN:"it",KANNADA_INSCRIPT:"kn_inscript",KANNADA_PHONETIC:"kn_phone",KAZAKH:"kk",KHMER:"km",KOREAN:"ko",KYRGYZ:"ky_cyrl",LAO:"lo",LATVIAN:"lv",LITHUANIAN:"lt",MACEDONIAN:"mk",MALAYALAM_INSCRIPT:"ml_inscript",MALAYALAM_PHONETIC:"ml_phone",MALTESE:"mt",MAORI:"mi",MONGOLIAN_CYRILLIC:"mn_cyrl",MONTENEGRIN:"srp",NORWEGIAN:"no",ORIYA_INSCRIPT:"or_inscript",ORIYA_PHONETIC:"or_phone",PAN_AFRICA_LATIN:"latn_002",PASHTO:"ps",PERSIAN:"fa",POLISH:"pl",PORTUGUESE:"pt_pt",ROMANI:"rom",ROMANIAN:"ro",ROMANIAN_SR13392_PRIMARY:"ro_sr13392_primary",ROMANIAN_SR13392_SECONDARY:"ro_sr13392_secondary",RUSSIAN:"ru",SANSKRIT_PHONETIC:"sa_phone",SERBIAN_CYRILLIC:"sr_cyrl",SERBIAN_LATIN:"sr_latn",SINHALA:"si",SLOVAK:"sk",SLOVAK_QWERTY:"sk_qwerty",SLOVENIAN:"sl",SOUTHERN_UZBEK:"uzs",SPANISH:"es_es",SWEDISH:"sv",SWISS_GERMAN:"de_ch",TAMIL_99:"ta_tamil99",TAMIL_INSCRIPT:"ta_inscript",TAMIL_PHONETIC:"ta_phone",TATAR:"tt",TELUGU_INSCRIPT:"te_inscript",TELUGU_PHONETIC:"te_phone",THAI:"th",TURKISH_F:"tr_f",TURKISH_Q:"tr_q",UIGHUR:"ug",UKRAINIAN_101:"uk_101",URDU:"ur",UZBEK_LATIN:"uz_latn",UZBEK_CYRILLIC_PHONETIC:"uz_cyrl_phone",UZBEK_CYRILLIC_TYPEWRITTER:"uz_cyrl_type",VIETNAMESE_TCVN:"vi_tcvn",VIETNAMESE_TELEX:"vi_telex",VIETNAMESE_VIQR:"vi_viqr"},w.Wa={ar:"العربية",be:"беларуская",bg:"български език",bg_phone:"български език(фонетика)",bn_inscript:"বাংলা(INSCRIPT)",bn_phone:"বাংলা(ফোনেটিক)",bs:"bosanski",ca:"català",chr:"ᏣᎳᎩ",cs:"čeština",cs_qwertz:"čeština QWERTZ",da:"dansk",de:"Deutsch",de_ch:"Deutschsprachige Schweiz",deva_phone:"देवनागरी(फोनेटिक)",el:"ελληνικά",en:"English",es_es:"español",et:"eesti keel",ethi:"ግዕዝ",eu:"Euskara",fa:"فارسی",fi:"suomi",fr:"français",gl:"Galego",gu_inscript:"ગુજરાતી(INSCRIPT)",gu_phone:"ગુજરાતી(ફોનેતિક)",guru_inscript:"ਗੁਰਮੁਖੀ(INSCRIPT)",guru_phone:"ਗੁਰਮੁਖੀ(ਫੋਨੇਟਿਕ)",he:"עִבְרִית",hi:"हिंदी",hr:"hrvatski",hu_101:"magyar nyelv(101)",hy_east:"Արևելահայերեն",hy_west:"Արեւմտահայերէն",is:"íslenska",it:"italiano",ka_qwerty:"ქართული (ქწერტყ)",ka_typewriter:"ქართული (საბეჭდი მანქანა)",kk:"Қазақ",km:"អក្សរខ្មែរ NiDA",ko:"한국어",kn_inscript:"ಕನ್ನಡ(INSCRIPT)",kn_phone:"ಕನ್ನಡ(ಫೊನೆಟಿಕ್)",ky_cyrl:"Кыргыз",latn_002:"Africa Latin",lo:"ພາສາລາວ",lt:"lietuvių kalba",lv:"latviešu valoda",mi:"Māori",mk:"македонски",ml_inscript:"മലയാളം(INSCRIPT)",ml_phone:"മലയാളം(ഫൊണറ്റിക്)",mn_cyrl:"Монгол",mt:"Malti",nl:"Nederlands",no:"norsk",or_inscript:"ଓଡ଼ିଆ(INSCRIPT)",or_phone:"ଓଡ଼ିଆ(ଫୋନେଟିକ)",pl:"polski",prs:"فارسی دری",ps:"پښتو",pt_br:"português brasileiro",ro:"română",ro_sr13392_primary:"română SR13392 Primary",ro_sr13392_secondary:"română SR13392 Secondary",pt_pt:"português europeu",rom:"rromani ćhib",ru:"Pyccĸий",sa_phone:"संस्कृतम्(फोनेटिक)",si:"ශුද්ධ සිංහල SLS1134",sk:"slovenský jazyk",sk_qwerty:"slovenščina QWERTY",sl:"slovenščina",sq:"shqip",srp:"Crnogorski jezik",sr_cyrl:"Српски",sr_latn:"Srpski",sv:"svenska",ta_tamil99:"தமிழ்(TAMIL99)",ta_inscript:"தமிழ்(INSCRIPT)",ta_phone:"தமிழ்(போனெடிக்)",te_inscript:"తెలుగు(INSCRIPT)",te_phone:"తెలుగు(ఫోనెటిక్)",th:"ภาษาไทย",tr_f:"Türkçe - F",tr_q:"Türkçe - Q",tt:"Татар",ug:"ئۇيغۇرچە",uk_101:"украї́нська мо́ва(101)",ur:"اردو",uz_latn:"O‘zbek",uz_cyrl_phone:"Ўзбек(фонетичні)",uz_cyrl_type:"Ўзбек(Російська)",uzs:"Southern Uzbek",vi_tcvn:"Tiếng Việt TCVN 6064",vi_telex:"Tiếng Việt Telex",vi_viqr:"Tiếng Việt VIQR"},f("google.elements.keyboard.LayoutName",w.Wa),f("google.elements.keyboard.LayoutCode",w.Xa);var j={id:"ar",title:"لوحة مفاتيح اللغة العربية",direction:"rtl",mappings:{"scl,sc,sl,s":{"À1234567890m=":"ّ!@#$%^&*)(_+",QWER:"ًٌَُ",T:"لإ","YUIOPÛÝÜ":"إ‘÷×؛<>|",ASDF:"ٍِ][",G:"لأ","HJKL;Þ":'أـ،"',ZXCV:"~ْ}{",B:"لآ","NM¼¾¿":"آ’,.؟"},"cl,l,c,":{"À1234567890m=":"ذ١٢٣٤٥٦٧٨٩٠-=","QWERTYUIOPÛÝÜ":"ضصثقفغعهخحجد\\","ASDFGHJKL;Þ":"شسيبلاتنمكط",ZXCV:"ئءؤر",B:"لا","NM¼¾¿":"ىةوزظ"}}};google.elements.keyboard.loadme(j);if(window.jstiming){window.jstiming.Jc={},window.jstiming.Ie=1;var F=function(t,n,r){var i=t.t[n],s=t.t.start;if(i&&(s||r))return i=t.t[n][0],s=r!=e?r:s[0],i-s},I=function(e,t,n){};window.jstiming.report=function(e,t,n){}}var U=new a;R(),f("google.tia.positionTia",function(e,t){U.Hc(e,t)}),f("google.tia.isVisible",function(){U.r()}),f("google.tia.show",function(){U.ha()}),f("google.tia.hide",function(){U.k()})})(); +}); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/md5/md5.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/md5/md5.js new file mode 100755 index 000000000..7f4d572b5 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/md5/md5.js @@ -0,0 +1 @@ +(function(){var e=0,t=function(e){return s(o(i(e),e.length*8))},n=function(t){try{e}catch(n){e=0}var r=e?"0123456789ABCDEF":"0123456789abcdef",i="",s;for(var o=0;o>>4&15)+r.charAt(s&15);return i},r=function(e){var t="",n=-1,r,i;while(++n>>6&31,128|r&63):r<=65535?t+=String.fromCharCode(224|r>>>12&15,128|r>>>6&63,128|r&63):r<=2097151&&(t+=String.fromCharCode(240|r>>>18&7,128|r>>>12&63,128|r>>>6&63,128|r&63));return t},i=function(e){var t=Array(e.length>>2);for(var n=0;n>5]|=(e.charCodeAt(n/8)&255)<>5]>>>n%32&255);return t},o=function(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n=1732584193,r=-271733879,i=-1732584194,s=271733878;for(var o=0;o>16)+(t>>16)+(n>>16);return r<<16|n&65535},p=function(e,t){return e<>>32-t};hex_md5=function(e,j){if(j){return e==""?e:n(t(r(e))).slice(8,24)}else{return e==""?e:n(t(r(e)))}}})();module.exports=hex_md5; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/spark-app/spark-app.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/spark-app/spark-app.js new file mode 100755 index 000000000..26766596c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/spark-app/spark-app.js @@ -0,0 +1,134 @@ +var $ = require('common:widget/ui/jquery/jquery.js'); +var UT = require('common:widget/ui/ut/ut.js'); +var helper = require('common:widget/ui/helper/helper.js'); +var cycletabs = require("lv2:widget/ui/cycletabs/cycletabs.js"); + +var App = function(config, modId) { + this.tpl = config.baseTpl || '
                                    '; + + this.itemTpl = config.itemTpl; + this.conf = config; + this.data = {}; + this.wrap = $(config.wrap); + + this.init(config, modId); +}; +App.prototype = { + init: function(conf, modId) { + var that = this; + that.createBaseHtml(conf); + if(conf.ajaxData) { + that.getAjaxData(conf.ajaxData, that.initSlide, conf.ajaxConf); + } else { + that.getNormalData(conf.list, conf, that.initSlide); + } + that.bindEvent(modId); + }, + createBaseHtml: function(conf) { + var that = this; + that.wrap.html(helper.replaceTpl(that.tpl, conf.slogan)); + }, + formatData: function(data) { + var that = this, + conf = that.conf; + if (conf.format) { + return conf.format.call(that, data); + } else { + return data; + } + }, + getContent: function(data) { + var that = this, + i = 0, j, + tpl = that.itemTpl, + per = parseInt(that.conf.per, 10), + tmpObj = {}, + tmpStr = "", + tmpId = 1, + dataMap = []; + + that.data = that.formatData(data); + tmpObj = that.data; + + // 数据分组记入slide中 + for (j = tmpObj.length; i < j; i++) { + tmpStr += helper.replaceTpl(tpl, tmpObj[i]); + tmpId = Math.floor(i / per) + 1; + + if ((i !== 0 && (i + 1) % per === 0) || i === j - 1) { + dataMap.push({ + "content": tmpStr, + "id": tmpId + }); + tmpStr = ""; + } + } + return dataMap; + }, + initSlide: function(data, conf, wrap) { + var options = { + offset: 0, + navSize: 1, + itemSize: conf.size, + dir: conf.dir, + scrollDuration: 400, + quickSwitch: true, + autoScroll: false, + containerId: wrap, + data: data, + defaultId: 1 + }, + obj = new cycletabs.NavUI(); + + obj.init(options); + if (data.length < 2) { + $(".ctrl", $(wrap)).hide(); + } + }, + getAjaxData: function(conf, callback, ajaxConf) { + var that = this; + $.ajax(ajaxConf).done(function(data) { + var dataGroup = that.getContent(data), + wrap = '#' + that.conf.slogan.wrap; + + callback(dataGroup, conf, wrap); + }); + }, + getNormalData: function(data, conf, callback) { + var that = this, + dataGroup = that.getContent(data), + wrap = '#' + that.conf.slogan.wrap; + + callback && callback(dataGroup, conf, wrap); + }, + bindEvent: function(modId) { + this.wrap.on("click", "a", function(e) { + var $that = $(this); + if($that.closest('.o-slogan').length) { + UT.send({ + modId: modId, + position: "title" + }); + } else { + UT.send({ + modId: modId, + position: "content" + }); + } + }).on('click', ".prev", function() { + UT.send({ + modId: modId, + ac: "b", + position: "prev" + }); + }).on("click", ".next", function() { + UT.send({ + modId: modId, + ac: "b", + position: "next" + }); + }); + } +}; + +module.exports = App; \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/suggest/suggest.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/suggest/suggest.css new file mode 100755 index 000000000..280dd65b0 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/suggest/suggest.css @@ -0,0 +1,68 @@ +/*------------------------suggest------------------------*/ +/*提示层外框*/ +.sug-search { + position:absolute; + top: 28px; + left: -2px; + border:1px solid #e3e4e6; + border-top: 0 none; + background:#fff; + width:528px; + color:#454545; + z-index:999; + white-space:nowrap; + overflow:hidden; +} +/*ie6 shim*/ +.sug-shim { + position:absolute; + top:-1px; + left:-2px; + z-index:-1; + filter:alpha(opacity="0"); + width:430px; + height:250px; +} +/*列表外框*/ +.sug-search ol { + font:bold 12px/23px Tahoma,arial,helvetica,clean,sans-serif; + cursor:default; +} +/*列表项*/ +.sug-search li { + padding: 3px 10px; + cursor: pointer; +} +.sug-search li b { + font: inherit; + display: inline; +} +/*选中样式*/ +.sug-search .sug-select { + background: #f5f7f7; +} +/*头部*/ +.sug-search .top { + font-weight:normal; + color:#999; + height:21px; + line-height:21px; + background:#eee; + padding:0 2px; +} +/*底部*/ +.sug-search .bot { + position:relative; + height:19px; + line-height:19px; + font-weight:normal; + border-top:1px solid #666; +} +/*高亮查询词*/ +.sug-search .sug-query { + font-weight:normal; +} +.sug-search font { + font-weight:normal !important; + color:#333 !important; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/suggest/suggest.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/suggest/suggest.js new file mode 100755 index 000000000..98ff81648 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/ui/suggest/suggest.js @@ -0,0 +1,977 @@ +/* +author: 斯人 +QQ: 103024979 +Email: leecade@163.com + +todo: + +1. 分离出配置参数中可能会reset的部分,便于在reset时参照,避免每次reset都要声明false,如,目前重置时,要禁用的的参数必须写{url:false,tpl:false} + +2. callbackDataNum 未用undef判断很不严谨,很有可能为0 + +3. 增加隐藏但未清空的状态记录 + +4. 序号同步 + +bugs: + +1. chrome 必须按END(输入框空值时)两次才能滚动页面 + +2. chrome浏览器+google输入法未改变input值时即会触发change + + +update: 2011.12.21 + +1. 增加onMouseSelect事件接口(通过鼠标点选sug后触发),以适应统计需求 + +update: 2011.11.28 + +1. 增加onFill事件接口,以兼容之前版本 +2. 更新input value时过滤html标签,之前版本有,改写时忘加了 +3. 增加一个启动监控的条件,必须实例拥有url,方便切换时可能遇到无sug的搜索 + +update: 2011.10.25 +1. 更改了sug触发的逻辑,之前通过比对当前输入词与查询词,不同则触发。这导致了比较严重的bug,比如当前输入"a",切换焦点关闭sug后,再次输入"a"不再触发sug。(百度首页亦同,等我去提醒他们) +2. 回车的保持sug隐藏策略(保留选中项、索引等) + +update: 2011.10.15 +1. 增加参数t控制请求时是否增加时间戳 + +update: + +2011.10.8 代码重构: + +1. 大幅度提升代码压缩比 + +2. 抽离工具函数,便于迁移至现成js框架下 + +3. 考虑之前的对齐方式可能会侵入布局结构(比如依赖于input外层元素并需设其为相对定位),增加一种无依赖的纯绝对定位方式(动态计算input坐标) + +4. 考虑input外层元素可能为绝对定位等情况,不再强制设其为相对定位,增加判断 + +5. 抽离shim样式,避免动态计算高度 + +6. 考虑兼容autoCompleteData模式、支持noSubmit、屏蔽IE6下ESC清空input值等情况,劫持onkeydown,即:重复绑定input的keydown,请用on(input, "keydown", function(){...})形式 + +7. 参考google增加策略:持续按上/下键时延迟响应和按ESC关闭后通过上/下键可以打开并保持选择项 +*/ + +var UT = require("common:widget/ui/ut/ut.js"); + +;;(function(WIN, DOC, undef) { + +//fastst trim, form: http://blog.stevenlevithan.com/archives/faster-trim-javascript +String.trim || (String.prototype.trim = function() { + var str = this, + str = str.replace(/^\s\s*/, ''), + ws = /\s/, + i = str.length; + while (ws.test(str.charAt(--i))); + return str.slice(0, i + 1); +}); + +//replace string by object, like "#{name}" +String.replaceTpl || (String.prototype.replaceTpl = function(o) { + return this.replace(/#\{([^}]*)\}/mg, function(a, b) { + return a = o[b.trim()] + }); +}); + +//encode html code("&", "<", ">", """, "'") +//实体字符全用Unicode表示 +//IE不支持单引号的实体名称,故转为实体编号"'" +//增加对"©"符的转义 +String.htmlEncode || (String.prototype.htmlEncode = function() { + return String(this).replace(/\x26/g,'&').replace(/\x3c/g,'<').replace(/\x3E/g,'>').replace(/\x22/g, """).replace(/\x27/g, "'").replace(/\xA9/g, "©"); +}); + +var SPACE = " ", + NULL = null, + htmlReg = /<[^>]+>/g, //过滤html标签 + + //IE8报错 + //CLASSLIST = !!(WIN.Element && Element.prototype.hasOwnProperty("classList")), + CLASSLIST = document.documentElement.classList !== undef, + isIE = /\w/.test('\u0130'), + isIE6 = isIE && !WIN.XMLHttpRequest, + isIE9 = DOC.documentMode && DOC.documentMode === 9, + +/* +if use any library, these functions can be replaced like: +hasClass = T.baidu.hasClass +*/ + +//namespace "window", "window.a", "a", "a.b.c" and any custom context +/* +ns = function(s, context) { + if(!s) return s; + var ret = s.replace(/^window.?/, "").split("."), + li; + context = context || WIN; + while(li = ret.shift()) context = context[li] = context[li] || {}; + return context; +}, + +ns = function(s, context) { + context = context || WIN; + if(!s) return context; + var ret = s.replace(/^window\.?/, "").split("."), + li; + ret.pop(); + while(li = ret.shift()) context = context[li] = context[li] || {}; + return context; +}, +*/ +namespace = function(s) { + if(!s) return; + var ret = s.split("."), + len = ret.length, + context = window, + i = 0, + p; + + //兼容处理形如"baidu.sug.xx"的回调方法名 + if(len > 1) { + for(; i < len - 1; i++){ + p = ret[i]; + context = (0 === i && context[p]) ? context[p] : p in context ? context[p] : context[p] = {}; + } + }; + return context; +}, + +hasClass = CLASSLIST ? function(el, cls) { + return el.classList.contains(cls); +} : function(el, cls){ + return -1 < (SPACE + el.className + SPACE).indexOf(SPACE + cls + SPACE); +}, +addClass = CLASSLIST ? function(el, cls) { + el.classList.add(cls); +} : function(el,cls) { + if (!hasClass(el,cls)) el.className += (el.className ? SPACE : "") + cls; +}, +removeClass = CLASSLIST ? function(el,cls) { + el.classList.remove(cls); +} : function(el,cls) { + if(!hasClass(el,cls)) return; + var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); + el.className = el.className.replace(reg, SPACE); +}, +on = DOC.addEventListener ? function(el,type,callback){ + el.addEventListener(type, callback, !1); +} : function(el,type,callback){ + el.attachEvent("on" + type, callback); +}, +bind = function(el, type, fun) { + on(el, type, function(e) { + e = e || WIN.event; + var el = e.srcElement || e.target; + fun.call(el, e); + }); +}, +getStyle = isIE ? function(el, style) { + style = style.replace(/\-(\w)/g, function(a, b){ + return b.toUpperCase(); + }); + return el.currentStyle[style]; +} : function(el, style) { + return DOC.defaultView.getComputedStyle(el, null).getPropertyValue(style) +}, +getCookie = function(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i = 0; i < ca.length; i++) { + var c = ca[i]; + while (c.charAt(0) == ' ') c = c.substring(1, c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); + } + return null; +}, + +//construct +_sug = function(el, o) { + + //ignore "new" + if(!(this instanceof _sug)) return new _sug(el, o); + + var that = this; + + //"id" or el + that.el = el + "" === el ? DOC.getElementById(el) : el; + //null/undefind + if(!that.el) return; + + //default arguments + that.o = { + + //样式接口及默认样式名 + classNameWrap: o.classNameWrap || "sug-wrap", //suggest内容面板className + classNameQuery: o.classNameQuery, //查询词高亮样式,如不定义则不增加span标签(避免和回调数据重复定义) + classNameQueryNull: o.classNameQueryNull, //提示条目不能匹配查询词时 + classNameSelect: o.classNameSelect || "sug-select", //列表选中样式(方向键选择响应和鼠标hover) + classNameClose: o.classNameClose || "sug-close", //关闭按钮样式 + classNameShim: o.classNameShim || "sug-shim", //ie6下shim样式 + locAbs: o.locAbs || false, //提示层是否绝对定位(默认相对于input外框定位) + + pressDelay: o.pressDelay === undef ? 3 : o.pressDelay, //上/下键选择的延迟程度,false||0||null ==> 禁止干涉(浏览器默认速度很快,难以准确选择), 1 ==> 禁止按住连续选择(只能通过多次敲击进行选择),Num ==> 数字(>1)越大,响应越慢,未配置该参数 ==> 3 + autoFocus: o.autoFocus || false, //自动获取焦点 + delay: o.delay || 200, //调整触发相应速度 + n: o.n || 10, //最多显示列表数 + t: o.t || true, //请求时是否自动附加时间戳 + + //数据接口配置 + autoCompleteData: o.autoCompleteData || false, //autoComplete模式(数组),优先 + //or + url: o.url || false, //数据url + charset: o.charset, //未配置则不设置script节点该属性 + + //回调接口配置,根据返回数据形式任选一种: + callbackFn: o.callbackFn || false, //回调函数名,允许链式字符串 + //or + callbackName: o.callbackName || false, //回调变量名,允许链式字符串 + + + //配置返回数据中的填充内容,根据数据格式任选一种: + callbackDataKey: o.callbackDataKey || false, //json(如{s: [$1,$2,$3]},这里callbackDataKey为"s") + //or + callbackDataNum: o.callbackDataNum || false, //array(如[s,[$1,$2,$3]],这里callbackDataNum为1) + + + requestQuery: o.requestQuery || false, //数据请求API接口中的查询参数 + requestParas: o.requestParas || {}, //请求数据时的自定义参数 + + + //是否自动提交表单 + noSubmit: o.noSubmit || false, //默认为true + + + //注册事件 + onSelect: o.onSelect, //鼠标点选或回车提交时(在表单提交前) + + onSearchDirect: o.onSearchDirect, // 搜索直达统计 + onCheckForm: o.onCheckForm, // 当表单通过submit()方法提交时触发,添加haobd参数 + + onMouseSelect: o.onMouseSelect, //鼠标点选后触发(在表单提交前) + onShow: o.onShow, //提示层显示时 + onHide: o.onHide, //提示层隐藏时 + onFill: o.onFill, //input内容被填充时 + onRequest: o.onRequest, //*每次请求前(用于修正url) + onSucess: o.onSucess, //每次请求数据成功时 + onError: o.onError, //每次请求数据失败时 + + customUrl: o.customUrl || false, //增加一个自定义拼装请求URL和参数的接口 + + templ: o.templ || false //暴露的自定义模板 + } + + //el(input)'s wrap + that.wrap = that.el.parentNode; + + //初始化 + that.init(); +}, + +//ths prototype's shortcut +_ = _sug.prototype; + +_.init = function() { + + var that = this, + o = that.o; + + //init layout + that.layoutInit(); + + that.reset(); + + //init input handle + that.inputHandle(); + + //if need autoFocus + o.autoFocus && setTimeout(function() { + that.el.focus(); + }, 16); + + //autoComplete模式 + if(o.autoCompleteData) return; + + var callbackFn = o.callbackFn, + context = namespace(callbackFn, true), + ret = callbackFn.split("."), + lastName = ret.pop(); + + //common callback(callbackFn || callbackName) + that.callback = function(data) { + + data = data || {}; + + var self = arguments.callee; + + //callback's multiton pattern + that = callbackFn && self.repeat ? self.context || that : that; + + that.o.onSucess && that.o.onSucess.call(that); + + /* + if(!data) { + that.hide(1); + that.isHide = false; + return; + } + */ + + var key = that.o.callbackDataKey || that.o.callbackDataNum, + + //callback([a1, a2, a3]) + _data = key ? data[key] : data; + + if(!_data || !_data.length) { + that.hide(1); + + //if nondata reset isHide state + that.isHide = false; + return; + } + + that.fill(data, that.q); + that.show(); + + //cache data + that.cache[that.q] = data; + }; + + //mark the same name callback + if(context[lastName]) context[lastName].repeat = true; + + //callbackFn refer to callback + else if(callbackFn) context[lastName] = that.callback; +} + +//reset +_.reset = function(o) { + + var that = this, + k; + + for(k in o) that.o[k] = o[k]; + + //cache + that.cache = {}; + + //cache last query + that.q = ""; + + //current selected item(synchronize keyboard and mouse) + that.s = NULL; + + //current selected item's index(update when content change) + that.i = -1; + + that.val = ""; //用于获取请求SUG数据的词 + + //timer + that.inputTimer(); + + //重置隐藏状态,否则切换tab会认为isHide + that.isHide = false; + + //隐藏 + that.hide(1); +} +//layoutInit +_.layoutInit = function() { + var that = this, + o = that.o, + wrap = o.locAbs ? DOC.body : that.wrap, + + //sug layer's wrap + sugWrap = that.sugWrap = DOC.createElement("div"); + + that.el.setAttribute("autocomplete", "off"); + + //fix IE6'z-index bug + if(isIE6) { + + //shim's height unknown + var shim = that.shim = sugWrap.appendChild(DOC.createElement("iframe")); + shim.src = "about:blank"; + addClass(shim, o.classNameShim); + shim.frameBorder = 0; + shim.scrolling = "no"; + that.content = sugWrap.appendChild(sugWrap.cloneNode(null)); + } else { + that.content = sugWrap; + } + addClass(sugWrap, o.classNameWrap); + + //set the input's prentNode's position if "locAbs" is true and it's "position" isn't "absolute" + !o.locAbs && getStyle(wrap, "position") === "static" && (wrap.style.position = "relative"); + + wrap.appendChild(sugWrap); +} + +//显示 +_.show = function() { + this.sugWrap.style.display = ""; + + //that.isHide = false; + //注册onShow + this.o.onShow && this.o.onShow.call(this); +} + +//隐藏 +//hide sug layer, 0||null ==> reset and !clear, 1 ==> clear and reset, 2 ==> !clear and !reset +_.hide = function(type) { + var that = this; + that.sugWrap.style.display = "none"; + + //updata that.q,or (a——andiod) after submit,input a,can't triggers sug + that.q = that.el.value; + + if(type != 2) { + that.s = NULL; + that.i = -1; + } + + type == 1 && that.fill(); + + //注册onHide + that.o.onHide && that.o.onHide.call(that); +} + +_.holdFocus = function(el, e) { + if(e.preventDefault) { + e.preventDefault(); + } else { + el.onbeforedeactivate = function() { + WIN.event.returnValue = false; + el.onbeforedeactivate = null; + } + } +} + +//inputTimer, 1||true ==> start, 0||false||null ==> stop +_.inputTimer = function(n) { + + var that = this, + el = that.el, + t = that.t, + value; + + //start + if(n) { + + //增加一个启动监控的条件,必须实例拥有url,方便切换时可能遇到无sug的搜索 + if(t || (!that.o.autoCompleteData && !that.o.url)) return; + + that.t = setInterval(function() { + value = el.value; + + //input值为空直接隐藏不触发更新 + if(!value.trim()) { + that.hide(1); + + that.q = value; + return; + } + + //输入值与上次更新值不同时触发更新(包含空格) + if(value !== that.q) { + that.updata(value); + } else { + that.val = value; // 确保SUG请求已缓存(不发送SUG请求)时也可以获得用户实时输入值 + } + + + /*FF监控bug + //NUL ==> hide + if(!value.trim()) { + that.hide(1); + + + //当输入 ==> 清空 然后切换tab时会出现bug,临时修复 + clearInterval(that.t); + that.t = 0; + + //记录当前值 + that.q = value; + return; + } + //更新触发显示逻辑! + clearInterval(that.t); + that.t = 0; + that.updata(value); + */ + }, that.o.delay); + } + + //stop + else { + t && clearInterval(that.t); + that.t = 0; + } +} + +//get index form list +_.getIndex = function(el, list) { + var l = list.length; + while(l--) if(list[l] === el) return l; + return -1; +} + +//get eligible el form wrap +_.matchEl = function(el, wrap, fun) { + while(el !== wrap) { + if(fun.call(el)) return el; + el = el.parentNode + } + return NULL; +} + +_.submitForm = function() { + var form = this.el.form; + if(form.onsubmit) { + form.onsubmit(); + } else { + + this.o.onCheckForm && this.o.onCheckForm(form); + form.submit(); + } + //this.q = this.el.value; +} + +//move by keydown +_.keydownMove = function(k) { + + var that = this, + ol = that.sugWrap.getElementsByTagName("OL")[0]; + + //console.log(that.i) + if(!ol) return; + if(that.isHide) { + that.isHide = false; + return; + } + + var list = ol.getElementsByTagName("LI"), + l = list.length, + el = that.el, + s = that.s, + o = that.o, + classNameSelect = o.classNameSelect, + q = that.q || "", + li; + if(s) { + removeClass(s, classNameSelect); + + //updata index + that.i = that.getIndex(s, list); + + //置空当前选中项 + that.s = NULL; + } + + //fix + that.i === undef && (that.index = -1); + that.i !== -1 && removeClass(list[that.i], classNameSelect); + + //根据键值判断是向上/下选择 + if(k === 40) { + that.i++; + } else if(k === 38){ + that.i--; + } + + //UP when init + if(that.i === -2) { + that.i = l - 1; + } + + //above + else if(that.i === l){ + el.value = q; + that.i = -1; + } + else if(that.i === -1) { + el.value = q; + } + + if(that.i !== -1 && that.i !== l) { + + li = list[that.i]; + addClass(li, classNameSelect); + !o.autoCompleteData && (el.value = li.getAttribute("q").replace(htmlReg, "")); + that.s = li; + } +} + +_.inputHandle = function() { + var that = this, + o = that.o, + el = that.el, + form = el.form, + sugWrap = that.sugWrap, + classNameSelect = o.classNameSelect, + autoCompleteData = o.autoCompleteData, + pressCount = 0, + k; + + // 解决keydown弹窗在firefox、IE下阻止的问题 + el.onkeypress = function(e) { + e = e || window.event; + k = e.keyCode; + + var targt = that.s? that.s.getElementsByTagName("a")[0] : null, + url = ""; + + if(k === 13 && targt) { + url = targt.getAttribute("href"); + that.el.blur(); + + window.open(url); + + if(e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + } + } + + el.onkeydown = function(e) { + e = e || window.event; + k = e.keyCode; + + + // ESC key,hide and reset input value + if(k === 27) { + that.hide(2); + //排除掉空数据,没想到更好的方法 + sugWrap.getElementsByTagName("ol")[0] && (that.isHide = true); + !autoCompleteData && (el.value = that.q); + that.inputTimer(); + + //IE8也会清空,为保证策略一致,全屏蔽 + //fix IE6 ESC clear input'value + //if(isIE6) return false; + + return false; + } + + // direction key(PgUp, PgDn, End, Home, Left, Up, Right, Down) + else if(k > 32 && k < 41) { + //change input's focus when value is null because maybe autoFocus + //bug: chrome按两次end才能滚动 + if (!el.value && sugWrap.style.display === "none") { + el.blur(); + } + + //DOWN/UP key + else if(k === 40 || k === 38) { + if(!o.pressDelay || pressCount++ === 0) { + //if isHide just show + that.isHide && that.show(); + that.keydownMove(k); + that.inputTimer(); + } else if(pressCount === o.pressDelay) { + pressCount = 0; + } + + //stop nonIE default event,like:chrome press UP key will set cursor position to the first + !isIE && e.preventDefault(); + } + } + + // ENTER key + else if(k === 13) { + that.inputTimer(); + + //保持隐藏策略 + that.hide(2); + + //onSelect + o.onSelect && o.onSelect.call(that); + + // 搜索直达统计 + if(that.s && hasClass(that.s, "sug-url")) { + o.onSearchDirect && o.onSearchDirect(that.s, el.value, that.val); + } + + //增加autoCompleteData模式 + if(autoCompleteData) { + /* + var list = sugWrap.getElementsByTagName("OL")[0].getElementsByTagName("LI"); + el.value = list[that.index].getAttribute("q"); + return false; + */ + + el.value = that.s ? that.s.getAttribute("q").replace(htmlReg, "") : ""; + + //注册onFill + that.o.onFill && that.o.onFill.call(that); + return false; + } + + //noSubmit + if(o.noSubmit) return false; + } + + //block some comb key,like (Alt, Ctrl, Tab) + else if(k > 8 && k < 19) { + + //chrome press ALT will lose focus + //排除tab键,允许脱离焦点 + k !==9 &&that.holdFocus(el, e); + return; + } + + //other keys + else { + that.inputTimer(1); + } + } + + on(el, "keyup", function() { + //reset pressCount + pressCount = 0; + }) + + on(el, "blur", function() { + that.hide(2); + + //排除掉空数据,没想到更好的方法 + sugWrap.getElementsByTagName("ol")[0] && (that.isHide = true); + that.inputTimer(); + }); + + bind(sugWrap, "mouseover", function() { + + //match the "li" tag + var li = that.matchEl(this, sugWrap, function() { + return this.tagName === "LI"; + }); + + if(!li) return; + that.s && removeClass(that.s, classNameSelect); + addClass(li, classNameSelect); + that.s = li; + }); + + bind(sugWrap, "mouseout", function() { + var li = that.matchEl(this, sugWrap, function() { + return this.tagName === "LI"; + }); + this.tagName === "LI" && this !== li && removeClass(li, classNameSelect) + }); + + on(sugWrap, "mousedown", function(e) { + that.inputTimer(); + + //hold input's focus + that.holdFocus(el, e); + }); + + bind(sugWrap, "mouseup", function(e) { + + var ol = sugWrap.getElementsByTagName("OL")[0], + li; + //val = el.value; // search input current value + + //block the right mouse button + if(!ol || e.which && e.which > 2 || e.button && (e.button !== 1 && e.button !== 4)) return; + + hasClass(this, o.classNameClose) && that.hide(); + + //match the "li" tag + li = that.matchEl(this, sugWrap, function() { + return this.tagName === "LI"; + }); + + if(!li) return; + + el.value = li.getAttribute("q").replace(htmlReg, ""); + that.hide(); + that.inputTimer(); + o.onSelect && o.onSelect.call(that); + + + //updata index + that.i = that.getIndex(li, ol.getElementsByTagName("LI")); + + //注册onFill + that.o.onFill && that.o.onFill.call(that); + + // 当点击元素是直达网址时表单不提交,以链接形式打开网站,同时发送统计数据 + if(hasClass(li, "sug-url")) { + o.onSearchDirect && o.onSearchDirect(li, el.value, that.val); + return true; + + } else { + o.onMouseSelect && o.onMouseSelect.call(that); + } + + !o.autoCompleteData && !o.noSubmit && that.submitForm(); + }); +} + + +//fill content(NUL arguments ==> clear) +_.fill = function(data, q) { + var that = this, + content = that.content; + + if(arguments.length < 2) { + content.innerHTML = ""; + return; + } + + var o = that.o, + templ = o.templ, + classNameQueryNull = o.classNameQueryNull, + classNameQuery = o.classNameQuery; + + this.content.innerHTML = templ ? templ.call(that, data, q) : function() { + + data = data[o.callbackDataKey || o.callbackDataNum] || []; + + var i = 0, + l = Math.min(data.length, o.n), + ret = [], + li; + + //与baidu策略保持一致 + q = q.trim(); + for(; i -1 ? "" : " class=" + classNameQueryNull) + '>' + (classNameQuery ? li.replace(q, '' + q + '') : li) + ''); + } + return '
                                      ' + ret.join("") + '
                                    '; + }(); +} + +_.updata = function(q) { + var that = this, + data = that.o.autoCompleteData || that.cache[q]; + + that.q = q; + that.i = -1; + that.isHide = false; //updata isHide state + + //1.from autoCompleteData or cache + if(data !== undef) { + + //fix autoComplete模式下可能data为空数组,此时不显示提示层 + if(that.o.autoCompleteData && !data.length) return; + + that.fill(data, q); + that.show(); + return; + } + + //2.request + that.request(q); +} + +//数据请求方法 +_.request = function(q) { + + var that = this, + o = that.o, + callbackFn = o.callbackFn, + callbackName = o.callbackName, + onSucess = o.onSucess, + onError = o.onError, + onRequest = o.onRequest, + callback = that.callback, + + encod = encodeURIComponent, + + url = o.url, + customUrl = o.customUrl, + para = o.requestParas, + ret = [], + k, li; + + //callback by callbackFn(switch the that'ref) + //if(callbackFn) (li = namespace(callbackFn)).repeat && (li.context = that); + if(callbackFn) { + var context = namespace(callbackFn), + lastFnName = callbackFn.split(".").pop(); + + //重新注册callback,有可能callbackFn被动态改变了 + context[lastFnName] = that.callback; + if(context[lastFnName].repeat) { + context[lastFnName].context = that; + } + } + + //callback by onload state + else if(callbackName) { + li = that.script; + + //IE + if(li.readyState){ + li.onreadystatechange = function(){ + if(li.readyState == "loaded" || li.readyState == "complete"){ + li.onreadystatechange = NULL; + + onSucess && onSucess.call(that); + callback(callbackName); + } + }; + } + + //Others + else { + li.onload = function(){ + onSucess && onSucess.call(that); + callback(callbackName); + }; + } + } + + onError && (that.script.onerror = function(){ + onError.call(that); + }); + + //creat new script or replace(nonIE and IE9 will not send request when change url) + if(!that.script || !isIE || isIE9) { + var ref = DOC.getElementsByTagName('script')[0]; + + li = DOC.createElement("script"); + li.type = "text/javascript"; + li.async = true; + + if(that.script) { + ref.parentNode.replaceChild(li, that.script); + } + + else { + ref.parentNode.insertBefore(li, ref); + } + that.script = li; + } + + //may modify this.o.requestParas or this.o.url before request + onRequest && onRequest.call(this); + + para = function() { + for(k in para) ((li = para[k]) !== undef) && ret.push(encod(k) + '=' + encod(para[k])); + + //增加时间戳 + o.t && ret.push(encod("t") + '=' + encod(+new Date)); + return ret.join("&"); + }(); + + //charset可能动态设置 + //o.charset && (that.script.charset = o.charset); + that.script.charset = o.charset ? o.charset : ""; + that.script.src = customUrl && customUrl.call(that, para) || url + '?' + o.requestQuery + '=' + encodeURIComponent(q) + '&' + para; + + that.val = q; // 获取请求SUG的词 +} + +//copy to G.sug +WIN.Gl || (WIN.Gl = {}), Gl.suggest = Gl.sug = _sug; + +})(window, document); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/img/yahoo_search_page.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/img/yahoo_search_page.png new file mode 100755 index 000000000..f598b371d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/img/yahoo_search_page.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/ltr/ltr.css new file mode 100755 index 000000000..95fcf5e80 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/ltr/ltr.css @@ -0,0 +1,541 @@ +body, +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +code, +form, +fieldset, +legend, +input, +button, +textarea, +p, +figure, +blockquote, +th, +td{ margin:0; padding:0;} + +fieldset, img, iframe{ border:0;} + +address, caption, cite, code, dfn, em, th, var, i{font-style:normal;font-weight:normal;} + +ul, +li, +ol{ list-style:none;} + +caption, +th{text-align:left;} + +h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; + background: #fff; +} + +body { + -webkit-text-size-adjust: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -o-tap-highlight-color: rgba(0,0,0,0); + -moz-tap-highlight-color: rgba(0,0,0,0); + + vertical-align: baseline; + background-color: transparent; + + font-family: Arial,sans-serif; + font-size: small; + + _zoom: expression(function(el){ + document.execCommand('BackgroundImageCache', false, true); + el.style.zoom = "1"; + }(this)); +} + +.cf{ zoom: 1;} +.cf:before, .cf:after{ content: ''; display: table;} +.cf:after { clear: both;} + +.fl, +.fr{ display:inline; /*fix: IE6 border*/} +.fl{ float:left !important;} +.fr{ float:right !important;} + +.l-w{ width: 960px; margin: 0 auto;} +.l-l{ width: 590px; float: left; padding-left: 20px;} +.l-r{ overflow: hidden; zoom: 1; padding-left: 45px;} +.l-hd .l-l{ width: 695px; position: relative;} +.l-hd .l-r{ padding: 0;} + +.l-hd{ /*padding: 20px 10px;*/ height: 105px; /*height: 82px;*/ background: #f9f9f9; border-bottom: 1px solid #e7e7e7; border-top: 5px solid #cfdbef; margin-bottom: 10px;} + +a{ text-decoration: none;} +a:hover{ text-decoration: underline;} +a:visited{ color: #4c2472;} +a:link{ color: #0e1bbb;} +/*a:link { color: #0000de;}*/ + +h3{ font-size: 123%; font-weight: normal;} +h3 a{ text-decoration: underline;} +h3 a:hover { color: #cc3434;} + + + +/*提示层外框*/ +.sug-wrap { + position:absolute; + top:26px; + left:-1px; + border:1px solid #aaa; + background:#fff; + width:438px; + color:#000; + z-index:999; + line-height: 1; +} + +/*ie6 shim*/ +.sug-shim{ position:absolute; top:26px; left:-1px; z-index:-1; filter:alpha(opacity="0"); + width:438px; + height:532px; +} + +/*列表外框*/ +.sug-wrap ol{ cursor: pointer;} + +/*列表项*/ +.sug-wrap li{ padding: 4px 6px 5px;} + +/*选中样式*/ +.sug-wrap .sug-select{ background:#f0f0f0;} + +/*底部*/ +.sug-wrap .bot{ position:relative; height:19px; line-height:19px; font-weight:normal; border-top:1px solid #666;} + +/*高亮查询词*/ +.sug-wrap .sug-query{ font-weight:bold;} + +/*提示不能匹配查询词*/ +.sug-wrap .sug-querynull{ font-weight:normal;} + +.sug-bot{ height: 17px; line-height: 17px; padding-right: 10px; background: #f7f7f7;} +.sug-switch{ font-size: 85%;} +.sug-switch a{ font-weight: bold; text-decoration: none; color: #000; cursor: default;} +a.sug-switch_cur{ font-weight: normal; color: #0000de; cursor: pointer;} + +.sug-bot .s-arr{ top: 18px; left: -1px; background-color: #999; border: none; background-position: 0 -239px; width: 42px; height: 11px;} +.sug-wrap ol p{ padding: 5px; color: #999; cursor: default;} + +/*sprite*/ +.s-btn, +.logo a, +.r-tip i, +/*.s-arr{ background-image: url(/img/yahoo_search_page.png);}*/ +a.s-btn_close, +.s-arr{ background-image: url(../img/yahoo_search_page.png);} + +.logo, .logo a{ overflow: hidden;} +.logo a{ display: inline-block;} + +.logo-hao123{ position: absolute; top: 31px; left: 20px;} +.logo-yahoo{ margin: 38px 0 0 0;} +.logo-hao123 a{ background-position: 0px 0px; width: 116px; height: 29px;} +.logo-yahoo a{ background-position: 0px -31px; width: 51px; height: 24px;} + +/*search*/ +.s{ position: relative; top: -5px;} +.l-hd .s{ margin-left: 130px;} +.s-hd{ } +.s-hd li{ float: left;} +.s-hd li a{ display: block; padding: 5px 8px; font-size: small; color: #333; border-top: 5px solid #cfdbef;} +.s-hd li a:hover{ background: #eee;} +.s-hd li.cur a{ color: #B43C3E; text-decoration: none; background: none; border-top-color: #5f87cb; cursor: default;} +.s-bd{ margin-top: 10px; /*margin-top: 29px;*/} +.s-ipt{ border: 1px solid #999; border-top: 1px solid #7c7c7c; display: inline-block; margin-right: 5px; z-index: 999; position: relative; background: #fff;} +.s-ipt input{ width: 410px; font-size: 108%; height: 24px; padding: 2px 24px 0 4px; background-color: #fff; vertical-align: bottom; line-height: 1.3; border: none; top: 0; left: 0; float: left; position: relative;} +.s-ipt input::-ms-clear{ + display: none; +} +.s-btn{ display: inline-block; border: 0px solid #fff; background-color: #4070ff; background-position: 25px -84px;} +.s-btn button{ border: none; background: none; width: 110px; height: 28px; line-height: 30px; letter-spacing: 0.1em; padding: 0 0 0 16px; font-size: 108%; font-weight: bold; color: #fff; cursor: pointer; +} +.s-btn:hover{ background-color: #1155ee;} +.s-arr{ border: 1px solid #f9f9f9; border-top: none; background-position: 15px -119px; background-repeat: no-repeat; display: inline-block; width: 38px; height: 10px; cursor: pointer; position: relative; top: -1px; +} +.s-arr:hover{ background-color: #f0f0f0; border-color: #999;} +.s-tt{ color: #666; font-size: 12px; margin-top: 5px; /*margin-top: -1px;*/} +.s-tt em{ font-weight: bold;} + +.s-btn_close{ + position: absolute; + display: none; + cursor: pointer; + /*display: inline-block;*/ + width: 16px; height: 16px; top: 5px; right: 5px; background-position: 0 -57px; +} + +.s-btn_close:hover{ + background-position: -20px -57px; +} + +.s-btn_close__bot{ + top: 6px; + /*right: 155px;*/ +} + +.s-ipt_tip{ + display: none; + position: absolute; + top: 4px; + left: 5px; + color: #999; +} + +/*result*/ +.r-wrap{ overflow: hidden;} +.r-li{ + margin: 0 20px 20px 0; + + max-width: none; + overflow: hidden; + word-break: break-all; + word-wrap: break-word; + line-height: 1.4; +} +.r-li b{ font-weight: bold;} +.r-li_hd{ margin-bottom: 5px;} +.r-li_bd{ } +.r-li_ft{ margin-top: 3px;} + +.r-li_u{ color: #008000; word-break: normal;} +.r-li_u abbr{ float: left; max-width: 460px; overflow: hidden; height: 18px; margin-right: 5px; text-decoration: none; border-width: 0;} +.r-li_a a{ color: #686ccd;} + +.r-list{ + -moz-transition: opacity 0.5s ease-in; + -webkit-transition: opacity 0.5s ease-in; + -o-transition: opacity 0.5s ease-in; + transition: opacity 0.5s ease-in; + padding-top: 5px; +} +.r-padding{ + /*padding*/ + min-height: 500px; height: auto!important; height: 500px; +} +.r-list_ad{ position: relative; display: none; /*padding: 10px 0;*/} + +.r-list_ad .r-li_bd{ font-size: 108%;} +.r-list_ad .r-list_more{ position: absolute; right: 10px;display: none;} +.r-list_ad .r-list_ad_title{ display:none; margin-bottom: 15px; } +.r-list_ad .r-list_adtitle_link{ color: #666; } + +.r-list_ad_north{ border-bottom: 1px solid #ccc; margin-bottom: 10px;} +.r-list_ad_south{ border-top: 1px solid #ccc; padding-top: 10px; margin-top: -10px;} +.r-list_ad_north .r-li{ margin-bottom: 10px;} +.r-list_ad_east{ padding-top: 20px;} +.r-pos-east .r-list_ad_east{padding-top: 5px;} +.r-list_ad_east .r-list_more{ margin-bottom: 10px; position: static;} + +.r-list_more{} +.r-list_more a{ font-size: 92%; color: #666;} +.r-li_host{ color: #008000; padding-bottom: 5px;} +.r-li_quick{ color: #999; font-size: small;} +.r-li_quick a:hover { color: #cc3434;} + +/*.r-list_ad .r-li{ margin: 0 20px 20px 0;}*/ + +.r-tip{ display: none;} +.r-tip i{ display: inline-block; overflow: hidden; width: 13px; height: 13px; background-position: -72px -58px; position: relative; top: 2px;} +.r-error i{ background-position: -42px -58px;} +.r-abort i{ background-position: -56px -58px;} +.r-loading .r-list{ opacity: 0;} +.r-loading .r-tip{ display: block;} +.r-error .r-tip{ display: block;} +.r-abort .r-tip{ display: block;} + +/*.r-loaded .r-list{ display: block;} +.r-loaded .r-tip{ display: none;}*/ + +.r-pn{ white-space: nowrap; padding: 15px 0 25px;} +.r-pn li{ float: left; line-height: 30px;} +.r-pn a{display: inline-block; height: 25px; line-height: 25px; padding: 0 .5em; margin: 2px; border: 1px solid #ddd; zoom: 1; background: #fff; font-size: 123%;} +.r-pn a:hover{ background: #039; border-color: #00d; color: #fff;} +a.r-pn_cur, a.r-pn_cur:hover{ border-color: #ddd; background: #eee; color: #333; text-decoration: none; cursor: default; font-weight: bold;} + + +.ad-box{} +.ad-quick{} +.r-list_quick{ padding-right: 20px;} +.r-list_quick h3{ font-size: 14px;} +.r-list_quick_t{ margin: 10px 0;} +.r-list_quick_t a{ font-size: 12px; color: #666;} + +.l-ft{ text-align: center;} +.s-wrap{ background: #f9f9f9; border-top: 1px solid #e7e7e7; border-bottom: 1px solid #e7e7e7; padding: 2px 0 13px 2px;} + +.about-link{ display: inline-block; margin-top: 20px; color: #666;} +.about-link li{ display: inline;} +.about-link a{ color: #0e1bbb;} +.about-des{ margin: 10px 0; line-height:1.3; color: #999; display: block;} +.about-about{} + +/***global***/ +.c-ept {display: none;} +.ept-srch .c-ept {display: block;color: #5A5A5A;font-size: 14px;padding-left: 0;width: 640px;} +.ept-srch .c-rsl {display: none;} +.ept-srch .c-main .l-r {margin-top: 44px;padding-left: 20px;} + +/*result*/ +.c-ept .ept-result {min-height: 780px;margin-bottom: 77px;padding-top: 6px;} +.c-ept .ept-tip {display: none;text-align: center;margin-top: 60px;line-height: 40px;} + +.ept-btn,.ept-ctrl,.ept-result {border: 1px solid #E3E5E6;} +.ept-btn,.ept-ctrl {border-bottom-width: 0;} +.ept-ctrl,.ept-result {border-top-width: 0;} + +/*title*/ +.ept-tle {height: 44px;line-height: 44px;font-weight: bold;font-size: 16px;} +.ept-tle img {vertical-align: middle;margin-right: 8px;margin-top: -3px;width: 34px;height: 21px;} +.ept-tle a {color: #5A5A5A; display: inline-block;} +.ept-tle a:hover {text-decoration: none;} + +/*tab*/ +.ept-btn {padding: 1px 1px 14px;overflow: hidden;} +.ept-btn li {float: left;height: 32px;line-height: 32px;border: 1px solid #EDEFF0;border-right-width: 0;border-top-width: 0;text-align: center;width: 158px;cursor: pointer;background: #F5F7F7;background-image: -webkit-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -ms-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -o-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -moz-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);} +.ept-btn li:first-child {border-left-color: #ffffff;} +.ept-btn li:hover {font-weight: bold;} +.ept-btn .cur {font-weight: bold; color: #00B075;cursor: default;background: #FEFEFE;background-image: -webkit-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -ms-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -o-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -moz-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);border-color: #fff;} + +/*control*/ +.ept-ctrl,.ept-result {text-align: center;} +.ept-ctrl .ctr-outer,.ept-result .ept-res {margin: 0 auto;width: 618px;} +.ept-ctrl .ctr-outer {border-top: 1px solid #ECECEC;padding-top: 1px;border-bottom: 1px solid #ECECEC;} +.ept-ctrl .ctr-inner {height: 42px;background-color: #F6F6F6;position: relative;} +.ept-ctrl .ctr-btn {position: absolute;display: block;top: 6px;height: 28px;line-height: 28px;width: 118px;right: 31px;border: 1px solid #D8D8D8;background-color: #FFFFFF;color: #6D6D6D;cursor: pointer;overflow: hidden;} +.ept-ctrl .ctr-btn:hover {border-color: #C3C3C3;font-weight: bold;} +.ept-ctrl .i-btn {position: absolute;font-weight: bold;color: #00B075;right: 20px;font-size: 16px;} +.ept-ctrl .i-pre {left: 20px;right: auto;} +.ept-ctrl .ctr-diable {border-color: #E7E7E7;font-weight: normal;background-color: #FDFDFD;color: #E0E0E0;cursor: default;} +.ept-ctrl .ctr-diable .i-btn {color: #ECECEC;} +.ept-ctrl .ctr-diable:hover {border-color: #E7E7E7;font-weight: normal;} +.ept-ctrl .ctr-prev {left: 31px;right: auto;} +.ept-ctrl .ctr-time {height: 42px;line-height: 44px;overflow: hidden;} + +/*result*/ +.ept-result .ept-res {text-align: left;margin-bottom: -1px;} +.ept-res li {height: 32px;line-height: 32px;padding: 12px 0;font-size: 15px;font-weight: bold;border-bottom: 1px dotted #E3E5E6;position: relative;overflow: hidden;} +.ept-res .i-rank {position: absolute;width: 26px;height: 26px;line-height: 26px;top: 14px;left: 10px;text-align: center;background-color: #C5C4C3;color: #ffffff;font-size: 16px;overflow: hidden;} +.ept-res .i-rank-1 {background-color: #FD0606;} +.ept-res .i-rank-2 {background-color: #FF7E00;} +.ept-res .i-rank-3 {background-color: #FFD200;} +.ept-res a {display: block;padding-left: 56px;color: #5A5A5A;font-size: 16px;white-space: nowrap;} + +/*no search word && no ajax data*/ +.no-data .ept-res {display: none;} +.no-data .ept-tip {display: block;} + + +/*amazon ads*/ +.r-list_ama { + border: 1px solid #ccc; + margin: 12px 3px 12px 2px; + padding-left: 10px; + padding-right: 10px; + display: none; + opacity: 0; +} +.amz-show { + display: block; + opacity: 1; +} +.r-list_ama .amz-li { + position: relative; +} +.r-list_ama .amz-li-noimg .li-img { + display: none !important; +} +.r-list_ama .li-img { + width: 77px; + height: 93px; + margin: 5px 6px; + overflow: hidden; + text-align: center; + float: left; +} +.r-list_ama .li-content { + padding-right: 2px; + position: absolute; + top: 26px; + left: 94px; + z-index: 1; +} +.r-list_ama .amz-li-noimg .li-content { + left: 8px; +} +.r-list_ama .amz-li h3 { + margin-top: 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-indent: 6px; +} +.r-list_ama .li-img img { + border: 1px solid #636363; + /*max-height: 75px; + max-width: 75px;*/ +} +.r-list_ama .li-img span { + line-height: 16px; + font-size: 12px; + color: #001AFC; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + display: block; + font-weight: bold; +} +.r-list_ama .amz-li a { + display: block; + overflow: hidden; + margin-bottom: 10px; + margin-top: 5px; + min-height: 100px; + position: relative; + z-index: 4; +} +.r-list_ama .amz-li:hover { + background-color: #F2F2F2; +} +.r-list_ama .amz-li p { + font-size: 13px; +} +.r-list_ama .dis-pri span { + color: #676767; + /*font-weight: bold;*/ +} +.r-list_ama .ori-pri span { + color: #CC0400; + /*font-weight: bold;*/ +} + + +/*mutiple line words*/ +.ellipsis { + overflow: hidden; + height: 72px; + line-height: 18px; +} +.ellipsis:before { + content: ""; + float: left; + width: 5px; + height: 54px; +} +.ellipsis > *:first-child { + float: right; + width: 100%; + margin-left: -5px; +} +.ellipsis:after { + content: "..."; + box-sizing: content-box; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + float: right; + position: relative; + height: 24px; + line-height: 24px; + top: -2px; + left: 100%; + width: 3em; + margin-left: -3em; + padding-right: 5px; + text-align: right; + /*background: linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);*/ +} + +/*r-word*/ +#wordWrap{ + font-size: 106%; + padding-bottom: 15px; + border-bottom: 1px solid #F7F7F7; + margin-bottom: 8px; + display: none; +} +#wordWrap .word-title{ + display: inline-block; + color: #666; +} +#resultWord{ + display: inline-block; + width: 528px; + overflow: hidden; + height: 14px; +} +.r-li_w{ + display: inline-block; + margin: 0 0 20px 15px; +} +.r-li_wa{ + text-decoration: underline; +} +.r-li_wa:hover{ + color: #cc3434; +} +.l-l-left{ + margin-left: -128px; +} +/*demo*/ +/*.r-list_ama .li-img { +position: absolute; +top: 0; +left: 0; +width: 75px; +height: 92px; +border: 1px solid #636363; +background-color: #ffffff; +overflow: hidden; +text-align: center; +display: none; +display: block; +} +.r-list_ama .amz-li { +float: right; +padding-right: 20px; +width: 182px; +padding-left: 86px; +position: relative; +padding-bottom: 10px; +} +.r-list_ama .amz-li:first-child { +float: left; +margin-right: 0; +} +.r-list_ama .li-img { +position: absolute; +top: 0; +left: 0; +width: 75px; +height: 92px; +border: 1px solid #636363; +background-color: #ffffff; +overflow: hidden; +text-align: center; +display: none; +display: block; +} +.r-list_ama .li-img img { + max-height: 75px; + max-width: 75px; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/yahoo-search-partner-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/yahoo-search-partner-async.js new file mode 100755 index 000000000..95229b873 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/yahoo-search-partner-async.js @@ -0,0 +1,1700 @@ +/*var ClickMonkey = function() { + if(!this.pageId) return { + log: function() {} + }; + var e = "http://nsclick.baidu.com/h.gif?pid=113&v=" + pageId + "&hao123_baiduid=" + unescape((document.cookie.match("BAIDUID"+'=(.+?);')||0)[1]||'').split(":")[0], + t = "bd_clickmonkey", + n = function(n) { + var r = (new Date).getTime(), + i = window[t + r] = new Image, + s = ""; + for(var o in n) s += "&" + o + "=" + n[o]; + i.src = e + "&r=" + r + s, i.onload = i.onerror = function() { + i = null + } + }, r = "", + i = function(e, t) { + t = t || [], r = e.monkey || e.getAttribute("monkey") || r, e.parentNode && e.parentNode.tagName.toUpperCase() != "BODY" && (t = i(e.parentNode, t)); + if(e.previousSibling) { + var n = 1, + s = e.previousSibling; + do s.nodeType == 1 && s.nodeName == e.nodeName && n++, s = s.previousSibling; while (s) + } + return e.nodeType == 1 && t.push(e.nodeName.toLowerCase() + (n > 1 ? n : "")), t + }, s = function(e, t, n, r) { + if(e.addEventListener) return e.addEventListener(t, n, r), !0; + if(e.attachEvent) { + var i = e.attachEvent("on" + t, n); + return i + } + }, o = function(e) { + return encodeURIComponent(e) + }; + s(document.body, "mousedown", function(e) { + var e = window.event || e, + t = e.srcElement || e.target; + if(t.tagName.toUpperCase() != "A") + if(t.parentNode.tagName.toUpperCase() == "A") t = t.parentNode; + else if((t.tagName.toUpperCase() != "INPUT" || t.type.toLowerCase() != "checkbox" && t.type.toLowerCase() != "radio") && t.tagName.toUpperCase() != "AREA") return; + r = ""; + var s = i(t).join("-"), + u = { + xp: s + }, a = t.getAttribute("href", 2); + a && !/^javascript|#/.test(a) ? u.objurl = o(a) : u.objurl = "none", t.innerHTML && !/^\s*\s*$/i.test(t.innerHTML) ? u.title = o(t.innerHTML) : u.title = "none", r && (u.monkey = r), n(u) + }); + var u = function(e, t, r) { + var i = { + xp: "_" + e + "_" + }; + t ? i.objurl = o(t) : i.objurl = "none", r ? i.title = o(r) : i.title = "none", n(i) + }; + return { + log: u + } +}();*/ + +window.G = window.G || function(id) { + return id + "" === id ? document.getElementById(id) : id; +}; + +"".trim || (String.prototype.trim = function() { + var str = this.replace(/^\s\s*/, ""), + ws = /\s/, + i = str.length; + while (ws.test(str.charAt(--i))); + return str.slice(0, i + 1); +}); + +"".replaceTpl || (String.prototype.replaceTpl = function(o) { + return this.replace(/#\{([^}]*)\}/mg, function(a, b) { + b = b.trim(); + return a = (o[b] && o[b].data ? o[b].data : o[b]) || ""; + }); +}); + +!function(types, li) { + types = types.split("|"); + while(li = types.shift()) !function(li){ + G["is" + li] = function(obj) { + return li === {}.toString.call(obj).replace(/^\[object (\w+)\]$/, "$1"); + } + }(li); +}("String|Array|Object|Number"); + +G.urlEscape = function(s) { + return s.replace(/[\(\)\.\*\{\}\|\[\]\^\\\`\!]/g, function(li){ + return "%" + { + "(" : "28" + , ")" : "29" + , "." : "2E" + , "*" : "2A" + , "{" : "7B" + , "}" : "7D" + , "|" : "7C" + , "[" : "5B" + , "]" : "5D" + , "^" : "5E" + , "\\" : "5C" + , "`" : "60" + , "!" : "21" + }[li] + }); +} + +G.urlUnEscape = function(s) { + + // decodeURIComponent("%") ==> error + s = s.replace(/\+/g, "%20"); + + try{ + s = decodeURIComponent(s); + } + catch(e) {} + return s; +} + +G.isElement = function(obj) { + return window.HTMLElement ? obj instanceof HTMLElement : G.isObject(obj) && G.isString(obj.tagName) && obj.nodeType > 0; +} + +G.each = function(obj, iterator, context) { + var i = 0, + li; + if(G.isArray(obj)) { + for(li = obj.length; i < li; i++) if(iterator.call(context, obj[i], i, obj) === false) break; + } + else if(G.isObject(obj)) { + for(li in obj) { + if(obj.hasOwnProperty(li)) if(iterator.call(context, obj[li], li, obj) === false) break; + } + } +} + +G.delegate = function(el, type, fn) { + el.addEventListener + ? el.addEventListener(type, function(e) { + return fn.call(e.target, e); + }, false) + : el.attachEvent("on" + type, function(e) { + e = window.event; + return fn.call(e.srcElement, e); + }) +} + +G.addCls = function(el, className) { + var els = el.length ? el : [el], + fur = false, // can use classList + ele; + for (var i = 0, j = els.length; i < j; i++) { + ele = els[i]; + if (fur) { + ele.classList.add(className); + } else { + if (ele.classList && ele.classList.add) { + ele.classList.add(className); + fur = true; + } else { + ele.className += " " + className; + fur = false; + } + } + } +} + +G.rmvCls = function(el, className) { + var els = el.length ? el : [el], + fur = false, // can use classList + ele, + reg = new RegExp('(\\s|^)'+className+'(\\s|$)'); + for (var i = 0, j = els.length; i < j; i++) { + ele = els[i]; + if (fur) { + ele.classList.remove(className); + } else { + if (ele.classList && ele.classList.remove) { + ele.classList.remove(className); + fur = true; + } else { + ele.className = ele.className.replace(reg, ' '); + fur = false; + } + } + } +} +/*G.json = { + toString: "", + parse: "" +}*/ + +G.xml = { + parse: function(str) { + var xml = null; + if(window.DOMParser) { + xml = (new DOMParser).parseFromString(str, "text/xml"); + } + else if(window.ActiveXObject) { + try{ + xml = new ActiveXObject("Microsoft.XMLDOM"); + xml.async = false; + xml.loadXML(str); + } catch(e) {} + } + return xml; + }, + toJson: function(xml, json) { + json = json || {}; + if(!xml) return json; + if(G.isString(xml)) xml = G.xml.parse(xml); + if(!xml) return json; + + if(xml.attributes && xml.attributes.length) { + for(var attrN = -1, attrs = xml.attributes, attr; attr = attrs[++attrN];) { + json["@" + attr.name.trim()] = attr.value; + } + } + for(var i = -1 + , children = xml.childNodes + , nodeName, node, li; li = children[++i];) { + if(li.data) { + if(li.data.trim() !== "") json.data = li.data; + continue; + } + nodeName = li.nodeName; + node = {}; + if(!json[nodeName]) json[nodeName] = node; + else if(!json[nodeName].length) { + json[nodeName] = [node, json[nodeName]]; + } + else json[nodeName].push(node); + arguments.callee(li, node); + } + return json; + }, + escape: function(s){ + return s.replace(/[&<>'"]/g, function(li){ + return "&" + { + "&" : "amp" + , "<" : "lt" + , ">" : "gt" + , "'" : "#39" + , '"' : "quot" + }[li] + ";" + }) + } +} + +G.ajax = function(o) { + if(!o || !o.url) return false; + + var type = (o.type || "GET").toUpperCase(), + async = !(o.async === false), + cache = !(o.cache === false), + charset = o.charset || "utf-8", + httpHeader = o.httpHeader || {}, + contentType = o.contentType || "application/x-www-form-urlencoded", + wait = +o.wait, + before = o.before, + success = o.success, + error = o.error, + me = arguments.callee, + encode = encodeURIComponent, + undef, + data = o.data ? G.isString(o.data) ? o.data : function(d, ret) { + G.isElement(d) + ? G.each(d.elements, function(li, i) { + li.name && !li.disabled && ret.push(encode(li.name) + "=" + G.urlEscape(encode(li.value))); + }) + : G.each(d, function(li, k) { + li !== undef && ret.push(encode(k) + "=" + G.urlEscape(encode(li))); + }); + return ret.join("&"); + }(o.data, []) : "", + url = function(s) { + var d = "GET" === type ? data : "", + c = cache ? "" : "r" + +new Date + "=1", + b = s.indexOf("?") < 0 ? "?" : "&"; + return (s + b + d + ((d && c) ? "&" + c : c)).replace(/&$/, ""); + }(o.url), + xhr = (me.getXhr || function(_xhr) { + G.each([ + function() { return new ActiveXObject("Microsoft.XMLHTTP")}, + function() { return new ActiveXObject("Msxml2.XMLHTTP.3.0")}, + function() { return new ActiveXObject("Msxml2.XMLHTTP.6.0")}, + function() { return new XMLHttpRequest} + ], function(li) { + try{ + _xhr = (me.getXhr = li)(); + return false; + } catch (e) {} + }); + return _xhr; + })(), + fix = function() { + if(xhr) xhr.onreadystatechange = function() {}; + if(async) xhr = null; + }, + stateHandle = function() { + if(xhr && xhr.readyState == 4) { + timer && clearTimeout(timer); + try { + var s = xhr.status; + }catch (e) { + error && error.call(xhr); + return; + } + if((s >= 200 && s < 300) || s == 304 || s == 1223) success && success.call(xhr, xhr.responseText); + else if(error) error.call(xhr); + setTimeout(fix, 16); + } + }, + timer; + before && before.call(xhr); + xhr.open(type, url, async); + if(async) xhr.onreadystatechange = stateHandle; + httpHeader['X-Request-With'] = 'XMLHttpRequest'; + if("POST" === type) try{ + xhr.setRequestHeader("Content-Type", contentType + ";charset=" + charset); + G.each(httpHeader, function(li, key) { + key && xhr.setRequestHeader(key, li); + }); + } catch(e){} + if(wait) timer = setTimeout(function() { + fix(); + xhr && xhr.abort(); + error && error.call(xhr); + }, wait); + xhr.send("POST" === type ? data : null); + !async && stateHandle(); + return xhr; +} + +G.loadJs = function(path, callback) { + var doc = document + , readyState = "readyState" + , onreadystatechange = "onreadystatechange" + , readyState = "readyState" + , script = "script" + , pos = doc.getElementsByTagName(script)[0] + , loaded + , node + , li; + if(path + "" === path) path = [path]; + while(li = path.shift()) { + node = doc.createElement(script); + node.onload = node.onerror = node[onreadystatechange] = function() { + if(loaded || (node[readyState] && !(/^c|loade/.test(node[readyState])))) return; + node.onload = node.onerror = node[onreadystatechange] = null; + loaded = 1; + if(callback && callback.scop) { + callback.call(callback.scop); + } else { + callback && callback(); + } + }; + node.async = 1; + node.src = li; + pos.parentNode.insertBefore(node, pos); + } +} + +G.getQuery = function(query, url) { + return G.urlUnEscape((location.href.match(new RegExp("\\?.*" + query + "=([^&$#]*)")) || ["",""])[1]); +} + +G.time = function () { + var imgUrl = "/static/web/common/img/gut.gif", + rate = 1000, + i = 0, + isGet = false, //whether has got the server time + _date; + return { + getTime: function(callback) { + //add callback parameter for other modules to do their own business after obtaining the server time + //get the time difference to prevent the errors which caused by users changed the local time + //two ways to fix the bug: 1. setInterval 2. local time difference, the 2nd way takes precedence + + var render = function(date) { + date = (date = date.getResponseHeader("Date")) ? new Date(date) : new Date; + var startTime = new Date, //get time stamp of the xhr + diff = function() { + var n = new Date - startTime, //2. local time difference + _n = ++i * rate; //1. setInterval + + //calc in 1 minute + return Math.abs(n - _n) > 1000 * 60 ? _n : n; + }, + timer = setInterval(function() { + //render time with the time difference + (_date = new Date(date.getTime())).setMilliseconds(_date.getMilliseconds() + diff()); + //obligate interface to get the server time + conf.serverNow = _date; + }, rate); + + // get time immediately + (_date = new Date(date.getTime())).setMilliseconds(_date.getMilliseconds() + diff()); + conf.serverNow = _date; + isGet = true; // get time process is done + }, + + get = function() { + var xhr = G.ajax({ + url: imgUrl, + cache: false, + error: function() { + //if there has an error such as 404, we can also get the head + render(xhr); + callback && callback.call(callback.scop || {}, conf.serverNow); + }, + success: function() { + render(xhr); + callback && callback.call(callback.scop || {}, conf.serverNow); + } + }); + }; + + if (!isGet) { + get(); + } else { + callback && callback(); + } + + return _date ? _date : new Date; + } + } +}() + +G.fixNum = function(n) { + return n > 9 ? n : ('0' + n); +} + +G.fixDate = function(date) { + var fixN = G.fixNum; + return date.y + '-' + fixN(date.m) + '-' + fixN(date.d); +} + +G.fixDay = function(date, n, _con) { + var that = this, + da = new Date(date.getTime()); + + da.setTime(date.getTime() + n * 24 * 3600 * 1000); + return { + y: da.getFullYear(), + Y: _con.year, + m: da.getMonth() + 1, + M: _con.month, + d: da.getDate(), + D: _con.day, + W: da.getDay() || 7 + }; +} + +G.cookie = function(key, value, options) { + + // key and value given, set cookie... + if (arguments.length > 1 && (value === null || typeof value !== "object")) { + //options = jQuery.extend({}, options); + + if (value === null) { + options.expires = -1; + } + if (typeof options.expires === 'number') { + var days = options.expires, + t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? String(value) : encodeURIComponent(String(value)), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function(s) { + return s; + } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; +} + +/* +bugs: + +"1234xca" ==> Api error + + */ +App.conf.reqPn = +G.getQuery("pn", location.href) || 1; +App.conf.adMaps = { + North: G("ClickUrl_north") + , South: G("ClickUrl_south") + , East: G("ClickUrl_east") + , Amazon: G("ClickUrl_amazon") +} + +// query, "" ==> block +App.conf.reqParam.query = G.getQuery("query", location.href); +App.conf.reqParam.useragent = navigator.userAgent; +App.conf.reqAdParam.affilData = "ip=" + App.conf.reqParam.ip + "&ua=" + App.conf.reqParam.useragent; + +App.supportState = !!(window.history && window.history.pushState && window.history.replaceState && !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/)); + +App.cache = { + urlbase: location.href.split('?')[0] +} + +App.tip = { + timer: null + , el: G("resultTip") + , wrap: G("resultWrap") + , show: function(state) { + App.tip.hide(); + App.tip.timer = setTimeout(function() { + App.tip.el.innerHTML = ' ' + App.conf.txt[state]; + App.tip.wrap.className += " r-" + state; + }, 500); + } + , hide: function(timer) { + timer = timer || App.tip.timer; + timer && clearTimeout(timer); + App.tip.wrap.className = App.tip.wrap.className.replace(/ r-(loading|error|abort)/g, ""); + } +} + +App.amazonAds = { + conf: {}, + data: {}, + callF: null, + MAXNUM: 2, + logoTpl:'', + tpl: '
                                  • ' + + '#{brand}' + + '

                                    #{title}

                                    ' + + '

                                    #{discount}#{dis}' + + '#{price}#{pri}' + + '#{descrip}

                                  • ', + init: function(con, rand) { + G.rmvCls(App.conf.adMaps.Amazon, "amz-show"); + + var _self = App.amazonAds, + that = _self.conf; + + if (con.isHidden !== "0") return; + + that.reqParams = con.params; + that.minTotal = parseInt(con.min, 10) || 2; + that.query = con.q; + that.url = con.url || window["conf"].apiUrlPrefix; + that.content = { + price: con.price, + discount: con.discount + }; + that.amazonLogo = con.amazonLogo; + that.logoUrl = con.logoSrc; + + _self.getData(function() { + _self.formatData(); + _self.render(_self.data, rand); + }); + }, + getData: function(callback) { + var _self = App.amazonAds, + that = _self.conf, + params = [], + reqUrl = that.url + "?" + that.reqParams + "&"; + + _self.callF = _self.getCallbackFunc(); + + params.push("country=" + (window["conf"].country || "jp")); + params.push("_=" + +new Date); + params.push(that.query + "=" + encodeURIComponent(App.conf.reqParam.query)); + params.push("jsonp=" + _self.callF); + reqUrl += params.join("&"); + + callback.scop = _self; + G.loadJs(reqUrl, callback); + + }, + filterHtmlTag: function(html){ + var tmp = document.createElement("div"); + tmp.innerHTML = html; + return tmp.innerText || tmp.textContent || ""; + }, + formatData: function() { + var _self = App.amazonAds, + that = _self.conf, + cont = that.content, + disCo = cont.discount, + price = cont.price, + data = window[_self.callF].data; + + data = (data && data.content) || ""; + if(!data) return; + data = G.xml.toJson(data); + data = data && data["ItemSearchResponse"] && data["ItemSearchResponse"]["Items"]; + data = data && data["Item"]; + + if(data) { + UT && UT.send({modId: "amazonAds_partner", type: "others", position: data.length || 0}); + } + if(data && data.length >= that.minTotal) { + data.sort(function(prev, next) { + var sR = "SalesRank", + pR = parseInt((prev[sR] && prev[sR].data) || 0, 10), + nR = parseInt((next[sR] && next[sR].data) || 0, 10); + return (pR && nR) ? (pR - nR) : (nR - pR); + }); + var _data = [], + url = '', title = '', dis = '', other = '', + pri = '', des = '', brand = '', imgSrc= ''; + var otherClass; + + for(var i = 0, l = data.length; i < l; i++) { + url = data[i]["DetailPageURL"]; + url = (url && url.data) || ""; + + title = data[i]["ItemAttributes"]; + title = (title && title["Title"]) || ""; + title = (title && title.data) || ""; + + dis = data[i]["ItemAttributes"]; + dis = (dis && dis["ListPrice"]) || ""; + dis = (dis && dis["FormattedPrice"]) || ""; + dis = (dis && dis.data) || ""; + + pri = data[i]["OfferSummary"]; + pri = (pri && pri["LowestNewPrice"]) || ""; + pri = (pri && pri["FormattedPrice"]) || ""; + pri = (pri && pri.data) || ""; + + des = data[i]["EditorialReviews"]; + des = (des && des["EditorialReview"]) || ""; + if (des.length >= 2) { + des = (des[0]["IsLinkSuppressed"]["data"] === "0") ? des[0]["Content"]["data"] : (des[1]["IsLinkSuppressed"]["data"] === "0" ? des[1]["Content"]["data"] : ""); + } else { + des = (des && des["IsLinkSuppressed"]["data"] === "0") ? des["Content"]["data"]: ""; + } + + brand = data[i]["ItemAttributes"]; + brand = (brand && brand["Brand"]) || ""; + brand = (brand && brand.data) || ""; + + imgSrc = data[i]["MediumImage"] || ""; + if(imgSrc) { + if(parseInt(imgSrc["Height"]["data"], 10) > parseInt(imgSrc["Width"]["data"], 10)) { + other = 'height="75"'; + } else { + other = 'width="75"'; + } + imgSrc = 'src="' + imgSrc["URL"]["data"] + '"'; + } else { + imgSrc = ''; + other = ''; + otherClass = 'amz-li-noimg'; + } + + if(!url || !title) continue; + + _data.push({ + href: url, + title: title, + discount: dis? disCo: "", + dis: dis? ("" + dis + "  "): "", + price: pri? price: "", + pri: pri? ("" + pri + "   "): "", + descrip: _self.filterHtmlTag(des), + brand: brand, + imgSrc: imgSrc, + other: other, + otherClass: otherClass + }); + } + _self.data = _data; + _self._data = data; + } else { + _self.data = {}; + _self._data = {}; + } + + }, + render: function(data, rand) { + var index = [], + str = '', + _self = App.amazonAds, + tpl = _self.tpl, + max = _self.MAXNUM; + + if(data.length) { + index = rand ? _self.getRandsIndex(data.length, max) : _self.enumType(max); + + for(var i = 0, l = index.length; i < l; i++) { + data[index[i]].i = i + 1; + str += tpl.replaceTpl(data[index[i]]); + } + if(_self.conf.amazonLogo) { + str = _self.logoTpl.replaceTpl({imgSrc: _self.conf.amazonLogo, linkUrl: _self.conf.logoUrl}) + str; + } + App.conf.adMaps.Amazon.innerHTML = str; + G.addCls(App.conf.adMaps.Amazon, "amz-show"); + } else { + return true; + } + }, + enumType: function(max) { + var arr = []; + for(var i = 0; i < max; i++) { + arr.push(i); + } + return arr; + }, + shuffle: function(o){ + for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); + return o; + }, + getRandsIndex: function(len, max) { + var arr = [], + curData = [], + _self = App.amazonAds; + + for(var i = 0; i < len; i++) { + arr[i] = i; + } + + for(var j = 0; j < max; j++) { + arr = _self.shuffle(arr); + curData.push(arr[0]); + arr.splice(0, 1); + } + + return curData; + }, + getCallbackFunc: function() { + var callName = "ghao123_amazon" + ('' + +new Date).substring(3); + window[callName] = function(data) { + window[callName].data = data; + }; + return callName; + }, + +} + +App.ept = function(conf) { + var that = this; + + that.conf = conf; + that.curDate = 0; + that.curType = that.conf.list[0].types; + that.timeList = []; // for get ajax data + that.timGroup = []; // for render date + + that.callName = {}; // jsonp callback function + that.reqPath = ""; // JSONP request path Tpl + + that.eptTle = G("eptTitle"); + that.eptTab = G("eptBtn"); + that.eptCtr = G("eptCtrl"); + that.eptRes = G("eptRes"); + + that.curTab = {}; // current tab DOM object + that.ctrPrev = {}; // control to prev + that.ctrNext = {}; // control to next + that.ctrTime = {}; // show time + + that.tabTpl = '
                                  • #{title}
                                  • '; + that.ctrTpl = '
                                    <#{prev}

                                    #{date}

                                    >#{next}
                                    '; + that.timTpl = '#{y}#{Y}#{m}#{M}#{d}#{D}#{update}'; + that.resTpl = '
                                  • #{num}#{content}
                                  • '; + + that.init(); +} +App.ept.prototype = { + init: function() { + var that = this; + + that.callName = that.getCallbackFunc(); // create callback + that.createHtml(); // init create html + that.createReqPath(); // create JSONP path tpl + + that.bindEvent(); + }, + sendRequest: function(typ, index, callback) { + var that = this, + path = that.reqPath.replaceTpl({ + type: typ, + date: (index === 0 ? "" : that.timeList[index]), + stamp: +new Date + }); + callback.scop = that; + G.loadJs(path, callback); + }, + render: function() { + var that = this, + _tpl = that.resTpl, + _bod = document.body, + data = window[that.callName].data || {}, + maxL = parseInt((that.conf && that.conf.ajaxUrl && that.conf.ajaxUrl.num) || 20, 10); + str = "", + _url = location.href.split("?")[0] + "?query="; + + data = (data.content && data.content.data) || []; + + if(data.length > 0) { + /*if(data.length === 1) { // when one data + G.addCls(that.ctrPrev, "ctr-diable"); + } else { // not only one data + G.rmvCls(that.ctrPrev, "ctr-diable"); + }*/ + G.rmvCls(_bod, "no-data"); + for(var i = 0, l = Math.min(data.length, maxL); i < l; i++) { + str += _tpl.replaceTpl({ + addClas: "i-rank-" + (i + 1), + num: i + 1, + content: data[i]["info_name"] || "", + url: _url + G.urlEscape(encodeURIComponent(data[i]["info_name"] || "")) + }); + } + that.eptRes.innerHTML = str; + } else { + G.addCls(_bod, "no-data"); + } + }, + createReqPath: function() { + var that = this, + params = [], + _glo = window.conf, + _con = that.conf.ajaxUrl, + url = (_con.url || _glo.apiUrlPrefix) + "?"; + for(var i in _con) { + if(_con.hasOwnProperty(i) && !_con[i].match("http://")) { + params.push(i + "=" + _con[i]); + } + } + params.push("type=#{type}"); + params.push("date=#{date}"); + params.push("jsonp=" + that.callName); + params.push("country=" + (_glo.country || "jp")); + params.push("_=#{stamp}"); + url += params.join("&"); + that.reqPath = url; + that.curReqPath = url.replace("&date=#{date}", ""); + }, + getCallbackFunc: function() { + var callName = "ghao123_custom" + ('' + +new Date).substring(3); + window[callName] = function(data) { + window[callName].data = data; + }; + return callName; + }, + initCtr: function(date) { + var that = this, + _con = that.conf, + _up = _con.update, + _ctr = that.eptCtr, + _cpl = that.ctrTpl, + _tpl = that.timTpl, + _lis = that.timeList, + _grp = that.timGroup; + + var fixDay = G.fixDay, + fixDat = G.fixDate, + tmpDay = {}; + + for(var i = 0, l = parseInt(_con.maxDays || 7, 10); i < l; i++) { + tmpDay = fixDay(date, 0-i, _con); + if(tmpDay.W < 6) { + tmpDay.update = _up; + _grp.push(_tpl.replaceTpl(tmpDay)); + _lis.push(fixDat(tmpDay)); + } + } + _ctr.innerHTML = _cpl.replaceTpl({ + prev: _con.prev, + next: _con.next, + date: _grp[0] + }); + that.ctrPrev = G("ctrlPrev"); // control to prev + that.ctrNext = G("ctrlNext"); // control to next + that.ctrTime = G("ctrlTime"); // show time + + that.bindCtrl(); // need elements have been created + + that.sendRequest(that.curType, that.curDate, that.render); // init request jsonp data + }, + initTle: function() { + var that = this, + _con = that.conf, + _img = _con.titleIcon, + _url = _con.titleUrl, + str = ''; + str += _url ? ('') : ''; + str += _img ? ('') : ''; + str += _con.title; + str += _url ? '' : ''; + that.eptTle.innerHTML = str; + }, + initTab: function() { + var that = this, + _con = that.conf.list, + _tab = that.eptTab, + _cuT = G.cookie("tabTypes"), + _cuI = 0, + str = '', + _tpl = that.tabTpl; + + for(var i = 0, l = _con.length; i < l; i++) { + _con[i].cur = ""; + + if(_cuT) { + if(_con[i].types == _cuT) { + that.curType = _con[i].types; + _cuI = i; + } + } else if( i === 0 ) { + that.curType = _con[i].types; + } + str += _tpl.replaceTpl(_con[i]); + } + + G.addCls(_tab, "tab-" + l); + _tab.innerHTML = str; + + that.curTab = _tab.getElementsByTagName("li")[_cuI]; + G.addCls(that.curTab, "cur"); + }, + switchTab: function(li) { + var that = this; + + that.curType = li.getAttribute("typ"); + + G.rmvCls(that.curTab, "cur"); + G.addCls(li, "cur"); + G.cookie("tabTypes", that.curType, {expires: 400}); + + that.curTab = li; + that.sendRequest(that.curType, that.curDate, that.render); + }, + getPrev: function() { + var that = this, + _tim = that.timeList, + _pre = that.ctrPrev, + _nex = that.ctrNext; + + if(_pre.className.search("ctr-diable") > -1) return; + + if(that.curDate === 0) { + G.rmvCls(_nex, "ctr-diable"); //is first + } + + that.curDate++; + + if(!_tim[that.curDate + 1]) { + G.addCls(_pre, "ctr-diable"); + } + + that.ctrTime.innerHTML = that.timGroup[that.curDate]; + + that.sendRequest(that.curType, that.curDate, that.render); + }, + getNext: function() { + var that = this, + _tim = that.timeList, + _pre = that.ctrPrev, + _nex = that.ctrNext; + + if(_nex.className.search("ctr-diable") > -1) return; + + if(that.curDate === _tim.length - 1) { + G.rmvCls(_pre, "ctr-diable"); //is last + } + + that.curDate--; + + if(that.curDate - 1 < 0) { + G.addCls(_nex, "ctr-diable"); + } + + that.ctrTime.innerHTML = that.timGroup[that.curDate]; + + that.sendRequest(that.curType, that.curDate, that.render); + }, + bindCtrl: function() { + var that = this; + + G.delegate(that.ctrPrev, 'click', function(event) { + that.getPrev(); + UT && UT.send({modId: "empty-search-rank", type: "pclick", position: "emptyPrev"}); + }); + G.delegate(that.ctrNext, 'click', function(event) { + that.getNext(); + UT && UT.send({modId: "empty-search-rank", type: "pclick", position: "emptyNext"}); + }); + }, + bindEvent: function() { + var that = this; + G.delegate(that.eptTab, 'click', function(event) { + var _self = this; + if(_self.tagName === "LI" && !_self.className.match("cur")) { + that.switchTab(_self); + UT && UT.send({modId: "empty-search-rank", type: "pclick", position: "emptyTab", sort: that.curType}); + } + }); + G.delegate(that.eptRes, 'click', function(event) { + var _self = this; + if(_self.tagName === "A" || _self.parentNode.tagName === "A") { + UT && UT.send({modId: "empty-search-rank", type: "pclick", position: "searchWords", sort: that.curType}); + } + }); + G.delegate(that.eptTle, 'click', function(event) { + var _self = this; + if(_self.tagName === "A" || _self.parentNode.tagName === "A") { + UT && UT.send({modId: "empty-search-rank", type: "pclick", position: "title"}); + } + }); + }, + createHtml: function() { + var that = this; + + that.initTle(); + that.initTab(); + + that.initCtr.scop = that; + G.time.getTime(that.initCtr); + } +} + +var eptObj = null, + noFrst = false; + +App.req = function(type) { + var eptConf = conf.ept, // empty search word + _conf = App.conf, + cache = App.cache, + reqParam = _conf.reqParam; + if (!reqParam.query) { + // add body class + if(eptConf) { + G.addCls(document.body, "ept-srch"); + + G("searchInput").value = G("searchInput2").value = reqParam.query; + + !eptObj && (eptObj = new App.ept(eptConf)); + } + } else { + // remove body class + G.rmvCls(document.body, "ept-srch"); + if (noFrst) {// first time no send log + UT && UT.send({ + type: "pclick", + sort: "search", + value: reqParam.query + }); + } else { + noFrst = true; + } + + reqParam["web.FirstResult"] = _conf.reqPn < 2 ? 0 : reqParam["web.NumResults"] * (_conf.reqPn - 1); + // G("searchInput").value = G("searchInput2").value = G.urlUnEscape(reqParam.query); + G("searchInput").value = G("searchInput2").value = reqParam.query; + + App.tip.show("loading"); + G("totalHits").innerHTML = ""; + cache.xhr && cache.xhr.abort(); + cache.xhr = G.ajax({ + type: "GET", + url: _conf.reqUrl, + data: _conf.reqParam, + wait: 10000, + success: App.render, + error: function() { + App.render(""); + App.tip.show("abort"); + } + }); + App.updateAd(); + + App.amazonAds.render(App.amazonAds.data); + } +} + +App.renderPn = function(str) { + if(G.isString(str)) return G("resultPn").innerHTML = str; + var conf = App.conf, + pn = conf.reqPn, + tpl = conf.tpl.pnLi, + txt = conf.txt, + i = 2, + total = 10, + dot = '
                                  • ...
                                  • ', + ret = [], + buildUrl = function(i) { + return App.supportState ? "javascript:void(0)" : App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(conf.reqParam.query)) + "&pn=" + i + "&tn=" + conf.tn; + } + + if(pn > 1) ret.push(tpl.replaceTpl({ + url: buildUrl(pn - 1) + , n: "<" + , t: txt["prepage"] + })); + ret.push(tpl.replaceTpl({ + url: buildUrl(1) + , n: 1 + , t: 1 + })); + + if(pn > 7){ + ret.push(dot); + i = pn - 5; + total = pn + 5; + } + + if(App.cache.isLastPage) total = pn + 1; + + for(; i < total; i++) { + ret.push(tpl.replaceTpl({ + url: buildUrl(i) + , n: i + , t: i + })); + } + + if(!App.cache.isLastPage) { + ret.push(dot); + ret.push(tpl.replaceTpl({ + url: buildUrl(pn + 1) + , n: ">" + , t: txt["nextpage"] + })); + } + + G("resultPn").innerHTML = ret.join("").replace(new RegExp(">" + pn + ""), ' onclick="return false" class="r-pn_cur">' + pn + ''); +} + +App.renderAd = function(data) { + // fix ad Data + data = function(data) { + var ret = {}, + key; + G.each(data, function(val, key) { + ret[key] = []; + val.length && G.each(val, function(li, i) { + li && ret[key].push(li); + }); + }); + return ret; + }(data); + + var conf = App.conf, + adMaps = conf.adMaps, + adNum = conf.adNum, + // fixNum = +adNum.North - data.North.length, + tmpLen = data.South.length, + el; + + /* + fix ad Data + 1. keep north = 4 + 2. from: south > east + */ + // if(fixNum > 0) data.North = data.North.concat(data.South.splice(0, fixNum), data.East.splice(0, (tmpLen > fixNum || tmpLen === fixNum) ? 0 : fixNum - tmpLen)); + + G.each(data, function(val, key) { + if(key === "Amazon") { + return true; + } + el = adMaps[key]; + val.length = Math.min(val.length, +adNum[key]); + el.innerHTML = val.length ? val.join("") : ""; + if(G("adWord"+key)&&conf.txt.adTitle){ + G("adWord"+key).innerHTML = G.xml.escape(conf.reqParam.query); + G("adWord"+key).parentNode.parentNode.style.display = "block"; + } + el.parentNode.style.display = val.length ? "block" : ""; + }); + + + // bind linkIndex + G.each(adMaps, function(val, key) { + if(!val) return false; + var list = val.getElementsByTagName("li"), + i = 0, + li; + if(list && list.length) for(; li = list[i++];) { + var link = li.getElementsByTagName("a")[0]; + link && link.setAttribute("data-i", i); + } + }); +} + +App.updateAd = function() { + var conf = App.conf, + adNum = conf.adNum, + reqAdParam = conf.reqAdParam, + tpl = conf.tpl.adLi, + data = { + North: [] + , South: [] + , East: [] + }, + counter = { + north: 0, + south: 0, + east: 0 + }, + // Render AD tpls + renderTpl = function (listing, clickUrl) { + var key = /North/.test(clickUrl["@type"]) && counter.north++ < +adNum["North"] ? "North": /South/.test(clickUrl["@type"]) && counter.south++ < +adNum["South"] ? "South" : /East/.test(clickUrl["@type"]) && counter.east++ < +adNum["East"] ? "East" : ""; + if(data[key] && listing["@rank"]) data[key][+listing["@rank"]] = tpl.replaceTpl({ + url: clickUrl["data"] + , t: listing["@title"] + , des: listing["@description1"] + listing["@description2"] + , host: listing["@siteHost"] + // only show quick links in the north position + , quickLink: listing["QuickLink"] && key === "North" ? function(links, ret) { + var i = 0; + G.each(links, function(link) { + if (/North/.test(link["@type"]) && i < conf.qlMaxNum) { + ret[+link["@number"] - 1] = '' + link["@text"] + ''; + i++; + } + }); + return ret.join(" - ") + }(listing["QuickLink"], []) : "" + }); + }; + reqAdParam.Keywords = conf.reqParam.query; + App.renderAd(data); + + reqAdParam.Keywords && G.ajax({ + type: "GET", + url: conf.reqAdUrl, + data: reqAdParam, + wait: 10000, + success: function(res) { + if(!res) return; + res = G.xml.toJson(res); + if(res["Results"] && res["Results"]["ResultSet"] && res["Results"]["ResultSet"]["Listing"]) { + res = res["Results"]["ResultSet"]["Listing"]; + if(!res.length) res = [res]; + G.each(res, function(li, i) { + /*if(li["ClickUrl"]) { + var key = (li["ClickUrl"]["@type"].split("-") || ["", ""])[1]; + + if(data[key] && li["@rank"]) data[key][+li["@rank"]] = tpl.replaceTpl({ + url: li["ClickUrl"] + , t: li["@title"] + , des: li["@description1"] + li["@description2"] + , host: li["@siteHost"] + , quickLink: li["QuickLink"] ? function(links, ret) { + G.each(links, function(link) { + ret[+link["@number"] - 1] = '' + link["@text"] + ''; + }); + return ret.join(" - ") + }(li["QuickLink"], []) : "" + }); + }*/ + + // no North / East / South + + // change to 2 / 8 / 4 + if(li["ClickUrl"]) { + // var key = i < +adNum["North"] ? "North" : i < (+adNum["North"] + +adNum["East"]) ? "East" : i < (+adNum["North"] + +adNum["East"] + +adNum["South"]) ? "South" : ""; + // Render tpls with the 2 kinds of data format + if (li["ClickUrl"].length && !li["ClickUrl"]["data"]) { + for (var j in li["ClickUrl"]) { + renderTpl(li, li["ClickUrl"][j]); + } + } else { + renderTpl(li, li["ClickUrl"]); + } + } + }); + } + App.renderAd(data); + UT && UT.send({type: "others", modId: "yahoo-search-ad_partner", position: conf.tn, sort: "north" + counter.north}); + }, + error: function() { + App.renderAd(data); + UT && UT.send({type: "others", modId: "yahoo-search-ad_partner", position: conf.tn, sort: "north" + counter.north}); + } + }); +} + +App.render = function(data) { + App.cache.xhr = null; + if(data === "") { + G("result").innerHTML = ""; + G("totalHits").innerHTML = ""; + App.renderPn(""); + return; + } + data = G.xml.toJson(data); + + if(!data["BATCHSEARCHRESPONSE"] + || !data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"] + || !data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["RESULT"] + ) { + G("result").innerHTML = '

                                    ' + App.conf.txt.noResult.replaceTpl({ + + // Fix: XSS + query: '' + G.xml.escape(App.conf.reqParam.query) + '' + }) + '

                                    ' + App.conf.tpl.noResult; + + G("totalHits").innerHTML = ""; + App.renderPn(""); + App.tip.hide(); + return; + } + + // last page + App.cache.isLastPage = data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["@XT"] === "1" ? 1 : 0; + + var result = G("result"), + conf = App.conf, + tpl = conf.tpl, + txt = conf.txt, + list = data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["RESULT"], + query = conf.reqParam.query, + ret = []; + setTimeout(function() { + G("searchInput").focus(); + }, 64); + + if(list) { + if(list.length) App.renderPn(); + else list = [list]; + + // fix list 0 <=> 1 + if(list.length > 1) { + var tmpLiNode = list[0]; + list[0] = list[1]; + list[1] = tmpLiNode; + tmpLiNode = null; + } + + G.each(list, function(li) { + li.cache = txt.cache; + li.query = encodeURIComponent(App.conf.reqParam.query); + // li.DISPURL.data = G.fixLen(li.DISPURL.data, 90, "..."); + ret.push(tpl.resultLi.replaceTpl(li)) + }); + App.tip.hide(); + } + else { + App.renderPn(""); + App.tip.show("error"); + } + result.innerHTML = ret.join(""); + G("totalHits").innerHTML = txt.totalhits.replaceTpl({ + totalhits: data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["@TOTALHITS"].replace(/(\d)(?=(?:\d{3})+\b)/g, "$1,") + }); + + App.renderWord(data); + +} +App.renderWord = function(data) { + if (!data["BATCHSEARCHRESPONSE"]||!data["BATCHSEARCHRESPONSE"]["RESULTSET_ASSIST"]||!data["BATCHSEARCHRESPONSE"]["RESULTSET_ASSIST"]["RESULT"]) return; + var resultWord = G("resultWord"); + var wordList = data["BATCHSEARCHRESPONSE"]["RESULTSET_ASSIST"]["RESULT"]; + var ret = []; + var conf = App.conf; + var tpl = conf.tpl; + var query = conf.reqParam.query; + + if(wordList) { + G.each(wordList, function(li) { + li.dataFm = li.data.replace(query,""+query+""); + li.url = App.supportState ? "javascript:void(0)" : App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(li.data)) + "&pn=" + 1 + "&tn=" + conf.tn; + ret.push(tpl.wordLi.replaceTpl(li)); + }); + resultWord.innerHTML = ret.join(""); + + + + + resultWord.parentNode.style.display = "block"; + }else{ + resultWord.parentNode.style.display = "none"; + } + +} + +App.sugInit = function() { + var conf = App.conf, + searchInput = G("searchInput"); + conf.sug.templ = function(data, q) { + var that = this, + o = that.o, + classNameQueryNull = o.classNameQueryNull, + classNameQuery = o.classNameQuery, + ret = []; + + if(data + "" === data) { + ret.push('

                                    ' + data + '

                                    ') + } + else { + data = data[o.callbackDataKey || o.callbackDataNum] || []; + + var i = 0, + l = Math.min(data.length, o.n), + li, + undef; + q = q.trim(); + for(; i -1 ? "" : " class=" + classNameQueryNull) + '>' + (classNameQuery ? li.replace(q, '' + q + '') : li) + ''); + } + } + return '
                                      ' + ret.join("") + '
                                    ' + conf.tpl.sugBot.replaceTpl({ + classOn: conf.sugOn ? "" : "sug-close sug-switch_cur" + , classOff: conf.sugOn ? "sug-close sug-switch_cur" : "" + }); + } + conf.sug.onSucess = function(data) { + if(App.cache.waitSugTimer) { + clearTimeout(App.cache.waitSugTimer); + App.cache.waitSugTimer = null; + } + } + conf.sug.onRequest = function(data) { + if(!App.cache.waitSugTimer) App.cache.waitSugTimer = setTimeout(function() { + searchtop(conf.txt.withoutSug); + }, 1000); + App.cache.sug.sugWrap.style.visibility = App.conf.sugOn ? "" : "hidden"; + } + G.loadJs([conf.sugPath], function() { + var sug = App.cache.sug = G.sug(searchInput, conf.sug); + G("sugShow").onclick = function() { + var val = searchInput.value; + searchInput.focus(); + if(!conf.sugOn) { + sug.q = ""; + searchtop(conf.txt.closedSug); + sug.sugWrap.style.visibility = ""; + return false; + } + + if(!val.trim()) { + searchtop(conf.txt.withoutQuery); + } + else { + sug.request(val); + } + } + G.delegate(sug.sugWrap, "mousedown", function(e) { + var type = this.getAttribute("data-switch"), + el; + + (this.tagName === "LI" || this.parentNode.tagName === "LI") && UT && UT.send({type: "pclick", sort:"search_sug"}); + + if(!type || !/sug-switch_cur/.test(this.className)) return false; + App.conf.sugOn = type === "on"; + el = G("sugSwitch_" + (conf.sugOn ? "off" : "on")); + el && (el.className += " sug-switch_cur"); + this.className = this.className.replace(" sug-switch_cur", ""); + return false; + }); + }) +} + +App.iptControl = function(opt) { + this.ipt = opt.ipt; + this.btnClose = opt.btnClose; + this.tip = opt.tip; +} + +App.iptControl.prototype = { + init: function() { + var that = this; + "onpropertychange" in that.ipt + ? that.ipt.onpropertychange = function(e){ + e = window.event; + e.propertyName == "value" && that.iptHandle.call(that); + } + : that.ipt.addEventListener("input", function(e) { + that.iptHandle.call(that); + }, false); + + that.updateBtnClose(); + + that.btnClose.onclick = function() { + that.ipt.value = ""; + setTimeout(function() { + that.ipt.focus(); + that.show(that.btnClose, "none"); + }, 64); + return false; + } + + that.ipt.onfocus = that.ipt.onblur = function(e) { + that.updateBtnClose.call(that); + } + + that.tip.onclick = function() { + that.ipt.focus(); + } + }, + updateBtnClose: function() { + var that = this; + setTimeout(function() { + that.ipt.value + ? that.show(that.btnClose, "inline-block") + : that.show(that.btnClose, "none") + }, 64); + }, + iptHandle: function(e) { + var that = this; + that.ipt.value + ? that.show(that.btnClose, "inline-block").show(that.tip, "none") + : that.show(that.btnClose, "none"); + }, + show: function(el, className) { + if(el.style.display !== className) el.style.display = className; + return this; + } +} + +App.init = function() { + var conf = App.conf, + searchInput = G("searchInput"), + iptControl = new App.iptControl({ + ipt: G("searchInput") + , btnClose: G("searchClose") + , tip: G("searchIptTip") + }), + iptControl2 = new App.iptControl({ + ipt: G("searchInput2") + , btnClose: G("searchClose2") + , tip: G("searchIptTip2") + }); + + G.delegate(document.body, "mousedown", function(e) { + + (this.tagName === "A" || this.parentNode.tagName === "A" || this.tagName === "BUTTON") && UT && UT.send({type: "pclick", position: "links"}); + + (this.id === "searchSubmit" || this.id === "searchSubmit2") && UT && UT.send({type: "pclick", sort: "search_btn"}); + + (/logo-hao123/.test(this.className) || /logo-hao123/.test(this.parentNode.className)) && UT && UT.send({type: "pclick", sort:"logo_hao123"}); + + (/logo-yahoo/.test(this.className) || /logo-yahoo/.test(this.parentNode.className)) && UT && UT.send({type: "pclick", sort:"logo-yahoo"}); + + if(this.tagName === "A" || this.parentNode.tagName === "A") { + e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = true); + } + }); + + G.delegate(G("result"), "mousedown", function(e) { + (this.tagName === "A" || this.parentNode.tagName === "A") && UT && UT.send({type: "pclick", sort:"search_result", position: "links"}); + }); + + G.each(conf.adMaps, function(val, key) { + G.delegate(val, "mousedown", function(e) { + if(this.getAttribute("data-logo") || this.parentNode.getAttribute("data-logo")) return; + (this.tagName === "A" || this.parentNode.tagName === "A" || this.parentNode.parentNode.tagName === "A") && !/r-list_more/.test(this.parentNode.className) && UT && UT.send({type: "pclick", position:"search_ad", value: (this.innerText || this.innerHTML).trim(), sort: key, linkIndex: this.getAttribute("data-i") || this.parentNode.getAttribute("data-i") || this.parentNode.parentNode.getAttribute("data-i")}); + }); + }); + + App.req(); + App.amazonAds.init(window["conf"].amazonAds, parseInt(conf.reqPn , 10) > 1 ? true: false); + + if(App.supportState) { + history.pushState({ + query: conf.reqParam.query + , pn: conf.reqPn + , tn: conf.tn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(conf.reqParam.query)) + "&pn=" + conf.reqPn + "&tn=" + conf.tn + ); + } + + G("searchForm").onsubmit = G("searchForm2").onsubmit = function(e) { + var query = conf.reqParam.query = this.getElementsByTagName("input")[0].value.trim(), + iptTip = G(/2/.test(this.id) ? "searchIptTip2" : "searchIptTip"); + //if(!query) { + /*iptControl.show(iptTip, "inline-block"); + return false;*/ + //return; + //} + + if(!App.supportState) { + var tnEle = document.createElement("input"); + tnEle["type"] = "hidden"; + tnEle["name"] = "tn"; + tnEle["value"] = conf.tn; + this.appendChild(tnEle); + return; + } + conf.reqPn = 1; + App.req(); + App.amazonAds.init(window["conf"].amazonAds); + history.pushState({ + query: query + , pn: conf.reqPn + , tn: conf.tn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(query)) + "&pn=" + conf.reqPn + "&tn=" + conf.tn + ); + setTimeout(function() { + App.cache.sug && App.cache.sug.hide(1); + }, 200); + return false; + } + G.delegate(G("resultWord"), "mousedown", function(e) { + if(this.tagName === "B"||this.tagName === "A"){ + var q = this.tagName === "B" ? this.parentNode.getAttribute("data-q") : this.getAttribute("data-q"); + conf.reqParam.query = q; + UT && UT.send({type: "pclick", modId: "related-keywords", sort: q}); + + if(!App.supportState) return; + conf.reqPn = 1; + App.req(); + history.pushState({ + query: q + , pn: conf.reqPn + , tn: conf.tn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(q)) + "&pn=" + conf.reqPn + "&tn=" + conf.tn + ); + + } + }); + G.delegate(G("searchLinks"), "click", function(e) { + var val = G("searchInput").value.trim(), + qUrl = this.getAttribute("data-url"); + if(!qUrl || !val) return; + + window.open(this.getAttribute("data-url").replaceTpl({q: encodeURIComponent(val)})); + e.preventDefault && e.preventDefault(); + return false; + }); + + G.delegate(G("searchLinks"), "mousedown", function(e) { + UT && UT.send({type: "pclick", sort: "search_tab", position: "links", value: this.innerHTML.trim()}); + }); + + setTimeout(function() { + App.sugInit(); + }, 200); + + if(!App.supportState) return; + + window.addEventListener("popstate", function(e) { + var state = e.state; + if(!state/* || !state.query*/) return; + conf.reqParam.query = history.state.query; + conf.reqPn = history.state.reqPn; + conf.tn = history.state.tn; + App.req(); + App.amazonAds.init(window["conf"].amazonAds, parseInt(conf.reqPn, 10) > 1 ? true: false); + + // fix history not reset page num +/* setTimeout(function() { + var pnLinks = G("resultPn").getElementsByTagName("a") || []; + G.each(pnLinks, function(li) { + if(~~li.getAttribute("data-n") === ~~conf.reqPn && !/r-pn_cur/.test(li.className)) { + li.className = "r-pn_cur"; + return false; + } + }); + }, 100);*/ + + }, false); + + G.delegate(G("resultPn"), "mousedown", function(e) { + var pn = this.getAttribute("data-n"), + query = conf.reqParam.query, + reqPn = conf.reqPn; + + if(this.tagName !== "A" || /r-pn_cur/.test(this.className || !pn)) return false; + + UT && UT.send({type: "pclick", sort:"nextpage"}); + + if(pn === "<") pn = -1; + else if(pn === ">") pn = 1; + else conf.reqPn = 0; + conf.reqPn = +pn + conf.reqPn; + App.req(); + if(App.amazonAds.render(App.amazonAds.data, parseInt(conf.reqPn, 10) > 1 ? true: false)) { + App.amazonAds.init(window["conf"].amazonAds); + } + history.pushState({ + query: query + , pn: conf.reqPn + , tn: conf.tn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(query)) + "&pn=" + conf.reqPn + "&tn=" + conf.tn + ); + setTimeout(function() { + searchInput.focus(); + }, 64); + return false; + }); + iptControl.init(); + iptControl2.init(); +} +App.init(); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/yahoo-search-partner.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/yahoo-search-partner.tpl new file mode 100755 index 000000000..f1c99b4ef --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search-partner/yahoo-search-partner.tpl @@ -0,0 +1,42 @@ + +<%style%> + @import url('/widget/yahoo-search-partner/ltr/ltr.css?__inline'); +<%/style%> + +<%script%> +window.App = {}; +App.conf = { + reqUrl: "<%$root.body.search_conf.reqUrl%>" + , reqParam: <%json_encode($root.body.search_conf.reqParam)%> + , reqAdUrl: "<%$root.body.ad_conf.reqAdUrl%>" + , reqAdParam: <%json_encode($root.body.ad_conf.reqAdParam)%> + , adNum: <%json_encode($root.body.ad_conf.adNum)%> + , qlMaxNum: "<%$root.body.ad_conf.qlMaxNum%>" + , txt: <%json_encode($root.body.txt)%> + , tpl: { + resultLi: '
                                  • #{ABSTRACT.BEST.HTML.HL}

                                    #{DISPURL}
                                  • ' + + , pnLi: '
                                  • #{t}
                                  • ' + + , adLi: '
                                  • #{des}

                                    #{host}

                                    #{quickLink}
                                  • ' + + , sugBot: '
                                    キーワード入力補助 ON - OFF
                                    ' + , noResult: '<%$root.html.noResult%>' + + , wordLi: '
                                  • #{dataFm}
                                  • ' + } + , sugOn: "<%$root.body.sug.sugOn%>" + , sugPath: "<%$root.body.sug.sugPath%>" + , sug: <%json_encode($root.body.sug.conf)%> +} +App.conf.reqParam.ip = "<%$sysInfo.userip%>"; +/*App.conf.reqParam.tn = conf.UT.tn;*/ +conf.UT.tn = (conf.UT.tn === "/" ? "" : conf.UT.tn); +conf.UT.params.ytn = conf.UT.tn; +App.conf.tn = conf.UT.tn; +App.conf.reqAdParam.type = conf.UT.tn; +conf.ept = <%json_encode($body.eptWord)%>; +conf.amazonAds = <%json_encode($body.amazonAds)%> || {}; + +require.async("lv2:widget/yahoo-search-partner/yahoo-search-partner-async.js"); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/img/yahoo_search_page.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/img/yahoo_search_page.png new file mode 100755 index 000000000..f598b371d Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/img/yahoo_search_page.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/ltr/ltr.css new file mode 100755 index 000000000..f24dc7882 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/ltr/ltr.css @@ -0,0 +1,555 @@ +body, +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +code, +form, +fieldset, +legend, +input, +button, +textarea, +p, +figure, +blockquote, +th, +td{ margin:0; padding:0;} + +fieldset, img, iframe{ border:0;} + +address, caption, cite, code, dfn, em, th, var, i{font-style:normal;font-weight:normal;} + +ul, +li, +ol{ list-style:none;} + +caption, +th{text-align:left;} + +h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; + background: #fff; +} + +body { + -webkit-text-size-adjust: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -o-tap-highlight-color: rgba(0,0,0,0); + -moz-tap-highlight-color: rgba(0,0,0,0); + + vertical-align: baseline; + background-color: transparent; + + font-family: Arial,sans-serif; + font-size: small; + + _zoom: expression(function(el){ + document.execCommand('BackgroundImageCache', false, true); + el.style.zoom = "1"; + }(this)); +} + +.cf{ zoom: 1;} +.cf:before, .cf:after{ content: ''; display: table;} +.cf:after { clear: both;} + +.fl, +.fr{ display:inline; /*fix: IE6 border*/} +.fl{ float:left !important;} +.fr{ float:right !important;} + +.l-w{ width: 960px; margin: 0 auto;} +.l-l{ width: 590px; float: left; padding-left: 20px;} +.l-r{ overflow: hidden; zoom: 1; padding-left: 45px;} +.l-hd .l-l{ width: 695px; position: relative;} +.l-hd .l-r{ padding: 0;} + +.l-hd{ /*padding: 20px 10px;*/ height: 105px; /*height: 82px;*/ background: #f9f9f9; border-bottom: 1px solid #e7e7e7; border-top: 5px solid #cfdbef; margin-bottom: 10px;} + +a{ text-decoration: none;} +a:hover{ text-decoration: underline;} +a:visited{ color: #4c2472;} +a:link{ color: #0e1bbb;} +/*a:link { color: #0000de;}*/ + +h3{ font-size: 123%; font-weight: normal;} +h3 a{ text-decoration: underline;} +h3 a:hover { color: #cc3434;} + + + +/*提示层外框*/ +.sug-wrap { + position:absolute; + top:26px; + left:-1px; + border:1px solid #aaa; + background:#fff; + width:438px; + color:#000; + z-index:999; + line-height: 1; +} + +/*ie6 shim*/ +.sug-shim{ position:absolute; top:26px; left:-1px; z-index:-1; filter:alpha(opacity="0"); + width:438px; + height:532px; +} + +/*列表外框*/ +.sug-wrap ol{ cursor: pointer;} + +/*列表项*/ +.sug-wrap li{ padding: 4px 6px 5px;} + +/*选中样式*/ +.sug-wrap .sug-select{ background:#f0f0f0;} + +/*底部*/ +.sug-wrap .bot{ position:relative; height:19px; line-height:19px; font-weight:normal; border-top:1px solid #666;} + +/*高亮查询词*/ +.sug-wrap .sug-query{ font-weight:bold;} + +/*提示不能匹配查询词*/ +.sug-wrap .sug-querynull{ font-weight:normal;} + +.sug-bot{ height: 17px; line-height: 17px; padding-right: 10px; background: #f7f7f7;} +.sug-switch{ font-size: 85%;} +.sug-switch a{ font-weight: bold; text-decoration: none; color: #000; cursor: default;} +a.sug-switch_cur{ font-weight: normal; color: #0000de; cursor: pointer;} + +.sug-bot .s-arr{ top: 18px; left: -1px; background-color: #999; border: none; background-position: 0 -239px; width: 42px; height: 11px;} +.sug-wrap ol p{ padding: 5px; color: #999; cursor: default;} + +/*sprite*/ +.s-btn, +.logo a, +.r-tip i, +/*.s-arr{ background-image: url(/img/yahoo_search_page.png);}*/ +a.s-btn_close, +.s-arr{ background-image: url(../img/yahoo_search_page.png);} + +.logo, .logo a{ overflow: hidden;} +.logo a{ display: inline-block;} + +.logo-hao123{ position: absolute; top: 31px; left: 20px;} +.logo-yahoo{ margin: 38px 0 0 0;} +.logo-hao123 a{ background-position: 0px 0px; width: 116px; height: 29px;} +.logo-yahoo a{ background-position: 0px -31px; width: 51px; height: 24px;} + +/*search*/ +.s{ position: relative; top: -5px;} +.l-hd .s{ margin-left: 130px;} +.s-hd{ } +.s-hd li{ float: left;} +.s-hd li a{ display: block; padding: 5px 8px; font-size: small; color: #333; border-top: 5px solid #cfdbef;} +.s-hd li a:hover{ background: #eee;} +.s-hd li.cur a{ color: #B43C3E; text-decoration: none; background: none; border-top-color: #5f87cb; cursor: default;} +.s-bd{ margin-top: 10px; /*margin-top: 29px;*/} +.s-ipt{ border: 1px solid #999; border-top: 1px solid #7c7c7c; display: inline-block; margin-right: 5px; z-index: 999; position: relative; background: #fff;} +.s-ipt input{ width: 410px; font-size: 108%; height: 24px; padding: 2px 24px 0 4px; background-color: #fff; vertical-align: bottom; line-height: 1.3; border: none; top: 0; left: 0; float: left; position: relative;} +.s-ipt input::-ms-clear{ + display: none; +} +.s-btn{ display: inline-block; border: 0px solid #fff; background-color: #4070ff; background-position: 25px -84px;} +.s-btn button{ border: none; background: none; width: 110px; height: 28px; line-height: 30px; letter-spacing: 0.1em; padding: 0 0 0 16px; font-size: 108%; font-weight: bold; color: #fff; cursor: pointer; +} +.s-btn:hover{ background-color: #1155ee;} +.s-arr{ border: 1px solid #f9f9f9; border-top: none; background-position: 15px -119px; background-repeat: no-repeat; display: inline-block; width: 38px; height: 10px; cursor: pointer; position: relative; top: -1px; +} +.s-arr:hover{ background-color: #f0f0f0; border-color: #999;} +.s-tt{ color: #666; font-size: 12px; margin-top: 5px; /*margin-top: -1px;*/} +.s-tt em{ font-weight: bold;} + +.s-btn_close{ + position: absolute; + display: none; + cursor: pointer; + /*display: inline-block;*/ + width: 16px; height: 16px; top: 5px; right: 5px; background-position: 0 -57px; +} + +.s-btn_close:hover{ + background-position: -20px -57px; +} + +.s-btn_close__bot{ + top: 6px; + /*right: 155px;*/ +} + +.s-ipt_tip{ + display: none; + position: absolute; + top: 4px; + left: 5px; + color: #999; +} + +/*result*/ +.r-wrap{ overflow: hidden;} +.r-li{ + margin: 0 20px 20px 0; + + max-width: none; + overflow: hidden; + word-break: break-all; + word-wrap: break-word; + line-height: 1.4; +} +.r-li b{ font-weight: bold;} +.r-li_hd{ margin-bottom: 5px;} +.r-li_bd{ } +.r-li_ft{ margin-top: 3px;} +.r-li_tp{ margin-bottom: 3px;} + +.r-li_u{ color: #008000; word-break: normal;} +.r-li_u abbr{ float: left; max-width: 460px; overflow: hidden; height: 18px; margin-right: 5px; text-decoration: none; border-width: 0;} +.r-li_a a{ color: #686ccd;} + +.r-list{ + -moz-transition: opacity 0.5s ease-in; + -webkit-transition: opacity 0.5s ease-in; + -o-transition: opacity 0.5s ease-in; + transition: opacity 0.5s ease-in; + padding-top: 5px; +} +.r-padding{ + /*padding*/ + min-height: 500px; height: auto!important; height: 500px; +} +.r-list_ad{ position: relative; display: none; /*padding: 10px 0;*/} + +.r-list_ad .r-li_bd{ font-size: 108%;} +.r-list_ad .r-list_more{ position: absolute; right: 10px;display: none;} +.r-list_ad .r-list_ad_title{ display:none; margin-bottom: 15px; } +.r-list_ad .r-list_adtitle_link{ color: #666; } + +.r-list_ad_north{ border-bottom: 1px solid #ccc; margin-bottom: 10px;} +.r-list_ad_south{ border-top: 1px solid #ccc; padding-top: 10px; margin-top: -10px;} +.r-list_ad_north .r-li{ margin-bottom: 10px;} +.r-list_ad_east{ padding-top: 20px;} +.r-pos-east .r-list_ad_east{padding-top: 5px;} +.r-pos-east .ad-box{ display: none; } +.r-list_ad_east .r-list_more{ margin-bottom: 10px; position: static;} + +.r-list_more{} +.r-list_more a{ font-size: 92%; color: #666;} +.r-li_host{ color: #008000; padding-bottom: 3px;} +.r-li_quick{ color: #999; font-size: small;} +.r-li_quick a:hover { color: #cc3434;} + +/*.r-list_ad .r-li{ margin: 0 20px 20px 0;}*/ + +.r-tip{ display: none;} +.r-tip i{ display: inline-block; overflow: hidden; width: 13px; height: 13px; background-position: -72px -58px; position: relative; top: 2px;} +.r-error i{ background-position: -42px -58px;} +.r-abort i{ background-position: -56px -58px;} +.r-loading .r-list{ opacity: 0;} +.r-loading .r-tip{ display: block;} +.r-error .r-tip{ display: block;} +.r-abort .r-tip{ display: block;} + +/*.r-loaded .r-list{ display: block;} +.r-loaded .r-tip{ display: none;}*/ + +.r-pn{ white-space: nowrap; padding: 15px 0 25px;} +.r-pn li{ float: left; line-height: 30px;} +.r-pn a{display: inline-block; height: 25px; line-height: 25px; padding: 0 .5em; margin: 2px; border: 1px solid #ddd; zoom: 1; background: #fff; font-size: 123%;} +.r-pn a:hover{ background: #039; border-color: #00d; color: #fff;} +a.r-pn_cur, a.r-pn_cur:hover{ border-color: #ddd; background: #eee; color: #333; text-decoration: none; cursor: default; font-weight: bold;} + + +.ad-box{} +.ad-quick{} +.r-list_quick{ padding-right: 20px;} +.r-list_quick h3{ font-size: 14px;} +.r-list_quick_t{ margin: 10px 0;} +.r-list_quick_t a{ font-size: 12px; color: #666;} + +.l-ft{ text-align: center;} +.s-wrap{ background: #f9f9f9; border-top: 1px solid #e7e7e7; border-bottom: 1px solid #e7e7e7; padding: 2px 0 13px 2px;} + +.about-link{ display: inline-block; margin-top: 20px; color: #666;} +.about-link li{ display: inline;} +.about-link a{ color: #0e1bbb;} +.about-des{ margin: 10px 0; line-height:1.3; color: #999; display: block;} +.about-about{} + +/***global***/ +.c-ept {display: none;} +.ept-srch .c-ept {display: block;color: #5A5A5A;font-size: 14px;padding-left: 0;width: 640px;} +.ept-srch .c-rsl {display: none;} +.ept-srch .c-main .l-r {margin-top: 44px;padding-left: 20px;} + +/*result*/ +.c-ept .ept-result {min-height: 780px;margin-bottom: 77px;padding-top: 6px;} +.c-ept .ept-tip {display: none;text-align: center;margin-top: 60px;line-height: 40px;} + +.ept-btn,.ept-ctrl,.ept-result {border: 1px solid #E3E5E6;} +.ept-btn,.ept-ctrl {border-bottom-width: 0;} +.ept-ctrl,.ept-result {border-top-width: 0;} + +/*title*/ +.ept-tle {height: 44px;line-height: 44px;font-weight: bold;font-size: 16px;} +.ept-tle img {vertical-align: middle;margin-right: 8px;margin-top: -3px;width: 34px;height: 21px;} +.ept-tle a {color: #5A5A5A; display: inline-block;} +.ept-tle a:hover {text-decoration: none;} + +/*tab*/ +.ept-btn {padding: 1px 1px 14px;overflow: hidden;} +.ept-btn li {float: left;height: 32px;line-height: 32px;border: 1px solid #EDEFF0;border-right-width: 0;border-top-width: 0;text-align: center;width: 158px;cursor: pointer;background: #F5F7F7;background-image: -webkit-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -ms-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -o-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -moz-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);} +.ept-btn li:first-child {border-left-color: #ffffff;} +.ept-btn li:hover {font-weight: bold;} +.ept-btn .cur {font-weight: bold; color: #00B075;cursor: default;background: #FEFEFE;background-image: -webkit-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -ms-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -o-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -moz-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);border-color: #fff;} + +/*control*/ +.ept-ctrl,.ept-result {text-align: center;} +.ept-ctrl .ctr-outer,.ept-result .ept-res {margin: 0 auto;width: 618px;} +.ept-ctrl .ctr-outer {border-top: 1px solid #ECECEC;padding-top: 1px;border-bottom: 1px solid #ECECEC;} +.ept-ctrl .ctr-inner {height: 42px;background-color: #F6F6F6;position: relative;} +.ept-ctrl .ctr-btn {position: absolute;display: block;top: 6px;height: 28px;line-height: 28px;width: 118px;right: 31px;border: 1px solid #D8D8D8;background-color: #FFFFFF;color: #6D6D6D;cursor: pointer;overflow: hidden;} +.ept-ctrl .ctr-btn:hover {border-color: #C3C3C3;font-weight: bold;} +.ept-ctrl .i-btn {position: absolute;font-weight: bold;color: #00B075;right: 20px;font-size: 16px;} +.ept-ctrl .i-pre {left: 20px;right: auto;} +.ept-ctrl .ctr-diable {border-color: #E7E7E7;font-weight: normal;background-color: #FDFDFD;color: #E0E0E0;cursor: default;} +.ept-ctrl .ctr-diable .i-btn {color: #ECECEC;} +.ept-ctrl .ctr-diable:hover {border-color: #E7E7E7;font-weight: normal;} +.ept-ctrl .ctr-prev {left: 31px;right: auto;} +.ept-ctrl .ctr-time {height: 42px;line-height: 44px;overflow: hidden;} + +/*result*/ +.ept-result .ept-res {text-align: left;margin-bottom: -1px;} +.ept-res li {height: 32px;line-height: 32px;padding: 12px 0;font-size: 15px;font-weight: bold;border-bottom: 1px dotted #E3E5E6;position: relative;overflow: hidden;} +.ept-res .i-rank {position: absolute;width: 26px;height: 26px;line-height: 26px;top: 14px;left: 10px;text-align: center;background-color: #C5C4C3;color: #ffffff;font-size: 16px;overflow: hidden;} +.ept-res .i-rank-1 {background-color: #FD0606;} +.ept-res .i-rank-2 {background-color: #FF7E00;} +.ept-res .i-rank-3 {background-color: #FFD200;} +.ept-res a {display: block;padding-left: 56px;color: #5A5A5A;font-size: 16px;white-space: nowrap;} + +/*no search word && no ajax data*/ +.no-data .ept-res {display: none;} +.no-data .ept-tip {display: block;} + + +/*amazon ads*/ +.r-list_ama { + border: 1px solid #ccc; + margin: 12px 3px 12px 2px; + padding-left: 10px; + padding-right: 10px; + display: none; + opacity: 0; +} +.amz-show { + display: block; + opacity: 1; +} +.r-list_ama .amz-li { + position: relative; +} +.r-list_ama .amz-li-noimg .li-img { + display: none !important; +} +.r-list_ama .li-img { + width: 77px; + height: 93px; + margin: 5px 6px; + overflow: hidden; + text-align: center; + float: left; +} +.r-list_ama .li-content { + padding-right: 2px; + position: absolute; + top: 26px; + left: 94px; + z-index: 1; +} +.r-list_ama .amz-li-noimg .li-content { + left: 8px; +} +.r-list_ama .amz-li h3 { + margin-top: 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-indent: 6px; +} +.r-list_ama .li-img img { + border: 1px solid #636363; + /*max-height: 75px; + max-width: 75px;*/ +} +.r-list_ama .li-img span { + line-height: 16px; + font-size: 12px; + color: #001AFC; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + display: block; + font-weight: bold; +} +.r-list_ama .amz-li a { + display: block; + overflow: hidden; + margin-bottom: 10px; + margin-top: 5px; + min-height: 100px; + position: relative; + z-index: 4; +} +.r-list_ama .amz-li:hover { + background-color: #F2F2F2; +} +.r-list_ama .amz-li p { + font-size: 13px; +} +.r-list_ama .dis-pri span { + color: #676767; + /*font-weight: bold;*/ +} +.r-list_ama .ori-pri span { + color: #CC0400; + /*font-weight: bold;*/ +} + + +/*mutiple line words*/ +.ellipsis { + overflow: hidden; + height: 72px; + line-height: 18px; +} +.ellipsis:before { + content: ""; + float: left; + width: 5px; + height: 54px; +} +.ellipsis > *:first-child { + float: right; + width: 100%; + margin-left: -5px; +} +.ellipsis:after { + content: "..."; + box-sizing: content-box; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + float: right; + position: relative; + height: 24px; + line-height: 24px; + top: -2px; + left: 100%; + width: 3em; + margin-left: -3em; + padding-right: 5px; + text-align: right; + /*background: linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);*/ +} + +/*r-word*/ +#wordWrap{ + font-size: 106%; + padding-bottom: 15px; + border-bottom: 1px solid #F7F7F7; + margin-bottom: 8px; + display: none; +} +#wordWrap .word-title{ + display: inline-block; + color: #666; +} +#resultWord{ + display: inline-block; + width: 528px; + overflow: hidden; + height: 14px; +} +.r-li_w{ + display: inline-block; + margin: 0 0 20px 15px; +} +.r-li_wa{ + text-decoration: underline; +} +.r-li_wa:hover{ + color: #cc3434; +} +.l-l-left{ + margin-left: -128px; +} +/*demo*/ +/*.r-list_ama .li-img { +position: absolute; +top: 0; +left: 0; +width: 75px; +height: 92px; +border: 1px solid #636363; +background-color: #ffffff; +overflow: hidden; +text-align: center; +display: none; +display: block; +} +.r-list_ama .amz-li { +float: right; +padding-right: 20px; +width: 182px; +padding-left: 86px; +position: relative; +padding-bottom: 10px; +} +.r-list_ama .amz-li:first-child { +float: left; +margin-right: 0; +} +.r-list_ama .li-img { +position: absolute; +top: 0; +left: 0; +width: 75px; +height: 92px; +border: 1px solid #636363; +background-color: #ffffff; +overflow: hidden; +text-align: center; +display: none; +display: block; +} +.r-list_ama .li-img img { + max-height: 75px; + max-width: 75px; +}*/ +#ClickUrl_amazon_center.r-list_ama > a { + display: block; + width: 100%; +} +#ClickUrl_amazon_center.r-list_ama .amz-li { + float: left; + width: 50%; + margin-bottom: 10px; +} +#ClickUrl_amazon_center.r-list_ama .amz-li li a { + margin-bottom: 0; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/yahoo-search-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/yahoo-search-async.js new file mode 100755 index 000000000..629e7c75a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/yahoo-search-async.js @@ -0,0 +1,1741 @@ +/* global G, App */ +/* eslint-disable fecs-camelcase */ + +/** + * @file 2015/06/09 日本yahoo搜索底部添加amazon模块 + * @author daihongtao modify + * */ + +var ClickMonkey = function() { + if(!this.pageId) return { + log: function() {} + }; + var e = "http://nsclick.baidu.com/h.gif?pid=113&v=" + pageId + "&hao123_baiduid=" + unescape((document.cookie.match("BAIDUID"+'=(.+?);')||0)[1]||'').split(":")[0], + t = "bd_clickmonkey", + n = function(n) { + var r = (new Date).getTime(), + i = window[t + r] = new Image, + s = ""; + for(var o in n) s += "&" + o + "=" + n[o]; + i.src = e + "&r=" + r + s, i.onload = i.onerror = function() { + i = null + } + }, r = "", + i = function(e, t) { + t = t || [], r = e.monkey || e.getAttribute("monkey") || r, e.parentNode && e.parentNode.tagName.toUpperCase() != "BODY" && (t = i(e.parentNode, t)); + if(e.previousSibling) { + var n = 1, + s = e.previousSibling; + do s.nodeType == 1 && s.nodeName == e.nodeName && n++, s = s.previousSibling; while (s) + } + return e.nodeType == 1 && t.push(e.nodeName.toLowerCase() + (n > 1 ? n : "")), t + }, s = function(e, t, n, r) { + if(e.addEventListener) return e.addEventListener(t, n, r), !0; + if(e.attachEvent) { + var i = e.attachEvent("on" + t, n); + return i + } + }, o = function(e) { + return encodeURIComponent(e) + }; + s(document.body, "mousedown", function(e) { + var e = window.event || e, + t = e.srcElement || e.target; + if(t.tagName.toUpperCase() != "A") + if(t.parentNode.tagName.toUpperCase() == "A") t = t.parentNode; + else if((t.tagName.toUpperCase() != "INPUT" || t.type.toLowerCase() != "checkbox" && t.type.toLowerCase() != "radio") && t.tagName.toUpperCase() != "AREA") return; + r = ""; + var s = i(t).join("-"), + u = { + xp: s + }, a = t.getAttribute("href", 2); + a && !/^javascript|#/.test(a) ? u.objurl = o(a) : u.objurl = "none", t.innerHTML && !/^\s*\s*$/i.test(t.innerHTML) ? u.title = o(t.innerHTML) : u.title = "none", r && (u.monkey = r), n(u) + }); + var u = function(e, t, r) { + var i = { + xp: "_" + e + "_" + }; + t ? i.objurl = o(t) : i.objurl = "none", r ? i.title = o(r) : i.title = "none", n(i) + }; + return { + log: u + } +}(); + +window.G = window.G || function(id) { + return id + "" === id ? document.getElementById(id) : id; +}; + +"".trim || (String.prototype.trim = function() { + var str = this.replace(/^\s\s*/, ""), + ws = /\s/, + i = str.length; + while (ws.test(str.charAt(--i))); + return str.slice(0, i + 1); +}); + +"".replaceTpl || (String.prototype.replaceTpl = function(o) { + return this.replace(/#\{([^}]*)\}/mg, function(a, b) { + b = b.trim(); + return a = (o[b] && o[b].data ? o[b].data : o[b]) || ""; + }); +}); + +!function(types, li) { + types = types.split("|"); + while(li = types.shift()) !function(li){ + G["is" + li] = function(obj) { + return li === {}.toString.call(obj).replace(/^\[object (\w+)\]$/, "$1"); + } + }(li); +}("String|Array|Object|Number"); + +G.urlEscape = function(s) { + return s.replace(/[\(\)\.\*\{\}\|\[\]\^\\\`\!]/g, function(li){ + return "%" + { + "(" : "28" + , ")" : "29" + , "." : "2E" + , "*" : "2A" + , "{" : "7B" + , "}" : "7D" + , "|" : "7C" + , "[" : "5B" + , "]" : "5D" + , "^" : "5E" + , "\\" : "5C" + , "`" : "60" + , "!" : "21" + }[li] + }); +} + +G.urlUnEscape = function(s) { + + // decodeURIComponent("%") ==> error + s = s.replace(/\+/g, "%20"); + + try{ + s = decodeURIComponent(s); + } + catch(e) {} + return s; +} + +G.isElement = function(obj) { + return window.HTMLElement ? obj instanceof HTMLElement : G.isObject(obj) && G.isString(obj.tagName) && obj.nodeType > 0; +} + +G.each = function(obj, iterator, context) { + var i = 0, + li; + if(G.isArray(obj)) { + for(li = obj.length; i < li; i++) if(iterator.call(context, obj[i], i, obj) === false) break; + } + else if(G.isObject(obj)) { + for(li in obj) { + if(obj.hasOwnProperty(li)) if(iterator.call(context, obj[li], li, obj) === false) break; + } + } +} + +G.delegate = function(el, type, fn) { + el.addEventListener + ? el.addEventListener(type, function(e) { + return fn.call(e.target, e); + }, false) + : el.attachEvent("on" + type, function(e) { + e = window.event; + return fn.call(e.srcElement, e); + }) +} + +G.addCls = function(el, className) { + var els = el.length ? el : [el], + fur = false, // can use classList + ele; + for (var i = 0, j = els.length; i < j; i++) { + ele = els[i]; + if (fur) { + ele.classList.add(className); + } else { + if (ele.classList && ele.classList.add) { + ele.classList.add(className); + fur = true; + } else { + ele.className += " " + className; + fur = false; + } + } + } +} + +G.rmvCls = function(el, className) { + var els = el.length ? el : [el], + fur = false, // can use classList + ele, + reg = new RegExp('(\\s|^)'+className+'(\\s|$)'); + for (var i = 0, j = els.length; i < j; i++) { + ele = els[i]; + if (fur) { + ele.classList.remove(className); + } else { + if (ele.classList && ele.classList.remove) { + ele.classList.remove(className); + fur = true; + } else { + ele.className = ele.className.replace(reg, ' '); + fur = false; + } + } + } +} +/*G.json = { + toString: "", + parse: "" +}*/ + +G.xml = { + parse: function(str) { + var xml = null; + if(window.DOMParser) { + xml = (new DOMParser).parseFromString(str, "text/xml"); + } + else if(window.ActiveXObject) { + try{ + xml = new ActiveXObject("Microsoft.XMLDOM"); + xml.async = false; + xml.loadXML(str); + } catch(e) {} + } + return xml; + }, + toJson: function(xml, json) { + json = json || {}; + if(!xml) return json; + if(G.isString(xml)) xml = G.xml.parse(xml); + if(!xml) return json; + + if(xml.attributes && xml.attributes.length) { + for(var attrN = -1, attrs = xml.attributes, attr; attr = attrs[++attrN];) { + json["@" + attr.name.trim()] = attr.value; + } + } + for(var i = -1 + , children = xml.childNodes + , nodeName, node, li; li = children[++i];) { + if(li.data) { + if(li.data.trim() !== "") json.data = li.data; + continue; + } + nodeName = li.nodeName; + node = {}; + if(!json[nodeName]) json[nodeName] = node; + else if(!json[nodeName].length) { + json[nodeName] = [node, json[nodeName]]; + } + else json[nodeName].push(node); + arguments.callee(li, node); + } + return json; + }, + escape: function(s){ + return s.replace(/[&<>'"]/g, function(li){ + return "&" + { + "&" : "amp" + , "<" : "lt" + , ">" : "gt" + , "'" : "#39" + , '"' : "quot" + }[li] + ";" + }) + } +} + +G.ajax = function(o) { + if(!o || !o.url) return false; + + var type = (o.type || "GET").toUpperCase(), + async = !(o.async === false), + cache = !(o.cache === false), + charset = o.charset || "utf-8", + httpHeader = o.httpHeader || {}, + contentType = o.contentType || "application/x-www-form-urlencoded", + wait = +o.wait, + before = o.before, + success = o.success, + error = o.error, + me = arguments.callee, + encode = encodeURIComponent, + undef, + data = o.data ? G.isString(o.data) ? o.data : function(d, ret) { + G.isElement(d) + ? G.each(d.elements, function(li, i) { + li.name && !li.disabled && ret.push(encode(li.name) + "=" + G.urlEscape(encode(li.value))); + }) + : G.each(d, function(li, k) { + li !== undef && ret.push(encode(k) + "=" + G.urlEscape(encode(li))); + }); + return ret.join("&"); + }(o.data, []) : "", + url = function(s) { + var d = "GET" === type ? data : "", + c = cache ? "" : "r" + +new Date + "=1", + b = s.indexOf("?") < 0 ? "?" : "&"; + return (s + b + d + ((d && c) ? "&" + c : c)).replace(/&$/, ""); + }(o.url), + xhr = (me.getXhr || function(_xhr) { + G.each([ + function() { return new ActiveXObject("Microsoft.XMLHTTP")}, + function() { return new ActiveXObject("Msxml2.XMLHTTP.3.0")}, + function() { return new ActiveXObject("Msxml2.XMLHTTP.6.0")}, + function() { return new XMLHttpRequest} + ], function(li) { + try{ + _xhr = (me.getXhr = li)(); + return false; + } catch (e) {} + }); + return _xhr; + })(), + fix = function() { + if(xhr) xhr.onreadystatechange = function() {}; + if(async) xhr = null; + }, + stateHandle = function() { + if(xhr && xhr.readyState == 4) { + timer && clearTimeout(timer); + try { + var s = xhr.status; + }catch (e) { + error && error.call(xhr); + return; + } + if((s >= 200 && s < 300) || s == 304 || s == 1223) success && success.call(xhr, xhr.responseText); + else if(error) error.call(xhr); + setTimeout(fix, 16); + } + }, + timer; + before && before.call(xhr); + xhr.open(type, url, async); + if(async) xhr.onreadystatechange = stateHandle; + httpHeader['X-Request-With'] = 'XMLHttpRequest'; + if("POST" === type) try{ + xhr.setRequestHeader("Content-Type", contentType + ";charset=" + charset); + G.each(httpHeader, function(li, key) { + key && xhr.setRequestHeader(key, li); + }); + } catch(e){} + if(wait) timer = setTimeout(function() { + fix(); + xhr && xhr.abort(); + error && error.call(xhr); + }, wait); + xhr.send("POST" === type ? data : null); + !async && stateHandle(); + return xhr; +} + +G.loadJs = function(path, callback) { + var doc = document + , readyState = "readyState" + , onreadystatechange = "onreadystatechange" + , readyState = "readyState" + , script = "script" + , pos = doc.getElementsByTagName(script)[0] + , loaded + , node + , li; + if(path + "" === path) path = [path]; + while(li = path.shift()) { + node = doc.createElement(script); + node.onload = node.onerror = node[onreadystatechange] = function() { + if(loaded || (node[readyState] && !(/^c|loade/.test(node[readyState])))) return; + node.onload = node.onerror = node[onreadystatechange] = null; + loaded = 1; + if(callback && callback.scop) { + callback.call(callback.scop); + } else { + callback && callback(); + } + }; + node.async = 1; + node.src = li; + pos.parentNode.insertBefore(node, pos); + } +} + +G.getQuery = function(query, url) { + return G.urlUnEscape((location.href.match(new RegExp("\\?.*" + query + "=([^&$#]*)")) || ["",""])[1]); +} + +G.time = function () { + var imgUrl = "/static/web/common/img/gut.gif", + rate = 1000, + i = 0, + isGet = false, //whether has got the server time + _date; + return { + getTime: function(callback) { + //add callback parameter for other modules to do their own business after obtaining the server time + //get the time difference to prevent the errors which caused by users changed the local time + //two ways to fix the bug: 1. setInterval 2. local time difference, the 2nd way takes precedence + + var render = function(date) { + date = (date = date.getResponseHeader("Date")) ? new Date(date) : new Date; + var startTime = new Date, //get time stamp of the xhr + diff = function() { + var n = new Date - startTime, //2. local time difference + _n = ++i * rate; //1. setInterval + + //calc in 1 minute + return Math.abs(n - _n) > 1000 * 60 ? _n : n; + }, + timer = setInterval(function() { + //render time with the time difference + (_date = new Date(date.getTime())).setMilliseconds(_date.getMilliseconds() + diff()); + //obligate interface to get the server time + conf.serverNow = _date; + }, rate); + + // get time immediately + (_date = new Date(date.getTime())).setMilliseconds(_date.getMilliseconds() + diff()); + conf.serverNow = _date; + isGet = true; // get time process is done + }, + + get = function() { + var xhr = G.ajax({ + url: imgUrl, + cache: false, + error: function() { + //if there has an error such as 404, we can also get the head + render(xhr); + callback && callback.call(callback.scop || {}, conf.serverNow); + }, + success: function() { + render(xhr); + callback && callback.call(callback.scop || {}, conf.serverNow); + } + }); + }; + + if (!isGet) { + get(); + } else { + callback && callback(); + } + + return _date ? _date : new Date; + } + } +}() + +G.fixNum = function(n) { + return n > 9 ? n : ('0' + n); +} + +G.fixDate = function(date) { + var fixN = G.fixNum; + return date.y + '-' + fixN(date.m) + '-' + fixN(date.d); +} + +G.fixDay = function(date, n, _con) { + var that = this, + da = new Date(date.getTime()); + + da.setTime(date.getTime() + n * 24 * 3600 * 1000); + return { + y: da.getFullYear(), + Y: _con.year, + m: da.getMonth() + 1, + M: _con.month, + d: da.getDate(), + D: _con.day, + W: da.getDay() || 7 + }; +} + +G.cookie = function(key, value, options) { + + // key and value given, set cookie... + if (arguments.length > 1 && (value === null || typeof value !== "object")) { + //options = jQuery.extend({}, options); + + if (value === null) { + options.expires = -1; + } + if (typeof options.expires === 'number') { + var days = options.expires, + t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? String(value) : encodeURIComponent(String(value)), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function(s) { + return s; + } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; +} + +/* +bugs: + +"1234xca" ==> Api error + + */ +App.conf.reqPn = +G.getQuery("pn", location.href) || 1; +App.conf.adMaps = { + North: G("ClickUrl_north") + , South: G("ClickUrl_south") + , East: G("ClickUrl_east") + , Amazon: G("ClickUrl_amazon") + , AmazonCenter: G("ClickUrl_amazon_center") +} + +// query, "" ==> block +App.conf.reqParam.query = G.getQuery("query", location.href); +App.conf.reqParam.useragent = navigator.userAgent; +App.conf.reqAdParam.affilData = "ip=" + App.conf.reqParam.ip + "&ua=" + App.conf.reqParam.useragent; + +App.supportState = !!(window.history && window.history.pushState && window.history.replaceState && !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/)); + +App.cache = { + urlbase: location.href.split('?')[0] +} + +App.tip = { + timer: null + , el: G("resultTip") + , wrap: G("resultWrap") + , show: function(state) { + App.tip.hide(); + App.tip.timer = setTimeout(function() { + App.tip.el.innerHTML = ' ' + App.conf.txt[state]; + App.tip.wrap.className += " r-" + state; + }, 500); + } + , hide: function(timer) { + timer = timer || App.tip.timer; + timer && clearTimeout(timer); + App.tip.wrap.className = App.tip.wrap.className.replace(/ r-(loading|error|abort)/g, ""); + } +} + +App.amazonAds = { + conf: {}, + data: {}, + callF: null, + MAXNUM: 2, + logoTpl:'', + tpl: '
                                  • ' + + '#{brand}' + + '

                                    #{title}

                                    ' + + '

                                    #{discount}#{dis}' + + '#{price}#{pri}' + + '#{descrip}

                                  • ', + init: function(con, rand) { + G.rmvCls(App.conf.adMaps.Amazon, "amz-show"); + G.rmvCls(App.conf.adMaps.AmazonCenter, "amz-show"); + + // 亚马逊广告出现时,如果adWordSouth的广告为空,隐藏 "xxx广告" 文案 + App.conf.adMaps.AmazonCenter.parentNode.style.display = 'block'; + // 为了通过编码检查,只好把G 换一个函数名 + var getElementByIdForRuleCheck = G; + var adWordSouthEle = getElementByIdForRuleCheck('adWordSouth'); + if (adWordSouthEle.parentNode.style.display !== 'block') { + adWordSouthEle.parentNode.style.display = 'none'; + } + + var _self = App.amazonAds, + that = _self.conf; + + if (con.isHidden !== "0") return; + + that.reqParams = con.params; + that.minTotal = parseInt(con.min, 10) || 2; + that.query = con.q; + that.url = con.url || window["conf"].apiUrlPrefix; + that.content = { + price: con.price, + discount: con.discount + }; + that.amazonLogo = con.amazonLogo; + that.logoUrl = con.logoSrc; + + _self.getData(function() { + _self.formatData(); + _self.render(_self.data, rand); + }); + }, + getData: function(callback) { + var _self = App.amazonAds, + that = _self.conf, + params = [], + reqUrl = that.url + "?" + that.reqParams + "&"; + + _self.callF = _self.getCallbackFunc(); + + params.push("country=" + (window["conf"].country || "jp")); + params.push("_=" + +new Date); + params.push(that.query + "=" + encodeURIComponent(App.conf.reqParam.query)); + params.push("jsonp=" + _self.callF); + reqUrl += params.join("&"); + + callback.scop = _self; + G.loadJs(reqUrl, callback); + + }, + filterHtmlTag: function(html){ + var tmp = document.createElement("div"); + tmp.innerHTML = html; + return tmp.innerText || tmp.textContent || ""; + }, + formatData: function() { + var _self = App.amazonAds, + that = _self.conf, + cont = that.content, + disCo = cont.discount, + price = cont.price, + data = window[_self.callF].data; + + data = (data && data.content) || ""; + if(!data) return; + data = G.xml.toJson(data); + data = data && data["ItemSearchResponse"] && data["ItemSearchResponse"]["Items"]; + data = data && data["Item"]; + + if(data) { + UT && UT.send({modId: "amazonAds", type: "others", position: data.length || 0}); + } + if(data && data.length >= that.minTotal) { + data.sort(function(prev, next) { + var sR = "SalesRank", + pR = parseInt((prev[sR] && prev[sR].data) || 0, 10), + nR = parseInt((next[sR] && next[sR].data) || 0, 10); + return (pR && nR) ? (pR - nR) : (nR - pR); + }); + var _data = [], + url = '', title = '', dis = '', other = '', + pri = '', des = '', brand = '', imgSrc= ''; + var otherClass; + + for(var i = 0, l = data.length; i < l; i++) { + url = data[i]["DetailPageURL"]; + url = (url && url.data) || ""; + + title = data[i]["ItemAttributes"]; + title = (title && title["Title"]) || ""; + title = (title && title.data) || ""; + + dis = data[i]["ItemAttributes"]; + dis = (dis && dis["ListPrice"]) || ""; + dis = (dis && dis["FormattedPrice"]) || ""; + dis = (dis && dis.data) || ""; + + pri = data[i]["OfferSummary"]; + pri = (pri && pri["LowestNewPrice"]) || ""; + pri = (pri && pri["FormattedPrice"]) || ""; + pri = (pri && pri.data) || ""; + + des = data[i]["EditorialReviews"]; + des = (des && des["EditorialReview"]) || ""; + if (des.length >= 2) { + des = (des[0]["IsLinkSuppressed"]["data"] === "0") ? des[0]["Content"]["data"] : (des[1]["IsLinkSuppressed"]["data"] === "0" ? des[1]["Content"]["data"] : ""); + } else { + des = (des && des["IsLinkSuppressed"]["data"] === "0") ? des["Content"]["data"]: ""; + } + + brand = data[i]["ItemAttributes"]; + brand = (brand && brand["Brand"]) || ""; + brand = (brand && brand.data) || ""; + + imgSrc = data[i]["MediumImage"] || ""; + if(imgSrc) { + if(parseInt(imgSrc["Height"]["data"], 10) > parseInt(imgSrc["Width"]["data"], 10)) { + other = 'height="75"'; + } else { + other = 'width="75"'; + } + imgSrc = 'src="' + imgSrc["URL"]["data"] + '"'; + } else { + imgSrc = ''; + other = ''; + otherClass = 'amz-li-noimg'; + } + + if(!url || !title) continue; + + _data.push({ + href: url, + title: title, + discount: dis? disCo: "", + dis: dis? ("" + dis + "  "): "", + price: pri? price: "", + pri: pri? ("" + pri + "   "): "", + descrip: _self.filterHtmlTag(des), + brand: brand, + imgSrc: imgSrc, + other: other, + otherClass: otherClass + }); + } + _self.data = _data; + _self._data = data; + } else { + _self.data = {}; + _self._data = {}; + } + + }, + render: function(data, rand) { + var index = [], + str = '', + _self = App.amazonAds, + tpl = _self.tpl, + max = _self.MAXNUM; + + if(data.length) { + index = rand ? _self.getRandsIndex(data.length, max) : _self.enumType(max); + + for(var i = 0, l = index.length; i < l; i++) { + data[index[i]].i = i + 1; + str += tpl.replaceTpl(data[index[i]]); + } + if(_self.conf.amazonLogo) { + str = _self.logoTpl.replaceTpl({imgSrc: _self.conf.amazonLogo, linkUrl: _self.conf.logoUrl}) + str; + } + App.conf.adMaps.Amazon.innerHTML = str; + G.addCls(App.conf.adMaps.Amazon, "amz-show"); + + // 列表页区域amazon广告,为尽量避免与侧边栏广告重复,采用随机策略 + index = _self.getRandsIndex(data.length, max); + str = ''; + + for(var i = 0, l = index.length; i < l; i++) { + data[index[i]].i = i + 1; + str += tpl.replaceTpl(data[index[i]]); + } + if(_self.conf.amazonLogo) { + str = _self.logoTpl.replaceTpl({imgSrc: _self.conf.amazonLogo, linkUrl: _self.conf.logoUrl}) + str; + } + App.conf.adMaps.AmazonCenter.innerHTML = str; + G.addCls(App.conf.adMaps.AmazonCenter, "amz-show"); + } else { + return true; + } + }, + enumType: function(max) { + var arr = []; + for(var i = 0; i < max; i++) { + arr.push(i); + } + return arr; + }, + shuffle: function(o){ + for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); + return o; + }, + getRandsIndex: function(len, max) { + var arr = [], + curData = [], + _self = App.amazonAds; + + for(var i = 0; i < len; i++) { + arr[i] = i; + } + + for(var j = 0; j < max; j++) { + arr = _self.shuffle(arr); + curData.push(arr[0]); + arr.splice(0, 1); + } + + return curData; + }, + getCallbackFunc: function() { + var callName = "ghao123_amazon" + ('' + +new Date).substring(3); + window[callName] = function(data) { + window[callName].data = data; + }; + return callName; + } + +} + +App.ept = function(conf) { + var that = this; + + that.conf = conf; + that.curDate = 0; + that.curType = that.conf.list[0].types; + that.timeList = []; // for get ajax data + that.timGroup = []; // for render date + + that.callName = {}; // jsonp callback function + that.reqPath = ""; // JSONP request path Tpl + + that.eptTle = G("eptTitle"); + that.eptTab = G("eptBtn"); + that.eptCtr = G("eptCtrl"); + that.eptRes = G("eptRes"); + + that.curTab = {}; // current tab DOM object + that.ctrPrev = {}; // control to prev + that.ctrNext = {}; // control to next + that.ctrTime = {}; // show time + + that.tabTpl = '
                                  • #{title}
                                  • '; + that.ctrTpl = '
                                    <#{prev}

                                    #{date}

                                    >#{next}
                                    '; + that.timTpl = '#{y}#{Y}#{m}#{M}#{d}#{D}#{update}'; + that.resTpl = '
                                  • #{num}#{content}
                                  • '; + + that.init(); +} +App.ept.prototype = { + init: function() { + var that = this; + + that.callName = that.getCallbackFunc(); // create callback + that.createHtml(); // init create html + that.createReqPath(); // create JSONP path tpl + + that.bindEvent(); + }, + sendRequest: function(typ, index, callback) { + var that = this, + path = that.reqPath.replaceTpl({ + type: typ, + date: (index === 0 ? "" : that.timeList[index]), + stamp: +new Date + }); + callback.scop = that; + G.loadJs(path, callback); + }, + render: function() { + var that = this, + _tpl = that.resTpl, + _bod = document.body, + data = window[that.callName].data || {}, + maxL = parseInt((that.conf && that.conf.ajaxUrl && that.conf.ajaxUrl.num) || 20, 10); + str = "", + _url = location.href.split("?")[0] + "?query="; + + data = (data.content && data.content.data) || []; + + if(data.length > 0) { + /*if(data.length === 1) { // when one data + G.addCls(that.ctrPrev, "ctr-diable"); + } else { // not only one data + G.rmvCls(that.ctrPrev, "ctr-diable"); + }*/ + G.rmvCls(_bod, "no-data"); + for(var i = 0, l = Math.min(data.length, maxL); i < l; i++) { + str += _tpl.replaceTpl({ + addClas: "i-rank-" + (i + 1), + num: i + 1, + content: data[i]["info_name"] || "", + url: _url + G.urlEscape(encodeURIComponent(data[i]["info_name"] || "")) + }); + } + that.eptRes.innerHTML = str; + } else { + G.addCls(_bod, "no-data"); + } + }, + createReqPath: function() { + var that = this, + params = [], + _glo = window.conf, + _con = that.conf.ajaxUrl, + url = (_con.url || _glo.apiUrlPrefix) + "?"; + for(var i in _con) { + if(_con.hasOwnProperty(i) && !_con[i].match("http://")) { + params.push(i + "=" + _con[i]); + } + } + params.push("type=#{type}"); + params.push("date=#{date}"); + params.push("jsonp=" + that.callName); + params.push("country=" + (_glo.country || "jp")); + params.push("_=#{stamp}"); + url += params.join("&"); + that.reqPath = url; + that.curReqPath = url.replace("&date=#{date}", ""); + }, + getCallbackFunc: function() { + var callName = "ghao123_custom" + ('' + +new Date).substring(3); + window[callName] = function(data) { + window[callName].data = data; + }; + return callName; + }, + initCtr: function(date) { + var that = this, + _con = that.conf, + _up = _con.update, + _ctr = that.eptCtr, + _cpl = that.ctrTpl, + _tpl = that.timTpl, + _lis = that.timeList, + _grp = that.timGroup; + + var fixDay = G.fixDay, + fixDat = G.fixDate, + tmpDay = {}; + + for(var i = 0, l = parseInt(_con.maxDays || 7, 10); i < l; i++) { + tmpDay = fixDay(date, 0-i, _con); + if(tmpDay.W < 6) { + tmpDay.update = _up; + _grp.push(_tpl.replaceTpl(tmpDay)); + _lis.push(fixDat(tmpDay)); + } + } + _ctr.innerHTML = _cpl.replaceTpl({ + prev: _con.prev, + next: _con.next, + date: _grp[0] + }); + that.ctrPrev = G("ctrlPrev"); // control to prev + that.ctrNext = G("ctrlNext"); // control to next + that.ctrTime = G("ctrlTime"); // show time + + that.bindCtrl(); // need elements have been created + + that.sendRequest(that.curType, that.curDate, that.render); // init request jsonp data + }, + initTle: function() { + var that = this, + _con = that.conf, + _img = _con.titleIcon, + _url = _con.titleUrl, + str = ''; + str += _url ? ('') : ''; + str += _img ? ('') : ''; + str += _con.title; + str += _url ? '' : ''; + that.eptTle.innerHTML = str; + }, + initTab: function() { + var that = this, + _con = that.conf.list, + _tab = that.eptTab, + _cuT = G.cookie("tabTypes"), + _cuI = 0, + str = '', + _tpl = that.tabTpl; + + for(var i = 0, l = _con.length; i < l; i++) { + _con[i].cur = ""; + + if(_cuT) { + if(_con[i].types == _cuT) { + that.curType = _con[i].types; + _cuI = i; + } + } else if( i === 0 ) { + that.curType = _con[i].types; + } + str += _tpl.replaceTpl(_con[i]); + } + + G.addCls(_tab, "tab-" + l); + _tab.innerHTML = str; + + that.curTab = _tab.getElementsByTagName("li")[_cuI]; + G.addCls(that.curTab, "cur"); + }, + switchTab: function(li) { + var that = this; + + that.curType = li.getAttribute("typ"); + + G.rmvCls(that.curTab, "cur"); + G.addCls(li, "cur"); + G.cookie("tabTypes", that.curType, {expires: 400}); + + that.curTab = li; + that.sendRequest(that.curType, that.curDate, that.render); + }, + getPrev: function() { + var that = this, + _tim = that.timeList, + _pre = that.ctrPrev, + _nex = that.ctrNext; + + if(_pre.className.search("ctr-diable") > -1) return; + + if(that.curDate === 0) { + G.rmvCls(_nex, "ctr-diable"); //is first + } + + that.curDate++; + + if(!_tim[that.curDate + 1]) { + G.addCls(_pre, "ctr-diable"); + } + + that.ctrTime.innerHTML = that.timGroup[that.curDate]; + + that.sendRequest(that.curType, that.curDate, that.render); + }, + getNext: function() { + var that = this, + _tim = that.timeList, + _pre = that.ctrPrev, + _nex = that.ctrNext; + + if(_nex.className.search("ctr-diable") > -1) return; + + if(that.curDate === _tim.length - 1) { + G.rmvCls(_pre, "ctr-diable"); //is last + } + + that.curDate--; + + if(that.curDate - 1 < 0) { + G.addCls(_nex, "ctr-diable"); + } + + that.ctrTime.innerHTML = that.timGroup[that.curDate]; + + that.sendRequest(that.curType, that.curDate, that.render); + }, + bindCtrl: function() { + var that = this; + + G.delegate(that.ctrPrev, 'click', function(event) { + that.getPrev(); + UT && UT.send({modId: "empty-search-rank", type: "click", position: "emptyPrev"}); + }); + G.delegate(that.ctrNext, 'click', function(event) { + that.getNext(); + UT && UT.send({modId: "empty-search-rank", type: "click", position: "emptyNext"}); + }); + }, + bindEvent: function() { + var that = this; + G.delegate(that.eptTab, 'click', function(event) { + var _self = this; + if(_self.tagName === "LI" && !_self.className.match("cur")) { + that.switchTab(_self); + UT && UT.send({modId: "empty-search-rank", type: "click", position: "emptyTab", sort: that.curType}); + } + }); + G.delegate(that.eptRes, 'click', function(event) { + var _self = this; + if(_self.tagName === "A" || _self.parentNode.tagName === "A") { + UT && UT.send({modId: "empty-search-rank", type: "click", position: "searchWords", sort: that.curType}); + } + }); + G.delegate(that.eptTle, 'click', function(event) { + var _self = this; + if(_self.tagName === "A" || _self.parentNode.tagName === "A") { + UT && UT.send({modId: "empty-search-rank", type: "click", position: "title"}); + } + }); + }, + createHtml: function() { + var that = this; + + that.initTle(); + that.initTab(); + + that.initCtr.scop = that; + G.time.getTime(that.initCtr); + } +} + +var eptObj = null, + noFrst = false; + +App.req = function(type) { + var eptConf = conf.ept, // empty search word + _conf = App.conf, + cache = App.cache, + reqParam = _conf.reqParam; + if (!reqParam.query) { + // add body class + if(eptConf) { + G.addCls(document.body, "ept-srch"); + + G("searchInput").value = G("searchInput2").value = reqParam.query; + + !eptObj && (eptObj = new App.ept(eptConf)); + } + } else { + // remove body class + G.rmvCls(document.body, "ept-srch"); + if (noFrst) {// first time no send log + UT && UT.send({ + type: "click", + sort: "search", + value: reqParam.query + }); + } else { + noFrst = true; + } + + reqParam["web.FirstResult"] = _conf.reqPn < 2 ? 0 : reqParam["web.NumResults"] * (_conf.reqPn - 1); + // G("searchInput").value = G("searchInput2").value = G.urlUnEscape(reqParam.query); + G("searchInput").value = G("searchInput2").value = reqParam.query; + + App.tip.show("loading"); + G("totalHits").innerHTML = ""; + cache.xhr && cache.xhr.abort(); + cache.xhr = G.ajax({ + type: "GET", + url: _conf.reqUrl, + data: _conf.reqParam, + wait: 10000, + success: App.render, + error: function() { + App.render(""); + App.tip.show("abort"); + } + }); + App.updateAd(); + + App.amazonAds.render(App.amazonAds.data); + } +} + +App.renderPn = function(str) { + if(G.isString(str)) return G("resultPn").innerHTML = str; + var conf = App.conf, + pn = conf.reqPn, + tpl = conf.tpl.pnLi, + txt = conf.txt, + i = 2, + total = 10, + dot = '
                                  • ...
                                  • ', + ret = [], + buildUrl = function(i) { + return App.supportState ? "javascript:void(0)" : App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(conf.reqParam.query)) + "&pn=" + i; + } + + if(pn > 1) ret.push(tpl.replaceTpl({ + url: buildUrl(pn - 1) + , n: "<" + , t: txt["prepage"] + })); + ret.push(tpl.replaceTpl({ + url: buildUrl(1) + , n: 1 + , t: 1 + })); + + if(pn > 7){ + ret.push(dot); + i = pn - 5; + total = pn + 5; + } + + if(App.cache.isLastPage) total = pn + 1; + + for(; i < total; i++) { + ret.push(tpl.replaceTpl({ + url: buildUrl(i) + , n: i + , t: i + })); + } + + if(!App.cache.isLastPage) { + ret.push(dot); + ret.push(tpl.replaceTpl({ + url: buildUrl(pn + 1) + , n: ">" + , t: txt["nextpage"] + })); + } + + G("resultPn").innerHTML = ret.join("").replace(new RegExp(">" + pn + ""), ' onclick="return false" class="r-pn_cur">' + pn + ''); +} + +App.renderAd = function(data) { + // fix ad Data + data = function(data) { + var ret = {}, + key; + G.each(data, function(val, key) { + ret[key] = []; + val.length && G.each(val, function(li, i) { + li && ret[key].push(li); + }); + }); + return ret; + }(data); + + var conf = App.conf, + adMaps = conf.adMaps, + adNum = conf.adNum, + // fixNum = +adNum.North - data.North.length, + tmpLen = data.South.length, + el; + + /* + fix ad Data + 1. keep north = 4 + 2. from: south > east + */ + // if(fixNum > 0) data.North = data.North.concat(data.South.splice(0, fixNum), data.East.splice(0, (tmpLen > fixNum || tmpLen === fixNum) ? 0 : fixNum - tmpLen)); + + G.each(data, function(val, key) { + if(key === "Amazon") { + return true; + } + el = adMaps[key]; + val.length = Math.min(val.length, +adNum[key]); + el.innerHTML = val.length ? val.join("") : ""; + if(G("adWord"+key)&&conf.txt.adTitle){ + G("adWord"+key).innerHTML = G.xml.escape(conf.reqParam.query); + G("adWord"+key).parentNode.parentNode.style.display = "block"; + } + + // 底部添加了amazon的广告,特殊处理 + if (key === 'South') { + if (val.length) { + el.parentNode.style.display = 'block'; + var getElementByIdForRuleCheck = G; + var adWordSouthEle = getElementByIdForRuleCheck('adWordSouth'); + adWordSouthEle.parentNode.style.display = 'block'; + } + } else { + el.parentNode.style.display = val.length ? 'block' : ''; + } + }); + + + // bind linkIndex + G.each(adMaps, function(val, key) { + if(!val) return false; + var list = val.getElementsByTagName("li"), + i = 0, + li; + if(list && list.length) for(; li = list[i++];) { + var link = li.getElementsByTagName("a")[0]; + link && link.setAttribute("data-i", i); + } + }); +} + +App.updateAd = function() { + var conf = App.conf, + adNum = conf.adNum, + reqAdParam = conf.reqAdParam, + tpl = conf.tpl.adLi, + data = { + North: [] + , South: [] + , East: [] + }, + counter = { + north: 0, + south: 0, + east: 0 + }, + // Render AD tpls + renderTpl = function (listing, clickUrl) { + var key = /North/.test(clickUrl["@type"]) && counter.north++ < +adNum["North"] ? "North": /South/.test(clickUrl["@type"]) && counter.south++ < +adNum["South"] ? "South" : /East/.test(clickUrl["@type"]) && counter.east++ < +adNum["East"] ? "East" : ""; + if(data[key] && listing["@rank"]) data[key][+listing["@rank"]] = tpl.replaceTpl({ + url: clickUrl["data"] + , t: listing["@title"] + , des: listing["@description1"] + listing["@description2"] + , host: listing["@siteHost"] + // only show quick links in the north position + , quickLink: listing["QuickLink"] && key === "North" ? function(links, ret) { + var i = 0; + G.each(links, function(link) { + if (/North/.test(link["@type"]) && i < conf.qlMaxNum) { + ret[+link["@number"] - 1] = '' + link["@text"] + ''; + i++; + } + }); + return ret.join(" - ") + }(listing["QuickLink"], []) : "" + }); + }; + reqAdParam.Keywords = conf.reqParam.query; + if(G("adBoxSeq")){ + G("adBoxSeq").style.display = "none"; + } + App.renderAd(data); + + reqAdParam.Keywords && G.ajax({ + type: "GET", + url: conf.reqAdUrl, + data: reqAdParam, + wait: 10000, + success: function(res) { + if(!res) return; + res = G.xml.toJson(res); + if(res["Results"] && res["Results"]["ResultSet"] && res["Results"]["ResultSet"]["Listing"]) { + res = res["Results"]["ResultSet"]["Listing"]; + if(!res.length) res = [res]; + G.each(res, function(li, i) { + /*if(li["ClickUrl"]) { + var key = (li["ClickUrl"]["@type"].split("-") || ["", ""])[1]; + + if(data[key] && li["@rank"]) data[key][+li["@rank"]] = tpl.replaceTpl({ + url: li["ClickUrl"] + , t: li["@title"] + , des: li["@description1"] + li["@description2"] + , host: li["@siteHost"] + , quickLink: li["QuickLink"] ? function(links, ret) { + G.each(links, function(link) { + ret[+link["@number"] - 1] = '' + link["@text"] + ''; + }); + return ret.join(" - ") + }(li["QuickLink"], []) : "" + }); + }*/ + + // no North / East / South + + // change to 2 / 8 / 4 + if(li["ClickUrl"]) { + // var key = i < +adNum["North"] ? "North" : i < (+adNum["North"] + +adNum["East"]) ? "East" : i < (+adNum["North"] + +adNum["East"] + +adNum["South"]) ? "South" : ""; + // Render tpls with the 2 kinds of data format + if (li["ClickUrl"].length && !li["ClickUrl"]["data"]) { + for (var j in li["ClickUrl"]) { + renderTpl(li, li["ClickUrl"][j]); + } + } else { + renderTpl(li, li["ClickUrl"]); + } + } + }); + } + App.renderAd(data); + if(G("adBoxSeq")){ + G("adBoxSeq").style.display = "block"; + } + UT && UT.send({type: "others", modId: "yahoo-search-ad", position:"north", sort: counter.north}); + }, + error: function() { + App.renderAd(data); + if(G("adBoxSeq")){ + G("adBoxSeq").style.display = "block"; + } + UT && UT.send({type: "others", modId: "yahoo-search-ad", position:"north", sort: counter.north}); + } + }); +} + +App.render = function(data) { + App.cache.xhr = null; + if(data === "") { + G("result").innerHTML = ""; + G("totalHits").innerHTML = ""; + App.renderPn(""); + return; + } + data = G.xml.toJson(data); + + if(!data["BATCHSEARCHRESPONSE"] + || !data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"] + || !data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["RESULT"] + ) { + G("result").innerHTML = '

                                    ' + App.conf.txt.noResult.replaceTpl({ + + // Fix: XSS + query: '' + G.xml.escape(App.conf.reqParam.query) + '' + }) + '

                                    ' + App.conf.tpl.noResult; + + G("totalHits").innerHTML = ""; + App.renderPn(""); + App.tip.hide(); + return; + } + + // last page + App.cache.isLastPage = data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["@XT"] === "1" ? 1 : 0; + + var result = G("result"), + conf = App.conf, + tpl = conf.tpl, + txt = conf.txt, + list = data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["RESULT"], + query = conf.reqParam.query, + ret = []; + setTimeout(function() { + G("searchInput").focus(); + }, 64); + + if(list) { + if(list.length) App.renderPn(); + else list = [list]; + + // fix list 0 <=> 1 + if(list.length > 1) { + var tmpLiNode = list[0]; + list[0] = list[1]; + list[1] = tmpLiNode; + tmpLiNode = null; + } + + G.each(list, function(li) { + li.cache = txt.cache; + li.query = encodeURIComponent(App.conf.reqParam.query); + // li.DISPURL.data = G.fixLen(li.DISPURL.data, 90, "..."); + ret.push(tpl.resultLi.replaceTpl(li)) + }); + App.tip.hide(); + } + else { + App.renderPn(""); + App.tip.show("error"); + } + result.innerHTML = ret.join(""); + G("totalHits").innerHTML = txt.totalhits.replaceTpl({ + totalhits: data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["@TOTALHITS"].replace(/(\d)(?=(?:\d{3})+\b)/g, "$1,") + }); + + App.renderWord(data); + +} +App.renderWord = function(data) { + if (!data["BATCHSEARCHRESPONSE"]||!data["BATCHSEARCHRESPONSE"]["RESULTSET_ASSIST"]||!data["BATCHSEARCHRESPONSE"]["RESULTSET_ASSIST"]["RESULT"]) return; + var resultWord = G("resultWord"); + var wordList = data["BATCHSEARCHRESPONSE"]["RESULTSET_ASSIST"]["RESULT"]; + var ret = []; + var conf = App.conf; + var tpl = conf.tpl; + var query = conf.reqParam.query; + + if(wordList) { + G.each(wordList, function(li) { + li.dataFm = li.data.replace(query,""+query+""); + li.url = App.supportState ? "javascript:void(0)" : App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(li.data)) + "&pn=" + 1; + ret.push(tpl.wordLi.replaceTpl(li)); + }); + resultWord.innerHTML = ret.join(""); + + + + + resultWord.parentNode.style.display = "block"; + }else{ + resultWord.parentNode.style.display = "none"; + } + +} + +App.sugInit = function() { + var conf = App.conf, + searchInput = G("searchInput"); + conf.sug.templ = function(data, q) { + var that = this, + o = that.o, + classNameQueryNull = o.classNameQueryNull, + classNameQuery = o.classNameQuery, + ret = []; + + if(data + "" === data) { + ret.push('

                                    ' + data + '

                                    ') + } + else { + data = data[o.callbackDataKey || o.callbackDataNum] || []; + + var i = 0, + l = Math.min(data.length, o.n), + li, + undef; + q = q.trim(); + for(; i -1 ? "" : " class=" + classNameQueryNull) + '>' + (classNameQuery ? li.replace(q, '' + q + '') : li) + ''); + } + } + return '
                                      ' + ret.join("") + '
                                    ' + conf.tpl.sugBot.replaceTpl({ + classOn: conf.sugOn ? "" : "sug-close sug-switch_cur" + , classOff: conf.sugOn ? "sug-close sug-switch_cur" : "" + }); + } + conf.sug.onSucess = function(data) { + if(App.cache.waitSugTimer) { + clearTimeout(App.cache.waitSugTimer); + App.cache.waitSugTimer = null; + } + } + conf.sug.onRequest = function(data) { + if(!App.cache.waitSugTimer) App.cache.waitSugTimer = setTimeout(function() { + searchtop(conf.txt.withoutSug); + }, 1000); + App.cache.sug.sugWrap.style.visibility = App.conf.sugOn ? "" : "hidden"; + } + G.loadJs([conf.sugPath], function() { + var sug = App.cache.sug = G.sug(searchInput, conf.sug); + G("sugShow").onclick = function() { + var val = searchInput.value; + searchInput.focus(); + if(!conf.sugOn) { + sug.q = ""; + searchtop(conf.txt.closedSug); + sug.sugWrap.style.visibility = ""; + return false; + } + + if(!val.trim()) { + searchtop(conf.txt.withoutQuery); + } + else { + sug.request(val); + } + } + G.delegate(sug.sugWrap, "mousedown", function(e) { + var type = this.getAttribute("data-switch"), + el; + + (this.tagName === "LI" || this.parentNode.tagName === "LI") && UT && UT.send({type: "click", sort:"search_sug"}); + + if(!type || !/sug-switch_cur/.test(this.className)) return false; + App.conf.sugOn = type === "on"; + el = G("sugSwitch_" + (conf.sugOn ? "off" : "on")); + el && (el.className += " sug-switch_cur"); + this.className = this.className.replace(" sug-switch_cur", ""); + return false; + }); + }) +} + +App.iptControl = function(opt) { + this.ipt = opt.ipt; + this.btnClose = opt.btnClose; + this.tip = opt.tip; +} + +App.iptControl.prototype = { + init: function() { + var that = this; + "onpropertychange" in that.ipt + ? that.ipt.onpropertychange = function(e){ + e = window.event; + e.propertyName == "value" && that.iptHandle.call(that); + } + : that.ipt.addEventListener("input", function(e) { + that.iptHandle.call(that); + }, false); + + that.updateBtnClose(); + + that.btnClose.onclick = function() { + that.ipt.value = ""; + setTimeout(function() { + that.ipt.focus(); + that.show(that.btnClose, "none"); + }, 64); + return false; + } + + that.ipt.onfocus = that.ipt.onblur = function(e) { + that.updateBtnClose.call(that); + } + + that.tip.onclick = function() { + that.ipt.focus(); + } + }, + updateBtnClose: function() { + var that = this; + setTimeout(function() { + that.ipt.value + ? that.show(that.btnClose, "inline-block") + : that.show(that.btnClose, "none") + }, 64); + }, + iptHandle: function(e) { + var that = this; + that.ipt.value + ? that.show(that.btnClose, "inline-block").show(that.tip, "none") + : that.show(that.btnClose, "none"); + }, + show: function(el, className) { + if(el.style.display !== className) el.style.display = className; + return this; + } +} + +App.init = function() { + var conf = App.conf, + searchInput = G("searchInput"), + iptControl = new App.iptControl({ + ipt: G("searchInput") + , btnClose: G("searchClose") + , tip: G("searchIptTip") + }), + iptControl2 = new App.iptControl({ + ipt: G("searchInput2") + , btnClose: G("searchClose2") + , tip: G("searchIptTip2") + }); + + G.delegate(document.body, "mousedown", function(e) { + + (this.tagName === "A" || this.parentNode.tagName === "A" || this.tagName === "BUTTON") && UT && UT.send({type: "click", position: "links"}); + + (this.id === "searchSubmit" || this.id === "searchSubmit2") && UT && UT.send({type: "click", sort: "search_btn"}); + + (/logo-hao123/.test(this.className) || /logo-hao123/.test(this.parentNode.className)) && UT && UT.send({type: "click", sort:"logo_hao123"}); + + (/logo-yahoo/.test(this.className) || /logo-yahoo/.test(this.parentNode.className)) && UT && UT.send({type: "click", sort:"logo-yahoo"}); + + if(this.tagName === "A" || this.parentNode.tagName === "A") { + e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = true); + } + }); + + G.delegate(G("result"), "mousedown", function(e) { + (this.tagName === "A" || this.parentNode.tagName === "A") && UT && UT.send({type: "click", sort:"search_result", position: "links"}); + }); + + G.each(conf.adMaps, function(val, key) { + G.delegate(val, "mousedown", function(e) { + if(this.getAttribute("data-logo") || this.parentNode.getAttribute("data-logo")) return; + (this.tagName === "A" || this.parentNode.tagName === "A" || this.parentNode.parentNode.tagName === "A") && !/r-list_more/.test(this.parentNode.className) && UT && UT.send({type: "click", position:"search_ad", value: (this.innerText || this.innerHTML).trim(), sort: key, linkIndex: this.getAttribute("data-i") || this.parentNode.getAttribute("data-i") || this.parentNode.parentNode.getAttribute("data-i")}); + }); + }); + + App.req(); + App.amazonAds.init(window["conf"].amazonAds, parseInt(conf.reqPn , 10) > 1 ? true: false); + + if(App.supportState) { + history.pushState({ + query: conf.reqParam.query + , pn: conf.reqPn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(conf.reqParam.query)) + "&pn=" + conf.reqPn + ); + } + + G("searchForm").onsubmit = G("searchForm2").onsubmit = function(e) { + var query = conf.reqParam.query = this.getElementsByTagName("input")[0].value.trim(), + iptTip = G(/2/.test(this.id) ? "searchIptTip2" : "searchIptTip"); + //if(!query) { + /*iptControl.show(iptTip, "inline-block"); + return false;*/ + //return; + //} + + if(!App.supportState) return; + conf.reqPn = 1; + App.req(); + App.amazonAds.init(window["conf"].amazonAds); + history.pushState({ + query: query + , pn: conf.reqPn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(query)) + "&pn=" + conf.reqPn + ); + setTimeout(function() { + App.cache.sug && App.cache.sug.hide(1); + }, 200); + return false; + } + G.delegate(G("resultWord"), "mousedown", function(e) { + if(this.tagName === "B"||this.tagName === "A"){ + var q = this.tagName === "B" ? this.parentNode.getAttribute("data-q") : this.getAttribute("data-q"); + conf.reqParam.query = q; + UT && UT.send({type: "click", modId: "related-keywords", sort: q}); + + if(!App.supportState) return; + conf.reqPn = 1; + App.req(); + history.pushState({ + query: q + , pn: conf.reqPn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(q)) + "&pn=" + conf.reqPn + ); + + } + }); + G.delegate(G("searchLinks"), "click", function(e) { + var val = G("searchInput").value.trim(), + qUrl = this.getAttribute("data-url"); + if(!qUrl || !val) return; + + window.open(this.getAttribute("data-url").replaceTpl({q: encodeURIComponent(val)})); + e.preventDefault && e.preventDefault(); + return false; + }); + + G.delegate(G("searchLinks"), "mousedown", function(e) { + UT && UT.send({type: "click", sort: "search_tab", position: "links", value: this.innerHTML.trim()}); + }); + + setTimeout(function() { + App.sugInit(); + }, 200); + + if(!App.supportState) return; + + window.addEventListener("popstate", function(e) { + var state = e.state; + if(!state/* || !state.query*/) return; + conf.reqParam.query = history.state.query; + conf.reqPn = history.state.reqPn; + App.req(); + App.amazonAds.init(window["conf"].amazonAds, parseInt(conf.reqPn, 10) > 1 ? true: false); + + // fix history not reset page num +/* setTimeout(function() { + var pnLinks = G("resultPn").getElementsByTagName("a") || []; + G.each(pnLinks, function(li) { + if(~~li.getAttribute("data-n") === ~~conf.reqPn && !/r-pn_cur/.test(li.className)) { + li.className = "r-pn_cur"; + return false; + } + }); + }, 100);*/ + + }, false); + + G.delegate(G("resultPn"), "mousedown", function(e) { + var pn = this.getAttribute("data-n"), + query = conf.reqParam.query, + reqPn = conf.reqPn; + + if(this.tagName !== "A" || /r-pn_cur/.test(this.className || !pn)) return false; + + UT && UT.send({type: "click", sort:"nextpage"}); + + if(pn === "<") pn = -1; + else if(pn === ">") pn = 1; + else conf.reqPn = 0; + conf.reqPn = +pn + conf.reqPn; + App.req(); + if(App.amazonAds.render(App.amazonAds.data, parseInt(conf.reqPn, 10) > 1 ? true: false)) { + App.amazonAds.init(window["conf"].amazonAds); + } + history.pushState({ + query: query + , pn: conf.reqPn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(query)) + "&pn=" + conf.reqPn + ); + setTimeout(function() { + searchInput.focus(); + }, 64); + return false; + }); + iptControl.init(); + iptControl2.init(); +} +App.init(); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/yahoo-search.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/yahoo-search.tpl new file mode 100755 index 000000000..a95536513 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search/yahoo-search.tpl @@ -0,0 +1,36 @@ + +<%style%> + @import url('/widget/yahoo-search/ltr/ltr.css?__inline'); +<%/style%> + +<%script%> +window.App = {}; +App.conf = { + reqUrl: "<%$root.body.search_conf.reqUrl%>" + , reqParam: <%json_encode($root.body.search_conf.reqParam)%> + , reqAdUrl: "<%$root.body.ad_conf.reqAdUrl%>" + , reqAdParam: <%json_encode($root.body.ad_conf.reqAdParam)%> + , adNum: <%json_encode($root.body.ad_conf.adNum)%> + , qlMaxNum: "<%$root.body.ad_conf.qlMaxNum%>" + , txt: <%json_encode($root.body.txt)%> + , tpl: { + resultLi: '
                                  • #{DISPURL}

                                    #{ABSTRACT.BEST.HTML.HL}

                                  • ' + + , pnLi: '
                                  • #{t}
                                  • ' + + , adLi: '
                                  • #{host}

                                    #{des}

                                    #{quickLink}
                                  • ' + + , sugBot: '
                                    キーワード入力補助 ON - OFF
                                    ' + , noResult: '<%$root.html.noResult%>' + + , wordLi: '
                                  • #{dataFm}
                                  • ' + } + , sugOn: "<%$root.body.sug.sugOn%>" + , sugPath: "<%$root.body.sug.sugPath%>" + , sug: <%json_encode($root.body.sug.conf)%> +} +App.conf.reqParam.ip = "<%$sysInfo.userip%>"; +conf.ept = <%json_encode($body.eptWord)%>; +conf.amazonAds = <%json_encode($body.amazonAds)%> || {}; +require.async("lv2:widget/yahoo-search/yahoo-search-async.js"); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/img/yahoo_search_page.png b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/img/yahoo_search_page.png new file mode 100755 index 000000000..707df9ff2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/img/yahoo_search_page.png differ diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/ltr/ltr.css b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/ltr/ltr.css new file mode 100755 index 000000000..0838f6859 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/ltr/ltr.css @@ -0,0 +1,501 @@ +body, +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +code, +form, +fieldset, +legend, +input, +button, +textarea, +p, +figure, +blockquote, +th, +td{ margin:0; padding:0;} + +fieldset, img, iframe{ border:0;} + +address, caption, cite, code, dfn, em, th, var, i{font-style:normal;font-weight:normal;} + +ul, +li, +ol{ list-style:none;} + +caption, +th{text-align:left;} + +h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; + background: #fff; +} + +body { + -webkit-text-size-adjust: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -o-tap-highlight-color: rgba(0,0,0,0); + -moz-tap-highlight-color: rgba(0,0,0,0); + + vertical-align: baseline; + background-color: transparent; + + font-family: Arial,sans-serif; + font-size: small; + + _zoom: expression(function(el){ + document.execCommand('BackgroundImageCache', false, true); + el.style.zoom = "1"; + }(this)); +} + +.cf{ zoom: 1;} +.cf:before, .cf:after{ content: ''; display: table;} +.cf:after { clear: both;} + +.fl, +.fr{ display:inline; /*fix: IE6 border*/} +.fl{ float:left !important;} +.fr{ float:right !important;} + +.l-w{ width: 960px; margin: 0 auto;} +.l-l{ width: 590px; float: left; padding-left: 20px;} +.l-r{ overflow: hidden; zoom: 1; padding-left: 45px;} +.l-hd .l-l{ width: 695px; position: relative;} +.l-hd .l-r{ padding: 0;} + +.l-hd{ /*padding: 20px 10px;*/ height: 105px; /*height: 82px;*/ background: #f9f9f9; border-bottom: 1px solid #e7e7e7; border-top: 5px solid #cfdbef; margin-bottom: 10px;} + +a{ text-decoration: none;} +a:hover{ text-decoration: underline;} +a:visited{ color: #4c2472;} +a:link{ color: #0e1bbb;} +/*a:link { color: #0000de;}*/ + +h3{ font-size: 123%; font-weight: normal;} +h3 a{ text-decoration: underline;} +h3 a:hover { color: #cc3434;} + + + +/*提示层外框*/ +.sug-wrap { + position:absolute; + top:26px; + left:-1px; + border:1px solid #aaa; + background:#fff; + width:438px; + color:#000; + z-index:999; + line-height: 1; +} + +/*ie6 shim*/ +.sug-shim{ position:absolute; top:26px; left:-1px; z-index:-1; filter:alpha(opacity="0"); + width:438px; + height:532px; +} + +/*列表外框*/ +.sug-wrap ol{ cursor: pointer;} + +/*列表项*/ +.sug-wrap li{ padding: 4px 6px 5px;} + +/*选中样式*/ +.sug-wrap .sug-select{ background:#f0f0f0;} + +/*底部*/ +.sug-wrap .bot{ position:relative; height:19px; line-height:19px; font-weight:normal; border-top:1px solid #666;} + +/*高亮查询词*/ +.sug-wrap .sug-query{ font-weight:bold;} + +/*提示不能匹配查询词*/ +.sug-wrap .sug-querynull{ font-weight:normal;} + +.sug-bot{ height: 17px; line-height: 17px; padding-right: 10px; background: #f7f7f7;} +.sug-switch{ font-size: 85%;} +.sug-switch a{ font-weight: bold; text-decoration: none; color: #000; cursor: default;} +a.sug-switch_cur{ font-weight: normal; color: #0000de; cursor: pointer;} + +.sug-bot .s-arr{ top: 18px; left: -1px; background-color: #999; border: none; background-position: 0 -239px; width: 42px; height: 11px;} +.sug-wrap ol p{ padding: 5px; color: #999; cursor: default;} + +/*sprite*/ +.s-btn, +.logo a, +.r-tip i, +/*.s-arr{ background-image: url(/img/yahoo_search_page.png);}*/ +a.s-btn_close, +.s-arr{ background-image: url(../img/yahoo_search_page.png);} + +.logo, .logo a{ overflow: hidden;} +.logo a{ display: inline-block;} + +.logo-hao123{ position: absolute; top: 31px; left: 20px;} +.logo-yahoo{ margin: 38px 0 0 0;} +.logo-hao123 a{ background-position: 0px 0px; width: 116px; height: 29px;} +.logo-yahoo a{ background-position: 0px -31px; width: 51px; height: 24px;} + +/*search*/ +.s{ position: relative; top: -5px;} +.l-hd .s{ margin-left: 130px;} +.s-hd{ } +.s-hd li{ float: left;} +.s-hd li a{ display: block; padding: 5px 8px; font-size: small; color: #333; border-top: 5px solid #cfdbef;} +.s-hd li a:hover{ background: #eee;} +.s-hd li.cur a{ color: #B43C3E; text-decoration: none; background: none; border-top-color: #5f87cb; cursor: default;} +.s-bd{ margin-top: 10px; /*margin-top: 29px;*/} +.s-ipt{ border: 1px solid #999; border-top: 1px solid #7c7c7c; display: inline-block; margin-right: 5px; z-index: 999; position: relative; background: #fff;} +.s-ipt input{ width: 410px; font-size: 108%; height: 24px; padding: 2px 24px 0 4px; background-color: #fff; vertical-align: bottom; line-height: 1.3; border: none; top: 0; left: 0; float: left; position: relative;} +.s-ipt input::-ms-clear{ + display: none; +} +.s-btn{ display: inline-block; border: 0px solid #fff; background-color: #4070ff; background-position: 25px -84px;} +.s-btn button{ border: none; background: none; width: 110px; height: 28px; line-height: 30px; letter-spacing: 0.1em; padding: 0 0 0 16px; font-size: 108%; font-weight: bold; color: #fff; cursor: pointer; +} +.s-btn:hover{ background-color: #1155ee;} +.s-arr{ border: 1px solid #f9f9f9; border-top: none; background-position: 15px -119px; background-repeat: no-repeat; display: inline-block; width: 38px; height: 10px; cursor: pointer; position: relative; top: -1px; +} +.s-arr:hover{ background-color: #f0f0f0; border-color: #999;} +.s-tt{ color: #666; font-size: 12px; margin-top: 5px; /*margin-top: -1px;*/} +.s-tt em{ font-weight: bold;} + +.s-btn_close{ + position: absolute; + display: none; + cursor: pointer; + /*display: inline-block;*/ + width: 16px; height: 16px; top: 5px; right: 5px; background-position: 0 -57px; +} + +.s-btn_close:hover{ + background-position: -20px -57px; +} + +.s-btn_close__bot{ + top: 6px; + /*right: 155px;*/ +} + +.s-ipt_tip{ + display: none; + position: absolute; + top: 4px; + left: 5px; + color: #999; +} + +/*result*/ +.r-wrap{ overflow: hidden;} +.r-li{ + margin: 0 20px 20px 0; + + max-width: none; + overflow: hidden; + word-break: break-all; + word-wrap: break-word; + line-height: 1.4; +} +.r-li b{ font-weight: bold;} +.r-li_hd{ margin-bottom: 5px;} +.r-li_bd{ } +.r-li_ft{ margin-top: 3px;} + +.r-li_u{ color: #008000; word-break: normal;} +.r-li_u abbr{ float: left; max-width: 460px; overflow: hidden; height: 18px; margin-right: 5px; text-decoration: none; border-width: 0;} +.r-li_a a{ color: #686ccd;} + +.r-list{ + -moz-transition: opacity 0.5s ease-in; + -webkit-transition: opacity 0.5s ease-in; + -o-transition: opacity 0.5s ease-in; + transition: opacity 0.5s ease-in; + padding-top: 5px; +} +.r-padding{ + /*padding*/ + min-height: 500px; height: auto!important; height: 500px; +} +.r-list_ad{ position: relative; display: none; /*padding: 10px 0;*/} + +.r-list_ad .r-li_bd{ font-size: 108%;} +.r-list_ad .r-list_more{ position: absolute; right: 10px;} + +.r-list_ad_north{ border-bottom: 1px solid #ccc; margin-bottom: 10px;} +.r-list_ad_south{ border-top: 1px solid #ccc; padding-top: 10px; margin-top: -10px;} +.r-list_ad_north .r-li{ margin-bottom: 10px;} +.r-list_ad_east{ padding-top: 20px;} +.r-list_ad_east .r-list_more{ margin-bottom: 10px; position: static;} + +.r-list_more{} +.r-list_more a{ font-size: 92%; color: #666;} +.r-li_host{ color: #008000; padding-bottom: 5px;} +.r-li_quick{ color: #999; font-size: small;} +.r-li_quick a:hover { color: #cc3434;} + +/*.r-list_ad .r-li{ margin: 0 20px 20px 0;}*/ + +.r-tip{ display: none;} +.r-tip i{ display: inline-block; overflow: hidden; width: 13px; height: 13px; background-position: -72px -58px; position: relative; top: 2px;} +.r-error i{ background-position: -42px -58px;} +.r-abort i{ background-position: -56px -58px;} +.r-loading .r-list{ opacity: 0;} +.r-loading .r-tip{ display: block;} +.r-error .r-tip{ display: block;} +.r-abort .r-tip{ display: block;} + +/*.r-loaded .r-list{ display: block;} +.r-loaded .r-tip{ display: none;}*/ + +.r-pn{ white-space: nowrap; padding: 15px 0 25px;} +.r-pn li{ float: left; line-height: 30px;} +.r-pn a{display: inline-block; height: 25px; line-height: 25px; padding: 0 .5em; margin: 2px; border: 1px solid #ddd; zoom: 1; background: #fff; font-size: 123%;} +.r-pn a:hover{ background: #039; border-color: #00d; color: #fff;} +a.r-pn_cur, a.r-pn_cur:hover{ border-color: #ddd; background: #eee; color: #333; text-decoration: none; cursor: default; font-weight: bold;} + + +.ad-box{} +.ad-quick{} +.r-list_quick{ padding-right: 20px;} +.r-list_quick h3{ font-size: 14px;} +.r-list_quick_t{ margin: 10px 0;} +.r-list_quick_t a{ font-size: 12px; color: #666;} + +.l-ft{ text-align: center;} +.s-wrap{ background: #f9f9f9; border-top: 1px solid #e7e7e7; border-bottom: 1px solid #e7e7e7; padding: 2px 0 13px 2px;} + +.about-link{ display: inline-block; margin-top: 20px; color: #666;} +.about-link li{ display: inline;} +.about-link a{ color: #0e1bbb;} +.about-des{ margin: 10px 0; line-height:1.3; color: #999; display: block;} +.about-about{} + +/***global***/ +.c-ept {display: none;} +.ept-srch .c-ept {display: block;color: #5A5A5A;font-size: 14px;padding-left: 0;width: 640px;} +.ept-srch .c-rsl {display: none;} +.ept-srch .c-main .l-r {margin-top: 44px;padding-left: 20px;} + +/*result*/ +.c-ept .ept-result {min-height: 780px;margin-bottom: 77px;padding-top: 6px;} +.c-ept .ept-tip {display: none;text-align: center;margin-top: 60px;line-height: 40px;} + +.ept-btn,.ept-ctrl,.ept-result {border: 1px solid #E3E5E6;} +.ept-btn,.ept-ctrl {border-bottom-width: 0;} +.ept-ctrl,.ept-result {border-top-width: 0;} + +/*title*/ +.ept-tle {height: 44px;line-height: 44px;font-weight: bold;font-size: 16px;} +.ept-tle img {vertical-align: middle;margin-right: 8px;margin-top: -3px;width: 34px;height: 21px;} +.ept-tle a {color: #5A5A5A; display: inline-block;} +.ept-tle a:hover {text-decoration: none;} + +/*tab*/ +.ept-btn {padding: 1px 1px 14px;overflow: hidden;} +.ept-btn li {float: left;height: 32px;line-height: 32px;border: 1px solid #EDEFF0;border-right-width: 0;border-top-width: 0;text-align: center;width: 158px;cursor: pointer;background: #F5F7F7;background-image: -webkit-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -ms-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -o-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: -moz-linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);background-image: linear-gradient(#ffffff, #FDFEFE, #FAFBFB, #F7F9F9, #f5f7f7);} +.ept-btn li:first-child {border-left-color: #ffffff;} +.ept-btn li:hover {font-weight: bold;} +.ept-btn .cur {font-weight: bold; color: #00B075;cursor: default;background: #FEFEFE;background-image: -webkit-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -ms-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -o-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: -moz-linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);background-image: linear-gradient(#f5f7f7, #F7F9F9, #FAFBFB, #FDFEFE, #ffffff);border-color: #fff;} + +/*control*/ +.ept-ctrl,.ept-result {text-align: center;} +.ept-ctrl .ctr-outer,.ept-result .ept-res {margin: 0 auto;width: 618px;} +.ept-ctrl .ctr-outer {border-top: 1px solid #ECECEC;padding-top: 1px;border-bottom: 1px solid #ECECEC;} +.ept-ctrl .ctr-inner {height: 42px;background-color: #F6F6F6;position: relative;} +.ept-ctrl .ctr-btn {position: absolute;display: block;top: 6px;height: 28px;line-height: 28px;width: 118px;right: 31px;border: 1px solid #D8D8D8;background-color: #FFFFFF;color: #6D6D6D;cursor: pointer;overflow: hidden;} +.ept-ctrl .ctr-btn:hover {border-color: #C3C3C3;font-weight: bold;} +.ept-ctrl .i-btn {position: absolute;font-weight: bold;color: #00B075;right: 20px;font-size: 16px;} +.ept-ctrl .i-pre {left: 20px;right: auto;} +.ept-ctrl .ctr-diable {border-color: #E7E7E7;font-weight: normal;background-color: #FDFDFD;color: #E0E0E0;cursor: default;} +.ept-ctrl .ctr-diable .i-btn {color: #ECECEC;} +.ept-ctrl .ctr-diable:hover {border-color: #E7E7E7;font-weight: normal;} +.ept-ctrl .ctr-prev {left: 31px;right: auto;} +.ept-ctrl .ctr-time {height: 42px;line-height: 44px;overflow: hidden;} + +/*result*/ +.ept-result .ept-res {text-align: left;margin-bottom: -1px;} +.ept-res li {height: 32px;line-height: 32px;padding: 12px 0;font-size: 15px;font-weight: bold;border-bottom: 1px dotted #E3E5E6;position: relative;overflow: hidden;} +.ept-res .i-rank {position: absolute;width: 26px;height: 26px;line-height: 26px;top: 14px;left: 10px;text-align: center;background-color: #C5C4C3;color: #ffffff;font-size: 16px;overflow: hidden;} +.ept-res .i-rank-1 {background-color: #FD0606;} +.ept-res .i-rank-2 {background-color: #FF7E00;} +.ept-res .i-rank-3 {background-color: #FFD200;} +.ept-res a {display: block;padding-left: 56px;color: #5A5A5A;font-size: 16px;white-space: nowrap;} + +/*no search word && no ajax data*/ +.no-data .ept-res {display: none;} +.no-data .ept-tip {display: block;} + + +/*amazon ads*/ +.r-list_ama { + border-bottom: 1px solid #ccc; + margin-bottom: 10px; + display: none; + opacity: 0; +} +.amz-show { + display: block; + opacity: 1; +} +.r-list_ama .amz-li { + float: right; + padding-right: 20px; + width: 265px; + position: relative; + padding-bottom: 10px; +} +.r-list_ama .amz-li:first-child { + float: left; + margin-right: 20px; +} +.r-list_ama .li-img { + position: absolute; + top: 20px; + left: 72px; + width: 110px; + height: 126px; + border: 1px solid #636363; + background-color: #ffffff; + overflow: hidden; + text-align: center; + display: none; +} +.r-list_ama .li-img span { + line-height: 16px; + font-size: 12px; + color: #001AFC; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + display: block; + font-weight: bold; +} +.r-list_ama .amz-li a { + white-space: nowrap; + display: block; + overflow: hidden; + text-overflow: ellipsis; + margin-bottom: 10px; + margin-top: 5px; +} +.r-list_ama .amz-li h3:hover .li-img { + display: block; +} +.r-list_ama .amz-li p { + font-size: 13px; + /*line-height: 1.4; + max-height: 54px; + overflow: hidden; + text-overflow: ellipsis;*/ +} +/*.r-list_ama .dis-pri, +.r-list_ama .ori-pri { + font-weight: bold; +}*/ +.r-list_ama .dis-pri span { + color: #676767; + font-weight: bold; +} +.r-list_ama .ori-pri span { + color: #CC0400; + font-weight: bold; +} + + +/*mutiple line words*/ +.ellipsis { + overflow: hidden; + height: 54px; + line-height: 18px; +} +.ellipsis:before { + content: ""; + float: left; + width: 5px; + height: 54px; +} +.ellipsis > *:first-child { + float: right; + width: 100%; + margin-left: -5px; +} +.ellipsis:after { + content: "..."; + box-sizing: content-box; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + float: right; + position: relative; + height: 24px; + line-height: 24px; + top: -18px; + left: 100%; + width: 3em; + margin-left: -3em; + padding-right: 5px; + text-align: right; + background: linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white); +} + + + +/*demo*/ +/*.r-list_ama .li-img { +position: absolute; +top: 0; +left: 0; +width: 75px; +height: 92px; +border: 1px solid #636363; +background-color: #ffffff; +overflow: hidden; +text-align: center; +display: none; +display: block; +} +.r-list_ama .amz-li { +float: right; +padding-right: 20px; +width: 182px; +padding-left: 86px; +position: relative; +padding-bottom: 10px; +} +.r-list_ama .amz-li:first-child { +float: left; +margin-right: 0; +} +.r-list_ama .li-img { +position: absolute; +top: 0; +left: 0; +width: 75px; +height: 92px; +border: 1px solid #636363; +background-color: #ffffff; +overflow: hidden; +text-align: center; +display: none; +display: block; +} +.r-list_ama .li-img img { + max-height: 75px; + max-width: 75px; +}*/ \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/yahoo-search_tmp-async.js b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/yahoo-search_tmp-async.js new file mode 100755 index 000000000..eae7b44f1 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/yahoo-search_tmp-async.js @@ -0,0 +1,1617 @@ +var ClickMonkey = function() { + if(!this.pageId) return { + log: function() {} + }; + var e = "http://nsclick.baidu.com/h.gif?pid=113&v=" + pageId + "&hao123_baiduid=" + unescape((document.cookie.match("BAIDUID"+'=(.+?);')||0)[1]||'').split(":")[0], + t = "bd_clickmonkey", + n = function(n) { + var r = (new Date).getTime(), + i = window[t + r] = new Image, + s = ""; + for(var o in n) s += "&" + o + "=" + n[o]; + i.src = e + "&r=" + r + s, i.onload = i.onerror = function() { + i = null + } + }, r = "", + i = function(e, t) { + t = t || [], r = e.monkey || e.getAttribute("monkey") || r, e.parentNode && e.parentNode.tagName.toUpperCase() != "BODY" && (t = i(e.parentNode, t)); + if(e.previousSibling) { + var n = 1, + s = e.previousSibling; + do s.nodeType == 1 && s.nodeName == e.nodeName && n++, s = s.previousSibling; while (s) + } + return e.nodeType == 1 && t.push(e.nodeName.toLowerCase() + (n > 1 ? n : "")), t + }, s = function(e, t, n, r) { + if(e.addEventListener) return e.addEventListener(t, n, r), !0; + if(e.attachEvent) { + var i = e.attachEvent("on" + t, n); + return i + } + }, o = function(e) { + return encodeURIComponent(e) + }; + s(document.body, "mousedown", function(e) { + var e = window.event || e, + t = e.srcElement || e.target; + if(t.tagName.toUpperCase() != "A") + if(t.parentNode.tagName.toUpperCase() == "A") t = t.parentNode; + else if((t.tagName.toUpperCase() != "INPUT" || t.type.toLowerCase() != "checkbox" && t.type.toLowerCase() != "radio") && t.tagName.toUpperCase() != "AREA") return; + r = ""; + var s = i(t).join("-"), + u = { + xp: s + }, a = t.getAttribute("href", 2); + a && !/^javascript|#/.test(a) ? u.objurl = o(a) : u.objurl = "none", t.innerHTML && !/^\s*\s*$/i.test(t.innerHTML) ? u.title = o(t.innerHTML) : u.title = "none", r && (u.monkey = r), n(u) + }); + var u = function(e, t, r) { + var i = { + xp: "_" + e + "_" + }; + t ? i.objurl = o(t) : i.objurl = "none", r ? i.title = o(r) : i.title = "none", n(i) + }; + return { + log: u + } +}(); + +window.G = window.G || function(id) { + return id + "" === id ? document.getElementById(id) : id; +}; + +"".trim || (String.prototype.trim = function() { + var str = this.replace(/^\s\s*/, ""), + ws = /\s/, + i = str.length; + while (ws.test(str.charAt(--i))); + return str.slice(0, i + 1); +}); + +"".replaceTpl || (String.prototype.replaceTpl = function(o) { + return this.replace(/#\{([^}]*)\}/mg, function(a, b) { + b = b.trim(); + return a = (o[b] && o[b].data ? o[b].data : o[b]) || ""; + }); +}); + +!function(types, li) { + types = types.split("|"); + while(li = types.shift()) !function(li){ + G["is" + li] = function(obj) { + return li === {}.toString.call(obj).replace(/^\[object (\w+)\]$/, "$1"); + } + }(li); +}("String|Array|Object|Number"); + +G.urlEscape = function(s) { + return s.replace(/[\(\)\.\*\{\}\|\[\]\^\\\`\!]/g, function(li){ + return "%" + { + "(" : "28" + , ")" : "29" + , "." : "2E" + , "*" : "2A" + , "{" : "7B" + , "}" : "7D" + , "|" : "7C" + , "[" : "5B" + , "]" : "5D" + , "^" : "5E" + , "\\" : "5C" + , "`" : "60" + , "!" : "21" + }[li] + }); +} + +G.urlUnEscape = function(s) { + + // decodeURIComponent("%") ==> error + try{ + s = decodeURIComponent(s); + } + catch(e) {} + return s; +} + +G.isElement = function(obj) { + return window.HTMLElement ? obj instanceof HTMLElement : G.isObject(obj) && G.isString(obj.tagName) && obj.nodeType > 0; +} + +G.each = function(obj, iterator, context) { + var i = 0, + li; + if(G.isArray(obj)) { + for(li = obj.length; i < li; i++) if(iterator.call(context, obj[i], i, obj) === false) break; + } + else if(G.isObject(obj)) { + for(li in obj) { + if(obj.hasOwnProperty(li)) if(iterator.call(context, obj[li], li, obj) === false) break; + } + } +} + +G.delegate = function(el, type, fn) { + el.addEventListener + ? el.addEventListener(type, function(e) { + return fn.call(e.target, e); + }, false) + : el.attachEvent("on" + type, function(e) { + e = window.event; + return fn.call(e.srcElement, e); + }) +} + +G.addCls = function(el, className) { + var els = el.length ? el : [el], + fur = false, // can use classList + ele; + for (var i = 0, j = els.length; i < j; i++) { + ele = els[i]; + if (fur) { + ele.classList.add(className); + } else { + if (ele.classList && ele.classList.add) { + ele.classList.add(className); + fur = true; + } else { + ele.className += " " + className; + fur = false; + } + } + } +} + +G.rmvCls = function(el, className) { + var els = el.length ? el : [el], + fur = false, // can use classList + ele, + reg = new RegExp('(\\s|^)'+className+'(\\s|$)'); + for (var i = 0, j = els.length; i < j; i++) { + ele = els[i]; + if (fur) { + ele.classList.remove(className); + } else { + if (ele.classList && ele.classList.remove) { + ele.classList.remove(className); + fur = true; + } else { + ele.className = ele.className.replace(reg, ' '); + fur = false; + } + } + } +} +/*G.json = { + toString: "", + parse: "" +}*/ + +G.xml = { + parse: function(str) { + var xml = null; + if(window.DOMParser) { + xml = (new DOMParser).parseFromString(str, "text/xml"); + } + else if(window.ActiveXObject) { + try{ + xml = new ActiveXObject("Microsoft.XMLDOM"); + xml.async = false; + xml.loadXML(str); + } catch(e) {} + } + return xml; + }, + toJson: function(xml, json) { + json = json || {}; + if(!xml) return json; + if(G.isString(xml)) xml = G.xml.parse(xml); + if(!xml) return json; + + if(xml.attributes && xml.attributes.length) { + for(var attrN = -1, attrs = xml.attributes, attr; attr = attrs[++attrN];) { + json["@" + attr.name.trim()] = attr.value; + } + } + for(var i = -1 + , children = xml.childNodes + , nodeName, node, li; li = children[++i];) { + if(li.data) { + if(li.data.trim() !== "") json.data = li.data; + continue; + } + nodeName = li.nodeName; + node = {}; + if(!json[nodeName]) json[nodeName] = node; + else if(!json[nodeName].length) { + json[nodeName] = [node, json[nodeName]]; + } + else json[nodeName].push(node); + arguments.callee(li, node); + } + return json; + }, + escape: function(s){ + return s.replace(/[&<>'"]/g, function(li){ + return "&" + { + "&" : "amp" + , "<" : "lt" + , ">" : "gt" + , "'" : "#39" + , '"' : "quot" + }[li] + ";" + }) + } +} + +G.ajax = function(o) { + if(!o || !o.url) return false; + + var type = (o.type || "GET").toUpperCase(), + async = !(o.async === false), + cache = !(o.cache === false), + charset = o.charset || "utf-8", + httpHeader = o.httpHeader || {}, + contentType = o.contentType || "application/x-www-form-urlencoded", + wait = +o.wait, + before = o.before, + success = o.success, + error = o.error, + me = arguments.callee, + encode = encodeURIComponent, + undef, + data = o.data ? G.isString(o.data) ? o.data : function(d, ret) { + G.isElement(d) + ? G.each(d.elements, function(li, i) { + li.name && !li.disabled && ret.push(encode(li.name) + "=" + G.urlEscape(encode(li.value))); + }) + : G.each(d, function(li, k) { + li !== undef && ret.push(encode(k) + "=" + G.urlEscape(encode(li))); + }); + return ret.join("&"); + }(o.data, []) : "", + url = function(s) { + var d = "GET" === type ? data : "", + c = cache ? "" : "r" + +new Date + "=1", + b = s.indexOf("?") < 0 ? "?" : "&"; + return (s + b + d + ((d && c) ? "&" + c : c)).replace(/&$/, ""); + }(o.url), + xhr = (me.getXhr || function(_xhr) { + G.each([ + function() { return new ActiveXObject("Microsoft.XMLHTTP")}, + function() { return new ActiveXObject("Msxml2.XMLHTTP.3.0")}, + function() { return new ActiveXObject("Msxml2.XMLHTTP.6.0")}, + function() { return new XMLHttpRequest} + ], function(li) { + try{ + _xhr = (me.getXhr = li)(); + return false; + } catch (e) {} + }); + return _xhr; + })(), + fix = function() { + if(xhr) xhr.onreadystatechange = function() {}; + if(async) xhr = null; + }, + stateHandle = function() { + if(xhr && xhr.readyState == 4) { + timer && clearTimeout(timer); + try { + var s = xhr.status; + }catch (e) { + error && error.call(xhr); + return; + } + if((s >= 200 && s < 300) || s == 304 || s == 1223) success && success.call(xhr, xhr.responseText); + else if(error) error.call(xhr); + setTimeout(fix, 16); + } + }, + timer; + before && before.call(xhr); + xhr.open(type, url, async); + if(async) xhr.onreadystatechange = stateHandle; + httpHeader['X-Request-With'] = 'XMLHttpRequest'; + if("POST" === type) try{ + xhr.setRequestHeader("Content-Type", contentType + ";charset=" + charset); + G.each(httpHeader, function(li, key) { + key && xhr.setRequestHeader(key, li); + }); + } catch(e){} + if(wait) timer = setTimeout(function() { + fix(); + xhr && xhr.abort(); + error && error.call(xhr); + }, wait); + xhr.send("POST" === type ? data : null); + !async && stateHandle(); + return xhr; +} + +G.loadJs = function(path, callback) { + var doc = document + , readyState = "readyState" + , onreadystatechange = "onreadystatechange" + , readyState = "readyState" + , script = "script" + , pos = doc.getElementsByTagName(script)[0] + , loaded + , node + , li; + if(path + "" === path) path = [path]; + while(li = path.shift()) { + node = doc.createElement(script); + node.onload = node.onerror = node[onreadystatechange] = function() { + if(loaded || (node[readyState] && !(/^c|loade/.test(node[readyState])))) return; + node.onload = node.onerror = node[onreadystatechange] = null; + loaded = 1; + if(callback && callback.scop) { + callback.call(callback.scop); + } else { + callback && callback(); + } + }; + node.async = 1; + node.src = li; + pos.parentNode.insertBefore(node, pos); + } +} + +G.getQuery = function(query, url) { + return G.urlUnEscape((location.href.match(new RegExp("\\?.*" + query + "=([^&$#]*)")) || ["",""])[1]); +} + +G.time = function () { + var imgUrl = "/static/web/common/img/gut.gif", + rate = 1000, + i = 0, + isGet = false, //whether has got the server time + _date; + return { + getTime: function(callback) { + //add callback parameter for other modules to do their own business after obtaining the server time + //get the time difference to prevent the errors which caused by users changed the local time + //two ways to fix the bug: 1. setInterval 2. local time difference, the 2nd way takes precedence + + var render = function(date) { + date = (date = date.getResponseHeader("Date")) ? new Date(date) : new Date; + var startTime = new Date, //get time stamp of the xhr + diff = function() { + var n = new Date - startTime, //2. local time difference + _n = ++i * rate; //1. setInterval + + //calc in 1 minute + return Math.abs(n - _n) > 1000 * 60 ? _n : n; + }, + timer = setInterval(function() { + //render time with the time difference + (_date = new Date(date.getTime())).setMilliseconds(_date.getMilliseconds() + diff()); + //obligate interface to get the server time + conf.serverNow = _date; + }, rate); + + // get time immediately + (_date = new Date(date.getTime())).setMilliseconds(_date.getMilliseconds() + diff()); + conf.serverNow = _date; + isGet = true; // get time process is done + }, + + get = function() { + var xhr = G.ajax({ + url: imgUrl, + cache: false, + error: function() { + //if there has an error such as 404, we can also get the head + render(xhr); + callback && callback.call(callback.scop || {}, conf.serverNow); + }, + success: function() { + render(xhr); + callback && callback.call(callback.scop || {}, conf.serverNow); + } + }); + }; + + if (!isGet) { + get(); + } else { + callback && callback(); + } + + return _date ? _date : new Date; + } + } +}() + +G.fixNum = function(n) { + return n > 9 ? n : ('0' + n); +} + +G.fixDate = function(date) { + var fixN = G.fixNum; + return date.y + '-' + fixN(date.m) + '-' + fixN(date.d); +} + +G.fixDay = function(date, n, _con) { + var that = this, + da = new Date(date.getTime()); + + da.setTime(date.getTime() + n * 24 * 3600 * 1000); + return { + y: da.getFullYear(), + Y: _con.year, + m: da.getMonth() + 1, + M: _con.month, + d: da.getDate(), + D: _con.day, + W: da.getDay() || 7 + }; +} + +G.cookie = function(key, value, options) { + + // key and value given, set cookie... + if (arguments.length > 1 && (value === null || typeof value !== "object")) { + //options = jQuery.extend({}, options); + + if (value === null) { + options.expires = -1; + } + if (typeof options.expires === 'number') { + var days = options.expires, + t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? String(value) : encodeURIComponent(String(value)), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function(s) { + return s; + } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; +} + +/* +bugs: + +"1234xca" ==> Api error + + */ +App.conf.reqPn = +G.getQuery("pn", location.href) || 1; +App.conf.adMaps = { + North: G("ClickUrl_north") + , South: G("ClickUrl_south") + , East: G("ClickUrl_east") + , Amazon: G("ClickUrl_amazon") +} + +// query, "" ==> block +App.conf.reqParam.query = G.getQuery("query", location.href); +App.conf.reqParam.useragent = navigator.userAgent; +App.conf.reqAdParam.affilData = "ip=" + App.conf.reqParam.ip + "&ua=" + App.conf.reqParam.useragent; + +App.supportState = !!(window.history && window.history.pushState && window.history.replaceState && !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/)); + +App.cache = { + urlbase: location.href.split('?')[0] +} + +App.tip = { + timer: null + , el: G("resultTip") + , wrap: G("resultWrap") + , show: function(state) { + App.tip.hide(); + App.tip.timer = setTimeout(function() { + App.tip.el.innerHTML = ' ' + App.conf.txt[state]; + App.tip.wrap.className += " r-" + state; + }, 500); + } + , hide: function(timer) { + timer = timer || App.tip.timer; + timer && clearTimeout(timer); + App.tip.wrap.className = App.tip.wrap.className.replace(/ r-(loading|error|abort)/g, ""); + } +} + +App.amazonAds = { + conf: {}, + data: {}, + callF: null, + MAXNUM: 2, + tpl: '
                                  • #{title}' + + '#{brand}' + + '

                                    ' + + '

                                    #{discount}#{dis}' + + '#{price}#{pri}' + + '#{descrip}

                                  • ', + init: function(con, rand) { + G.rmvCls(App.conf.adMaps.Amazon, "amz-show"); + + var _self = App.amazonAds, + that = _self.conf; + + if (con.isHidden !== "0") return; + + that.reqParams = con.params; + that.minTotal = parseInt(con.min, 10) || 2; + that.query = con.q; + that.url = con.url || window["conf"].apiUrlPrefix; + that.content = { + price: con.price, + discount: con.discount + }; + + _self.getData(function() { + _self.formatData(); + _self.render(_self.data, rand); + }); + }, + getData: function(callback) { + var _self = App.amazonAds, + that = _self.conf, + params = [], + reqUrl = that.url + "?" + that.reqParams + "&"; + + _self.callF = _self.getCallbackFunc(); + + params.push("country=" + (window["conf"].country || "jp")); + params.push("_=" + +new Date); + params.push(that.query + "=" + encodeURIComponent(App.conf.reqParam.query)); + params.push("jsonp=" + _self.callF); + reqUrl += params.join("&"); + + callback.scop = _self; + G.loadJs(reqUrl, callback); + + }, + filterHtmlTag: function(html){ + var tmp = document.createElement("div"); + tmp.innerHTML = html; + return tmp.innerText || tmp.textContent || ""; + }, + formatData: function() { + var _self = App.amazonAds, + that = _self.conf, + cont = that.content, + disCo = cont.discount, + price = cont.price, + data = window[_self.callF].data; + + data = (data && data.content) || ""; + if(!data) return; + data = G.xml.toJson(data); + data = data && data["ItemSearchResponse"] && data["ItemSearchResponse"]["Items"]; + data = data && data["Item"]; + + if(data) { + UT && UT.send({modId: "amazonAds", type: "others", position: data.length || 0}); + } + if(data && data.length >= that.minTotal) { + var _data = [], + url = '', title = '', dis = '', other = '', + pri = '', des = '', brand = '', imgSrc= ''; + + for(var i = 0, l = data.length; i < l; i++) { + url = data[i]["DetailPageURL"]; + url = (url && url.data) || ""; + + title = data[i]["ItemAttributes"]; + title = (title && title["Title"]) || ""; + title = (title && title.data) || ""; + + dis = data[i]["ItemAttributes"]; + dis = (dis && dis["ListPrice"]) || ""; + dis = (dis && dis["FormattedPrice"]) || ""; + dis = (dis && dis.data) || ""; + + pri = data[i]["OfferSummary"]; + pri = (pri && pri["LowestNewPrice"]) || ""; + pri = (pri && pri["FormattedPrice"]) || ""; + pri = (pri && pri.data) || ""; + + des = data[i]["EditorialReviews"]; + des = (des && des["EditorialReview"]) || ""; + if (des.length >= 2) { + des = (des[0]["IsLinkSuppressed"]["data"] === "0") ? des[0]["Content"]["data"] : (des[1]["IsLinkSuppressed"]["data"] === "0" ? des[1]["Content"]["data"] : ""); + } else { + des = (des && des["IsLinkSuppressed"]["data"] === "0") ? des["Content"]["data"]: ""; + } + + brand = data[i]["ItemAttributes"]; + brand = (brand && brand["Brand"]) || ""; + brand = (brand && brand.data) || ""; + + imgSrc = data[i]["MediumImage"] || ""; + if(imgSrc) { + if(parseInt(imgSrc["Height"]["data"], 10) > parseInt(imgSrc["Width"]["data"], 10)) { + other = 'height="110"'; + } else { + other = 'width="110"'; + } + imgSrc = 'src="' + imgSrc["URL"]["data"] + '"'; + } else { + imgSrc = ''; + other = ''; + } + + if(!url || !title) continue; + + _data.push({ + href: url, + title: title, + discount: dis? disCo: "", + dis: dis? ("" + dis + "   "): "", + price: pri? price: "", + pri: pri? ("" + pri + "     "): "", + descrip: _self.filterHtmlTag(des), + brand: brand, + imgSrc: imgSrc, + other: other + }); + } + _self.data = _data; + _self._data = data; + } else { + _self.data = {}; + _self._data = {}; + } + + }, + render: function(data, rand) { + var index = [], + str = '', + _self = App.amazonAds, + tpl = _self.tpl, + max = _self.MAXNUM; + + if(data.length) { + index = rand ? _self.getRandsIndex(data.length, max) : _self.enum(max); + + for(var i = 0, l = index.length; i < l; i++) { + data[index[i]].i = i + 1; + str += tpl.replaceTpl(data[index[i]]); + } + App.conf.adMaps.Amazon.innerHTML = str; + G.addCls(App.conf.adMaps.Amazon, "amz-show"); + } else { + return true; + } + }, + enum: function(max) { + var arr = []; + for(var i = 0; i < max; i++) { + arr.push(i); + } + return arr; + }, + shuffle: function(o){ + for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); + return o; + }, + getRandsIndex: function(len, max) { + var arr = [], + curData = [], + _self = App.amazonAds; + + for(var i = 0; i < len; i++) { + arr[i] = i; + } + + for(var j = 0; j < max; j++) { + arr = _self.shuffle(arr); + curData.push(arr[0]); + arr.splice(0, 1); + } + + return curData; + }, + getCallbackFunc: function() { + var callName = "ghao123_amazon" + ('' + +new Date).substring(3); + window[callName] = function(data) { + window[callName].data = data; + }; + return callName; + }, + +} + +App.ept = function(conf) { + var that = this; + + that.conf = conf; + that.curDate = 0; + that.curType = that.conf.list[0].types; + that.timeList = []; // for get ajax data + that.timGroup = []; // for render date + + that.callName = {}; // jsonp callback function + that.reqPath = ""; // JSONP request path Tpl + + that.eptTle = G("eptTitle"); + that.eptTab = G("eptBtn"); + that.eptCtr = G("eptCtrl"); + that.eptRes = G("eptRes"); + + that.curTab = {}; // current tab DOM object + that.ctrPrev = {}; // control to prev + that.ctrNext = {}; // control to next + that.ctrTime = {}; // show time + + that.tabTpl = '
                                  • #{title}
                                  • '; + that.ctrTpl = '
                                    <#{prev}

                                    #{date}

                                    >#{next}
                                    '; + that.timTpl = '#{y}#{Y}#{m}#{M}#{d}#{D}#{update}'; + that.resTpl = '
                                  • #{num}#{content}
                                  • '; + + that.init(); +} +App.ept.prototype = { + init: function() { + var that = this; + + that.callName = that.getCallbackFunc(); // create callback + that.createHtml(); // init create html + that.createReqPath(); // create JSONP path tpl + + that.bindEvent(); + }, + sendRequest: function(typ, index, callback) { + var that = this, + path = that.reqPath.replaceTpl({ + type: typ, + date: (index === 0 ? "" : that.timeList[index]), + stamp: +new Date + }); + callback.scop = that; + G.loadJs(path, callback); + }, + render: function() { + var that = this, + _tpl = that.resTpl, + _bod = document.body, + data = window[that.callName].data || {}, + maxL = parseInt((that.conf && that.conf.ajaxUrl && that.conf.ajaxUrl.num) || 20, 10); + str = "", + _url = location.href.split("?")[0] + "?query="; + + data = (data.content && data.content.data) || []; + + if(data.length > 0) { + /*if(data.length === 1) { // when one data + G.addCls(that.ctrPrev, "ctr-diable"); + } else { // not only one data + G.rmvCls(that.ctrPrev, "ctr-diable"); + }*/ + G.rmvCls(_bod, "no-data"); + for(var i = 0, l = Math.min(data.length, maxL); i < l; i++) { + str += _tpl.replaceTpl({ + addClas: "i-rank-" + (i + 1), + num: i + 1, + content: data[i]["info_name"] || "", + url: _url + G.urlEscape(encodeURIComponent(data[i]["info_name"] || "")) + }); + } + that.eptRes.innerHTML = str; + } else { + G.addCls(_bod, "no-data"); + } + }, + createReqPath: function() { + var that = this, + params = [], + _glo = window.conf, + _con = that.conf.ajaxUrl, + url = (_con.url || _glo.apiUrlPrefix) + "?"; + for(var i in _con) { + if(_con.hasOwnProperty(i) && !_con[i].match("http://")) { + params.push(i + "=" + _con[i]); + } + } + params.push("type=#{type}"); + params.push("date=#{date}"); + params.push("jsonp=" + that.callName); + params.push("country=" + (_glo.country || "jp")); + params.push("_=#{stamp}"); + url += params.join("&"); + that.reqPath = url; + that.curReqPath = url.replace("&date=#{date}", ""); + }, + getCallbackFunc: function() { + var callName = "ghao123_custom" + ('' + +new Date).substring(3); + window[callName] = function(data) { + window[callName].data = data; + }; + return callName; + }, + initCtr: function(date) { + var that = this, + _con = that.conf, + _up = _con.update, + _ctr = that.eptCtr, + _cpl = that.ctrTpl, + _tpl = that.timTpl, + _lis = that.timeList, + _grp = that.timGroup; + + var fixDay = G.fixDay, + fixDat = G.fixDate, + tmpDay = {}; + + for(var i = 0, l = parseInt(_con.maxDays || 7, 10); i < l; i++) { + tmpDay = fixDay(date, 0-i, _con); + if(tmpDay.W < 6) { + tmpDay.update = _up; + _grp.push(_tpl.replaceTpl(tmpDay)); + _lis.push(fixDat(tmpDay)); + } + } + _ctr.innerHTML = _cpl.replaceTpl({ + prev: _con.prev, + next: _con.next, + date: _grp[0] + }); + that.ctrPrev = G("ctrlPrev"); // control to prev + that.ctrNext = G("ctrlNext"); // control to next + that.ctrTime = G("ctrlTime"); // show time + + that.bindCtrl(); // need elements have been created + + that.sendRequest(that.curType, that.curDate, that.render); // init request jsonp data + }, + initTle: function() { + var that = this, + _con = that.conf, + _img = _con.titleIcon, + _url = _con.titleUrl, + str = ''; + str += _url ? ('') : ''; + str += _img ? ('') : ''; + str += _con.title; + str += _url ? '' : ''; + that.eptTle.innerHTML = str; + }, + initTab: function() { + var that = this, + _con = that.conf.list, + _tab = that.eptTab, + _cuT = G.cookie("tabTypes"), + _cuI = 0, + str = '', + _tpl = that.tabTpl; + + for(var i = 0, l = _con.length; i < l; i++) { + _con[i].cur = ""; + + if(_cuT) { + if(_con[i].types == _cuT) { + that.curType = _con[i].types; + _cuI = i; + } + } else if( i === 0 ) { + that.curType = _con[i].types; + } + str += _tpl.replaceTpl(_con[i]); + } + + G.addCls(_tab, "tab-" + l); + _tab.innerHTML = str; + + that.curTab = _tab.getElementsByTagName("li")[_cuI]; + G.addCls(that.curTab, "cur"); + }, + switchTab: function(li) { + var that = this; + + that.curType = li.getAttribute("typ"); + + G.rmvCls(that.curTab, "cur"); + G.addCls(li, "cur"); + G.cookie("tabTypes", that.curType, {expires: 400}); + + that.curTab = li; + that.sendRequest(that.curType, that.curDate, that.render); + }, + getPrev: function() { + var that = this, + _tim = that.timeList, + _pre = that.ctrPrev, + _nex = that.ctrNext; + + if(_pre.className.search("ctr-diable") > -1) return; + + if(that.curDate === 0) { + G.rmvCls(_nex, "ctr-diable"); //is first + } + + that.curDate++; + + if(!_tim[that.curDate + 1]) { + G.addCls(_pre, "ctr-diable"); + } + + that.ctrTime.innerHTML = that.timGroup[that.curDate]; + + that.sendRequest(that.curType, that.curDate, that.render); + }, + getNext: function() { + var that = this, + _tim = that.timeList, + _pre = that.ctrPrev, + _nex = that.ctrNext; + + if(_nex.className.search("ctr-diable") > -1) return; + + if(that.curDate === _tim.length - 1) { + G.rmvCls(_pre, "ctr-diable"); //is last + } + + that.curDate--; + + if(that.curDate - 1 < 0) { + G.addCls(_nex, "ctr-diable"); + } + + that.ctrTime.innerHTML = that.timGroup[that.curDate]; + + that.sendRequest(that.curType, that.curDate, that.render); + }, + bindCtrl: function() { + var that = this; + + G.delegate(that.ctrPrev, 'click', function(event) { + that.getPrev(); + UT && UT.send({modId: "empty-search-rank", type: "click", position: "emptyPrev"}); + }); + G.delegate(that.ctrNext, 'click', function(event) { + that.getNext(); + UT && UT.send({modId: "empty-search-rank", type: "click", position: "emptyNext"}); + }); + }, + bindEvent: function() { + var that = this; + G.delegate(that.eptTab, 'click', function(event) { + var _self = this; + if(_self.tagName === "LI" && !_self.className.match("cur")) { + that.switchTab(_self); + UT && UT.send({modId: "empty-search-rank", type: "click", position: "emptyTab", sort: that.curType}); + } + }); + G.delegate(that.eptRes, 'click', function(event) { + var _self = this; + if(_self.tagName === "A" || _self.parentNode.tagName === "A") { + UT && UT.send({modId: "empty-search-rank", type: "click", position: "searchWords", sort: that.curType}); + } + }); + G.delegate(that.eptTle, 'click', function(event) { + var _self = this; + if(_self.tagName === "A" || _self.parentNode.tagName === "A") { + UT && UT.send({modId: "empty-search-rank", type: "click", position: "title"}); + } + }); + }, + createHtml: function() { + var that = this; + + that.initTle(); + that.initTab(); + + that.initCtr.scop = that; + G.time.getTime(that.initCtr); + } +} + +var eptObj = null, + noFrst = false; + +App.req = function(type) { + var eptConf = conf.ept, // empty search word + _conf = App.conf, + cache = App.cache, + reqParam = _conf.reqParam; + if (!reqParam.query) { + // add body class + if(eptConf) { + G.addCls(document.body, "ept-srch"); + + G("searchInput").value = G("searchInput2").value = reqParam.query; + + !eptObj && (eptObj = new App.ept(eptConf)); + } + } else { + // remove body class + G.rmvCls(document.body, "ept-srch"); + if (noFrst) {// first time no send log + UT && UT.send({ + type: "click", + sort: "search", + value: reqParam.query + }); + } else { + noFrst = true; + } + + reqParam["web.FirstResult"] = _conf.reqPn < 2 ? 0 : reqParam["web.NumResults"] * (_conf.reqPn - 1); + // G("searchInput").value = G("searchInput2").value = G.urlUnEscape(reqParam.query); + G("searchInput").value = G("searchInput2").value = reqParam.query; + + App.tip.show("loading"); + G("totalHits").innerHTML = ""; + cache.xhr && cache.xhr.abort(); + cache.xhr = G.ajax({ + type: "GET", + url: _conf.reqUrl, + data: _conf.reqParam, + wait: 10000, + success: App.render, + error: function() { + App.render(""); + App.tip.show("abort"); + } + }); + App.updateAd(); + + App.amazonAds.render(App.amazonAds.data); + } +} + +App.renderPn = function(str) { + if(G.isString(str)) return G("resultPn").innerHTML = str; + var conf = App.conf, + pn = conf.reqPn, + tpl = conf.tpl.pnLi, + txt = conf.txt, + i = 2, + total = 10, + dot = '
                                  • ...
                                  • ', + ret = [], + buildUrl = function(i) { + return App.supportState ? "javascript:void(0)" : App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(conf.reqParam.query)) + "&pn=" + i; + } + + if(pn > 1) ret.push(tpl.replaceTpl({ + url: buildUrl(pn - 1) + , n: "<" + , t: txt["prepage"] + })); + ret.push(tpl.replaceTpl({ + url: buildUrl(1) + , n: 1 + , t: 1 + })); + + if(pn > 7){ + ret.push(dot); + i = pn - 5; + total = pn + 5; + } + + if(App.cache.isLastPage) total = pn + 1; + + for(; i < total; i++) { + ret.push(tpl.replaceTpl({ + url: buildUrl(i) + , n: i + , t: i + })); + } + + if(!App.cache.isLastPage) { + ret.push(dot); + ret.push(tpl.replaceTpl({ + url: buildUrl(pn + 1) + , n: ">" + , t: txt["nextpage"] + })); + } + + G("resultPn").innerHTML = ret.join("").replace(new RegExp(">" + pn + ""), ' onclick="return false" class="r-pn_cur">' + pn + ''); +} + +App.renderAd = function(data) { + // fix ad Data + data = function(data) { + var ret = {}, + key; + G.each(data, function(val, key) { + ret[key] = []; + val.length && G.each(val, function(li, i) { + li && ret[key].push(li); + }); + }); + return ret; + }(data); + + var conf = App.conf, + adMaps = conf.adMaps, + adNum = conf.adNum, + // fixNum = +adNum.North - data.North.length, + tmpLen = data.South.length, + el; + + /* + fix ad Data + 1. keep north = 4 + 2. from: south > east + */ + // if(fixNum > 0) data.North = data.North.concat(data.South.splice(0, fixNum), data.East.splice(0, (tmpLen > fixNum || tmpLen === fixNum) ? 0 : fixNum - tmpLen)); + + G.each(data, function(val, key) { + if(key === "Amazon") { + return true; + } + el = adMaps[key]; + val.length = Math.min(val.length, +adNum[key]); + el.innerHTML = val.length ? val.join("") : ""; + el.parentNode.style.display = val.length ? "block" : ""; + }); + + + // bind linkIndex + G.each(adMaps, function(val, key) { + if(!val) return false; + var list = val.getElementsByTagName("li"), + i = 0, + li; + if(list && list.length) for(; li = list[i++];) { + var link = li.getElementsByTagName("a")[0]; + link && link.setAttribute("data-i", i); + } + }); +} + +App.updateAd = function() { + var conf = App.conf, + adNum = conf.adNum, + reqAdParam = conf.reqAdParam, + tpl = conf.tpl.adLi, + data = { + North: [] + , South: [] + , East: [] + }, + counter = { + north: 0, + south: 0, + east: 0 + }, + // Render AD tpls + renderTpl = function (listing, clickUrl) { + var key = /North/.test(clickUrl["@type"]) && counter.north++ < +adNum["North"] ? "North": /South/.test(clickUrl["@type"]) && counter.south++ < +adNum["South"] ? "South" : /East/.test(clickUrl["@type"]) && counter.east++ < +adNum["East"] ? "East" : ""; + if(data[key] && listing["@rank"]) data[key][+listing["@rank"]] = tpl.replaceTpl({ + url: clickUrl["data"] + , t: listing["@title"] + , des: listing["@description1"] + listing["@description2"] + , host: listing["@siteHost"] + // only show quick links in the north position + , quickLink: listing["QuickLink"] && key === "North" ? function(links, ret) { + var i = 0; + G.each(links, function(link) { + if (/North/.test(link["@type"]) && i < conf.qlMaxNum) { + ret[+link["@number"] - 1] = '' + link["@text"] + ''; + i++; + } + }); + return ret.join(" - ") + }(listing["QuickLink"], []) : "" + }); + }; + reqAdParam.Keywords = conf.reqParam.query; + App.renderAd(data); + + reqAdParam.Keywords && G.ajax({ + type: "GET", + url: conf.reqAdUrl, + data: reqAdParam, + wait: 10000, + success: function(res) { + if(!res) return; + res = G.xml.toJson(res); + if(res["Results"] && res["Results"]["ResultSet"] && res["Results"]["ResultSet"]["Listing"]) { + res = res["Results"]["ResultSet"]["Listing"]; + if(!res.length) res = [res]; + G.each(res, function(li, i) { + /*if(li["ClickUrl"]) { + var key = (li["ClickUrl"]["@type"].split("-") || ["", ""])[1]; + + if(data[key] && li["@rank"]) data[key][+li["@rank"]] = tpl.replaceTpl({ + url: li["ClickUrl"] + , t: li["@title"] + , des: li["@description1"] + li["@description2"] + , host: li["@siteHost"] + , quickLink: li["QuickLink"] ? function(links, ret) { + G.each(links, function(link) { + ret[+link["@number"] - 1] = '' + link["@text"] + ''; + }); + return ret.join(" - ") + }(li["QuickLink"], []) : "" + }); + }*/ + + // no North / East / South + + // change to 2 / 8 / 4 + if(li["ClickUrl"]) { + // var key = i < +adNum["North"] ? "North" : i < (+adNum["North"] + +adNum["East"]) ? "East" : i < (+adNum["North"] + +adNum["East"] + +adNum["South"]) ? "South" : ""; + // Render tpls with the 2 kinds of data format + if (li["ClickUrl"].length && !li["ClickUrl"]["data"]) { + for (var j in li["ClickUrl"]) { + renderTpl(li, li["ClickUrl"][j]); + } + } else { + renderTpl(li, li["ClickUrl"]); + } + } + }); + } + App.renderAd(data); + }, + error: function() { + App.renderAd(data); + } + }); +} + +App.render = function(data) { + App.cache.xhr = null; + if(data === "") { + G("result").innerHTML = ""; + G("totalHits").innerHTML = ""; + App.renderPn(""); + return; + } + data = G.xml.toJson(data); + + if(!data["BATCHSEARCHRESPONSE"] + || !data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"] + || !data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["RESULT"] + ) { + G("result").innerHTML = '

                                    ' + App.conf.txt.noResult.replaceTpl({ + + // Fix: XSS + query: '' + G.xml.escape(App.conf.reqParam.query) + '' + }) + '

                                    ' + App.conf.tpl.noResult; + + G("totalHits").innerHTML = ""; + App.renderPn(""); + App.tip.hide(); + return; + } + + // last page + App.cache.isLastPage = data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["@XT"] === "1" ? 1 : 0; + + var result = G("result"), + conf = App.conf, + tpl = conf.tpl, + txt = conf.txt, + list = data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["RESULT"], + query = conf.reqParam.query, + ret = []; + setTimeout(function() { + G("searchInput").focus(); + }, 64); + + if(list) { + if(list.length) App.renderPn(); + else list = [list]; + + // fix list 0 <=> 1 + if(list.length > 1) { + var tmpLiNode = list[0]; + list[0] = list[1]; + list[1] = tmpLiNode; + tmpLiNode = null; + } + + G.each(list, function(li) { + li.cache = txt.cache; + li.query = encodeURIComponent(App.conf.reqParam.query); + // li.DISPURL.data = G.fixLen(li.DISPURL.data, 90, "..."); + ret.push(tpl.resultLi.replaceTpl(li)) + }); + App.tip.hide(); + } + else { + App.renderPn(""); + App.tip.show("error"); + } + result.innerHTML = ret.join(""); + G("totalHits").innerHTML = txt.totalhits.replaceTpl({ + totalhits: data["BATCHSEARCHRESPONSE"]["RESULTSET_WEB"]["@TOTALHITS"].replace(/(\d)(?=(?:\d{3})+\b)/g, "$1,") + }); +} + +App.sugInit = function() { + var conf = App.conf, + searchInput = G("searchInput"); + conf.sug.templ = function(data, q) { + var that = this, + o = that.o, + classNameQueryNull = o.classNameQueryNull, + classNameQuery = o.classNameQuery, + ret = []; + + if(data + "" === data) { + ret.push('

                                    ' + data + '

                                    ') + } + else { + data = data[o.callbackDataKey || o.callbackDataNum] || []; + + var i = 0, + l = Math.min(data.length, o.n), + li, + undef; + q = q.trim(); + for(; i -1 ? "" : " class=" + classNameQueryNull) + '>' + (classNameQuery ? li.replace(q, '' + q + '') : li) + ''); + } + } + return '
                                      ' + ret.join("") + '
                                    ' + conf.tpl.sugBot.replaceTpl({ + classOn: conf.sugOn ? "" : "sug-close sug-switch_cur" + , classOff: conf.sugOn ? "sug-close sug-switch_cur" : "" + }); + } + conf.sug.onSucess = function(data) { + if(App.cache.waitSugTimer) { + clearTimeout(App.cache.waitSugTimer); + App.cache.waitSugTimer = null; + } + } + conf.sug.onRequest = function(data) { + if(!App.cache.waitSugTimer) App.cache.waitSugTimer = setTimeout(function() { + searchtop(conf.txt.withoutSug); + }, 1000); + App.cache.sug.sugWrap.style.visibility = App.conf.sugOn ? "" : "hidden"; + } + G.loadJs([conf.sugPath], function() { + var sug = App.cache.sug = G.sug(searchInput, conf.sug); + G("sugShow").onclick = function() { + var val = searchInput.value; + searchInput.focus(); + if(!conf.sugOn) { + sug.q = ""; + searchtop(conf.txt.closedSug); + sug.sugWrap.style.visibility = ""; + return false; + } + + if(!val.trim()) { + searchtop(conf.txt.withoutQuery); + } + else { + sug.request(val); + } + } + G.delegate(sug.sugWrap, "mousedown", function(e) { + var type = this.getAttribute("data-switch"), + el; + + (this.tagName === "LI" || this.parentNode.tagName === "LI") && UT && UT.send({type: "click", sort:"search_sug"}); + + if(!type || !/sug-switch_cur/.test(this.className)) return false; + App.conf.sugOn = type === "on"; + el = G("sugSwitch_" + (conf.sugOn ? "off" : "on")); + el && (el.className += " sug-switch_cur"); + this.className = this.className.replace(" sug-switch_cur", ""); + return false; + }); + }) +} + +App.iptControl = function(opt) { + this.ipt = opt.ipt; + this.btnClose = opt.btnClose; + this.tip = opt.tip; +} + +App.iptControl.prototype = { + init: function() { + var that = this; + "onpropertychange" in that.ipt + ? that.ipt.onpropertychange = function(e){ + e = window.event; + e.propertyName == "value" && that.iptHandle.call(that); + } + : that.ipt.addEventListener("input", function(e) { + that.iptHandle.call(that); + }, false); + + that.updateBtnClose(); + + that.btnClose.onclick = function() { + that.ipt.value = ""; + setTimeout(function() { + that.ipt.focus(); + that.show(that.btnClose, "none"); + }, 64); + return false; + } + + that.ipt.onfocus = that.ipt.onblur = function(e) { + that.updateBtnClose.call(that); + } + + that.tip.onclick = function() { + that.ipt.focus(); + } + }, + updateBtnClose: function() { + var that = this; + setTimeout(function() { + that.ipt.value + ? that.show(that.btnClose, "inline-block") + : that.show(that.btnClose, "none") + }, 64); + }, + iptHandle: function(e) { + var that = this; + that.ipt.value + ? that.show(that.btnClose, "inline-block").show(that.tip, "none") + : that.show(that.btnClose, "none"); + }, + show: function(el, className) { + if(el.style.display !== className) el.style.display = className; + return this; + } +} + +App.init = function() { + var conf = App.conf, + searchInput = G("searchInput"), + iptControl = new App.iptControl({ + ipt: G("searchInput") + , btnClose: G("searchClose") + , tip: G("searchIptTip") + }), + iptControl2 = new App.iptControl({ + ipt: G("searchInput2") + , btnClose: G("searchClose2") + , tip: G("searchIptTip2") + }); + + G.delegate(document.body, "mousedown", function(e) { + + (this.tagName === "A" || this.parentNode.tagName === "A" || this.tagName === "BUTTON") && UT && UT.send({type: "click", postion: "links"}); + + (this.id === "searchSubmit" || this.id === "searchSubmit2") && UT && UT.send({type: "click", sort: "search_btn"}); + + (/logo-hao123/.test(this.className) || /logo-hao123/.test(this.parentNode.className)) && UT && UT.send({type: "click", sort:"logo_hao123"}); + + (/logo-yahoo/.test(this.className) || /logo-yahoo/.test(this.parentNode.className)) && UT && UT.send({type: "click", sort:"logo-yahoo"}); + + if(this.tagName === "A" || this.parentNode.tagName === "A") { + e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = true); + } + }); + + G.delegate(G("result"), "mousedown", function(e) { + (this.tagName === "A" || this.parentNode.tagName === "A") && UT && UT.send({type: "click", sort:"search_result", position: "links"}); + }); + + G.each(conf.adMaps, function(val, key) { + G.delegate(val, "mousedown", function(e) { + (this.tagName === "A" || this.parentNode.tagName === "A") && !/r-list_more/.test(this.parentNode.className) && UT && UT.send({type: "click", position:"search_ad", value: (this.innerText || this.innerHTML).trim(), sort: key, linkIndex: this.getAttribute("data-i") || this.parentNode.getAttribute("data-i")}); + }); + }); + + App.req(); + App.amazonAds.init(window["conf"].amazonAds, parseInt(conf.reqPn , 10) > 1 ? true: false); + + if(App.supportState) { + history.pushState({ + query: conf.reqParam.query + , pn: conf.reqPn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(conf.reqParam.query)) + "&pn=" + conf.reqPn + ); + } + + G("searchForm").onsubmit = G("searchForm2").onsubmit = function(e) { + var query = conf.reqParam.query = this.getElementsByTagName("input")[0].value.trim(), + iptTip = G(/2/.test(this.id) ? "searchIptTip2" : "searchIptTip"); + //if(!query) { + /*iptControl.show(iptTip, "inline-block"); + return false;*/ + //return; + //} + + if(!App.supportState) return; + conf.reqPn = 1; + App.req(); + App.amazonAds.init(window["conf"].amazonAds); + history.pushState({ + query: query + , pn: conf.reqPn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(query)) + "&pn=" + conf.reqPn + ); + setTimeout(function() { + App.cache.sug && App.cache.sug.hide(1); + }, 200); + return false; + } + + G.delegate(G("searchLinks"), "click", function(e) { + var val = G("searchInput").value.trim(), + qUrl = this.getAttribute("data-url"); + if(!qUrl || !val) return; + + window.open(this.getAttribute("data-url").replaceTpl({q: encodeURIComponent(val)})); + e.preventDefault && e.preventDefault(); + return false; + }); + + G.delegate(G("searchLinks"), "mousedown", function(e) { + UT && UT.send({type: "click", sort: "search_tab", postion: "links", value: this.innerHTML.trim()}); + }); + + setTimeout(function() { + App.sugInit(); + }, 200); + + if(!App.supportState) return; + + window.addEventListener("popstate", function(e) { + var state = e.state; + if(!state/* || !state.query*/) return; + conf.reqParam.query = history.state.query; + conf.reqPn = history.state.reqPn; + App.req(); + App.amazonAds.init(window["conf"].amazonAds, parseInt(conf.reqPn, 10) > 1 ? true: false); + + // fix history not reset page num +/* setTimeout(function() { + var pnLinks = G("resultPn").getElementsByTagName("a") || []; + G.each(pnLinks, function(li) { + if(~~li.getAttribute("data-n") === ~~conf.reqPn && !/r-pn_cur/.test(li.className)) { + li.className = "r-pn_cur"; + return false; + } + }); + }, 100);*/ + + }, false); + + G.delegate(G("resultPn"), "mousedown", function(e) { + var pn = this.getAttribute("data-n"), + query = conf.reqParam.query, + reqPn = conf.reqPn; + + if(this.tagName !== "A" || /r-pn_cur/.test(this.className || !pn)) return false; + + UT && UT.send({type: "click", sort:"nextpage"}); + + if(pn === "<") pn = -1; + else if(pn === ">") pn = 1; + else conf.reqPn = 0; + conf.reqPn = +pn + conf.reqPn; + App.req(); + if(App.amazonAds.render(App.amazonAds.data, parseInt(conf.reqPn, 10) > 1 ? true: false)) { + App.amazonAds.init(window["conf"].amazonAds); + } + history.pushState({ + query: query + , pn: conf.reqPn + } + , "" + , App.cache.urlbase + "?query=" + G.urlEscape(encodeURIComponent(query)) + "&pn=" + conf.reqPn + ); + setTimeout(function() { + searchInput.focus(); + }, 64); + return false; + }); + iptControl.init(); + iptControl2.init(); +} +App.init(); diff --git a/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/yahoo-search_tmp.tpl b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/yahoo-search_tmp.tpl new file mode 100755 index 000000000..ffd8ceb27 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/hao123_fis3_smarty/lv2/widget/yahoo-search_tmp/yahoo-search_tmp.tpl @@ -0,0 +1,34 @@ + +<%style%> + @import url('/widget/yahoo-search_tmp/ltr/ltr.css?__inline'); +<%/style%> + +<%script%> +window.App = {}; +App.conf = { + reqUrl: "<%$root.body.search_conf.reqUrl%>" + , reqParam: <%json_encode($root.body.search_conf.reqParam)%> + , reqAdUrl: "<%$root.body.ad_conf.reqAdUrl%>" + , reqAdParam: <%json_encode($root.body.ad_conf.reqAdParam)%> + , adNum: <%json_encode($root.body.ad_conf.adNum)%> + , qlMaxNum: "<%$root.body.ad_conf.qlMaxNum%>" + , txt: <%json_encode($root.body.txt)%> + , tpl: { + resultLi: '
                                  • #{ABSTRACT.BEST.HTML.HL}

                                    #{DISPURL}
                                  • ' + + , pnLi: '
                                  • #{t}
                                  • ' + + , adLi: '
                                  • #{des}

                                    #{host}

                                    #{quickLink}
                                  • ' + + , sugBot: '
                                    キーワード入力補助 ON - OFF
                                    ' + , noResult: '<%$root.html.noResult%>' + } + , sugOn: "<%$root.body.sug.sugOn%>" + , sugPath: "<%$root.body.sug.sugPath%>" + , sug: <%json_encode($root.body.sug.conf)%> +} +App.conf.reqParam.ip = "<%$sysInfo.userip%>"; +conf.ept = <%json_encode($body.eptWord)%>; +conf.amazonAds = <%json_encode($body.amazonAds)%> || {}; +require.async("lv2:widget/yahoo-search_tmp/yahoo-search_tmp-async.js"); +<%/script%> diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/build.sh b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/build.sh new file mode 100644 index 000000000..b92f3952c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/build.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +export PATH=/home/fis/npm/bin:$PATH +fisp -v --no-color +fisp release -ompuDcd ./output --no-color +#fisp release -ompuDd remote +rm -rf ./output/data +mkdir ./output/webroot +mv ./output/static ./output/webroot/static + diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/config/smarty.conf b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/config/smarty.conf new file mode 100644 index 000000000..ddd0862f3 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/config/smarty.conf @@ -0,0 +1,344 @@ +# 提交命令号 +#附件提交 +DC_FILE_SUBMIT = "20001" +#说明提交 +DC_SUMMARY_SUBMIT = "20002" +#转化成功 +#DC_CONV_SUCCESS = "20003" +#转化失败 +#DC_CONV_FAILED = "20004" +#修改说明 +DC_SUMMARY_MODIFY = "20005" +#修改分类 +DC_MODIFY_CLASS = "20006" +#修改标价 +DC_MODIFY_PRICE = "20007" +#文档下载 +DC_DOWNLOAD_DOC = "20008" +#文档评价 +DC_VALUE_DOC = "20009" +#添加书单 +DC_ADD_MYDOC = "20010" +#删除书单 +DC_DELETE_FROM_MYDOC = "20011" +#用户删除(隐藏)文档 +DC_HIDE_FROM_UC = "20013" + + +# 提交审核通过 +DC_SUBMIT_RELEASE = "20020" +# 恢复文档 +DC_RECOVER_DOC = "20020" +# 管理员前端删除文档 +DC_ADMIN_DELETE_DOC = "20021" +# 提交审核未过 +DC_SUBMIT_FAILED = "20021" +# 删除文档 +DC_DELETE_DOC = "20021" +# 修改审核通过 +DC_MODIFY_RELEASE = "20022" +# 修改审核未过 +DC_MODIFY_FAILED = "20023" +# 管理员加分 +DC_ADD_SCORE = "20024" +# 管理员扣分 +DC_DEC_SCORE = "20025" + +# 提交审核通过 +DC_SUBMIT_RELEASE = "20020" +# 恢复文档 +DC_RECOVER_DOC = "20020" +# 管理员前端删除文档 +DC_ADMIN_DELETE_DOC = "20021" +# 管理员前端删除目录 +DC_ADMIN_DELETE_BOOKMARK = "20042" + +# 提交审核未过 +DC_SUBMIT_FAILED = "20021" +# 删除文档 +DC_DELETE_DOC = "20021" +# 删除文档书签 +DC_DELETE_BOOKMARK = "20110" +# 删除书店书签 +DC_DELETE_GOODSMARK = "20316" +# 修改审核通过 +DC_MODIFY_RELEASE = "20022" +# 修改审核未过 +DC_MODIFY_FAILED = "20023" +# 管理员加分 +DC_ADD_SCORE = "20024" +# 管理员扣分 +DC_DEC_SCORE = "20025" + +#增加合作机构 +ORG_ADD_SUBMIT = "20036" +#修改合作机构信息 +ORG_MODIFY_SUBMIT = "20037" +#删除合作机构 +ORG_DELL_SUBMIT = "20038" + +#机构合作注册 +ORG_REQ = "20105" + +# 专辑创建成功 +AL_SUBMIT_ALBUM = "20016" +# 添加文档到专辑成功 +AL_SUBMIT_DOC = "20017" +# 收藏文辑成功 +AL_FAVO = "20102" +# 删除专辑的文档成功 +AL_DELL_DOC = "20018" +# 修改专辑成功 +AL_EDIT = "20101" +# 删除搜藏的专辑成功 +AL_FAVO_DELL = "20103" + +#文辑审核通过 +AL_AUDIT_PASS = "20029" +#文辑审核不通过 +AL_AUDIT_FAIL = "20030" +#文辑修改通过 +AL_MOD_PASS = "20031" +#文辑修改不通过 +AL_MOD_FAIL = "20032" + +# 封禁用户 +US_FILTER = "20027" +# 解封用户 +US_UNFILTER = "20028" +# 添加管理员 +US_ADD_ADMIN = "20033" +# 删除管理员 +US_DELETE_ADMIN = "20034" +# 转让超级管理员 +US_MOVE_SUPER = "20035" + +#课件提交 +LEC_SUBMIT = "20106" +#课件修改 +LEC_EDIT = "20107" + +NEW_MARK = "20109" + +DATA_COLLECT = "20108" + +#文档私有 +DC_ADMIN_PRIVATE_DOC = "31" + + + + + +# 文档基本状态 +# 供个人中心展示 + +# 文档主状态 +# 空状态 +DOC_STATUS_NONE = 0 +# 已提交附件 +DOC_STATUS_SUBMITTED = 2 +# 文档说明已提交 +DOC_STATUS_WAITING = 3 +# 文档转换完成 +DOC_STATUS_CONVERTED = 4 + +# 文档审核通过 +DOC_STATUS_PASS = 4 + +# 审核未通过 +DOC_STATUS_FAILED = 4 + +# 文档处于待审核时的辅状态 +SUB_DOC_INVISIBLE = 0 +SUB_DOC_VISIBLE = 1 + +# 文档审核未通过时的辅状态 +SUB_DOC_MODIFIABLE = 0 +SUB_DOC_UNMODIFIABLE = 1 + +# 文档修改的处理状态 +MODIFY_STATUS_WAITING = 0 +MODIFY_STATUS_PASS = 1 +MODIFY_STATUS_FAILED = 2 + +# 文档需要更新 +DOC_UD_UPDATE = 20 +# 文档泄露了隐私内容 +DOC_UD_PRIVACY = 21 +# 文档上传错误 +DOC_UD_ERROR = 22 +# 文档侵犯了他人版权 +DOC_UD_COPYRIGHT = 23 +# 其他 +DOC_UD_OTHER = 24 + + +# reponse status +# xiaoguang +# 2011 11 9 +# 一级命名规则:MESSAGE + + +# 版权提示文案 +# 二级命名规则:MESSAGE_RIGHT + +# 浏览者看的版权提示(检索页,分类页) +MESSAGE_RIGHT_USER = "我们不允许任何未经著作权人同意而将其作品进行上传和公开分享的行为。一旦您发现了此类文档,希望您能前往投诉区进行投诉,我们非常感谢您为维护百度文库无盗版环境作出的贡献。" + +# 上传页顶部版权提示 +MESSAGE_RIGHT_TOP = "我们不允许任何未经著作权人同意而将其作品进行上传和公开分享的行为。请不要上传任何可能侵犯他人版权的内容,我们非常感谢您为维护百度文库无盗版环境作出的贡献。" + +# 上传页底部版权提示 +MESSAGE_RIGHT_BOTTOM = "请不要上传任何可能侵犯他人版权的内容,感谢您为维护百度文库无盗版环境作出的贡献。" + +# 我的文档版权提示 +MESSAGE_RIGHT_MYDOC = "我们不允许公开分享任何可能侵犯他人版权的文档,我们希望您能主动删除您上传的可能侵犯他人版权的文档,感谢您对文库的理解与支持。" + + +# reponse status +# xiaoqiang +# 2009 08 13 + +# 默认交互成功 +DEFAULT_SUCCESS = "0" +# 系统错误 +DOC_SYSTEM_ERROR = "1" +# 用户未登录 +USER_UNLOGIN = "2" +# 用户被封禁 +USER_LOCKED = "3" +# 用户没有操作权限 +USER_NO_POWER = "4" +# 操作频率过快 +USER_TOO_FAST = "5" +# 重复评价 +DOC_REPEATED_VALUE = "6" +# 文档大小非法 +DOC_SIZE_ILLEGAL = "7" +# 文档标题非法 +DOC_TITLE_ILLEGAL = "8" +# 文档格式非法 +DOC_TYPE_ILLEGAL = "9" +# 文档重复 +DOC_REPEATED = "10" +# 提交参数非法 +POST_PARAM_INVALID = "11" +# 文档下载失败 +ERR_DOWNLOAD_FAILED = "12" +# 评价失败 +DOC_VALUE_FAILED = "13" +# 下载文档积分不够 +ERR_LOW_SCORE = "14" +# 文档已在书单中 +DOC_IN_STORE_ALREADY = "15" +# 上传文档速度过快 +ERR_UPLOAD_TOO_FAST = "16" +# 下载速度过快 +ERR_DOWNLOAD_TOO_FAST = "17" + +#文辑已经被收藏 +ERR_ALBUM_REPEAT_FAVO = "21" +#文辑已含该文档 +ERR_ALBUM_DUP_DOC = "20" +#文辑文档数达到上限 +ERR_ALBUM_DOC_HIGH = "19" +#创建文档包含文档数不够 +ERR_ALBUM_DOC_LOW = "24" +#文辑修改次数限制 +ERR_ALBUM_MOD_TOP = "22" +#文辑包含敏感词 +ERR_ALBUM_SENSE_WORD = "23" + + +# 用户因广告被封禁 +USER_LOCKED_AD = "31" +#用户因低质量被封禁 +USER_LOCKED_LOW_QUA = "32" +#用户因作弊被封禁 +USER_LOCKED_CHEAT= "33" +#用户因红反被封禁 +USER_LOCKED_REA_PORN = "34" +#用户因其他原因被封禁 +USER_LOCKED_OTHER = "35" +# 用户因广告被永久封禁 +USER_LOCKED_NA_AD = "36" +#用户因低质量被永久封禁 +USER_LOCKED_NA_LOW_QUA = "37" +#用户因作弊被永久封禁 +USER_LOCKED_NA_CHEAT= "38" +#用户因红反被永久封禁 +USER_LOCKED_NA_REA_PORN = "39" +#用户因其他原因被永久封禁 +USER_LOCKED_NA_OTHER = "40" +# 管理员删除 +DOC_UD_ADMINDEL = "41" +#用户上传次数过多 +DOC_UP_FREQUENT = "42" +#用户上传重复 +ERR_UPLOAD_SAME = "46" +#用户没有认证邮箱 +USER_NOT_VERIFICATION = "44" +#用户需要补填用户名 +USER_NO_USERNAME = "47" + + +#lazyload默认图片地址 +LAZYLOAD_DEFAULT_IMAGE = "/static/common/asets/gray_img.gif" +CDN_HOST = "http://static.wenku.bdimg.com" +DOC_COVER_URL_PREFIX = "http://retype.wenku.bdimg.com/img/" + +# global url conf +host = "http://wenku.baidu.com" +waphost = "http://wapwenku.baidu.com" +list = "/list/" +albumlist = "/album/list" +albumview = "/album/view/" +albumsubmit = "/album/submit" +submit = "/submit" +filter = "/filter" +img = "/img/" +view = "/view/" +shopview = "/book/view/" +latest = "/latest" +search = "/search" +lecsearch = "/lec/search" +new = "/new" +upload = "/upload" +download = "/download" +create = "/create" +#uc = "http://zhidao.baidu.com/q?ct=24&cm=16&tn=ucframework&item=doc#doc" +uc = "http://wenku.baidu.com/user/" +ucenter = "/user/" +uc_tab = "/user/" +userlist = "/userlist/" +mis = "/mis" +mislogin = "/mis/login" +misleft = "/mis/left" +mispublic = "/mis/pub" +miscat = "/mis/cat" +misnew = "/mis/new" +misbatch = "/mis/batch" +misinner = "/mis/inner" +mismod = "/mis/mod" +misall = "/mis/all" +mishot = "/mis/hot" +miswaphot = "/mis/waphot" +miswaprec = "/mis/waprec" +missearch = "/mis/search" +misword = "/mis/word" +mislable = "/mis/lable" +misalbumnew = "/mis/album/new" +misalbummod = "/mis/album/mod" +misalbumall = "/mis/album/all" +misusersmg ="/mis/usersmg" +od1='1' +od2='salecount' +od3='viewcount' +od4='updatetime' +od9='9' +miswapalbum ="/mis/wapalbumhot" +space = "http://hiphotos.baidu.com/baidu/pic/item/" +hezuo = "http://open.read.baidu.com" +defaultimg="/static/img/default_image.gif" +left_delimiter="<{" +right_delimiter="}>" \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/data/index.php b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/data/index.php new file mode 100755 index 000000000..1859252be --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/data/index.php @@ -0,0 +1,7 @@ + '正阳门', + 'UserName' => 'Mr.Q', +); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/data/list.php b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/data/list.php new file mode 100644 index 000000000..13fdc1ce7 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/data/list.php @@ -0,0 +1,23 @@ + '正阳门', + 'UserName' => 'Mr.Q', + 'booklist' => array( + array( + "id" => 2, + "book_id" => "8024ccbff121dd36a32d8205", + "edit_status" => 3, + "create_time" => "1373903120", + "title" => "markdown", + ), + + array( + "id" => 1, + "book_id" => "261810a6f524ccbff1218405", + "edit_status" => 1, + "create_time" => "12121212", + "title" => "markdown", + ), + ) +); \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/fis-conf2.js b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/fis-conf2.js new file mode 100755 index 000000000..cd18c9465 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/fis-conf2.js @@ -0,0 +1,181 @@ +fis.require('smarty')(fis); + +fis.set('namespace', "bookeditor"); + +fis + .media('dev') + .match('**' , { + useHash: false + }); + +//fis.match('*', { +// deploy: fis.plugin('local-deliver', { +// to: "../output" +// }) +//}); + +fis.set('project.charset', 'gbk'); + + + + +// fis.match( /\/(ueditor\/.*$)/i , { +// useHash: false, +// release: '/static/${namespace}/js/$1' +// }); + +// fis.match( /^\/static\/js\/util\.js/i , { +// isMod: true, +// release: '/static/${namespace}/js/util.js' +// }); + +// fis.match( /^\/widget\/(.*\.tpl)$/i , { +// isMod: true, +// url : '${namespace}/widget/$1', +// release : '/template/${namespace}/widget/$1' +// }); + +// fis.match( /^\/widget\/(.*\.(js|css))$/i , { +// isMod: true, +// release : '/static/${namespace}/widget/$1' +// }); + +// fis.match( /^\/page\/(.+\.tpl)$/i , { +// isMod: true, +// release : '/template/${namespace}/page/$1', +// extras: { +// isPage: true +// } +// }); + +// fis.match( /\.tmpl$/i , { +// release : false +// }); + +// fis.match( /^\/(static|data)\/(.*)/i , { +// release: '/$1/${namespace}/$2' +// }); + +// fis.match( /^\/plugin\/.*\.php$/i , { +// release: '/template/$&' +// }); + +// fis.match( "domain.conf" , { +// release: 'template/config/$&' +// }); + +// fis.match( /^\/config\/(.*)/i , { +// release: '/template/config/$1' +// }); + +// fis.match( "build.sh" , { +// release: false +// }); + +// fis.match( '${namespace}-map.json' , { +// release: '/template/config/${namespace}-map.json' +// }); + +// // fis.match( /^.+$/ , { +// // release: '/static/${namespace}$&' +// // }); + +// fis.set('smarty', { +// 'left_delimiter': '<{', +// 'right_delimiter': '}>' +// }); + +// fis.match('/static/js/jquery.js', { +// packTo: 'pkg/aio.js' +// }); + +// fis.match('/static/js/jquery.color.js', { +// packTo: 'pkg/aio.js' +// }); + +// fis.match('/static/js/util.js', { +// packTo: 'pkg/aio.js' +// }); + +// fis.match('/static/js/bootstrap.js', { +// packTo: 'pkg/aio.js' +// }); + +// fis.match(/^static\/css\/.*\.css$/i, { +// packTo: 'pkg/aio.css' +// }); +//wangrui + +fis.match(/^static\/css\/.*\.css$/i, { + packTo: 'pkg/aio.css' +}); +fis.match('/static/js/bootstrap.js', { + packTo: 'pkg/aio.js' +}); +fis.match('/static/js/util.js', { + packTo: 'pkg/aio.js' +}); +fis.match('/static/js/jquery.color.js', { + packTo: 'pkg/aio.js' +}); +fis.match('/static/js/jquery.js', { + packTo: 'pkg/aio.js', + packOrder: -100 +}); +fis.set('smarty', { + 'left_delimiter': '<{', + 'right_delimiter': '}>' +}); +// fis.match( /^.+$/ , { +// release: '/static/${namespace}$&' +// }); + +fis.match( '${namespace}-map.json' , { + release: '/template/config/${namespace}-map.json' +}); +fis.match( "build.sh" , { + release: false +}); +fis.match( /^\/config\/(.*)/i , { + release: '/template/config/$1' +}); +fis.match( "domain.conf" , { + release: 'template/config/$&' +}); +fis.match( /^\/plugin\/.*\.php$/i , { + release: '/template/$&' +}); +fis.match( /^\/(static|data)\/(.*)/i , { + release: '/$1/${namespace}/$2' +}); +fis.match( /\.tmpl$/i , { + release : false +}); +fis.match( /^\/page\/(.+\.tpl)$/i , { + isMod: true, + release : '/template/${namespace}/page/$1', + extras: { + isPage: true + } +}); +fis.match( /^\/widget\/(.*\.(js|css))$/i , { + isMod: true, + release : '/static/${namespace}/widget/$1' +}); +fis.match( /^\/widget\/(.*\.tpl)$/i , { + isMod: true, + url : '${namespace}/widget/$1', + release : '/template/${namespace}/widget/$1' +}); +fis.match( /^\/static\/js\/util\.js/i , { + isMod: true, + release: '/static/${namespace}/js/util.js' +}); +fis.match( /\/(ueditor\/.*$)/i , { + useHash: false, + release: '/static/${namespace}/js/$1' +}); + +// fis.match('*.js', { +// optimizer: false +// }) diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/index.js b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/index.less b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/index.less new file mode 100755 index 000000000..7f015f111 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/index.less @@ -0,0 +1,3 @@ +.body { + margin-top: 50px; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/index.tpl b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/index.tpl new file mode 100755 index 000000000..b3e055f28 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/index.tpl @@ -0,0 +1,40 @@ +<{html class="expanded"}> +<{head}> + + + book编辑器 + <{require name="bookeditor:static/css/bootstrap.css"}> + <{require name="bookeditor:static/css/bootstrap-responsive.css"}> + <{require name="bookeditor:static/js/mod2222.js"}> + <{require name="bookeditor:static/js/jquery.js"}> + <{require name="bookeditor:static/js/jquery.color.js"}> + <{require name="bookeditor:static/js/bootstrap.js"}> + <{require name="bookeditor:static/js/util.js"}> + <{require name="bookeditor:static/js/ueditor/ueditor.config.js"}> + <{require name="bookeditor:static/js/ueditor/ueditor.all.js"}> + <{require name="bookeditor:static/js/ueditor/lang/zh-cn/zh-cn.js"}> + + +<{/head}> +<{body}> + + <{widget name="bookeditor:widget/nav/nav.tpl"}> + +
                                    +
                                    +
                                    + <{widget name="bookeditor:widget/sidebar/sidebar.tpl"}> +
                                    +
                                    + <{widget name="bookeditor:widget/editor/editor.tpl"}> +
                                    +
                                    +
                                    + <{require name="bookeditor:page/index.less"}> +<{/body}> +<{/html}> diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/list.less b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/list.less new file mode 100644 index 000000000..6281d7d3b --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/list.less @@ -0,0 +1,55 @@ +.table-data { + margin: 50px; + + .pagination { + display: table; + margin: 20px auto; + } +} + +.ui-pager{ clear:both;line-height:22px; overflow:hidden;zoom:1; white-space:nowrap;text-align: center;zoom:1; } +.ui-pager .pager-inner{ float:left; font-size:13px; } +.ui-pager a, +.ui-pager span{ float:left; width:23px; height:22px; margin-right:5px; line-height:22px; overflow:hidden; border:1px solid #e7ecf0; background:#fff; text-decoration:none; text-align:center;} +.ui-pager a:hover{ background:#e9f1f7;text-decoration:none;color:#0000cd; } +.ui-pager .cur{ width:25px; border:none; background:none; font-weight:700; color:#000; } +.ui-pager .els{ width:15px; border:none; color:#0000cd; background:none; } +.ui-pager .first, +.ui-pager .last{ width:41px;*line-height:24px; line-height:24px\9\0; } +.ui-pager .pre, +.ui-pager .next{ width:60px;line-height:23px; _line-height:24px; line-height:24px\9\0; } +.ui-pager .no4, +.ui-pager .no5{ width:40px; } +.ui-pager span.no4, +.ui-pager span.no5{ width:42px; } +.ui-pager .no6, +.ui-pager .no7{ width:50px; } +.ui-pager span.no6, +.ui-pager span.no7{ width:52px; } +.ui-pager .nums{ float:right; margin-left:65px; font-size:12px; color:#999; } +.pager-center .pager{ float:left;position:relative; left:50%;} +.pager-center .pager-inner{position:relative; right:50%;} +.pager-center .nums{ margin-left:290px;} + +/* +
                                    +
                                    +
                                    + 首页 + <上一页 + 1 + 2 + 3 + 45 + 6 + 7 + 8 + 9 + 10 + + 尾页 +
                                    +
                                    +
                                    +*/ + diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/list.tpl b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/list.tpl new file mode 100644 index 000000000..14ae55233 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/page/list.tpl @@ -0,0 +1,45 @@ +<{html class="expanded"}> +<{head}> + + + 图书列表 + <{require name="bookeditor:static/css/bootstrap.css"}> + <{require name="bookeditor:static/css/bootstrap-responsive.css"}> + <{require name="bookeditor:static/js/mod.js"}> + <{require name="bookeditor:static/js/jquery.js"}> + <{require name="bookeditor:static/js/bootstrap.js"}> + <{require name="bookeditor:static/js/util.js"}> +<{/head}> +<{body}> + + <{widget name="bookeditor:widget/nav/nav.tpl"}> +
                                    + + <{widget name="bookeditor:widget/list/list.tpl"}> +
                                    +
                                    +
                                    + <{$page|page|escape:"none"}> +
                                    +
                                    +
                                    + <{* + + *}> +
                                    + + + <{require name="bookeditor:page/list.less"}> + + <{/body}> +<{/html}> diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/function.http_header.php b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/function.http_header.php new file mode 100644 index 000000000..d0ca7419e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/function.http_header.php @@ -0,0 +1,40 @@ + 'text/html', + 'json' => 'application/json', + 'javascript' => 'application/x-javascript', + 'js' => 'application/x-javascript', + 'xml' => 'text/xml', + 'stream' => 'application/octet-stream' + ); + if (array_key_exists($type, $mimeTypes)) { + $mime = $mimeTypes[$type]; + } else { + $mime = "text/plain"; + } + header("Content-Type:$mime; charset=$charset;"); +} + + diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_callback.php b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_callback.php new file mode 100644 index 000000000..1c3d9db3e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_callback.php @@ -0,0 +1,12 @@ + '<', + '>' => '>', + "'" => "\\'", + '"' => '\\"', + "\\" => "\\\\", + "\n" => "\\n", + "\r" => "\\r", + "/" => "\\/" + ); + $patterns = array_keys($arr_js_char); + $targets = array_values($arr_js_char); + $ret = str_replace($patterns, $targets, $str); + return $ret; +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_event.php b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_event.php new file mode 100644 index 000000000..bbfb2aa3d --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_event.php @@ -0,0 +1,18 @@ + '&', + '<' => '<', + '>' => '>', + "\\" => "\\\\", + "'" => "\\'", + '"' => "\\"", + "\n" => "\\n", + "\r" => "\\r", + "/" => "\\/" + ); + $patterns = array_keys($char_map); + $targets = array_values($char_map); + return str_replace($patterns, $targets, $str); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_js.php b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_js.php new file mode 100644 index 000000000..ccdb70102 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_js.php @@ -0,0 +1,15 @@ + "\\\\", + "'" => "\\x27", + "\"" => "\\x22", + "/" => "\\/", + "\n" => "\\n", + "\r" => "\\r" + ); + $patterns = array_keys($char_map); + $targets = array_values($char_map); + return str_replace($patterns, $targets, $str); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_path.php b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_path.php new file mode 100644 index 000000000..26f67dc8c --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.f_escape_path.php @@ -0,0 +1,14 @@ +', '\'', '"'), + array('&', '<', '>', ''', '"'), + strval($str) + ); +} \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.page.php b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.page.php new file mode 100755 index 000000000..7dbbee377 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/plugin/modifier.page.php @@ -0,0 +1,116 @@ +10, + 'numberPerPage'=>10, + 'show_end'=>true, + 'more'=>'', + 'url'=>false + ); + + $pageInfo = array_merge($pageInfo_def,$pageInfo); + + $CURRENT_NUM = $pageInfo['currentNum']; + $NUM_PER_PAGE = $pageInfo['numberPerPage']; + $TOTAL_NUM = $pageInfo['totalNumber']; + $TOTAL_NUM_LIMIT = $pageInfo['totalNumberLimit']; + $PAGE_NUM_LIMIT =$pageInfo['pageNumLimit']; + $URL = $pageInfo['url']; + $MORE = $pageInfo['more']; + $SHOW_END = $pageInfo['show_end']; + + + if (!$URL){ + $URL=$_SERVER['REQUEST_URI']; + } + + $arr = parse_url($URL); + if($arr['query']){ + parse_str($arr['query'],$query); + $URL = $arr['path']; + + unset($query['pn']); + if(count($query)){ + $URL=$URL.'?'.http_build_query($query); + } + + } + + + if ( $CURRENT_NUM < 0 || $TOTAL_NUM <= $NUM_PER_PAGE ) return false; + + if ( $TOTAL_NUM_LIMIT != 0 ) { + $TOTAL_NUM = ($TOTAL_NUM >= $TOTAL_NUM_LIMIT)? $TOTAL_NUM_LIMIT : $TOTAL_NUM; + } + //$CURRENT_PAGE_NUM ǰʼҳ + $CURRENT_PAGE_NUM = intval($CURRENT_NUM / $NUM_PER_PAGE ); + //$TOTAL_PAGE_NUM ҳ + $TOTAL_PAGE_NUM = intval($TOTAL_NUM / $NUM_PER_PAGE ); + if ( ($TOTAL_PAGE_NUM * $NUM_PER_PAGE) < $TOTAL_NUM ) { + $TOTAL_PAGE_NUM++; + } + $URL = (preg_match("/\?/",$URL))? $URL."&" : $URL."?"; + $output = ""; + $head_offset = 4; // ǰҳǰƫλ + $tail_offset = 5; // ǰҳƫλ + // ҳСָҳ + if ( $TOTAL_PAGE_NUM <= $PAGE_NUM_LIMIT ) { + $start = 0; + $end = $TOTAL_PAGE_NUM; + } else { + // ǰҳǰ + if ( $CURRENT_PAGE_NUM <= $head_offset) { + $start = 0; + $end = $start + $PAGE_NUM_LIMIT; + } + // ǰҳ + else if ( ($CURRENT_PAGE_NUM + $tail_offset) >= $TOTAL_PAGE_NUM) { + $start = $TOTAL_PAGE_NUM - $PAGE_NUM_LIMIT; + $end = $TOTAL_PAGE_NUM; + } + // ǰҳм + else { + $start = $CURRENT_PAGE_NUM - $head_offset; + $end = $start + $PAGE_NUM_LIMIT; + } + // 1ʧˣҪʾҳ + if ( $CURRENT_PAGE_NUM > $head_offset ) { + $output .= 'ҳ'; + } + } + // ֻҪǵһҳʾһҳ + if ($start != $CURRENT_PAGE_NUM) { + $output .= '<<һҳ'; + } + // ʾҳ + for ($i = $start; $i < $end; $i++) { + $no = strlen("".($i+1)); + if ( $i == $CURRENT_PAGE_NUM ) { + $output .= ''.($i+1).''; + } else { + $output .= ''.($i+1).''; + } + } + // ֻҪһҳʾһҳ + if (($CURRENT_PAGE_NUM + 1) != $TOTAL_PAGE_NUM) { + $output .= ''; + } + // ֻҪβҳûҳʾʾβҳ + if ($SHOW_END && $end < $TOTAL_PAGE_NUM){ + $output .= 'βҳ'; + } + return $output; + } diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/server.conf b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/server.conf new file mode 100644 index 000000000..fcfe58f0e --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/server.conf @@ -0,0 +1 @@ +redirect ^\/?$ /bookeditor/page/index \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/smarty.conf b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/smarty.conf new file mode 100644 index 000000000..461388e0a --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/smarty.conf @@ -0,0 +1,2 @@ +left_delimiter="<{" +right_delimiter="}>" \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/css/bootstrap-responsive.css b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/css/bootstrap-responsive.css new file mode 100755 index 000000000..09e88ce3f --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/css/bootstrap-responsive.css @@ -0,0 +1,1109 @@ +/*! + * Bootstrap Responsive v2.3.2 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +@-ms-viewport { + width: device-width; +} + +.hidden { + display: none; + visibility: hidden; +} + +.visible-phone { + display: none !important; +} + +.visible-tablet { + display: none !important; +} + +.hidden-desktop { + display: none !important; +} + +.visible-desktop { + display: inherit !important; +} + +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} + +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} + +.visible-print { + display: none !important; +} + +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} + +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 1156px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 1056px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 956px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 856px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 756px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 656px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 556px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 456px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 356px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 256px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 156px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} + +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} + +@media (max-width: 767px) { + body { + padding-right: 20px; + padding-left: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-right: -20px; + margin-left: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + width: auto; + clear: none; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + display: block; + float: none; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + right: 20px; + left: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } +} + +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 20px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-right: 10px; + padding-left: 10px; + } + .media .pull-left, + .media .pull-right { + display: block; + float: none; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + right: 10px; + left: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} + +@media (max-width: 979px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 20px; + } + .navbar-fixed-bottom { + margin-top: 20px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-right: 10px; + padding-left: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 10px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #777777; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #777777; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: #111111; + } + .nav-collapse.in .btn-group { + padding: 0; + margin-top: 5px; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + display: none; + float: none; + max-width: none; + padding: 0; + margin: 0 15px; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 10px 15px; + margin: 10px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + height: 0; + overflow: hidden; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-right: 10px; + padding-left: 10px; + } +} + +@media (min-width: 980px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/css/bootstrap.css b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/css/bootstrap.css new file mode 100755 index 000000000..b725064aa --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/css/bootstrap.css @@ -0,0 +1,6167 @@ +/*! + * Bootstrap v2.3.2 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +audio:not([controls]) { + display: none; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +a:hover, +a:active { + outline: 0; +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + width: auto\9; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +#map_canvas img, +.google-maps img { + max-width: none; +} + +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} + +button, +input { + *overflow: visible; + line-height: normal; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} + +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} + +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} + +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #333333; + background-color: #ffffff; +} + +a { + color: #0088cc; + text-decoration: none; +} + +a:hover, +a:focus { + color: #005580; + text-decoration: underline; +} + +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} + +.row { + margin-left: -20px; + *zoom: 1; +} + +.row:before, +.row:after { + display: table; + line-height: 0; + content: ""; +} + +.row:after { + clear: both; +} + +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} + +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.span12 { + width: 940px; +} + +.span11 { + width: 860px; +} + +.span10 { + width: 780px; +} + +.span9 { + width: 700px; +} + +.span8 { + width: 620px; +} + +.span7 { + width: 540px; +} + +.span6 { + width: 460px; +} + +.span5 { + width: 380px; +} + +.span4 { + width: 300px; +} + +.span3 { + width: 220px; +} + +.span2 { + width: 140px; +} + +.span1 { + width: 60px; +} + +.offset12 { + margin-left: 980px; +} + +.offset11 { + margin-left: 900px; +} + +.offset10 { + margin-left: 820px; +} + +.offset9 { + margin-left: 740px; +} + +.offset8 { + margin-left: 660px; +} + +.offset7 { + margin-left: 580px; +} + +.offset6 { + margin-left: 500px; +} + +.offset5 { + margin-left: 420px; +} + +.offset4 { + margin-left: 340px; +} + +.offset3 { + margin-left: 260px; +} + +.offset2 { + margin-left: 180px; +} + +.offset1 { + margin-left: 100px; +} + +.row-fluid { + width: 100%; + *zoom: 1; +} + +.row-fluid:before, +.row-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.row-fluid:after { + clear: both; +} + +.row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} + +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} + +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} + +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} + +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} + +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} + +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} + +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} + +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} + +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} + +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} + +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} + +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} + +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} + +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} + +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} + +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} + +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} + +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} + +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} + +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} + +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} + +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} + +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} + +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} + +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} + +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} + +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} + +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} + +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} + +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} + +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} + +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} + +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} + +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} + +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} + +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} + +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} + +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} + +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} + +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} + +.container:before, +.container:after { + display: table; + line-height: 0; + content: ""; +} + +.container:after { + clear: both; +} + +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} + +.container-fluid:before, +.container-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.container-fluid:after { + clear: both; +} + +p { + margin: 0 0 10px; +} + +.lead { + margin-bottom: 20px; + font-size: 21px; + font-weight: 200; + line-height: 30px; +} + +small { + font-size: 85%; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +cite { + font-style: normal; +} + +.muted { + color: #999999; +} + +a.muted:hover, +a.muted:focus { + color: #808080; +} + +.text-warning { + color: #c09853; +} + +a.text-warning:hover, +a.text-warning:focus { + color: #a47e3c; +} + +.text-error { + color: #b94a48; +} + +a.text-error:hover, +a.text-error:focus { + color: #953b39; +} + +.text-info { + color: #3a87ad; +} + +a.text-info:hover, +a.text-info:focus { + color: #2d6987; +} + +.text-success { + color: #468847; +} + +a.text-success:hover, +a.text-success:focus { + color: #356635; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; + font-family: inherit; + font-weight: bold; + line-height: 20px; + color: inherit; + text-rendering: optimizelegibility; +} + +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} + +h1, +h2, +h3 { + line-height: 40px; +} + +h1 { + font-size: 38.5px; +} + +h2 { + font-size: 31.5px; +} + +h3 { + font-size: 24.5px; +} + +h4 { + font-size: 17.5px; +} + +h5 { + font-size: 14px; +} + +h6 { + font-size: 11.9px; +} + +h1 small { + font-size: 24.5px; +} + +h2 small { + font-size: 17.5px; +} + +h3 small { + font-size: 14px; +} + +h4 small { + font-size: 14px; +} + +.page-header { + padding-bottom: 9px; + margin: 20px 0 30px; + border-bottom: 1px solid #eeeeee; +} + +ul, +ol { + padding: 0; + margin: 0 0 10px 25px; +} + +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} + +li { + line-height: 20px; +} + +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} + +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} + +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + padding-right: 5px; + padding-left: 5px; + *zoom: 1; +} + +dl { + margin-bottom: 20px; +} + +dt, +dd { + line-height: 20px; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 10px; +} + +.dl-horizontal { + *zoom: 1; +} + +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + line-height: 0; + content: ""; +} + +.dl-horizontal:after { + clear: both; +} + +.dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; +} + +.dl-horizontal dd { + margin-left: 180px; +} + +hr { + margin: 20px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} + +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} + +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} + +blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #eeeeee; +} + +blockquote p { + margin-bottom: 0; + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + +blockquote small { + display: block; + line-height: 20px; + color: #999999; +} + +blockquote small:before { + content: '\2014 \00A0'; +} + +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} + +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} + +blockquote.pull-right small:before { + content: ''; +} + +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} + +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 20px; +} + +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 12px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +code { + padding: 2px 4px; + color: #d14; + white-space: nowrap; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +pre.prettyprint { + margin-bottom: 20px; +} + +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} + +form { + margin: 0 0 20px; +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} + +legend small { + font-size: 15px; + color: #999999; +} + +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} + +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +label { + display: block; + margin-bottom: 5px; +} + +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; + vertical-align: middle; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +input, +textarea, +.uneditable-input { + width: 206px; +} + +textarea { + height: auto; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); +} + +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + *margin-top: 0; + line-height: normal; +} + +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} + +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} + +select { + width: 220px; + background-color: #ffffff; + border: 1px solid #cccccc; +} + +select[multiple], +select[size] { + height: auto; +} + +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.uneditable-input, +.uneditable-textarea { + color: #999999; + cursor: not-allowed; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); +} + +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} + +.uneditable-textarea { + width: auto; + height: auto; +} + +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} + +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} + +.radio, +.checkbox { + min-height: 20px; + padding-left: 20px; +} + +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} + +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} + +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} + +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} + +.input-mini { + width: 60px; +} + +.input-small { + width: 90px; +} + +.input-medium { + width: 150px; +} + +.input-large { + width: 210px; +} + +.input-xlarge { + width: 270px; +} + +.input-xxlarge { + width: 530px; +} + +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} + +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} + +input, +textarea, +.uneditable-input { + margin-left: 0; +} + +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} + +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} + +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} + +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} + +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} + +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} + +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} + +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} + +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} + +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} + +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} + +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} + +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} + +.controls-row { + *zoom: 1; +} + +.controls-row:before, +.controls-row:after { + display: table; + line-height: 0; + content: ""; +} + +.controls-row:after { + clear: both; +} + +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} + +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} + +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} + +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} + +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} + +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} + +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} + +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} + +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} + +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} + +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} + +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} + +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} + +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} + +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} + +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} + +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} + +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} + +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} + +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} + +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} + +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} + +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} + +.form-actions:before, +.form-actions:after { + display: table; + line-height: 0; + content: ""; +} + +.form-actions:after { + clear: both; +} + +.help-block, +.help-inline { + color: #595959; +} + +.help-block { + display: block; + margin-bottom: 10px; +} + +.help-inline { + display: inline-block; + *display: inline; + padding-left: 5px; + vertical-align: middle; + *zoom: 1; +} + +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 10px; + font-size: 0; + white-space: nowrap; + vertical-align: middle; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 14px; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} + +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} + +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} + +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} + +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} + +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} + +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +/* Allow for input prepend/append in search forms */ + +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + margin-bottom: 0; + vertical-align: middle; + *zoom: 1; +} + +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} + +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} + +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} + +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} + +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} + +.control-group { + margin-bottom: 10px; +} + +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} + +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} + +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + line-height: 0; + content: ""; +} + +.form-horizontal .control-group:after { + clear: both; +} + +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} + +.form-horizontal .controls:first-child { + *padding-left: 180px; +} + +.form-horizontal .help-block { + margin-bottom: 0; +} + +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 10px; +} + +.form-horizontal .form-actions { + padding-left: 180px; +} + +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} + +.table { + width: 100%; + margin-bottom: 20px; +} + +.table th, +.table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} + +.table th { + font-weight: bold; +} + +.table thead th { + vertical-align: bottom; +} + +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} + +.table tbody + tbody { + border-top: 2px solid #dddddd; +} + +.table .table { + background-color: #ffffff; +} + +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} + +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} + +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} + +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; +} + +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} + +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} + +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} + +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} + +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} + +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} + +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} + +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} + +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} + +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} + +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} + +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} + +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} + +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} + +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} + +.table tbody tr.success > td { + background-color: #dff0d8; +} + +.table tbody tr.error > td { + background-color: #f2dede; +} + +.table tbody tr.warning > td { + background-color: #fcf8e3; +} + +.table tbody tr.info > td { + background-color: #d9edf7; +} + +.table-hover tbody tr.success:hover > td { + background-color: #d0e9c6; +} + +.table-hover tbody tr.error:hover > td { + background-color: #ebcccc; +} + +.table-hover tbody tr.warning:hover > td { + background-color: #faf2cc; +} + +.table-hover tbody tr.info:hover > td { + background-color: #c4e3f3; +} + +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; +} + +/* White icons with optional class, or on hover/focus/active states of certain elements */ + +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/glyphicons-halflings-white.png"); +} + +.icon-glass { + background-position: 0 0; +} + +.icon-music { + background-position: -24px 0; +} + +.icon-search { + background-position: -48px 0; +} + +.icon-envelope { + background-position: -72px 0; +} + +.icon-heart { + background-position: -96px 0; +} + +.icon-star { + background-position: -120px 0; +} + +.icon-star-empty { + background-position: -144px 0; +} + +.icon-user { + background-position: -168px 0; +} + +.icon-film { + background-position: -192px 0; +} + +.icon-th-large { + background-position: -216px 0; +} + +.icon-th { + background-position: -240px 0; +} + +.icon-th-list { + background-position: -264px 0; +} + +.icon-ok { + background-position: -288px 0; +} + +.icon-remove { + background-position: -312px 0; +} + +.icon-zoom-in { + background-position: -336px 0; +} + +.icon-zoom-out { + background-position: -360px 0; +} + +.icon-off { + background-position: -384px 0; +} + +.icon-signal { + background-position: -408px 0; +} + +.icon-cog { + background-position: -432px 0; +} + +.icon-trash { + background-position: -456px 0; +} + +.icon-home { + background-position: 0 -24px; +} + +.icon-file { + background-position: -24px -24px; +} + +.icon-time { + background-position: -48px -24px; +} + +.icon-road { + background-position: -72px -24px; +} + +.icon-download-alt { + background-position: -96px -24px; +} + +.icon-download { + background-position: -120px -24px; +} + +.icon-upload { + background-position: -144px -24px; +} + +.icon-inbox { + background-position: -168px -24px; +} + +.icon-play-circle { + background-position: -192px -24px; +} + +.icon-repeat { + background-position: -216px -24px; +} + +.icon-refresh { + background-position: -240px -24px; +} + +.icon-list-alt { + background-position: -264px -24px; +} + +.icon-lock { + background-position: -287px -24px; +} + +.icon-flag { + background-position: -312px -24px; +} + +.icon-headphones { + background-position: -336px -24px; +} + +.icon-volume-off { + background-position: -360px -24px; +} + +.icon-volume-down { + background-position: -384px -24px; +} + +.icon-volume-up { + background-position: -408px -24px; +} + +.icon-qrcode { + background-position: -432px -24px; +} + +.icon-barcode { + background-position: -456px -24px; +} + +.icon-tag { + background-position: 0 -48px; +} + +.icon-tags { + background-position: -25px -48px; +} + +.icon-book { + background-position: -48px -48px; +} + +.icon-bookmark { + background-position: -72px -48px; +} + +.icon-print { + background-position: -96px -48px; +} + +.icon-camera { + background-position: -120px -48px; +} + +.icon-font { + background-position: -144px -48px; +} + +.icon-bold { + background-position: -167px -48px; +} + +.icon-italic { + background-position: -192px -48px; +} + +.icon-text-height { + background-position: -216px -48px; +} + +.icon-text-width { + background-position: -240px -48px; +} + +.icon-align-left { + background-position: -264px -48px; +} + +.icon-align-center { + background-position: -288px -48px; +} + +.icon-align-right { + background-position: -312px -48px; +} + +.icon-align-justify { + background-position: -336px -48px; +} + +.icon-list { + background-position: -360px -48px; +} + +.icon-indent-left { + background-position: -384px -48px; +} + +.icon-indent-right { + background-position: -408px -48px; +} + +.icon-facetime-video { + background-position: -432px -48px; +} + +.icon-picture { + background-position: -456px -48px; +} + +.icon-pencil { + background-position: 0 -72px; +} + +.icon-map-marker { + background-position: -24px -72px; +} + +.icon-adjust { + background-position: -48px -72px; +} + +.icon-tint { + background-position: -72px -72px; +} + +.icon-edit { + background-position: -96px -72px; +} + +.icon-share { + background-position: -120px -72px; +} + +.icon-check { + background-position: -144px -72px; +} + +.icon-move { + background-position: -168px -72px; +} + +.icon-step-backward { + background-position: -192px -72px; +} + +.icon-fast-backward { + background-position: -216px -72px; +} + +.icon-backward { + background-position: -240px -72px; +} + +.icon-play { + background-position: -264px -72px; +} + +.icon-pause { + background-position: -288px -72px; +} + +.icon-stop { + background-position: -312px -72px; +} + +.icon-forward { + background-position: -336px -72px; +} + +.icon-fast-forward { + background-position: -360px -72px; +} + +.icon-step-forward { + background-position: -384px -72px; +} + +.icon-eject { + background-position: -408px -72px; +} + +.icon-chevron-left { + background-position: -432px -72px; +} + +.icon-chevron-right { + background-position: -456px -72px; +} + +.icon-plus-sign { + background-position: 0 -96px; +} + +.icon-minus-sign { + background-position: -24px -96px; +} + +.icon-remove-sign { + background-position: -48px -96px; +} + +.icon-ok-sign { + background-position: -72px -96px; +} + +.icon-question-sign { + background-position: -96px -96px; +} + +.icon-info-sign { + background-position: -120px -96px; +} + +.icon-screenshot { + background-position: -144px -96px; +} + +.icon-remove-circle { + background-position: -168px -96px; +} + +.icon-ok-circle { + background-position: -192px -96px; +} + +.icon-ban-circle { + background-position: -216px -96px; +} + +.icon-arrow-left { + background-position: -240px -96px; +} + +.icon-arrow-right { + background-position: -264px -96px; +} + +.icon-arrow-up { + background-position: -289px -96px; +} + +.icon-arrow-down { + background-position: -312px -96px; +} + +.icon-share-alt { + background-position: -336px -96px; +} + +.icon-resize-full { + background-position: -360px -96px; +} + +.icon-resize-small { + background-position: -384px -96px; +} + +.icon-plus { + background-position: -408px -96px; +} + +.icon-minus { + background-position: -433px -96px; +} + +.icon-asterisk { + background-position: -456px -96px; +} + +.icon-exclamation-sign { + background-position: 0 -120px; +} + +.icon-gift { + background-position: -24px -120px; +} + +.icon-leaf { + background-position: -48px -120px; +} + +.icon-fire { + background-position: -72px -120px; +} + +.icon-eye-open { + background-position: -96px -120px; +} + +.icon-eye-close { + background-position: -120px -120px; +} + +.icon-warning-sign { + background-position: -144px -120px; +} + +.icon-plane { + background-position: -168px -120px; +} + +.icon-calendar { + background-position: -192px -120px; +} + +.icon-random { + width: 16px; + background-position: -216px -120px; +} + +.icon-comment { + background-position: -240px -120px; +} + +.icon-magnet { + background-position: -264px -120px; +} + +.icon-chevron-up { + background-position: -288px -120px; +} + +.icon-chevron-down { + background-position: -313px -119px; +} + +.icon-retweet { + background-position: -336px -120px; +} + +.icon-shopping-cart { + background-position: -360px -120px; +} + +.icon-folder-close { + width: 16px; + background-position: -384px -120px; +} + +.icon-folder-open { + width: 16px; + background-position: -408px -120px; +} + +.icon-resize-vertical { + background-position: -432px -119px; +} + +.icon-resize-horizontal { + background-position: -456px -118px; +} + +.icon-hdd { + background-position: 0 -144px; +} + +.icon-bullhorn { + background-position: -24px -144px; +} + +.icon-bell { + background-position: -48px -144px; +} + +.icon-certificate { + background-position: -72px -144px; +} + +.icon-thumbs-up { + background-position: -96px -144px; +} + +.icon-thumbs-down { + background-position: -120px -144px; +} + +.icon-hand-right { + background-position: -144px -144px; +} + +.icon-hand-left { + background-position: -168px -144px; +} + +.icon-hand-up { + background-position: -192px -144px; +} + +.icon-hand-down { + background-position: -216px -144px; +} + +.icon-circle-arrow-right { + background-position: -240px -144px; +} + +.icon-circle-arrow-left { + background-position: -264px -144px; +} + +.icon-circle-arrow-up { + background-position: -288px -144px; +} + +.icon-circle-arrow-down { + background-position: -312px -144px; +} + +.icon-globe { + background-position: -336px -144px; +} + +.icon-wrench { + background-position: -360px -144px; +} + +.icon-tasks { + background-position: -384px -144px; +} + +.icon-filter { + background-position: -408px -144px; +} + +.icon-briefcase { + background-position: -432px -144px; +} + +.icon-fullscreen { + background-position: -456px -144px; +} + +.dropup, +.dropdown { + position: relative; +} + +.dropdown-toggle { + *margin-bottom: -3px; +} + +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; +} + +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + outline: 0; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} + +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.open { + *z-index: 1000; +} + +.open > .dropdown-menu { + display: block; +} + +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} + +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} + +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} + +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} + +.dropdown-submenu > a:after { + display: block; + float: right; + width: 0; + height: 0; + margin-top: 5px; + margin-right: -10px; + border-color: transparent; + border-left-color: #cccccc; + border-style: solid; + border-width: 5px 0 5px 5px; + content: " "; +} + +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.dropdown .dropdown-menu .nav-header { + padding-right: 20px; + padding-left: 20px; +} + +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} + +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} + +.fade.in { + opacity: 1; +} + +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} + +.collapse.in { + height: auto; +} + +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} + +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} + +.btn { + display: inline-block; + *display: inline; + padding: 4px 12px; + margin-bottom: 0; + *margin-left: .3em; + font-size: 14px; + line-height: 20px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + cursor: pointer; + background-color: #f5f5f5; + *background-color: #e6e6e6; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border: 1px solid #cccccc; + *border: 0; + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + border-bottom-color: #b3b3b3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} + +.btn:active, +.btn.active { + background-color: #cccccc \9; +} + +.btn:first-child { + *margin-left: 0; +} + +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} + +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-large { + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} + +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} + +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} + +.btn-mini { + padding: 0 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.btn-block + .btn-block { + margin-top: 5px; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} + +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #006dcc; + *background-color: #0044cc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} + +.btn-primary:active, +.btn-primary.active { + background-color: #003399 \9; +} + +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + *background-color: #f89406; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} + +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} + +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #da4f49; + *background-color: #bd362f; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); + background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-repeat: repeat-x; + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + *background-color: #a9302a; +} + +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} + +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; + *background-color: #51a351; + background-image: -moz-linear-gradient(top, #62c462, #51a351); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); + background-image: -webkit-linear-gradient(top, #62c462, #51a351); + background-image: -o-linear-gradient(top, #62c462, #51a351); + background-image: linear-gradient(to bottom, #62c462, #51a351); + background-repeat: repeat-x; + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + *background-color: #499249; +} + +.btn-success:active, +.btn-success.active { + background-color: #408140 \9; +} + +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #49afcd; + *background-color: #2f96b4; + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); + background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); + background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-repeat: repeat-x; + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #2f96b4; + *background-color: #2a85a0; +} + +.btn-info:active, +.btn-info.active { + background-color: #24748c \9; +} + +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #363636; + *background-color: #222222; + background-image: -moz-linear-gradient(top, #444444, #222222); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); + background-image: -webkit-linear-gradient(top, #444444, #222222); + background-image: -o-linear-gradient(top, #444444, #222222); + background-image: linear-gradient(to bottom, #444444, #222222); + background-repeat: repeat-x; + border-color: #222222 #222222 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #222222; + *background-color: #151515; +} + +.btn-inverse:active, +.btn-inverse.active { + background-color: #080808 \9; +} + +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} + +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} + +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} + +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-link { + color: #0088cc; + cursor: pointer; + border-color: transparent; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-link:hover, +.btn-link:focus { + color: #005580; + text-decoration: underline; + background-color: transparent; +} + +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} + +.btn-group { + position: relative; + display: inline-block; + *display: inline; + *margin-left: .3em; + font-size: 0; + white-space: nowrap; + vertical-align: middle; + *zoom: 1; +} + +.btn-group:first-child { + *margin-left: 0; +} + +.btn-group + .btn-group { + margin-left: 5px; +} + +.btn-toolbar { + margin-top: 10px; + margin-bottom: 10px; + font-size: 0; +} + +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} + +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group > .btn + .btn { + margin-left: -1px; +} + +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 14px; +} + +.btn-group > .btn-mini { + font-size: 10.5px; +} + +.btn-group > .btn-small { + font-size: 11.9px; +} + +.btn-group > .btn-large { + font-size: 17.5px; +} + +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} + +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + +.btn-group > .btn + .dropdown-toggle { + *padding-top: 5px; + padding-right: 8px; + *padding-bottom: 5px; + padding-left: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group > .btn-mini + .dropdown-toggle { + *padding-top: 2px; + padding-right: 5px; + *padding-bottom: 2px; + padding-left: 5px; +} + +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} + +.btn-group > .btn-large + .dropdown-toggle { + *padding-top: 7px; + padding-right: 12px; + *padding-bottom: 7px; + padding-left: 12px; +} + +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} + +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #0044cc; +} + +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} + +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #bd362f; +} + +.btn-group.open .btn-success.dropdown-toggle { + background-color: #51a351; +} + +.btn-group.open .btn-info.dropdown-toggle { + background-color: #2f96b4; +} + +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #222222; +} + +.btn .caret { + margin-top: 8px; + margin-left: 0; +} + +.btn-large .caret { + margin-top: 6px; +} + +.btn-large .caret { + border-top-width: 5px; + border-right-width: 5px; + border-left-width: 5px; +} + +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} + +.dropup .btn-large .caret { + border-bottom-width: 5px; +} + +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} + +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group-vertical > .btn + .btn { + margin-top: -1px; + margin-left: 0; +} + +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} + +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.alert, +.alert h4 { + color: #c09853; +} + +.alert h4 { + margin: 0; +} + +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; +} + +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.alert-success h4 { + color: #468847; +} + +.alert-danger, +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-info h4 { + color: #3a87ad; +} + +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} + +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} + +.alert-block p + p { + margin-top: 5px; +} + +.nav { + margin-bottom: 20px; + margin-left: 0; + list-style: none; +} + +.nav > li > a { + display: block; +} + +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} + +.nav > li > a > img { + max-width: none; +} + +.nav > .pull-right { + float: right; +} + +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 20px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} + +.nav li + .nav-header { + margin-top: 9px; +} + +.nav-list { + padding-right: 15px; + padding-left: 15px; + margin-bottom: 0; +} + +.nav-list > li > a, +.nav-list .nav-header { + margin-right: -15px; + margin-left: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} + +.nav-list > li > a { + padding: 3px 15px; +} + +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #0088cc; +} + +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} + +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.nav-tabs, +.nav-pills { + *zoom: 1; +} + +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + line-height: 0; + content: ""; +} + +.nav-tabs:after, +.nav-pills:after { + clear: both; +} + +.nav-tabs > li, +.nav-pills > li { + float: left; +} + +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} + +.nav-tabs { + border-bottom: 1px solid #ddd; +} + +.nav-tabs > li { + margin-bottom: -1px; +} + +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 20px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #dddddd; +} + +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + cursor: default; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #0088cc; +} + +.nav-stacked > li { + float: none; +} + +.nav-stacked > li > a { + margin-right: 0; +} + +.nav-tabs.nav-stacked { + border-bottom: 0; +} + +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; +} + +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + z-index: 2; + border-color: #ddd; +} + +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} + +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} + +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.nav .dropdown-toggle .caret { + margin-top: 6px; + border-top-color: #0088cc; + border-bottom-color: #0088cc; +} + +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #005580; + border-bottom-color: #005580; +} + +/* move down carets for tabs */ + +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} + +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} + +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} + +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} + +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} + +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} + +.tabbable { + *zoom: 1; +} + +.tabbable:before, +.tabbable:after { + display: table; + line-height: 0; + content: ""; +} + +.tabbable:after { + clear: both; +} + +.tab-content { + overflow: auto; +} + +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} + +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} + +.tab-content > .active, +.pill-content > .active { + display: block; +} + +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} + +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} + +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-top-color: #ddd; + border-bottom-color: transparent; +} + +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} + +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} + +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} + +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} + +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} + +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} + +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} + +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} + +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} + +.nav > .disabled > a { + color: #999999; +} + +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; +} + +.navbar { + *position: relative; + *z-index: 2; + margin-bottom: 20px; + overflow: visible; +} + +.navbar-inner { + min-height: 40px; + padding-right: 20px; + padding-left: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + border: 1px solid #d4d4d4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + *zoom: 1; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); +} + +.navbar-inner:before, +.navbar-inner:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-inner:after { + clear: both; +} + +.navbar .container { + width: auto; +} + +.nav-collapse.collapse { + height: auto; + overflow: visible; +} + +.navbar .brand { + display: block; + float: left; + padding: 10px 20px 10px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #777777; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} + +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #777777; +} + +.navbar-link { + color: #777777; +} + +.navbar-link:hover, +.navbar-link:focus { + color: #333333; +} + +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-right: 1px solid #ffffff; + border-left: 1px solid #f2f2f2; +} + +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} + +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} + +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} + +.navbar-form:before, +.navbar-form:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-form:after { + clear: both; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} + +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} + +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} + +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} + +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} + +.navbar-search .search-query { + padding: 4px 14px; + margin-bottom: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.navbar-static-top { + position: static; + margin-bottom: 0; +} + +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} + +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-right: 0; + padding-left: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.navbar-fixed-top { + top: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar-fixed-bottom { + bottom: 0; +} + +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} + +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} + +.navbar .nav > li { + float: left; +} + +.navbar .nav > li > a { + float: none; + padding: 10px 15px 10px; + color: #777777; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} + +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + color: #333333; + text-decoration: none; + background-color: transparent; +} + +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} + +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-right: 5px; + margin-left: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + *background-color: #e5e5e5; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); +} + +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} + +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} + +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} + +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} + +.navbar .nav > li > .dropdown-menu:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.navbar .nav > li > .dropdown-menu:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + border-left: 6px solid transparent; + content: ''; +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + top: auto; + bottom: -7px; + border-top: 7px solid #ccc; + border-bottom: 0; + border-top-color: rgba(0, 0, 0, 0.2); +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + top: auto; + bottom: -6px; + border-top: 6px solid #ffffff; + border-bottom: 0; +} + +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + color: #555555; + background-color: #e5e5e5; +} + +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #777777; + border-bottom-color: #777777; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + right: 12px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + right: 13px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + right: 100%; + left: auto; + margin-right: -1px; + margin-left: 0; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + border-color: #252525; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); +} + +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} + +.navbar-inverse .brand { + color: #999999; +} + +.navbar-inverse .navbar-text { + color: #999999; +} + +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; + background-color: transparent; +} + +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .navbar-link { + color: #999999; +} + +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} + +.navbar-inverse .divider-vertical { + border-right-color: #222222; + border-left-color: #111111; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} + +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + outline: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} + +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + *background-color: #040404; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} + +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} + +.breadcrumb { + padding: 8px 15px; + margin: 0 0 20px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.breadcrumb > li { + display: inline-block; + *display: inline; + text-shadow: 0 1px 0 #ffffff; + *zoom: 1; +} + +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} + +.breadcrumb > .active { + color: #999999; +} + +.pagination { + margin: 20px 0; +} + +.pagination ul { + display: inline-block; + *display: inline; + margin-bottom: 0; + margin-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + *zoom: 1; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.pagination ul > li { + display: inline; +} + +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 20px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} + +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} + +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} + +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + cursor: default; + background-color: transparent; +} + +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.pagination-centered { + text-align: center; +} + +.pagination-right { + text-align: right; +} + +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} + +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; +} + +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; +} + +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; +} + +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0 6px; + font-size: 10.5px; +} + +.pager { + margin: 20px 0; + text-align: center; + list-style: none; + *zoom: 1; +} + +.pager:before, +.pager:after { + display: table; + line-height: 0; + content: ""; +} + +.pager:after { + clear: both; +} + +.pager li { + display: inline; +} + +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} + +.pager .next > a, +.pager .next > span { + float: right; +} + +.pager .previous > a, +.pager .previous > span { + float: left; +} + +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + cursor: default; + background-color: #fff; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} + +.modal-backdrop.fade { + opacity: 0; +} + +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + outline: none; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} + +.modal.fade { + top: -25%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out; +} + +.modal.fade.in { + top: 10%; +} + +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} + +.modal-header .close { + margin-top: 2px; +} + +.modal-header h3 { + margin: 0; + line-height: 30px; +} + +.modal-body { + position: relative; + max-height: 400px; + padding: 15px; + overflow-y: auto; +} + +.modal-form { + margin-bottom: 0; +} + +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; +} + +.modal-footer:before, +.modal-footer:after { + display: table; + line-height: 0; + content: ""; +} + +.modal-footer:after { + clear: both; +} + +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} + +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} + +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} + +.tooltip { + position: absolute; + z-index: 1030; + display: block; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); + visibility: visible; +} + +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} + +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} + +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} + +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} + +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-right-color: #000000; + border-width: 5px 5px 5px 0; +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-left-color: #000000; + border-width: 5px 0 5px 5px; +} + +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + white-space: normal; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.popover.top { + margin-top: -10px; +} + +.popover.right { + margin-left: 10px; +} + +.popover.bottom { + margin-top: 10px; +} + +.popover.left { + margin-left: -10px; +} + +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} + +.popover-title:empty { + display: none; +} + +.popover-content { + padding: 9px 14px; +} + +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.popover .arrow { + border-width: 11px; +} + +.popover .arrow:after { + border-width: 10px; + content: ""; +} + +.popover.top .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + border-bottom-width: 0; +} + +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-top-color: #ffffff; + border-bottom-width: 0; +} + +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); + border-left-width: 0; +} + +.popover.right .arrow:after { + bottom: -10px; + left: 1px; + border-right-color: #ffffff; + border-left-width: 0; +} + +.popover.bottom .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + border-top-width: 0; +} + +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-bottom-color: #ffffff; + border-top-width: 0; +} + +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); + border-right-width: 0; +} + +.popover.left .arrow:after { + right: 1px; + bottom: -10px; + border-left-color: #ffffff; + border-right-width: 0; +} + +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} + +.thumbnails:before, +.thumbnails:after { + display: table; + line-height: 0; + content: ""; +} + +.thumbnails:after { + clear: both; +} + +.row-fluid .thumbnails { + margin-left: 0; +} + +.thumbnails > li { + float: left; + margin-bottom: 20px; + margin-left: 20px; +} + +.thumbnail { + display: block; + padding: 4px; + line-height: 20px; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #0088cc; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} + +.thumbnail > img { + display: block; + max-width: 100%; + margin-right: auto; + margin-left: auto; +} + +.thumbnail .caption { + padding: 9px; + color: #555555; +} + +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} + +.media, +.media .media { + margin-top: 15px; +} + +.media:first-child { + margin-top: 0; +} + +.media-object { + display: block; +} + +.media-heading { + margin: 0 0 5px; +} + +.media > .pull-left { + margin-right: 10px; +} + +.media > .pull-right { + margin-left: 10px; +} + +.media-list { + margin-left: 0; + list-style: none; +} + +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + white-space: nowrap; + vertical-align: baseline; + background-color: #999999; +} + +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.badge { + padding-right: 9px; + padding-left: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} + +.label:empty, +.badge:empty { + display: none; +} + +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} + +.label-important, +.badge-important { + background-color: #b94a48; +} + +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} + +.label-warning, +.badge-warning { + background-color: #f89406; +} + +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} + +.label-success, +.badge-success { + background-color: #468847; +} + +.label-success[href], +.badge-success[href] { + background-color: #356635; +} + +.label-info, +.badge-info { + background-color: #3a87ad; +} + +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} + +.label-inverse, +.badge-inverse { + background-color: #333333; +} + +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} + +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} + +.btn-mini .label, +.btn-mini .badge { + top: 0; +} + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} + +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} + +.progress .bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + color: #ffffff; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} + +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); +} + +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} + +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} + +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} + +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} + +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} + +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.accordion { + margin-bottom: 20px; +} + +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.accordion-heading { + border-bottom: 0; +} + +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} + +.accordion-toggle { + cursor: pointer; +} + +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} + +.carousel { + position: relative; + margin-bottom: 20px; + line-height: 1; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} + +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} + +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} + +.carousel-inner > .active { + left: 0; +} + +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} + +.carousel-inner > .next { + left: 100%; +} + +.carousel-inner > .prev { + left: -100%; +} + +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} + +.carousel-inner > .active.left { + left: -100%; +} + +.carousel-inner > .active.right { + left: 100%; +} + +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.carousel-control.right { + right: 15px; + left: auto; +} + +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} + +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} + +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} + +.carousel-indicators .active { + background-color: #fff; +} + +.carousel-caption { + position: absolute; + right: 0; + bottom: 0; + left: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} + +.carousel-caption h4, +.carousel-caption p { + line-height: 20px; + color: #ffffff; +} + +.carousel-caption h4 { + margin: 0 0 5px; +} + +.carousel-caption p { + margin-bottom: 0; +} + +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; + background-color: #eeeeee; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + letter-spacing: -1px; + color: inherit; +} + +.hero-unit li { + line-height: 30px; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.hide { + display: none; +} + +.show { + display: block; +} + +.invisible { + visibility: hidden; +} + +.affix { + position: fixed; +} diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/img/glyphicons-halflings-white.png b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/img/glyphicons-halflings-white.png new file mode 100755 index 000000000..3bf6484a2 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/img/glyphicons-halflings-white.png differ diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/img/glyphicons-halflings.png b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/img/glyphicons-halflings.png new file mode 100755 index 000000000..a99699932 Binary files /dev/null and b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/img/glyphicons-halflings.png differ diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/js/bootstrap.js b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/js/bootstrap.js new file mode 100644 index 000000000..643e71cdf --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/js/bootstrap.js @@ -0,0 +1,2280 @@ +/* =================================================== + * bootstrap-transition.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#transitions + * =================================================== + * Copyright 2012 Twitter, Inc. + * + * 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. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ + + $(function () { + + $.support.transition = (function () { + + var transitionEnd = (function () { + + var el = document.createElement('bootstrap') + , transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' + } + , name + + for (name in transEndEventNames){ + if (el.style[name] !== undefined) { + return transEndEventNames[name] + } + } + + }()) + + return transitionEnd && { + end: transitionEnd + } + + })() + + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-alert.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#alerts + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * 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. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT NO CONFLICT + * ================= */ + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + /* ALERT DATA-API + * ============== */ + + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) + +}(window.jQuery);/* ============================================================ + * bootstrap-button.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * 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. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON NO CONFLICT + * ================== */ + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + /* BUTTON DATA-API + * =============== */ + + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-carousel.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#carousel + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * 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. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + + , to: function (pos) { + var activeIndex = this.getActiveIndex() + , that = this + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activeIndex == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + if (this.$element.find('.next, .prev').length && $.support.transition.end) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + e = $.Event('slide', { + relatedTarget: $next[0] + , direction: direction + }) + + if ($next.hasClass('active')) return + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + , action = typeof option == 'string' ? option : options.slide + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL NO CONFLICT + * ==================== */ + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + /* CAROUSEL DATA-API + * ================= */ + + $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + , slideIndex + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('carousel').pause().to(slideIndex).cycle() + } + + e.preventDefault() + }) + +}(window.jQuery);/* ============================================================= + * bootstrap-collapse.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#collapse + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * 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. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning || this.$element.hasClass('in')) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + $.support.transition && this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning || !this.$element.hasClass('in')) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSE PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSE NO CONFLICT + * ==================== */ + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + /* COLLAPSE DATA-API + * ================= */ + + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) + }) + +}(window.jQuery);/* ============================================================ + * bootstrap-dropdown.js v2.3.2 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * 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. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement) { + // if mobile we we use a backdrop because click events don't delegate + $(''; + return html; + } +})(); + +///import core +///import uicore +(function (){ + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase; + + var TablePicker = baidu.editor.ui.TablePicker = function (options){ + this.initOptions(options); + this.initTablePicker(); + }; + TablePicker.prototype = { + defaultNumRows: 10, + defaultNumCols: 10, + maxNumRows: 20, + maxNumCols: 20, + numRows: 10, + numCols: 10, + lengthOfCellSide: 22, + initTablePicker: function (){ + this.initUIBase(); + }, + getHtmlTpl: function (){ + var me = this; + return '
                                    ' + + '
                                    ' + + '
                                    ' + + '' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    '; + }, + _UIBase_render: UIBase.prototype.render, + render: function (holder){ + this._UIBase_render(holder); + this.getDom('label').innerHTML = '0'+this.editor.getLang("t_row")+' x 0'+this.editor.getLang("t_col"); + }, + _track: function (numCols, numRows){ + var style = this.getDom('overlay').style; + var sideLen = this.lengthOfCellSide; + style.width = numCols * sideLen + 'px'; + style.height = numRows * sideLen + 'px'; + var label = this.getDom('label'); + label.innerHTML = numCols +this.editor.getLang("t_col")+' x ' + numRows + this.editor.getLang("t_row"); + this.numCols = numCols; + this.numRows = numRows; + }, + _onMouseOver: function (evt, el){ + var rel = evt.relatedTarget || evt.fromElement; + if (!uiUtils.contains(el, rel) && el !== rel) { + this.getDom('label').innerHTML = '0'+this.editor.getLang("t_col")+' x 0'+this.editor.getLang("t_row"); + this.getDom('overlay').style.visibility = ''; + } + }, + _onMouseOut: function (evt, el){ + var rel = evt.relatedTarget || evt.toElement; + if (!uiUtils.contains(el, rel) && el !== rel) { + this.getDom('label').innerHTML = '0'+this.editor.getLang("t_col")+' x 0'+this.editor.getLang("t_row"); + this.getDom('overlay').style.visibility = 'hidden'; + } + }, + _onMouseMove: function (evt, el){ + var style = this.getDom('overlay').style; + var offset = uiUtils.getEventOffset(evt); + var sideLen = this.lengthOfCellSide; + var numCols = Math.ceil(offset.left / sideLen); + var numRows = Math.ceil(offset.top / sideLen); + this._track(numCols, numRows); + }, + _onClick: function (){ + this.fireEvent('picktable', this.numCols, this.numRows); + } + }; + utils.inherits(TablePicker, UIBase); +})(); + +(function (){ + var browser = baidu.editor.browser, + domUtils = baidu.editor.dom.domUtils, + uiUtils = baidu.editor.ui.uiUtils; + + var TPL_STATEFUL = 'onmousedown="$$.Stateful_onMouseDown(event, this);"' + + ' onmouseup="$$.Stateful_onMouseUp(event, this);"' + + ( browser.ie ? ( + ' onmouseenter="$$.Stateful_onMouseEnter(event, this);"' + + ' onmouseleave="$$.Stateful_onMouseLeave(event, this);"' ) + : ( + ' onmouseover="$$.Stateful_onMouseOver(event, this);"' + + ' onmouseout="$$.Stateful_onMouseOut(event, this);"' )); + + baidu.editor.ui.Stateful = { + alwalysHoverable: false, + target:null,//目标元素和this指向dom不一样 + Stateful_init: function (){ + this._Stateful_dGetHtmlTpl = this.getHtmlTpl; + this.getHtmlTpl = this.Stateful_getHtmlTpl; + }, + Stateful_getHtmlTpl: function (){ + var tpl = this._Stateful_dGetHtmlTpl(); + // 使用function避免$转义 + return tpl.replace(/stateful/g, function (){ return TPL_STATEFUL; }); + }, + Stateful_onMouseEnter: function (evt, el){ + this.target=el; + if (!this.isDisabled() || this.alwalysHoverable) { + this.addState('hover'); + this.fireEvent('over'); + } + }, + Stateful_onMouseLeave: function (evt, el){ + if (!this.isDisabled() || this.alwalysHoverable) { + this.removeState('hover'); + this.removeState('active'); + this.fireEvent('out'); + } + }, + Stateful_onMouseOver: function (evt, el){ + var rel = evt.relatedTarget; + if (!uiUtils.contains(el, rel) && el !== rel) { + this.Stateful_onMouseEnter(evt, el); + } + }, + Stateful_onMouseOut: function (evt, el){ + var rel = evt.relatedTarget; + if (!uiUtils.contains(el, rel) && el !== rel) { + this.Stateful_onMouseLeave(evt, el); + } + }, + Stateful_onMouseDown: function (evt, el){ + if (!this.isDisabled()) { + this.addState('active'); + } + }, + Stateful_onMouseUp: function (evt, el){ + if (!this.isDisabled()) { + this.removeState('active'); + } + }, + Stateful_postRender: function (){ + if (this.disabled && !this.hasState('disabled')) { + this.addState('disabled'); + } + }, + hasState: function (state){ + return domUtils.hasClass(this.getStateDom(), 'edui-state-' + state); + }, + addState: function (state){ + if (!this.hasState(state)) { + this.getStateDom().className += ' edui-state-' + state; + } + }, + removeState: function (state){ + if (this.hasState(state)) { + domUtils.removeClasses(this.getStateDom(), ['edui-state-' + state]); + } + }, + getStateDom: function (){ + return this.getDom('state'); + }, + isChecked: function (){ + return this.hasState('checked'); + }, + setChecked: function (checked){ + if (!this.isDisabled() && checked) { + this.addState('checked'); + } else { + this.removeState('checked'); + } + }, + isDisabled: function (){ + return this.hasState('disabled'); + }, + setDisabled: function (disabled){ + if (disabled) { + this.removeState('hover'); + this.removeState('checked'); + this.removeState('active'); + this.addState('disabled'); + } else { + this.removeState('disabled'); + } + } + }; +})(); + +///import core +///import uicore +///import ui/stateful.js +(function (){ + var utils = baidu.editor.utils, + UIBase = baidu.editor.ui.UIBase, + Stateful = baidu.editor.ui.Stateful, + Button = baidu.editor.ui.Button = function (options){ + this.initOptions(options); + this.initButton(); + }; + Button.prototype = { + uiName: 'button', + label: '', + title: '', + showIcon: true, + showText: true, + initButton: function (){ + this.initUIBase(); + this.Stateful_init(); + }, + getHtmlTpl: function (){ + return '
                                    ' + + '
                                    ' + + '
                                    ' + + (this.showIcon ? '
                                    ' : '') + + (this.showText ? '
                                    ' + this.label + '
                                    ' : '') + + '
                                    ' + + '
                                    ' + + '
                                    '; + }, + postRender: function (){ + this.Stateful_postRender(); + this.setDisabled(this.disabled) + }, + _onClick: function (){ + if (!this.isDisabled()) { + this.fireEvent('click'); + } + } + }; + utils.inherits(Button, UIBase); + utils.extend(Button.prototype, Stateful); + +})(); + +///import core +///import uicore +///import ui/stateful.js +(function (){ + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + domUtils = baidu.editor.dom.domUtils, + UIBase = baidu.editor.ui.UIBase, + Stateful = baidu.editor.ui.Stateful, + SplitButton = baidu.editor.ui.SplitButton = function (options){ + this.initOptions(options); + this.initSplitButton(); + }; + SplitButton.prototype = { + popup: null, + uiName: 'splitbutton', + title: '', + initSplitButton: function (){ + this.initUIBase(); + this.Stateful_init(); + var me = this; + if (this.popup != null) { + var popup = this.popup; + this.popup = null; + this.setPopup(popup); + } + }, + _UIBase_postRender: UIBase.prototype.postRender, + postRender: function (){ + this.Stateful_postRender(); + this._UIBase_postRender(); + }, + setPopup: function (popup){ + if (this.popup === popup) return; + if (this.popup != null) { + this.popup.dispose(); + } + popup.addListener('show', utils.bind(this._onPopupShow, this)); + popup.addListener('hide', utils.bind(this._onPopupHide, this)); + popup.addListener('postrender', utils.bind(function (){ + popup.getDom('body').appendChild( + uiUtils.createElementByHtml('
                                    ') + ); + popup.getDom().className += ' ' + this.className; + }, this)); + this.popup = popup; + }, + _onPopupShow: function (){ + this.addState('opened'); + }, + _onPopupHide: function (){ + this.removeState('opened'); + }, + getHtmlTpl: function (){ + return '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    '; + }, + showPopup: function (){ + // 当popup往上弹出的时候,做特殊处理 + var rect = uiUtils.getClientRect(this.getDom()); + rect.top -= this.popup.SHADOW_RADIUS; + rect.height += this.popup.SHADOW_RADIUS; + this.popup.showAnchorRect(rect); + }, + _onArrowClick: function (event, el){ + if (!this.isDisabled()) { + this.showPopup(); + } + }, + _onButtonClick: function (){ + if (!this.isDisabled()) { + this.fireEvent('buttonclick'); + } + } + }; + utils.inherits(SplitButton, UIBase); + utils.extend(SplitButton.prototype, Stateful, true); + +})(); + +///import core +///import uicore +///import ui/colorpicker.js +///import ui/popup.js +///import ui/splitbutton.js +(function (){ + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + ColorPicker = baidu.editor.ui.ColorPicker, + Popup = baidu.editor.ui.Popup, + SplitButton = baidu.editor.ui.SplitButton, + ColorButton = baidu.editor.ui.ColorButton = function (options){ + this.initOptions(options); + this.initColorButton(); + }; + ColorButton.prototype = { + initColorButton: function (){ + var me = this; + this.popup = new Popup({ + content: new ColorPicker({ + noColorText: me.editor.getLang("clearColor"), + editor:me.editor, + onpickcolor: function (t, color){ + me._onPickColor(color); + }, + onpicknocolor: function (t, color){ + me._onPickNoColor(color); + } + }), + editor:me.editor + }); + this.initSplitButton(); + }, + _SplitButton_postRender: SplitButton.prototype.postRender, + postRender: function (){ + this._SplitButton_postRender(); + this.getDom('button_body').appendChild( + uiUtils.createElementByHtml('
                                    ') + ); + this.getDom().className += ' edui-colorbutton'; + }, + setColor: function (color){ + this.getDom('colorlump').style.backgroundColor = color; + this.color = color; + }, + _onPickColor: function (color){ + if (this.fireEvent('pickcolor', color) !== false) { + this.setColor(color); + this.popup.hide(); + } + }, + _onPickNoColor: function (color){ + if (this.fireEvent('picknocolor') !== false) { + this.popup.hide(); + } + } + }; + utils.inherits(ColorButton, SplitButton); + +})(); + +///import core +///import uicore +///import ui/popup.js +///import ui/tablepicker.js +///import ui/splitbutton.js +(function (){ + var utils = baidu.editor.utils, + Popup = baidu.editor.ui.Popup, + TablePicker = baidu.editor.ui.TablePicker, + SplitButton = baidu.editor.ui.SplitButton, + TableButton = baidu.editor.ui.TableButton = function (options){ + this.initOptions(options); + this.initTableButton(); + }; + TableButton.prototype = { + initTableButton: function (){ + var me = this; + this.popup = new Popup({ + content: new TablePicker({ + editor:me.editor, + onpicktable: function (t, numCols, numRows){ + me._onPickTable(numCols, numRows); + } + }), + 'editor':me.editor + }); + this.initSplitButton(); + }, + _onPickTable: function (numCols, numRows){ + if (this.fireEvent('picktable', numCols, numRows) !== false) { + this.popup.hide(); + } + } + }; + utils.inherits(TableButton, SplitButton); + +})(); + +///import core +///import uicore +(function () { + var utils = baidu.editor.utils, + UIBase = baidu.editor.ui.UIBase; + + var AutoTypeSetPicker = baidu.editor.ui.AutoTypeSetPicker = function (options) { + this.initOptions(options); + this.initAutoTypeSetPicker(); + }; + AutoTypeSetPicker.prototype = { + initAutoTypeSetPicker:function () { + this.initUIBase(); + }, + getHtmlTpl:function () { + var me = this.editor, + opt = me.options.autotypeset, + lang = me.getLang("autoTypeSet"); + + return '
                                    ' + + '
                                    ' + + '' + + '' + + '' + + '' + + '
                                    ' + lang.delLine + '' + lang.indent + '
                                    ' + lang.trimSpace + '
                                    ' + + '
                                    ' + + '
                                    '; + + + }, + _UIBase_render:UIBase.prototype.render + }; + utils.inherits(AutoTypeSetPicker, UIBase); +})(); + +///import core +///import uicore +///import ui/popup.js +///import ui/autotypesetpicker.js +///import ui/splitbutton.js +(function (){ + var utils = baidu.editor.utils, + Popup = baidu.editor.ui.Popup, + AutoTypeSetPicker = baidu.editor.ui.AutoTypeSetPicker, + SplitButton = baidu.editor.ui.SplitButton, + AutoTypeSetButton = baidu.editor.ui.AutoTypeSetButton = function (options){ + this.initOptions(options); + this.initAutoTypeSetButton(); + }; + function getPara(me){ + var opt = me.editor.options.autotypeset, + cont = me.getDom(), + editorId = me.editor.uid, + inputType = null, + attrName = null, + ipts = domUtils.getElementsByTagName(cont,"input"); + for(var i=ipts.length-1,ipt;ipt=ipts[i--];){ + + inputType = ipt.getAttribute("type"); + + if(inputType=="checkbox"){ + attrName = ipt.getAttribute("name"); + opt[attrName] && delete opt[attrName]; + if(ipt.checked){ + var attrValue = document.getElementById( attrName+"Value" + editorId ); + if(attrValue){ + if(/input/ig.test(attrValue.tagName)){ + opt[attrName] = attrValue.value; + }else{ + var iptChilds = attrValue.getElementsByTagName("input"); + for(var j=iptChilds.length-1,iptchild;iptchild=iptChilds[j--];){ + if(iptchild.checked){ + opt[attrName] = iptchild.value; + break; + } + } + } + }else{ + opt[attrName] = true; + } + } + } + } + var selects = domUtils.getElementsByTagName(cont,"select"); + for(var i=0,si;si=selects[i++];){ + var attr = si.getAttribute('name'); + opt[attr] = opt[attr] ? si.value : ''; + } + + me.editor.options.autotypeset = opt; + } + AutoTypeSetButton.prototype = { + initAutoTypeSetButton: function (){ + var me = this; + this.popup = new Popup({ + //传入配置参数 + content: new AutoTypeSetPicker({editor:me.editor}), + 'editor':me.editor, + hide : function(){ + + if (!this._hidden && this.getDom()) { + getPara(this); + this.getDom().style.display = 'none'; + this._hidden = true; + this.fireEvent('hide'); + } + } + }); + var flag = 0; + this.popup.addListener('postRenderAfter',function(){ + var popupUI = this; + if(flag)return; + var cont = this.getDom(), + btn = cont.getElementsByTagName('button')[0]; + + btn.onclick = function(){ + getPara(popupUI); + me.editor.execCommand('autotypeset'); + popupUI.hide() + }; + flag = 1; + }); + this.initSplitButton(); + } + }; + utils.inherits(AutoTypeSetButton, SplitButton); + +})(); + +///import core +///import uicore +(function () { + var utils = baidu.editor.utils, + Popup = baidu.editor.ui.Popup, + Stateful = baidu.editor.ui.Stateful, + UIBase = baidu.editor.ui.UIBase; + + /** + * 该参数将新增一个参数: selected, 参数类型为一个Object, 形如{ 'align': 'center', 'valign': 'top' }, 表示单元格的初始 + * 对齐状态为: 竖直居上,水平居中; 其中 align的取值为:'center', 'left', 'right'; valign的取值为: 'top', 'middle', 'bottom' + * @update 2013/4/2 hancong03@baidu.com + */ + var CellAlignPicker = baidu.editor.ui.CellAlignPicker = function (options) { + this.initOptions(options); + this.initSelected(); + this.initCellAlignPicker(); + }; + CellAlignPicker.prototype = { + //初始化选中状态, 该方法将根据传递进来的参数获取到应该选中的对齐方式图标的索引 + initSelected: function(){ + + var status = { + + valign: { + top: 0, + middle: 1, + bottom: 2 + }, + align: { + left: 0, + center: 1, + right: 2 + }, + count: 3 + + }, + result = -1; + + if( this.selected ) { + this.selectedIndex = status.valign[ this.selected.valign ] * status.count + status.align[ this.selected.align ]; + } + + }, + initCellAlignPicker:function () { + this.initUIBase(); + this.Stateful_init(); + }, + getHtmlTpl:function () { + + var alignType = [ 'left', 'center', 'right' ], + COUNT = 9, + tempClassName = null, + tempIndex = -1, + tmpl = []; + + + for( var i= 0; i'); + + tmpl.push( '
                                    ' ); + + tempIndex === 2 && tmpl.push(''); + + } + + return '
                                    ' + + '
                                    ' + + '' + + tmpl.join('') + + '
                                    ' + + '
                                    ' + + '
                                    '; + }, + getStateDom: function (){ + return this.target; + }, + _onClick: function (evt){ + var target= evt.target || evt.srcElement; + if(/icon/.test(target.className)){ + this.items[target.parentNode.getAttribute("index")].onclick(); + Popup.postHide(evt); + } + }, + _UIBase_render:UIBase.prototype.render + }; + utils.inherits(CellAlignPicker, UIBase); + utils.extend(CellAlignPicker.prototype, Stateful,true); +})(); + + + + +///import core +///import uicore +(function () { + var utils = baidu.editor.utils, + Stateful = baidu.editor.ui.Stateful, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase; + + var PastePicker = baidu.editor.ui.PastePicker = function (options) { + this.initOptions(options); + this.initPastePicker(); + }; + PastePicker.prototype = { + initPastePicker:function () { + this.initUIBase(); + this.Stateful_init(); + }, + getHtmlTpl:function () { + return '
                                    ' + + '
                                    ' + + '
                                    ' + this.editor.getLang("pasteOpt") + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + }, + getStateDom:function () { + return this.target; + }, + format:function (param) { + this.editor.ui._isTransfer = true; + this.editor.fireEvent('pasteTransfer', param); + }, + _onClick:function (cur) { + var node = domUtils.getNextDomNode(cur), + screenHt = uiUtils.getViewportRect().height, + subPop = uiUtils.getClientRect(node); + + if ((subPop.top + subPop.height) > screenHt) + node.style.top = (-subPop.height - cur.offsetHeight) + "px"; + else + node.style.top = ""; + + if (/hidden/ig.test(domUtils.getComputedStyle(node, "visibility"))) { + node.style.visibility = "visible"; + domUtils.addClass(cur, "edui-state-opened"); + } else { + node.style.visibility = "hidden"; + domUtils.removeClasses(cur, "edui-state-opened") + } + }, + _UIBase_render:UIBase.prototype.render + }; + utils.inherits(PastePicker, UIBase); + utils.extend(PastePicker.prototype, Stateful, true); +})(); + + + + + +(function (){ + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase, + Toolbar = baidu.editor.ui.Toolbar = function (options){ + this.initOptions(options); + this.initToolbar(); + }; + Toolbar.prototype = { + items: null, + initToolbar: function (){ + this.items = this.items || []; + this.initUIBase(); + }, + add: function (item){ + this.items.push(item); + }, + getHtmlTpl: function (){ + var buff = []; + for (var i=0; i' + + buff.join('') + + '' + }, + postRender: function (){ + var box = this.getDom(); + for (var i=0; i
                                    '; + }, + postRender:function () { + }, + queryAutoHide:function () { + return true; + } + }; + Menu.prototype = { + items:null, + uiName:'menu', + initMenu:function () { + this.items = this.items || []; + this.initPopup(); + this.initItems(); + }, + initItems:function () { + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + if (item == '-') { + this.items[i] = this.getSeparator(); + } else if (!(item instanceof MenuItem)) { + item.editor = this.editor; + item.theme = this.editor.options.theme; + this.items[i] = this.createItem(item); + } + } + }, + getSeparator:function () { + return menuSeparator; + }, + createItem:function (item) { + //新增一个参数menu, 该参数存储了menuItem所对应的menu引用 + item.menu = this; + return new MenuItem(item); + }, + _Popup_getContentHtmlTpl:Popup.prototype.getContentHtmlTpl, + getContentHtmlTpl:function () { + if (this.items.length == 0) { + return this._Popup_getContentHtmlTpl(); + } + var buff = []; + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + buff[i] = item.renderHtml(); + } + return ('
                                    ' + buff.join('') + '
                                    '); + }, + _Popup_postRender:Popup.prototype.postRender, + postRender:function () { + var me = this; + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + item.ownerMenu = this; + item.postRender(); + } + domUtils.on(this.getDom(), 'mouseover', function (evt) { + evt = evt || event; + var rel = evt.relatedTarget || evt.fromElement; + var el = me.getDom(); + if (!uiUtils.contains(el, rel) && el !== rel) { + me.fireEvent('over'); + } + }); + this._Popup_postRender(); + }, + queryAutoHide:function (el) { + if (el) { + if (uiUtils.contains(this.getDom(), el)) { + return false; + } + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + if (item.queryAutoHide(el) === false) { + return false; + } + } + } + }, + clearItems:function () { + for (var i = 0; i < this.items.length; i++) { + var item = this.items[i]; + clearTimeout(item._showingTimer); + clearTimeout(item._closingTimer); + if (item.subMenu) { + item.subMenu.destroy(); + } + } + this.items = []; + }, + destroy:function () { + if (this.getDom()) { + domUtils.remove(this.getDom()); + } + this.clearItems(); + }, + dispose:function () { + this.destroy(); + } + }; + utils.inherits(Menu, Popup); + + /** + * @update 2013/04/03 hancong03 新增一个参数menu, 该参数存储了menuItem所对应的menu引用 + * @type {Function} + */ + var MenuItem = baidu.editor.ui.MenuItem = function (options) { + this.initOptions(options); + this.initUIBase(); + this.Stateful_init(); + if (this.subMenu && !(this.subMenu instanceof Menu)) { + if (options.className && options.className.indexOf("aligntd") != -1) { + var me = this; + + //获取单元格对齐初始状态 + this.subMenu.selected = this.editor.queryCommandValue( 'cellalignment' ); + + this.subMenu = new Popup({ + content:new CellAlignPicker(this.subMenu), + parentMenu:me, + editor:me.editor, + destroy:function () { + if (this.getDom()) { + domUtils.remove(this.getDom()); + } + } + }); + this.subMenu.addListener("postRenderAfter", function () { + domUtils.on(this.getDom(), "mouseover", function () { + me.addState('opened'); + }); + }); + } else { + this.subMenu = new Menu(this.subMenu); + } + } + }; + MenuItem.prototype = { + label:'', + subMenu:null, + ownerMenu:null, + uiName:'menuitem', + alwalysHoverable:true, + getHtmlTpl:function () { + return '
                                    ' + + '
                                    ' + + this.renderLabelHtml() + + '
                                    ' + + '
                                    '; + }, + postRender:function () { + var me = this; + this.addListener('over', function () { + me.ownerMenu.fireEvent('submenuover', me); + if (me.subMenu) { + me.delayShowSubMenu(); + } + }); + if (this.subMenu) { + this.getDom().className += ' edui-hassubmenu'; + this.subMenu.render(); + this.addListener('out', function () { + me.delayHideSubMenu(); + }); + this.subMenu.addListener('over', function () { + clearTimeout(me._closingTimer); + me._closingTimer = null; + me.addState('opened'); + }); + this.ownerMenu.addListener('hide', function () { + me.hideSubMenu(); + }); + this.ownerMenu.addListener('submenuover', function (t, subMenu) { + if (subMenu !== me) { + me.delayHideSubMenu(); + } + }); + this.subMenu._bakQueryAutoHide = this.subMenu.queryAutoHide; + this.subMenu.queryAutoHide = function (el) { + if (el && uiUtils.contains(me.getDom(), el)) { + return false; + } + return this._bakQueryAutoHide(el); + }; + } + this.getDom().style.tabIndex = '-1'; + uiUtils.makeUnselectable(this.getDom()); + this.Stateful_postRender(); + }, + delayShowSubMenu:function () { + var me = this; + if (!me.isDisabled()) { + me.addState('opened'); + clearTimeout(me._showingTimer); + clearTimeout(me._closingTimer); + me._closingTimer = null; + me._showingTimer = setTimeout(function () { + me.showSubMenu(); + }, 250); + } + }, + delayHideSubMenu:function () { + var me = this; + if (!me.isDisabled()) { + me.removeState('opened'); + clearTimeout(me._showingTimer); + if (!me._closingTimer) { + me._closingTimer = setTimeout(function () { + if (!me.hasState('opened')) { + me.hideSubMenu(); + } + me._closingTimer = null; + }, 400); + } + } + }, + renderLabelHtml:function () { + return '
                                    ' + + '
                                    ' + + '
                                    ' + (this.label || '') + '
                                    '; + }, + getStateDom:function () { + return this.getDom(); + }, + queryAutoHide:function (el) { + if (this.subMenu && this.hasState('opened')) { + return this.subMenu.queryAutoHide(el); + } + }, + _onClick:function (event, this_) { + if (this.hasState('disabled')) return; + if (this.fireEvent('click', event, this_) !== false) { + if (this.subMenu) { + this.showSubMenu(); + } else { + Popup.postHide(event); + } + } + }, + showSubMenu:function () { + var rect = uiUtils.getClientRect(this.getDom()); + rect.right -= 5; + rect.left += 2; + rect.width -= 7; + rect.top -= 4; + rect.bottom += 4; + rect.height += 8; + this.subMenu.showAnchorRect(rect, true, true); + }, + hideSubMenu:function () { + this.subMenu.hide(); + } + }; + utils.inherits(MenuItem, UIBase); + utils.extend(MenuItem.prototype, Stateful, true); +})(); + +///import core +///import uicore +///import ui/menu.js +///import ui/splitbutton.js +(function (){ + // todo: menu和item提成通用list + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + Menu = baidu.editor.ui.Menu, + SplitButton = baidu.editor.ui.SplitButton, + Combox = baidu.editor.ui.Combox = function (options){ + this.initOptions(options); + this.initCombox(); + }; + Combox.prototype = { + uiName: 'combox', + initCombox: function (){ + var me = this; + this.items = this.items || []; + for (var i=0; i vpRect.right) { + left = vpRect.right - rect.width; + } + var top = offset.top; + if (top + rect.height > vpRect.bottom) { + top = vpRect.bottom - rect.height; + } + el.style.left = Math.max(left, 0) + 'px'; + el.style.top = Math.max(top, 0) + 'px'; + }, + showAtCenter: function (){ + this.getDom().style.display = ''; + var vpRect = uiUtils.getViewportRect(); + var popSize = this.fitSize(); + var titleHeight = this.getDom('titlebar').offsetHeight | 0; + var left = vpRect.width / 2 - popSize.width / 2; + var top = vpRect.height / 2 - (popSize.height - titleHeight) / 2 - titleHeight; + var popEl = this.getDom(); + this.safeSetOffset({ + left: Math.max(left | 0, 0), + top: Math.max(top | 0, 0) + }); + if (!domUtils.hasClass(popEl, 'edui-state-centered')) { + popEl.className += ' edui-state-centered'; + } + this._show(); + }, + getContentHtml: function (){ + var contentHtml = ''; + if (typeof this.content == 'string') { + contentHtml = this.content; + } else if (this.iframeUrl) { + contentHtml = ''; + } + return contentHtml; + }, + getHtmlTpl: function (){ + var footHtml = ''; + + if (this.buttons) { + var buff = []; + for (var i=0; i' + buff.join('') + '' + + ''; + } + + return '
                                    ' + + '
                                    ' + + '
                                    ' + + '
                                    ' + + '' + (this.title || '') + '' + + '
                                    ' + + this.closeButton.renderHtml() + + '
                                    ' + + '
                                    '+ ( this.autoReset ? '' : this.getContentHtml()) +'
                                    ' + + footHtml + + '
                                    '; + }, + postRender: function (){ + // todo: 保持居中/记住上次关闭位置选项 + if (!this.modalMask.getDom()) { + this.modalMask.render(); + this.modalMask.hide(); + } + if (!this.dragMask.getDom()) { + this.dragMask.render(); + this.dragMask.hide(); + } + var me = this; + this.addListener('show', function (){ + me.modalMask.show(this.getDom().style.zIndex - 2); + }); + this.addListener('hide', function (){ + me.modalMask.hide(); + }); + if (this.buttons) { + for (var i=0; i' + (this.label || '') + ''; + } + }); + }); + + var ui = new editorui.Combox({ + editor:editor, + items:items, + onselect:function (t, index) { + editor.execCommand('insertcode', this.items[index].value); + }, + onbuttonclick:function () { + this.showPopup(); + }, + title:title, + initValue:title, + className:'edui-for-insertcode', + indexByValue:function (value) { + if (value) { + for (var i = 0, ci; ci = this.items[i]; i++) { + if (ci.value.indexOf(value) != -1) + return i; + } + } + + return -1; + } + }); + editorui.buttons['insertcode'] = ui; + editor.addListener('selectionchange', function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState('insertcode'); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue('insertcode'); + if(!value){ + ui.setValue(title); + return; + } + //trace:1871 ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 + value && (value = value.replace(/['"]/g, '').split(',')[0]); + ui.setValue(value); + + } + } + + }); + return ui; + }; + editorui.fontfamily = function (editor, list, title) { + var nameToValue = function(list,value){ + for (var i = 0; i < list.length; i++) { + if(list[i].name == value) return list[i].value; + } + return 0; + }; + + list = editor.options['fontfamily'] || []; + title = editor.options.labelMap['fontfamily'] || editor.getLang("labelMap.fontfamily") || ''; + if (!list.length) return; + for (var i = 0, ci, items = []; ci = list[i]; i++) { + var langLabel = editor.getLang('fontfamily')[ci.name] || ""; + (function (key, val) { + items.push({ + label:key, + value:val, + theme:editor.options.theme, + renderLabelHtml:function () { + return '
                                    ' + (this.label || '') + '
                                    '; + } + }); + })(ci.label || langLabel, ci.name) + } + var ui = new editorui.Combox({ + editor:editor, + items:items, + onselect:function (t, index) { + editor.execCommand('fontfamily', this.items[index].value); + }, + onbuttonclick:function () { + this.showPopup(); + }, + title:title, + initValue:title, + className:'edui-for-fontfamily', + indexByValue:function (value) { + if (value) { + for (var i = 0, ci; ci = this.items[i]; i++) { + if (ci.value.indexOf(value) != -1) + return i; + } + } + + return -1; + } + }); + editorui.buttons['fontfamily'] = ui; + editor.addListener('selectionchange', function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState('fontfamily'); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue('fontfamily'); + //trace:1871 ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 + value && (value = value.replace(/['"]/g, '').split(',')[0]); + ui.setValue(value || '字体'); + + } + } + + }); + return ui; + }; + + editorui.fontsize = function (editor, list, title) { + title = editor.options.labelMap['fontsize'] || editor.getLang("labelMap.fontsize") || ''; + list = list || editor.options['fontsize'] || []; + if (!list.length) return; + var items = [], + nameToValue = function(list,value){ + for (var i = 0; i < list.length; i++) { + if(list[i].name == value) return list[i].value; + } + return 0; + }; + for (var i = 0; i < list.length; i++) { + var label = list[i].label, + name = list[i].name; + items.push({ + label:label, + value:name, + theme:editor.options.theme, + renderLabelHtml:function () { + return '
                                    ' + (this.label || '') + '
                                    '; + } + }); + } + var ui = new editorui.Combox({ + editor:editor, + items:items, + title:title, + initValue:title, + onselect:function (t, index) { + editor.execCommand('FontSize', this.items[index].value); + }, + onbuttonclick:function () { + this.showPopup(); + }, + className:'edui-for-fontsize' + }); + editorui.buttons['fontsize'] = ui; + editor.addListener('selectionchange', function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState('fontsize'); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + ui.setValue(editor.queryCommandValue('fontsize') || '字号'); + } + } + + }); + return ui; + }; + + + //字体颜色和背景颜色 + editorui.forecolor = function (cmd) { + return function (editor) { + var ui = new editorui.ColorButton({ + className:'edui-for-' + cmd, + color:'default', + title:editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd) || '', + editor:editor, + onpickcolor:function (t, color) { + editor.execCommand(cmd, color.substr(1)); + }, + onpicknocolor:function () { + editor.execCommand(cmd, 'default'); + this.setColor('transparent'); + this.color = 'default'; + }, + onbuttonclick:function () { + editor.execCommand(cmd, this.color.substr(1)); + } + }); + editorui.buttons[cmd] = ui; + editor.addListener('selectionchange', function () { + ui.setDisabled(editor.queryCommandState(cmd) == -1); + }); + return ui; + }; + }('forecolor'); + + editorui.paragraph = function (editor, list, title) { + title = editor.options.labelMap['paragraph'] || editor.getLang("labelMap.paragraph") || ''; + list = editor.options['paragraph'] || []; + if (utils.isEmptyObject(list)) return; + var items = [], + _wk_cmds = {'blockquote': true, 'inscribed': true, 'legends': true}; + for (var i in list) { + items.push({ + value:i, + label:list[i] || editor.getLang("paragraph")[i], + theme:editor.options.theme, + renderLabelHtml:function () { + return '
                                    ' + (this.label || '') + '
                                    '; + } + }) + } + + var ui = new editorui.Combox({ + editor:editor, + items:items, + title:title, + initValue:title, + className:'edui-for-paragraph', + onselect:function (t, index) { + //引用特殊处理 + if( _wk_cmds[ this.items[index].value ] ) { + editor.execCommand( this.items[index].value ); + } else { + editor.execCommand('Paragraph', this.items[index].value); + } + }, + onbuttonclick:function () { + this.showPopup(); + } + }); + editorui.buttons['paragraph'] = ui; + editor.addListener('selectionchange', function (type, causeByUi, uiReady) { + if (!uiReady) { + + //查询引用状态 + for( var key in _wk_cmds ) { + + if( !_wk_cmds.hasOwnProperty( key ) ) { + continue; + } + + if( editor.queryCommandState( key ) ) { + + ui.setDisabled(false); + ui.setValue( key ); + + return; + + } + + } + + var state = editor.queryCommandState('Paragraph'); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue('Paragraph'); + var index = ui.indexByValue(value); + if (index != -1) { + ui.setValue(value); + } else { + ui.setValue(ui.initValue); + } + } + + } + + }); + return ui; + }; + + + //自定义标题 + editorui.customstyle = function (editor) { + var list = editor.options['customstyle'] || [], + title = editor.options.labelMap['customstyle'] || editor.getLang("labelMap.customstyle") || ''; + if (!list.length)return; + var langCs = editor.getLang('customstyle'); + for (var i = 0, items = [], t; t = list[i++];) { + (function (t) { + var ck = {}; + ck.label = t.label ? t.label : langCs[t.name]; + ck.style = t.style; + ck.className = t.className; + ck.tag = t.tag; + items.push({ + label:ck.label, + value:ck, + theme:editor.options.theme, + renderLabelHtml:function () { + return '
                                    ' + '<' + ck.tag + ' ' + (ck.className ? ' class="' + ck.className + '"' : "") + + (ck.style ? ' style="' + ck.style + '"' : "") + '>' + ck.label + "<\/" + ck.tag + ">" + + '
                                    '; + } + }); + })(t); + } + + var ui = new editorui.Combox({ + editor:editor, + items:items, + title:title, + initValue:title, + className:'edui-for-customstyle', + onselect:function (t, index) { + editor.execCommand('customstyle', this.items[index].value); + }, + onbuttonclick:function () { + this.showPopup(); + }, + indexByValue:function (value) { + for (var i = 0, ti; ti = this.items[i++];) { + if (ti.label == value) { + return i - 1 + } + } + return -1; + } + }); + editorui.buttons['customstyle'] = ui; + editor.addListener('selectionchange', function (type, causeByUi, uiReady) { + if (!uiReady) { + var state = editor.queryCommandState('customstyle'); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue('customstyle'); + var index = ui.indexByValue(value); + if (index != -1) { + ui.setValue(value); + } else { + ui.setValue(ui.initValue); + } + } + } + + }); + return ui; + }; + editorui.inserttable = function (editor, iframeUrl, title) { + title = editor.options.labelMap['inserttable'] || editor.getLang("labelMap.inserttable") || ''; + var ui = new editorui.TableButton({ + editor:editor, + title:title, + className:'edui-for-inserttable', + onpicktable:function (t, numCols, numRows) { + editor.execCommand('InsertTable', {numRows:numRows, numCols:numCols, border:1}); + }, + onbuttonclick:function () { + this.showPopup(); + } + }); + editorui.buttons['inserttable'] = ui; + editor.addListener('selectionchange', function () { + ui.setDisabled(editor.queryCommandState('inserttable') == -1); + }); + return ui; + }; + + editorui.lineheight = function (editor) { + var val = editor.options.lineheight || []; + if (!val.length)return; + for (var i = 0, ci, items = []; ci = val[i++];) { + items.push({ + //todo:写死了 + label:ci, + value:ci, + theme:editor.options.theme, + onclick:function () { + editor.execCommand("lineheight", this.value); + } + }) + } + var ui = new editorui.MenuButton({ + editor:editor, + className:'edui-for-lineheight', + title:editor.options.labelMap['lineheight'] || editor.getLang("labelMap.lineheight") || '', + items:items, + onbuttonclick:function () { + var value = editor.queryCommandValue('LineHeight') || this.value; + editor.execCommand("LineHeight", value); + } + }); + editorui.buttons['lineheight'] = ui; + editor.addListener('selectionchange', function () { + var state = editor.queryCommandState('LineHeight'); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue('LineHeight'); + value && ui.setValue((value + '').replace(/cm/, '')); + ui.setChecked(state) + } + }); + return ui; + }; + + var rowspacings = ['top', 'bottom']; + for (var r = 0, ri; ri = rowspacings[r++];) { + (function (cmd) { + editorui['rowspacing' + cmd] = function (editor) { + var val = editor.options['rowspacing' + cmd] || []; + if (!val.length) return null; + for (var i = 0, ci, items = []; ci = val[i++];) { + items.push({ + label:ci, + value:ci, + theme:editor.options.theme, + onclick:function () { + editor.execCommand("rowspacing", this.value, cmd); + } + }) + } + var ui = new editorui.MenuButton({ + editor:editor, + className:'edui-for-rowspacing' + cmd, + title:editor.options.labelMap['rowspacing' + cmd] || editor.getLang("labelMap.rowspacing" + cmd) || '', + items:items, + onbuttonclick:function () { + var value = editor.queryCommandValue('rowspacing', cmd) || this.value; + editor.execCommand("rowspacing", value, cmd); + } + }); + editorui.buttons[cmd] = ui; + editor.addListener('selectionchange', function () { + var state = editor.queryCommandState('rowspacing', cmd); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue('rowspacing', cmd); + value && ui.setValue((value + '').replace(/%/, '')); + ui.setChecked(state) + } + }); + return ui; + } + })(ri) + } + //有序,无序列表 + var lists = ['insertorderedlist', 'insertunorderedlist']; + for (var l = 0, cl; cl = lists[l++];) { + (function (cmd) { + editorui[cmd] = function (editor) { + var vals = editor.options[cmd], + _onMenuClick = function () { + editor.execCommand(cmd, this.value); + }, items = []; + for (var i in vals) { + items.push({ + label:vals[i] || editor.getLang()[cmd][i] || "", + value:i, + theme:editor.options.theme, + onclick:_onMenuClick + }) + } + var ui = new editorui.MenuButton({ + editor:editor, + className:'edui-for-' + cmd, + title:editor.getLang("labelMap." + cmd) || '', + 'items':items, + onbuttonclick:function () { + var value = editor.queryCommandValue(cmd) || this.value; + editor.execCommand(cmd, value); + } + }); + editorui.buttons[cmd] = ui; + editor.addListener('selectionchange', function () { + var state = editor.queryCommandState(cmd); + if (state == -1) { + ui.setDisabled(true); + } else { + ui.setDisabled(false); + var value = editor.queryCommandValue(cmd); + ui.setValue(value); + ui.setChecked(state) + } + }); + return ui; + }; + })(cl) + } + + editorui.fullscreen = function (editor, title) { + title = editor.options.labelMap['fullscreen'] || editor.getLang("labelMap.fullscreen") || ''; + var ui = new editorui.Button({ + className:'edui-for-fullscreen', + title:title, + theme:editor.options.theme, + onclick:function () { + if (editor.ui) { + editor.ui.setFullScreen(!editor.ui.isFullScreen()); + } + this.setChecked(editor.ui.isFullScreen()); + } + }); + editorui.buttons['fullscreen'] = ui; + editor.addListener('selectionchange', function () { + var state = editor.queryCommandState('fullscreen'); + ui.setDisabled(state == -1); + ui.setChecked(editor.ui.isFullScreen()); + }); + return ui; + }; + + // 表情 + editorui["emotion"] = function (editor, iframeUrl) { + var cmd = "emotion"; + var ui = new editorui.MultiMenuPop({ + title:editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd + "") || '', + editor:editor, + className:'edui-for-' + cmd, + iframeUrl:editor.ui.mapUrl(iframeUrl || (editor.options.iframeUrlMap || {})[cmd] || iframeUrlMap[cmd]) + }); + editorui.buttons[cmd] = ui; + + editor.addListener('selectionchange', function () { + ui.setDisabled(editor.queryCommandState(cmd) == -1) + }); + return ui; + }; + + editorui.autotypeset = function (editor) { + var ui = new editorui.AutoTypeSetButton({ + editor:editor, + title:editor.options.labelMap['autotypeset'] || editor.getLang("labelMap.autotypeset") || '', + className:'edui-for-autotypeset', + onbuttonclick:function () { + editor.execCommand('autotypeset') + } + }); + editorui.buttons['autotypeset'] = ui; + editor.addListener('selectionchange', function () { + ui.setDisabled(editor.queryCommandState('autotypeset') == -1); + }); + return ui; + }; + +})(); + +///import core +///commands 全屏 +///commandsName FullScreen +///commandsTitle 全屏 +(function () { + var utils = baidu.editor.utils, + uiUtils = baidu.editor.ui.uiUtils, + UIBase = baidu.editor.ui.UIBase, + domUtils = baidu.editor.dom.domUtils; + var nodeStack = []; + + function EditorUI(options) { + this.initOptions(options); + this.initEditorUI(); + } + + EditorUI.prototype = { + uiName:'editor', + initEditorUI:function () { + this.editor.ui = this; + this._dialogs = {}; + this.initUIBase(); + this._initToolbars(); + var editor = this.editor, + me = this; + + editor.addListener('ready', function () { + //提供getDialog方法 + editor.getDialog = function (name) { + return editor.ui._dialogs[name + "Dialog"]; + }; + domUtils.on(editor.window, 'scroll', function (evt) { + baidu.editor.ui.Popup.postHide(evt); + }); + //提供编辑器实时宽高(全屏时宽高不变化) + editor.ui._actualFrameWidth = editor.options.initialFrameWidth; + + //display bottom-bar label based on config + if (editor.options.elementPathEnabled) { + editor.ui.getDom('elementpath').innerHTML = '
                                    ' + editor.getLang("elementPathTip") + ':
                                    '; + } + if (editor.options.wordCount) { + function countFn() { + setCount(editor,me); + domUtils.un(editor.document, "click", arguments.callee); + } + domUtils.on(editor.document, "click", countFn); + editor.ui.getDom('wordcount').innerHTML = editor.getLang("wordCountTip"); + } + editor.ui._scale(); + if (editor.options.scaleEnabled) { + if (editor.autoHeightEnabled) { + editor.disableAutoHeight(); + } + me.enableScale(); + } else { + me.disableScale(); + } + if (!editor.options.elementPathEnabled && !editor.options.wordCount && !editor.options.scaleEnabled) { + editor.ui.getDom('elementpath').style.display = "none"; + editor.ui.getDom('wordcount').style.display = "none"; + editor.ui.getDom('scale').style.display = "none"; + } + + if (!editor.selection.isFocus())return; + editor.fireEvent('selectionchange', false, true); + + + }); + + editor.addListener('mousedown', function (t, evt) { + var el = evt.target || evt.srcElement; + baidu.editor.ui.Popup.postHide(evt, el); + baidu.editor.ui.ShortCutMenu.postHide(evt); + + }); + editor.addListener("delcells", function () { + if (UE.ui['edittip']) { + new UE.ui['edittip'](editor); + } + editor.getDialog('edittip').open(); + }); + + var pastePop, isPaste = false, timer; + editor.addListener("afterpaste", function () { + if(editor.queryCommandState('pasteplain')) + return; + if(baidu.editor.ui.PastePicker){ + pastePop = new baidu.editor.ui.Popup({ + content:new baidu.editor.ui.PastePicker({editor:editor}), + editor:editor, + className:'edui-wordpastepop' + }); + pastePop.render(); + } + isPaste = true; + }); + + editor.addListener("afterinserthtml", function () { + clearTimeout(timer); + timer = setTimeout(function () { + if (pastePop && (isPaste || editor.ui._isTransfer)) { + if(pastePop.isHidden()){ + var span = domUtils.createElement(editor.document, 'span', { + 'style':"line-height:0px;", + 'innerHTML':'\ufeff' + }), + range = editor.selection.getRange(); + range.insertNode(span); + var tmp= getDomNode(span, 'firstChild', 'previousSibling'); + pastePop.showAnchor(tmp.nodeType == 3 ? tmp.parentNode : tmp); + domUtils.remove(span); + + }else{ + pastePop.show(); + } + delete editor.ui._isTransfer; + isPaste = false; + } + }, 200) + }); + editor.addListener('contextmenu', function (t, evt) { + baidu.editor.ui.Popup.postHide(evt); + }); + editor.addListener('keydown', function (t, evt) { + if (pastePop) pastePop.dispose(evt); + var keyCode = evt.keyCode || evt.which; + if(evt.altKey&&keyCode==90){ + UE.ui.buttons['fullscreen'].onclick(); + } + }); + editor.addListener('wordcount', function (type) { + setCount(this,me); + }); + function setCount(editor,ui) { + editor.setOpt({ + wordCount:true, + maximumWords:10000, + wordCountMsg:editor.options.wordCountMsg || editor.getLang("wordCountMsg"), + wordOverFlowMsg:editor.options.wordOverFlowMsg || editor.getLang("wordOverFlowMsg") + }); + var opt = editor.options, + max = opt.maximumWords, + msg = opt.wordCountMsg , + errMsg = opt.wordOverFlowMsg, + countDom = ui.getDom('wordcount'); + if (!opt.wordCount) { + return; + } + var count = editor.getContentLength(true); + if (count > max) { + countDom.innerHTML = errMsg; + editor.fireEvent("wordcountoverflow"); + } else { + countDom.innerHTML = msg.replace("{#leave}", max - count).replace("{#count}", count); + } + } + + editor.addListener('selectionchange', function () { + if (editor.options.elementPathEnabled) { + me[(editor.queryCommandState('elementpath') == -1 ? 'dis' : 'en') + 'ableElementPath']() + } + if (editor.options.scaleEnabled) { + me[(editor.queryCommandState('scale') == -1 ? 'dis' : 'en') + 'ableScale'](); + + } + }); + var popup = new baidu.editor.ui.Popup({ + editor:editor, + content:'', + className:'edui-bubble', + _onEditButtonClick:function () { + this.hide(); + editor.ui._dialogs.linkDialog.open(); + }, + _onImgEditButtonClick:function (name) { + this.hide(); + editor.ui._dialogs[name] && editor.ui._dialogs[name].open(); + + }, + _onImgSetFloat:function (value) { + this.hide(); + editor.execCommand("imagefloat", value); + + }, + _setIframeAlign:function (value) { + var frame = popup.anchorEl; + var newFrame = frame.cloneNode(true); + switch (value) { + case -2: + newFrame.setAttribute("align", ""); + break; + case -1: + newFrame.setAttribute("align", "left"); + break; + case 1: + newFrame.setAttribute("align", "right"); + break; + } + frame.parentNode.insertBefore(newFrame, frame); + domUtils.remove(frame); + popup.anchorEl = newFrame; + popup.showAnchor(popup.anchorEl); + }, + _updateIframe:function () { + editor._iframe = popup.anchorEl; + editor.ui._dialogs.insertframeDialog.open(); + popup.hide(); + }, + _onRemoveButtonClick:function (cmdName) { + editor.execCommand(cmdName); + this.hide(); + }, + queryAutoHide:function (el) { + if (el && el.ownerDocument == editor.document) { + if (el.tagName.toLowerCase() == 'img' || domUtils.findParentByTagName(el, 'a', true)) { + return el !== popup.anchorEl; + } + } + return baidu.editor.ui.Popup.prototype.queryAutoHide.call(this, el); + } + }); + popup.render(); + if (editor.options.imagePopup) { + editor.addListener('mouseover', function (t, evt) { + evt = evt || window.event; + var el = evt.target || evt.srcElement; + if (editor.ui._dialogs.insertframeDialog && /iframe/ig.test(el.tagName)) { + var html = popup.formatHtml( + '' + editor.getLang("property") + ': ' + editor.getLang("default") + '  ' + editor.getLang("justifyleft") + '  ' + editor.getLang("justifyright") + '  ' + + ' ' + editor.getLang("modify") + ''); + if (html) { + popup.getDom('content').innerHTML = html; + popup.anchorEl = el; + popup.showAnchor(popup.anchorEl); + } else { + popup.hide(); + } + } + }); + editor.addListener('selectionchange', function (t, causeByUi) { + if (!causeByUi) return; + var html = '', str = "", + img = editor.selection.getRange().getClosedNode(), + dialogs = editor.ui._dialogs; + if (img && img.tagName == 'IMG') { + var dialogName = 'insertimageDialog'; + if (img.className.indexOf("edui-faked-video") != -1) { + dialogName = "insertvideoDialog" + } + if (img.className.indexOf("edui-faked-webapp") != -1) { + dialogName = "webappDialog" + } + if (img.src.indexOf("http://api.map.baidu.com") != -1) { + dialogName = "mapDialog" + } + if (img.className.indexOf("edui-faked-music") != -1) { + dialogName = "musicDialog" + } + if (img.src.indexOf("http://maps.google.com/maps/api/staticmap") != -1) { + dialogName = "gmapDialog" + } + if (img.getAttribute("anchorname")) { + dialogName = "anchorDialog"; + html = popup.formatHtml( + '' + editor.getLang("property") + ': ' + editor.getLang("modify") + '  ' + + '' + editor.getLang("delete") + ''); + } + if (img.getAttribute("word_img")) { + //todo 放到dialog去做查询 + editor.word_img = [img.getAttribute("word_img")]; + dialogName = "wordimageDialog" + } + if (!dialogs[dialogName]) { + return; + } + str = '' + editor.getLang("property") + ': '+ + '' + editor.getLang("default") + '  ' + + '' + editor.getLang("justifyleft") + '  ' + + '' + editor.getLang("justifyright") + '  ' + + '' + editor.getLang("justifycenter") + '  '+ + '' + editor.getLang("modify") + ''; + + !html && (html = popup.formatHtml(str)) + + } + if (editor.ui._dialogs.linkDialog) { + var link = editor.queryCommandValue('link'); + var url; + if (link && (url = (link.getAttribute('_href') || link.getAttribute('href', 2)))) { + var txt = url; + if (url.length > 30) { + txt = url.substring(0, 20) + "..."; + } + if (html) { + html += '
                                    ' + } + html += popup.formatHtml( + '' + editor.getLang("anthorMsg") + ': ' + txt + '' + + ' ' + editor.getLang("modify") + '' + + ' ' + editor.getLang("clear") + ''); + popup.showAnchor(link); + } + } + + if (html) { + popup.getDom('content').innerHTML = html; + popup.anchorEl = img || link; + popup.showAnchor(popup.anchorEl); + } else { + popup.hide(); + } + }); + } + + }, + _initToolbars:function () { + var editor = this.editor; + var toolbars = this.toolbars || []; + var toolbarUis = []; + for (var i = 0; i < toolbars.length; i++) { + var toolbar = toolbars[i]; + var toolbarUi = new baidu.editor.ui.Toolbar({theme:editor.options.theme}); + for (var j = 0; j < toolbar.length; j++) { + var toolbarItem = toolbar[j]; + var toolbarItemUi = null; + if (typeof toolbarItem == 'string') { + toolbarItem = toolbarItem.toLowerCase(); + if (toolbarItem == '|') { + toolbarItem = 'Separator'; + } + if(toolbarItem == '||'){ + toolbarItem = 'Breakline'; + } + if (baidu.editor.ui[toolbarItem]) { + toolbarItemUi = new baidu.editor.ui[toolbarItem](editor); + } + + //fullscreen这里单独处理一下,放到首行去 + if (toolbarItem == 'fullscreen') { + if (toolbarUis && toolbarUis[0]) { + toolbarUis[0].items.splice(0, 0, toolbarItemUi); + } else { + toolbarItemUi && toolbarUi.items.splice(0, 0, toolbarItemUi); + } + + continue; + + + } + } else { + toolbarItemUi = toolbarItem; + } + if (toolbarItemUi && toolbarItemUi.id) { + + toolbarUi.add(toolbarItemUi); + } + } + toolbarUis[i] = toolbarUi; + } + this.toolbars = toolbarUis; + }, + getHtmlTpl:function () { + return '
                                    ' + + '
                                    ' + + (this.toolbars.length ? + '
                                    ' + + this.renderToolbarBoxHtml() + + '
                                    ' : '') + + '' + + '
                                    ' + + '
                                    ' + + //modify wdcount by matao + '
                                    ' + + '' + + '' + + '' + + '
                                    ' + + '
                                    ' + + '
                                    '; + }, + showWordImageDialog:function () { + this.editor.execCommand("wordimage", "word_img"); + this._dialogs['wordimageDialog'].open(); + }, + renderToolbarBoxHtml:function () { + var buff = []; + for (var i = 0; i < this.toolbars.length; i++) { + buff.push(this.toolbars[i].renderHtml()); + } + return buff.join(''); + }, + setFullScreen:function (fullscreen) { + + var editor = this.editor, + container = editor.container.parentNode.parentNode; + if (this._fullscreen != fullscreen) { + this._fullscreen = fullscreen; + this.editor.fireEvent('beforefullscreenchange', fullscreen); + if (baidu.editor.browser.gecko) { + var bk = editor.selection.getRange().createBookmark(); + } + if (fullscreen) { + while (container.tagName != "BODY") { + var position = baidu.editor.dom.domUtils.getComputedStyle(container, "position"); + nodeStack.push(position); + container.style.position = "static"; + container = container.parentNode; + } + this._bakHtmlOverflow = document.documentElement.style.overflow; + this._bakBodyOverflow = document.body.style.overflow; + this._bakAutoHeight = this.editor.autoHeightEnabled; + this._bakScrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop); + + this._bakEditorContaninerWidth = editor.iframe.parentNode.offsetWidth; + if (this._bakAutoHeight) { + //当全屏时不能执行自动长高 + editor.autoHeightEnabled = false; + this.editor.disableAutoHeight(); + } + + document.documentElement.style.overflow = 'hidden'; + document.body.style.overflow = 'hidden'; + this._bakCssText = this.getDom().style.cssText; + this._bakCssText1 = this.getDom('iframeholder').style.cssText; + editor.iframe.parentNode.style.width = ''; + this._updateFullScreen(); + } else { + while (container.tagName != "BODY") { + container.style.position = nodeStack.shift(); + container = container.parentNode; + } + this.getDom().style.cssText = this._bakCssText; + this.getDom('iframeholder').style.cssText = this._bakCssText1; + if (this._bakAutoHeight) { + editor.autoHeightEnabled = true; + this.editor.enableAutoHeight(); + } + + document.documentElement.style.overflow = this._bakHtmlOverflow; + document.body.style.overflow = this._bakBodyOverflow; + editor.iframe.parentNode.style.width = this._bakEditorContaninerWidth + 'px'; + window.scrollTo(0, this._bakScrollTop); + } + if (baidu.editor.browser.gecko && editor.body.contentEditable === 'true') { + var input = document.createElement('input'); + document.body.appendChild(input); + editor.body.contentEditable = false; + setTimeout(function () { + input.focus(); + setTimeout(function () { + editor.body.contentEditable = true; + editor.selection.getRange().moveToBookmark(bk).select(true); + baidu.editor.dom.domUtils.remove(input); + fullscreen && window.scroll(0, 0); + }, 0) + }, 0) + } + if(editor.body.contentEditable === 'true'){ + this.editor.fireEvent('fullscreenchanged', fullscreen); + this.triggerLayout(); + } + + } + }, + _updateFullScreen:function () { + if (this._fullscreen) { + var vpRect = uiUtils.getViewportRect(); + this.getDom().style.cssText = 'border:0;position:absolute;left:0;top:' + (this.editor.options.topOffset || 0) + 'px;width:' + vpRect.width + 'px;height:' + vpRect.height + 'px;z-index:' + (this.getDom().style.zIndex * 1 + 100); + uiUtils.setViewportOffset(this.getDom(), { left:0, top:this.editor.options.topOffset || 0 }); + this.editor.setHeight(vpRect.height - this.getDom('toolbarbox').offsetHeight - this.getDom('bottombar').offsetHeight - (this.editor.options.topOffset || 0)); + //不手动调一下,会导致全屏失效 + if(browser.gecko){ + window.onresize(); + } + } + }, + _updateElementPath:function () { + var bottom = this.getDom('elementpath'), list; + if (this.elementPathEnabled && (list = this.editor.queryCommandValue('elementpath'))) { + + var buff = []; + for (var i = 0, ci; ci = list[i]; i++) { + buff[i] = this.formatHtml('' + ci + ''); + } + bottom.innerHTML = '
                                    ' + this.editor.getLang("elementPathTip") + ': ' + buff.join(' > ') + '
                                    '; + + } else { + bottom.style.display = 'none' + } + }, + disableElementPath:function () { + var bottom = this.getDom('elementpath'); + bottom.innerHTML = ''; + bottom.style.display = 'none'; + this.elementPathEnabled = false; + + }, + enableElementPath:function () { + var bottom = this.getDom('elementpath'); + bottom.style.display = ''; + this.elementPathEnabled = true; + this._updateElementPath(); + }, + _scale:function () { + var doc = document, + editor = this.editor, + editorHolder = editor.container, + editorDocument = editor.document, + toolbarBox = this.getDom("toolbarbox"), + bottombar = this.getDom("bottombar"), + scale = this.getDom("scale"), + scalelayer = this.getDom("scalelayer"); + + var isMouseMove = false, + position = null, + minEditorHeight = 0, + minEditorWidth = editor.options.minFrameWidth, + pageX = 0, + pageY = 0, + scaleWidth = 0, + scaleHeight = 0; + + function down() { + position = domUtils.getXY(editorHolder); + + if (!minEditorHeight) { + minEditorHeight = editor.options.minFrameHeight + toolbarBox.offsetHeight + bottombar.offsetHeight; + } + + scalelayer.style.cssText = "position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:" + editorHolder.offsetWidth + "px;height:" + + editorHolder.offsetHeight + "px;z-index:" + (editor.options.zIndex + 1); + + domUtils.on(doc, "mousemove", move); + domUtils.on(editorDocument, "mouseup", up); + domUtils.on(doc, "mouseup", up); + } + + var me = this; + //by xuheng 全屏时关掉缩放 + this.editor.addListener('fullscreenchanged', function (e, fullScreen) { + if (fullScreen) { + me.disableScale(); + + } else { + if (me.editor.options.scaleEnabled) { + me.enableScale(); + var tmpNode = me.editor.document.createElement('span'); + me.editor.body.appendChild(tmpNode); + me.editor.body.style.height = Math.max(domUtils.getXY(tmpNode).y, me.editor.iframe.offsetHeight - 20) + 'px'; + domUtils.remove(tmpNode) + } + } + }); + function move(event) { + clearSelection(); + var e = event || window.event; + pageX = e.pageX || (doc.documentElement.scrollLeft + e.clientX); + pageY = e.pageY || (doc.documentElement.scrollTop + e.clientY); + scaleWidth = pageX - position.x; + scaleHeight = pageY - position.y; + + if (scaleWidth >= minEditorWidth) { + isMouseMove = true; + scalelayer.style.width = scaleWidth + 'px'; + } + if (scaleHeight >= minEditorHeight) { + isMouseMove = true; + scalelayer.style.height = scaleHeight + "px"; + } + } + + function up() { + if (isMouseMove) { + isMouseMove = false; + editor.ui._actualFrameWidth = scalelayer.offsetWidth - 2; + editorHolder.style.width = editor.ui._actualFrameWidth + 'px'; + + editor.setHeight(scalelayer.offsetHeight - bottombar.offsetHeight - toolbarBox.offsetHeight - 2); + } + if (scalelayer) { + scalelayer.style.display = "none"; + } + clearSelection(); + domUtils.un(doc, "mousemove", move); + domUtils.un(editorDocument, "mouseup", up); + domUtils.un(doc, "mouseup", up); + } + + function clearSelection() { + if (browser.ie) + doc.selection.clear(); + else + window.getSelection().removeAllRanges(); + } + + this.enableScale = function () { + //trace:2868 + if (editor.queryCommandState("source") == 1) return; + scale.style.display = ""; + this.scaleEnabled = true; + domUtils.on(scale, "mousedown", down); + }; + this.disableScale = function () { + scale.style.display = "none"; + this.scaleEnabled = false; + domUtils.un(scale, "mousedown", down); + }; + }, + isFullScreen:function () { + return this._fullscreen; + }, + postRender:function () { + UIBase.prototype.postRender.call(this); + for (var i = 0; i < this.toolbars.length; i++) { + this.toolbars[i].postRender(); + } + var me = this; + var timerId, + domUtils = baidu.editor.dom.domUtils, + updateFullScreenTime = function () { + clearTimeout(timerId); + timerId = setTimeout(function () { + me._updateFullScreen(); + }); + }; + domUtils.on(window, 'resize', updateFullScreenTime); + + me.addListener('destroy', function () { + domUtils.un(window, 'resize', updateFullScreenTime); + clearTimeout(timerId); + }) + }, + showToolbarMsg:function (msg, flag) { + this.getDom('toolbarmsg_label').innerHTML = msg; + this.getDom('toolbarmsg').style.display = ''; + // + if (!flag) { + var w = this.getDom('upload_dialog'); + w.style.display = 'none'; + } + }, + hideToolbarMsg:function () { + this.getDom('toolbarmsg').style.display = 'none'; + }, + mapUrl:function (url) { + return url ? url.replace('~/', this.editor.options.UEDITOR_HOME_URL || '') : '' + }, + triggerLayout:function () { + var dom = this.getDom(); + if (dom.style.zoom == '1') { + dom.style.zoom = '100%'; + } else { + dom.style.zoom = '1'; + } + } + }; + utils.inherits(EditorUI, baidu.editor.ui.UIBase); + + + var instances = {}; + + + UE.ui.Editor = function (options) { + var editor = new UE.Editor(options); + editor.options.editor = editor; + utils.loadFile(document, { + href:editor.options.themePath + editor.options.theme + "/css/ueditor.css", + tag:"link", + type:"text/css", + rel:"stylesheet" + }); + + var oldRender = editor.render; + editor.render = function (holder) { + if (holder.constructor === String) { + editor.key = holder; + instances[holder] = editor; + } + utils.domReady(function () { + editor.langIsReady ? renderUI() : editor.addListener("langReady", renderUI); + function renderUI() { + editor.setOpt({ + labelMap:editor.options.labelMap || editor.getLang('labelMap') + }); + new EditorUI(editor.options); + if (holder) { + if (holder.constructor === String) { + holder = document.getElementById(holder); + } + holder && holder.getAttribute('name') && ( editor.options.textarea = holder.getAttribute('name')); + if (holder && /script|textarea/ig.test(holder.tagName)) { + var newDiv = document.createElement('div'); + holder.parentNode.insertBefore(newDiv, holder); + var cont = holder.value || holder.innerHTML; + editor.options.initialContent = /^[\t\r\n ]*$/.test(cont) ? editor.options.initialContent : + cont.replace(/>[\n\r\t]+([ ]{4})+/g, '>') + .replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<'); + holder.className && (newDiv.className = holder.className); + holder.style.cssText && (newDiv.style.cssText = holder.style.cssText); + if (/textarea/i.test(holder.tagName)) { + editor.textarea = holder; + editor.textarea.style.display = 'none'; + + } else { + holder.parentNode.removeChild(holder); + holder.id && (newDiv.id = holder.id); + } + holder = newDiv; + holder.innerHTML = ''; + } + + } + domUtils.addClass(holder, "edui-" + editor.options.theme); + editor.ui.render(holder); + var opt = editor.options; + //给实例添加一个编辑器的容器引用 + editor.container = editor.ui.getDom(); + var parents = domUtils.findParents(holder,true); + var displays = []; + for(var i = 0 ,ci;ci=parents[i];i++){ + displays[i] = ci.style.display; + ci.style.display = 'block' + } + if (opt.initialFrameWidth) { + opt.minFrameWidth = opt.initialFrameWidth; + } else { + opt.minFrameWidth = opt.initialFrameWidth = holder.offsetWidth; + } + if (opt.initialFrameHeight) { + opt.minFrameHeight = opt.initialFrameHeight; + } else { + opt.initialFrameHeight = opt.minFrameHeight = holder.offsetHeight; + } + for(var i = 0 ,ci;ci=parents[i];i++){ + ci.style.display = displays[i] + } + //编辑器最外容器设置了高度,会导致,编辑器不占位 + //todo 先去掉,没有找到原因 + if(holder.style.height){ + holder.style.height = '' + } + editor.container.style.width = opt.initialFrameWidth + (/%$/.test(opt.initialFrameWidth) ? '' : 'px'); + editor.container.style.zIndex = opt.zIndex; + oldRender.call(editor, editor.ui.getDom('iframeholder')); + + } + }) + }; + return editor; + }; + + + /** + * @file + * @name UE + * @short UE + * @desc UEditor的顶部命名空间 + */ + /** + * @name getEditor + * @since 1.2.4+ + * @grammar UE.getEditor(id,[opt]) => Editor实例 + * @desc 提供一个全局的方法得到编辑器实例 + * + * * ''id'' 放置编辑器的容器id, 如果容器下的编辑器已经存在,就直接返回 + * * ''opt'' 编辑器的可选参数 + * @example + * UE.getEditor('containerId',{onready:function(){//创建一个编辑器实例 + * this.setContent('hello') + * }}); + * UE.getEditor('containerId'); //返回刚创建的实例 + * + */ + UE.getEditor = function (id, opt) { + var editor = instances[id]; + if (!editor) { + editor = instances[id] = new UE.ui.Editor(opt); + editor.render(id); + } + return editor; + }; + + + UE.delEditor = function (id) { + var editor; + if (editor = instances[id]) { + editor.key && editor.destroy(); + delete instances[id] + } + } +})(); +///import core +///import uicore + ///commands 表情 +(function(){ + var utils = baidu.editor.utils, + Popup = baidu.editor.ui.Popup, + SplitButton = baidu.editor.ui.SplitButton, + MultiMenuPop = baidu.editor.ui.MultiMenuPop = function(options){ + this.initOptions(options); + this.initMultiMenu(); + }; + + MultiMenuPop.prototype = { + initMultiMenu: function (){ + var me = this; + this.popup = new Popup({ + content: '', + editor : me.editor, + iframe_rendered: false, + onshow: function (){ + if (!this.iframe_rendered) { + this.iframe_rendered = true; + this.getDom('content').innerHTML = ''; + me.editor.container.style.zIndex && (this.getDom().style.zIndex = me.editor.container.style.zIndex * 1 + 1); + } + } + // canSideUp:false, + // canSideLeft:false + }); + this.onbuttonclick = function(){ + this.showPopup(); + }; + this.initSplitButton(); + } + + }; + + utils.inherits(MultiMenuPop, SplitButton); +})(); + +(function () { + var UI = baidu.editor.ui, + UIBase = UI.UIBase, + uiUtils = UI.uiUtils, + utils = baidu.editor.utils, + domUtils = baidu.editor.dom.domUtils; + + var allMenus = [],//存储所有快捷菜单 + isSubMenuShow = false;//是否有子pop显示 + + var ShortCutMenu = UI.ShortCutMenu = function (options) { + this.initOptions (options); + this.initShortCutMenu (); + }; + + ShortCutMenu.postHide = hideAllMenu; + + ShortCutMenu.prototype = { + isHidden : true , + SPACE : 5 , + initShortCutMenu : function () { + this.items = this.items || []; + this.initUIBase (); + this.initItems (); + this.initEvent (); + allMenus.push (this); + } , + initEvent : function () { + var me = this, + doc = me.editor.document; + + domUtils.on (doc , "mousemove" , function (e) { + if (me.isHidden === false) { + //有pop显示就不隐藏快捷菜单 + if (me.getSubMenuMark () || me.eventType == "contextmenu") return; + + + var flag = true, + el = me.getDom (), + wt = el.offsetWidth, + ht = el.offsetHeight, + distanceX = wt / 2 + me.SPACE,//距离中心X标准 + distanceY = ht / 2,//距离中心Y标准 + x = Math.abs (e.screenX - me.left),//离中心距离横坐标 + y = Math.abs (e.screenY - me.top);//离中心距离纵坐标 + + if (y > 0 && y < distanceY) { + me.setOpacity (el , "1"); + } else if (y > distanceY && y < distanceY + 70) { + me.setOpacity (el , "0.5"); + flag = false; + } else if (y > distanceY + 70 && y < distanceY + 140) { + me.hide (); + } + + if (flag && x > 0 && x < distanceX) { + me.setOpacity (el , "1") + } else if (x > distanceX && x < distanceX + 70) { + me.setOpacity (el , "0.5") + } else if (x > distanceX + 70 && x < distanceX + 140) { + me.hide (); + } + } + }); + + domUtils.on (doc , "mouseout" , function (e) { + var relatedTgt = e.relatedTarget || e.toElement; + if (relatedTgt == null || relatedTgt.tagName == "HTML") { + me.hide (); + } + }); + + + me.editor.addListener ("afterhidepop" , function () { + if (!me.isHidden) { + isSubMenuShow = true; + } + }); + + } , + initItems : function () { + if (utils.isArray (this.items)) { + for (var i = 0, len = this.items.length ; i < len ; i++) { + var item = this.items[i].toLowerCase (); + + if (UI[item]) { + this.items[i] = new UI[item] (this.editor); + this.items[i].className += " edui-shortcutsubmenu "; + } + } + } + } , + setOpacity : function (el , value) { + if (browser.ie && browser.version < 9) { + el.style.filter = "alpha(opacity = " + parseFloat (value) * 100 + ");" + } else { + el.style.opacity = value; + } + } , + getSubMenuMark : function () { + isSubMenuShow = false; + var layerEle = uiUtils.getFixedLayer (); + var list = domUtils.getElementsByTagName (layerEle , "div" , function (node) { + return domUtils.hasClass (node , "edui-shortcutsubmenu edui-popup") + }); + + for (var i = 0, node ; node = list[i++] ;) { + if (node.style.display != "none") { + isSubMenuShow = true; + } + } + return isSubMenuShow; + } , + show : function (e , hasContextmenu) { + var me = this, + offset = {}, + el = this.getDom (), + fixedlayer = uiUtils.getFixedLayer (); + + function setPos (offset) { + if (offset.left < 0) { + offset.left = 0; + } + if (offset.top < 0) { + offset.top = 0; + } + el.style.cssText = "position:absolute;left:" + offset.left + "px;top:" + offset.top + "px;"; + } + + function setPosByCxtMenu (menu) { + if (!menu.tagName) { + menu = menu.getDom (); + } + offset.left = parseInt (menu.style.left); + offset.top = parseInt (menu.style.top); + offset.top -= el.offsetHeight + 15; + setPos (offset); + } + + me.eventType = e.type; + el.style.cssText = "display:block;left:-9999px"; + + if (e.type == "contextmenu" && hasContextmenu) { + var menu = domUtils.getElementsByTagName (fixedlayer , "div" , "edui-contextmenu")[0]; + if (menu) { + setPosByCxtMenu (menu) + } else { + me.editor.addListener ("aftershowcontextmenu" , function (type , menu) { + setPosByCxtMenu (menu); + }); + } + } else { + offset = uiUtils.getViewportOffsetByEvent (e); + offset.top -= el.offsetHeight + me.SPACE; + offset.left += me.SPACE; + setPos (offset); + } + + + me.isHidden = false; + me.left = e.screenX + el.offsetWidth / 2 - me.SPACE; + me.top = e.screenY - (el.offsetHeight / 2) - me.SPACE; + me.setOpacity (el , 0.2); + + if (me.editor) { + el.style.zIndex = me.editor.container.style.zIndex * 1 + 10; + fixedlayer.style.zIndex = el.style.zIndex - 1; + } + } , + hide : function () { + if (this.getDom ()) { + this.getDom ().style.display = "none"; + } + this.isHidden = true; + } , + postRender : function () { + if (utils.isArray (this.items)) { + for (var i = 0, item ; item = this.items[i++] ;) { + item.postRender (); + } + } + } , + getHtmlTpl : function () { + var buff; + if (utils.isArray (this.items)) { + buff = []; + for (var i = 0 ; i < this.items.length ; i++) { + buff[i] = this.items[i].renderHtml (); + } + buff = buff.join (""); + } else { + buff = this.items; + } + + return '
                                    ' + + buff + + '
                                    '; + } + }; + + utils.inherits (ShortCutMenu , UIBase); + + function hideAllMenu (e) { + var tgt = e.target || e.srcElement, + cur = domUtils.findParent (tgt , function (node) { + return domUtils.hasClass (node , "edui-shortcutmenu") || domUtils.hasClass (node , "edui-popup"); + } , true); + + if (!cur) { + for (var i = 0, menu ; menu = allMenus[i++] ;) { + menu.hide () + } + } + } + + domUtils.on (document , 'mousedown' , function (e) { + hideAllMenu (e); + }); + + domUtils.on (window , 'scroll' , function (e) { + hideAllMenu (e); + }); + +}) (); + +(function (){ + var utils = baidu.editor.utils, + UIBase = baidu.editor.ui.UIBase, + Breakline = baidu.editor.ui.Breakline = function (options){ + this.initOptions(options); + this.initSeparator(); + }; + Breakline.prototype = { + uiName: 'Breakline', + initSeparator: function (){ + this.initUIBase(); + }, + getHtmlTpl: function (){ + return '
                                    '; + } + }; + utils.inherits(Breakline, UIBase); + +})(); +})() \ No newline at end of file diff --git a/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/js/ueditor/ueditor.all.min.js b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/js/ueditor/ueditor.all.min.js new file mode 100644 index 000000000..5c51e0b58 --- /dev/null +++ b/test/diff_fis3_smarty/product_code/wenku_svn_fis3_smarty/static/js/ueditor/ueditor.all.min.js @@ -0,0 +1,414 @@ +(function(){function wa(a,b,c){var d;b=b.toLowerCase();return(d=a.__allListeners||c&&(a.__allListeners={}))&&(d[b]||c&&(d[b]=[]))}function xa(a,b,c,d,e,g){d=d&&a[b];var h;for(!d&&(d=a[c]);!d&&(h=(h||a).parentNode);){if("BODY"==h.tagName||g&&!g(h))return null;d=h[c]}return d&&e&&!e(d)?xa(d,b,c,!1,e):d}UEDITOR_CONFIG=window.UEDITOR_CONFIG||{};var l=window.baidu||{};window.baidu=l;window.UE=l.editor={};UE.plugins={};UE.commands={};UE.instants={};UE.I18N={};UE.version="1.2.6.1";var P=UE.dom={},Bc=UE, +L=navigator.userAgent.toLowerCase(),ya=window.opera,w={ie:!!window.ActiveXObject,opera:!!ya&&ya.version,webkit:-1F||w.quirks);if(w.gecko){var Q=L.match(/rv:([\d\.]+)/);Q&&(Q=Q[1].split("."),F=1E4*Q[0]+100*(Q[1]||0)+1*(Q[2]||0))}/chrome\/(\d+\.\d)/i.test(L)&&(w.chrome=+RegExp.$1);/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(L)&&!/chrome/i.test(L)&&(w.safari=+(RegExp.$1||RegExp.$2));w.opera&&(F=parseFloat(ya.version()));w.webkit&&(F=parseFloat(L.match(/ applewebkit\/(\d+)/)[1]));w.version=F;w.isCompatible=!w.mobile&&(w.ie&&6<=F||w.gecko&&10801<=F||w.opera&&9.5<=F||w.air&&1<=F||w.webkit&&522<=F||!1);var q= +Bc.browser=w,D=q.ie,Cc=UE,bb=document.createElement("div").style,cb={"float":void 0!=bb.cssFloat?"cssFloat":void 0!=bb.styleFloat?"styleFloat":"float"},eb=function(a,b){try{for(var c=0,d;d=db[c++];)if(d.doc===a&&d.url==(b.src||b.href))return d}catch(e){return null}},db=[],R=function(a){for(a.isReady=!0;a=fb.pop();a());},fb=[],n=Cc.utils={each:function(a,b,c){if(null!=a)if(a.length===+a.length)for(var d=0,e=a.length;d=c&&a===b)return d=g,!1});return d},removeItem:function(a,b){for(var c=0,d=a.length;c'](?:(amp|lt|quot|gt|#39|nbsp);)?/g,function(a,b){return b?a:{"<":"<","&":"&",'"':""",">":">","'":"'"}[a]}):""},html:function(a){return a?a.replace(/&((g|l|quo)t|amp|#39);/g,function(a){return{"<":"<","&":"&",""":'"',">":">","'":"'"}[a]}):""},cssStyleToDomStyle:function(a){return cb[a]||(cb[a]=a.toLowerCase().replace(/-./g,function(a){return a.charAt(1).toUpperCase()}))},loadFile:function(a,b,c){var d=eb(a,b);if(d)d.ready? +c&&c():d.funs.push(c);else if(db.push({doc:a,url:b.src||b.href,funs:[c]}),a.body){if(!b.id||!a.getElementById(b.id)){var e=a.createElement(b.tag);delete b.tag;for(g in b)e.setAttribute(g,b[g]);e.onload=e.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){d=eb(a,b);if(0")}},isEmptyObject:function(a){if(null==a)return!0;if(this.isArray(a)||this.isString(a))return 0===a.length;for(var b in a)if(a.hasOwnProperty(b))return!1;return!0},fixColor:function(a,b){if(/color/i.test(a)&&/rgba?/.test(b)){var c=b.split(",");if(3q.version?{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength", +cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder"}:{tabindex:"tabIndex",readonly:"readOnly"},Hc=n.listToMap("-webkit-box -moz-box block list-item table table-row-group table-header-group table-footer-group table-row table-column-group table-column table-cell table-caption".split(" ")),f=P.domUtils={NODE_ELEMENT:1,NODE_DOCUMENT:9,NODE_TEXT:3,NODE_COMMENT:8,NODE_DOCUMENT_FRAGMENT:11,POSITION_IDENTICAL:0,POSITION_DISCONNECTED:1, +POSITION_FOLLOWING:2,POSITION_PRECEDING:4,POSITION_IS_CONTAINED:8,POSITION_CONTAINS:16,fillChar:D&&"6"==q.version?"\ufeff":"\u200b",keys:{8:1,46:1,16:1,17:1,18:1,37:1,38:1,39:1,40:1,13:1},getPosition:function(a,b){if(a===b)return 0;var c,d=[a],e=[b];for(c=a;c=c.parentNode;){if(c===b)return 10;d.push(c)}for(c=b;c=c.parentNode;){if(c===a)return 20;e.push(c)}d.reverse();e.reverse();if(d[0]!==e[0])return 1;for(c=-1;c++,d[c]===e[c];);a=d[c];for(b=e[c];a=a.nextSibling;)if(a===b)return 4;return 2},getNodeIndex:function(a, +b){for(var c=a,d=0;c=c.previousSibling;)b&&3==c.nodeType?c.nodeType!=c.nextSibling.nodeType&&d++:d++;return d},inDoc:function(a,b){return 10==f.getPosition(a,b)},findParent:function(a,b,c){if(a&&!f.isBody(a))for(a=c?a:a.parentNode;a;){if(!b||b(a)||f.isBody(a))return b&&!b(a)&&f.isBody(a)?null:a;a=a.parentNode}return null},findParentByTagName:function(a,b,c,d){b=n.listToMap(n.isArray(b)?b:[b]);return f.findParent(a,function(a){return b[a.tagName]&&!(d&&d(a))},c)},findParents:function(a,b,c,d){for(b= +b&&(c&&c(a)||!c)?[a]:[];a=f.findParent(a,c);)b.push(a);return d?b:b.reverse()},insertAfter:function(a,b){return a.parentNode.insertBefore(b,a.nextSibling)},remove:function(a,b){var c=a.parentNode,d;if(c){if(b&&a.hasChildNodes())for(;d=a.firstChild;)c.insertBefore(d,a);c.removeChild(a)}return a},getNextDomNode:function(a,b,c,d){return xa(a,"firstChild","nextSibling",b,c,d)},isBookmarkNode:function(a){return 1==a.nodeType&&a.id&&/^_baidu_bookmark_/i.test(a.id)},getWindow:function(a){a=a.ownerDocument|| +a;return a.defaultView||a.parentWindow},getCommonAncestor:function(a,b){if(a===b)return a;for(var c=[a],d=[b],e=a,g=-1;e=e.parentNode;){if(e===b)return e;c.push(e)}for(e=b;e=e.parentNode;){if(e===a)return e;d.push(e)}c.reverse();for(d.reverse();g++,c[g]===d[g];);return 0==g?null:c[g-1]},clearEmptySibling:function(a,b,c){function d(a,b){for(var c;a&&!f.isBookmarkNode(a)&&(f.isEmptyInlineElement(a)||!RegExp("[^\t\n\r"+f.fillChar+"]").test(a.nodeValue));)c=a[b],f.remove(a),a=c}!b&&d(a.nextSibling,"nextSibling"); +!c&&d(a.previousSibling,"previousSibling")},split:function(a,b){var c=a.ownerDocument;if(q.ie&&b==a.nodeValue.length){var d=c.createTextNode("");return f.insertAfter(a,d)}d=a.splitText(b);q.ie8&&(c=c.createTextNode(""),f.insertAfter(d,c),f.remove(c));return d},isWhitespace:function(a){return!RegExp("[^ \t\n\r"+f.fillChar+"]").test(a.nodeValue)},getXY:function(a){for(var b=0,c=0;a.offsetParent;)c+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return{x:b,y:c}},on:function(a,b,c){var d=n.isArray(b)?b: +[b],e=d.length;if(e)for(;e--;)if(b=d[e],a.addEventListener)a.addEventListener(b,c,!1);else{c._d||(c._d={els:[]});var g=b+c.toString(),h=n.indexOf(c._d.els,a);if(!c._d[g]||-1==h)-1==h&&c._d.els.push(a),c._d[g]||(c._d[g]=function(a){return c.call(a.srcElement,a||window.event)}),a.attachEvent("on"+b,c._d[g])}a=null},un:function(a,b,c){var d=n.isArray(b)?b:[b],e=d.length;if(e)for(;e--;)if(b=d[e],a.removeEventListener)a.removeEventListener(b,c,!1);else{var g=b+c.toString();try{a.detachEvent("on"+b,c._d? +c._d[g]:c)}catch(h){}c._d&&c._d[g]&&(b=n.indexOf(c._d.els,a),-1!=b&&c._d.els.splice(b,1),0==c._d.els.length&&delete c._d[g])}},isSameElement:function(a,b){if(a.tagName!=b.tagName)return!1;var c=a.attributes,d=b.attributes;if(!D&&c.length!=d.length)return!1;for(var e,g,h=0,j=0,k=0;e=c[k++];){if("style"==e.nodeName)if(e.specified&&h++,f.isSameStyle(a,b))continue;else return!1;if(D)if(e.specified)h++,g=d.getNamedItem(e.nodeName);else continue;else g=b.attributes[e.nodeName];if(!g.specified||e.nodeValue!= +g.nodeValue)return!1}if(D){for(k=0;g=d[k++];)g.specified&&j++;if(h!=j)return!1}return!0},isSameStyle:function(a,b){var c=a.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,":"),d=b.style.cssText.replace(/( ?; ?)/g,";").replace(/( ?: ?)/g,":");if(q.opera){c=a.style;d=b.style;if(c.length!=d.length)return!1;for(var e in c)if(!/^(\d+|csstext)$/i.test(e)&&c[e]!=d[e])return!1;return!0}if(!c||!d)return c==d;c=c.split(";");d=d.split(";");if(c.length!=d.length)return!1;e=0;for(var g;g=c[e++];)if(-1== +n.indexOf(d,g))return!1;return!0},isBlockElm:function(a){return 1==a.nodeType&&(u.$block[a.tagName]||Hc[f.getComputedStyle(a,"display")])&&!u.$nonChild[a.tagName]},isBody:function(a){return a&&1==a.nodeType&&"body"==a.tagName.toLowerCase()},breakParent:function(a,b){var c,d=a,e=a,g,h;do{d=d.parentNode;g?(c=d.cloneNode(!1),c.appendChild(g),g=c,c=d.cloneNode(!1),c.appendChild(h),h=c):(g=d.cloneNode(!1),h=g.cloneNode(!1));for(;c=e.previousSibling;)g.insertBefore(c,g.firstChild);for(;c=e.nextSibling;)h.appendChild(c); +e=d}while(b!==d);c=b.parentNode;c.insertBefore(g,b);c.insertBefore(h,b);c.insertBefore(a,h);f.remove(b);return a},isEmptyInlineElement:function(a){if(1!=a.nodeType||!u.$removeEmpty[a.tagName])return 0;for(a=a.firstChild;a;){if(f.isBookmarkNode(a)||1==a.nodeType&&!f.isEmptyInlineElement(a)||3==a.nodeType&&!f.isWhitespace(a))return 0;a=a.nextSibling}return 1},trimWhiteTextNode:function(a){function b(b){for(var d;(d=a[b])&&3==d.nodeType&&f.isWhitespace(d);)a.removeChild(d)}b("firstChild");b("lastChild")}, +mergeChild:function(a,b,c){b=f.getElementsByTagName(a,a.tagName.toLowerCase());for(var d=0,e;e=b[d++];)if(e.parentNode&&!f.isBookmarkNode(e))if("span"==e.tagName.toLowerCase()){if(a===e.parentNode&&(f.trimWhiteTextNode(a),1==a.childNodes.length)){a.style.cssText=e.style.cssText+";"+a.style.cssText;f.remove(e,!0);continue}e.style.cssText=a.style.cssText+";"+e.style.cssText;if(c){var g=c.style;if(g)for(var g=g.split(";"),h=0,j;j=g[h++];)e.style[n.cssStyleToDomStyle(j.split(":")[0])]=j.split(":")[1]}f.isSameStyle(e, +a)&&f.remove(e,!0)}else f.isSameElement(a,e)&&f.remove(e,!0)},getElementsByTagName:function(a,b,c){if(c&&n.isString(c)){var d=c;c=function(a){return f.hasClass(a,d)}}b=n.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var e=[],g=0,h;h=b[g++];){h=a.getElementsByTagName(h);for(var j=0,k;k=h[j++];)(!c||c(k))&&e.push(k)}return e},mergeToParent:function(a){for(var b=a.parentNode;b&&u.$removeEmpty[b.tagName];){if(b.tagName==a.tagName||"A"==b.tagName){f.trimWhiteTextNode(b);if("SPAN"==b.tagName&&!f.isSameStyle(b, +a)||"A"==b.tagName&&"SPAN"==a.tagName)if(1q.version&&"font-size"==b&&!a.style.fontSize&&!u.$empty[a.tagName]&&!u.$nonChild[a.tagName]){var c= +a.ownerDocument.createElement("span");c.style.cssText="padding:0;border:0;font-family:simsun;";c.innerHTML=".";a.appendChild(c);var d=c.offsetHeight;a.removeChild(c);c=null;return d+"px"}try{c=f.getStyle(a,b)||(window.getComputedStyle?f.getWindow(a).getComputedStyle(a,"").getPropertyValue(b):(a.currentStyle||a.style)[n.cssStyleToDomStyle(b)])}catch(e){return""}return n.transUnitToPx(n.fixColor(b,c))},removeClasses:function(a,b){b=n.isArray(b)?b:n.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c= +0,d,e=a.className;d=b[c++];)e=e.replace(RegExp("\\b"+d+"\\b"),"");(e=n.trim(e).replace(/[ ]{2,}/g," "))?a.className=e:f.removeAttributes(a,["class"])},addClass:function(a,b){if(a){b=n.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c=0,d,e=a.className;d=b[c++];)RegExp("\\b"+d+"\\b").test(e)||(a.className+=" "+d)}},hasClass:function(a,b){if(n.isRegExp(b))return b.test(a.className);b=n.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c=0,d,e=a.className;d=b[c++];)if(!RegExp("\\b"+d+"\\b","i").test(e))return!1; +return c-1==b.length},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},removeStyle:function(a,b){q.ie?a.style.cssText=a.style.cssText.replace(RegExp(b+"[^:]*:[^;]+;?","ig"),""):a.style.removeProperty?a.style.removeProperty(b):a.style.removeAttribute(n.cssStyleToDomStyle(b));a.style.cssText||f.removeAttributes(a,["style"])},getStyle:function(a,b){var c=a.style[n.cssStyleToDomStyle(b)];return n.fixColor(b,c)},setStyle:function(a,b,c){a.style[n.cssStyleToDomStyle(b)]= +c;n.trim(a.style.cssText)||this.removeAttributes(a,"style")},setStyles:function(a,b){for(var c in b)b.hasOwnProperty(c)&&f.setStyle(a,c,b[c])},removeDirtyAttr:function(a){for(var b=0,c,d=a.getElementsByTagName("*");c=d[b++];)c.removeAttribute("_moz_dirty");a.removeAttribute("_moz_dirty")},getChildCount:function(a,b){var c=0,d=a.firstChild;for(b=b||function(){return 1};d;)b(d)&&c++,d=d.nextSibling;return c},isEmptyNode:function(a){return!a.firstChild||0==f.getChildCount(a,function(a){return!f.isBr(a)&& +!f.isBookmarkNode(a)&&!f.isWhitespace(a)})},clearSelectedArr:function(a){for(var b;b=a.pop();)f.removeAttributes(b,["class"])},scrollToView:function(a,b,c){var d=b.document,d=("CSS1Compat"==d.compatMode?d.documentElement.clientHeight:d.body.clientHeight)||0;c=-1*d+c+(a.offsetHeight||0);a=f.getXY(a);c+=a.y;"pageXOffset"in b?a=b.pageYOffset||0:(a=b.document,a=a.documentElement.scrollTop||a.body.scrollTop||0);if(c>a||cc?-20:20))},isBr:function(a){return 1==a.nodeType&&"BR"==a.tagName}, +isFillChar:function(a,b){return 3==a.nodeType&&!a.nodeValue.replace(RegExp((b?"^":"")+f.fillChar),"").length},isStartInblock:function(a){a=a.cloneRange();var b=0,c=a.startContainer,d;if(1==c.nodeType&&c.childNodes[a.startOffset])for(var c=c.childNodes[a.startOffset],e=c.previousSibling;e&&f.isFillChar(e);)c=e,e=e.previousSibling;this.isFillChar(c,!0)&&1==a.startOffset&&(a.setStartBefore(c),c=a.startContainer);for(;c&&f.isFillChar(c);)d=c,c=c.previousSibling;d&&(a.setStartBefore(d),c=a.startContainer); +for(1==c.nodeType&&(f.isEmptyNode(c)&&1==a.startOffset)&&a.setStart(c,0).collapse(!0);!a.startOffset;){c=a.startContainer;if(f.isBlockElm(c)||f.isBody(c)){b=1;break}var e=a.startContainer.previousSibling,g;if(e){for(;e&&f.isFillChar(e);)g=e,e=e.previousSibling;g?a.setStartBefore(g):a.setStartBefore(a.startContainer)}else a.setStartBefore(a.startContainer)}return b&&!f.isBody(a.startContainer)?1:0},isEmptyBlock:function(a,b){b=b||RegExp("[ \t\r\n"+f.fillChar+"]","g");if(0/.test(a.outerHTML):0==a.attributes.length},isCustomeNode:function(a){return 1==a.nodeType&&a.getAttribute("_ue_custom_node_")},isTagNode:function(a,b){return 1==a.nodeType&&RegExp("^"+a.tagName+"$","i").test(b)},filterNodeList:function(a,b,c){var d=[];if(!n.isFunction(b)){var e=b;b=function(a){return-1!=n.indexOf(n.isArray(e)?e:e.split(" "),a.tagName.toLowerCase())}}n.each(a,function(a){b(a)&&d.push(a)}); +return 0==d.length?null:1==d.length||!c?d[0]:d},isInNodeEndBoundary:function(a,b){var c=a.startContainer;if(3==c.nodeType&&a.startOffset!=c.nodeValue.length||1==c.nodeType&&a.startOffset!=c.childNodes.length)return 0;for(;c!==b;){if(c.nextSibling)return 0;c=c.parentNode}return 1},isBoundaryNode:function(a,b){for(var c;!f.isBody(a);)if(c=a,a=a.parentNode,c!==a[b])return!1;return!0}},ka=RegExp(f.fillChar,"g"),tb=function(a){return!a.collapsed&&1==a.startContainer.nodeType&&a.startContainer===a.endContainer&& +1==a.endOffset-a.startOffset},ub=function(a,b,c,d){if(1==b.nodeType&&(u.$empty[b.tagName]||u.$nonChild[b.tagName]))c=f.getNodeIndex(b)+(a?0:1),b=b.parentNode;a?(d.startContainer=b,d.startOffset=c,d.endContainer||d.collapse(!0)):(d.endContainer=b,d.endOffset=c,d.startContainer||d.collapse(!1));d.collapsed=d.startContainer&&d.endContainer&&d.startContainer===d.endContainer&&d.startOffset==d.endOffset;return d},Da=function(a,b){var c=a.startContainer,d=a.endContainer,e=a.startOffset,g=a.endOffset,h= +a.document,j=h.createDocumentFragment(),k,m;1==c.nodeType&&(c=c.childNodes[e]||(k=c.appendChild(h.createTextNode(""))));1==d.nodeType&&(d=d.childNodes[g]||(m=d.appendChild(h.createTextNode(""))));if(c===d&&3==c.nodeType)return j.appendChild(h.createTextNode(c.substringData(e,g-e))),b&&(c.deleteData(e,g-e),a.collapse(!0)),j;for(var p,l,s=j,x=f.findParents(c,!0),C=f.findParents(d,!0),G=0;x[G]==C[G];)G++;for(var n=G,S;S=x[n];n++){p=S.nextSibling;S==c?k||(3==a.startContainer.nodeType?(s.appendChild(h.createTextNode(c.nodeValue.slice(e))), +b&&c.deleteData(e,c.nodeValue.length-e)):s.appendChild(!b?c.cloneNode(!0):c)):(l=S.cloneNode(!1),s.appendChild(l));for(;p&&!(p===d||p===C[n]);)S=p.nextSibling,s.appendChild(!b?p.cloneNode(!0):p),p=S;s=l}s=j;x[G]||(s.appendChild(x[G-1].cloneNode(!1)),s=s.firstChild);for(n=G;e=C[n];n++){p=e.previousSibling;e==d?!m&&3==a.endContainer.nodeType&&(s.appendChild(h.createTextNode(d.substringData(0,g))),b&&d.deleteData(0,g)):(l=e.cloneNode(!1),s.appendChild(l));if(n!=G||!x[G])for(;p&&p!==c;)e=p.previousSibling, +s.insertBefore(!b?p.cloneNode(!0):p,s.firstChild),p=e;s=l}b&&a.setStartBefore(!C[G]?C[G-1]:!x[G]?x[G-1]:C[G]).collapse(!0);k&&f.remove(k);m&&f.remove(m);return j},vb=function(a,b){try{if(H&&f.inDoc(H,a))if(H.nodeValue.replace(ka,"").length)H.nodeValue=H.nodeValue.replace(ka,"");else{var c=H.parentNode;for(f.remove(H);c&&f.isEmptyInlineElement(c)&&(q.safari?!(f.getPosition(c,b)&f.POSITION_CONTAINS):!c.contains(b));)H=c.parentNode,f.remove(c),c=H}}catch(d){}},la=function(a,b){var c;for(a=a[b];a&&f.isFillChar(a);)c= +a[b],f.remove(a),a=c},wb=0,Ea=f.fillChar,H,xb=P.Range=function(a){this.startContainer=this.startOffset=this.endContainer=this.endOffset=null;this.document=a;this.collapsed=!0};xb.prototype={cloneContents:function(){return this.collapsed?null:Da(this,0)},deleteContents:function(){var a;this.collapsed||Da(this,1);q.webkit&&(a=this.startContainer,3==a.nodeType&&!a.nodeValue.length&&(this.setStartBefore(a).collapse(!0),f.remove(a)));return this},extractContents:function(){return this.collapsed?null:Da(this, +2)},setStart:function(a,b){return ub(!0,a,b,this)},setEnd:function(a,b){return ub(!1,a,b,this)},setStartAfter:function(a){return this.setStart(a.parentNode,f.getNodeIndex(a)+1)},setStartBefore:function(a){return this.setStart(a.parentNode,f.getNodeIndex(a))},setEndAfter:function(a){return this.setEnd(a.parentNode,f.getNodeIndex(a)+1)},setEndBefore:function(a){return this.setEnd(a.parentNode,f.getNodeIndex(a))},setStartAtFirst:function(a){return this.setStart(a,0)},setStartAtLast:function(a){return this.setStart(a, +3==a.nodeType?a.nodeValue.length:a.childNodes.length)},setEndAtFirst:function(a){return this.setEnd(a,0)},setEndAtLast:function(a){return this.setEnd(a,3==a.nodeType?a.nodeValue.length:a.childNodes.length)},selectNode:function(a){return this.setStartBefore(a).setEndAfter(a)},selectNodeContents:function(a){return this.setStart(a,0).setEndAtLast(a)},cloneRange:function(){return(new xb(this.document)).setStart(this.startContainer,this.startOffset).setEnd(this.endContainer,this.endOffset)},collapse:function(a){a? +(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset);this.collapsed=!0;return this},shrinkBoundary:function(a){function b(a){return 1==a.nodeType&&!f.isBookmarkNode(a)&&!u.$empty[a.tagName]&&!u.$nonChild[a.tagName]}for(var c,d=this.collapsed;1==this.startContainer.nodeType&&(c=this.startContainer.childNodes[this.startOffset])&&b(c);)this.setStart(c,0);if(d)return this.collapse(!0);if(!a)for(;1==this.endContainer.nodeType&& +0=b.nodeValue.length)this.setStartAfter(b);else{var g=f.split(b,c);b===e?this.setEnd(g,this.endOffset-c):b.parentNode===e&&(this.endOffset+=1);this.setStartBefore(g)}if(d)return this.collapse(!0)}a||(c=this.endOffset,e=this.endContainer,3==e.nodeType&&(0==c?this.setEndBefore(e):(c=e.nodeValue.length)a["set"+b.replace(/(\w)/, +function(a){return a.toUpperCase()})+"After"](e)}else a["set"+b.replace(/(\w)/,function(a){return a.toUpperCase()})+"Before"](e)}if(a||!this.collapsed)b(this,"start"),b(this,"end");return this},insertNode:function(a){var b=a,c=1;11==a.nodeType&&(b=a.firstChild,c=a.childNodes.length);this.trimBoundary(!0);var d=this.startContainer,e=d.childNodes[this.startOffset];e?d.insertBefore(a,e):d.appendChild(a);b.parentNode===this.endContainer&&(this.endOffset+=c);return this.setStartBefore(b)},setCursor:function(a, +b){return this.collapse(!a).select(b)},createBookmark:function(a,b){var c,d=this.document.createElement("span");d.style.cssText="display:none;line-height:0px;";d.appendChild(this.document.createTextNode("\u200d"));d.id="_baidu_bookmark_start_"+(b?"":wb++);this.collapsed||(c=d.cloneNode(!0),c.id="_baidu_bookmark_end_"+(b?"":wb++));this.insertNode(d);c&&this.collapse().insertNode(c).setEndBefore(c);this.setStartAfter(d);return{start:a?d.id:d,end:c?a?c.id:c:null,id:a}},moveToBookmark:function(a){var b= +a.id?this.document.getElementById(a.start):a.start;a=a.end&&a.id?this.document.getElementById(a.end):a.end;this.setStartBefore(b);f.remove(b);a?(this.setEndBefore(a),f.remove(a)):this.collapse(!0);return this},enlarge:function(a,b){var c=f.isBody,d,e,g=this.document.createTextNode("");if(a){e=this.startContainer;1==e.nodeType?e.childNodes[this.startOffset]?d=e=e.childNodes[this.startOffset]:(e.appendChild(g),d=e=g):d=e;for(;;){if(f.isBlockElm(e)){for(e=d;(d=e.previousSibling)&&!f.isBlockElm(d);)e= +d;this.setStartBefore(e);break}d=e;e=e.parentNode}e=this.endContainer;1==e.nodeType?((d=e.childNodes[this.endOffset])?e.insertBefore(g,d):e.appendChild(g),d=e=g):d=e;for(;;){if(f.isBlockElm(e)){for(e=d;(d=e.nextSibling)&&!f.isBlockElm(d);)e=d;this.setEndAfter(e);break}d=e;e=e.parentNode}g.parentNode===this.endContainer&&this.endOffset--;f.remove(g)}if(!this.collapsed){for(;0==this.startOffset&&(!b||!b(this.startContainer))&&!c(this.startContainer);)this.setStartBefore(this.startContainer);for(;this.endOffset== +(1==this.endContainer.nodeType?this.endContainer.childNodes.length:this.endContainer.nodeValue.length)&&(!b||!b(this.endContainer))&&!c(this.endContainer);)this.setEndAfter(this.endContainer)}return this},adjustmentBoundary:function(){if(!this.collapsed){for(;!f.isBody(this.startContainer)&&this.startOffset==this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length&&this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length;)this.setStartAfter(this.startContainer); +for(;!f.isBody(this.endContainer)&&!this.endOffset&&this.endContainer[3==this.endContainer.nodeType?"nodeValue":"childNodes"].length;)this.setEndBefore(this.endContainer)}return this},applyInlineStyle:function(a,b,c){if(this.collapsed)return this;this.trimBoundary().enlarge(!1,function(a){return 1==a.nodeType&&f.isBlockElm(a)}).adjustmentBoundary();for(var d=this.createBookmark(),e=d.end,g=function(a){return 1==a.nodeType?"br"!=a.tagName.toLowerCase():!f.isWhitespace(a)},h=f.getNextDomNode(d.start, +!1,g),j,k,m=this.cloneRange();h&&f.getPosition(h,e)&f.POSITION_PRECEDING;)if(3==h.nodeType||u[a][h.tagName]){m.setStartBefore(h);for(j=h;j&&(3==j.nodeType||u[a][j.tagName])&&j!==e;)k=j,j=f.getNextDomNode(j,1==j.nodeType,null,function(b){return u[a][b.tagName]});var h=m.setEndAfter(k).extractContents(),p;if(c&&0d&&(d=0);k.push(d);return k}var d={},e=this;d.startAddress=c(!0);a||(d.endAddress=e.collapsed?[].concat(d.startAddress):c());return d},moveToAddress:function(a,b){function c(a,b){for(var c=d.document.body,f,k,m=0,p,l=a.length;mp)j=m+1;else return{container:d,offset:c(g)}}if(-1==m){h.moveToElementText(d);h.setEndPoint("StartToStart",a);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h)return g=e[e.length-1],{container:g,offset:g.nodeValue.length};for(c=e.length;0"+(D?"":"
                                    ")+"

                                    ",a.removeListener("firstBeforeExecCommand focus",Cb),setTimeout(function(){a.focus();a._selectionChange()},0))};Bb.prototype={ready:function(a){a&&(this.isReady?a.apply(this):this.addListener("ready", +a))},setOpt:function(a,b){var c={};n.isString(a)?c[a]=b:c=a;n.extend(this.options,c,!0)},destroy:function(){this.fireEvent("destroy");var a=this.container.parentNode,b=this.textarea;b?b.style.display="":(b=document.createElement("textarea"),a.parentNode.insertBefore(b,a));b.style.width=this.iframe.offsetWidth+"px";b.style.height=this.iframe.offsetHeight+"px";b.value=this.getContent();b.id=this.key;a.innerHTML="";f.remove(a);var a=this.key,c;for(c in this)this.hasOwnProperty(c)&&delete this[c];UE.delEditor(a)}, +render:function(a){var b=this.options;n.isString(a)&&(a=document.getElementById(a));if(a){b.minFrameWidth=b.initialFrameWidth?b.initialFrameWidth:b.initialFrameWidth=a.offsetWidth;b.initialFrameHeight?b.minFrameHeight=b.initialFrameHeight:b.initialFrameHeight=b.minFrameHeight=a.offsetHeight;a.style.width=/%$/.test(b.initialFrameWidth)?"100%":b.initialFrameWidth-parseInt(f.getComputedStyle(a,"padding-left"))-parseInt(f.getComputedStyle(a,"padding-right"))+"px";a.style.height=/%$/.test(b.initialFrameHeight)? +"100%":b.initialFrameHeight-parseInt(f.getComputedStyle(a,"padding-top"))-parseInt(f.getComputedStyle(a,"padding-bottom"))+"px";a.style.zIndex=b.zIndex;var c=(D&&9>q.version?"":"")+""+(b.iframeCssUrl?"":"")+(b.initialStyle?"":"")+"