diff --git a/static/css/aowow.css b/static/css/aowow.css index 5f012512..1a54e25d 100644 --- a/static/css/aowow.css +++ b/static/css/aowow.css @@ -2534,36 +2534,9 @@ div.modelviewer-screen { margin: 0 auto; } -div.modelviewer-quality { - margin: 10px 10px 5px 0; - line-height: 22px; - height: 22px; - display: block; - float: left; -} - -div.modelviewer-quality var { - float: left; - height: 22px; - display: block; - color: #a0a0a0; - text-transform: uppercase; - text-decoration: none; - font-size: 15px; - font-style: normal; - margin-right: 10px; - font-family: Tahoma, sans-serif; -} - -div.modelviewer-quality span { - float: left; - display: block; - line-height: 22px; -} - div.modelviewer-model { -/* clear: left; - padding: 5px 0 10px 0; */ + clear: left; + padding: 5px 0 10px 0; padding: 10px 0; } @@ -2586,13 +2559,16 @@ a.modelviewer-help { display: block; padding: 10px 0 10px 10px; margin-right: 10px; + margin-top:5px; } a.modelviewer-close { float: right; display: block; padding: 10px 0 10px 10px; -} + clear:right; + margin-top:5px; + } /**********/ /* LAYOUT */ diff --git a/static/css/locale_dede.css b/static/css/locale_dede.css index 6004c159..ee898302 100644 --- a/static/css/locale_dede.css +++ b/static/css/locale_dede.css @@ -1,13 +1,4 @@ -div.modelviewer-quality div { - float: left; - width: 71px; - height: 22px; - margin-right: 10px; - background: url(../images/dede/modelviewer-picshures.gif) left center no-repeat; -} - div.modelviewer-model div { - margin-left: 25px; margin-right: 10px; float: left; width: 50px; diff --git a/static/css/locale_enus.css b/static/css/locale_enus.css index 9e5d204a..90cf74ef 100644 --- a/static/css/locale_enus.css +++ b/static/css/locale_enus.css @@ -1,13 +1,4 @@ -div.modelviewer-quality div { - float: left; - width: 61px; - height: 22px; - margin-right: 10px; - background: url(../images/enus/modelviewer-picshures.gif) left center no-repeat; -} - div.modelviewer-model div { - margin-left: 40px; margin-right: 10px; float: left; width: 50px; diff --git a/static/css/locale_eses.css b/static/css/locale_eses.css index 2fd01db7..a338b0a9 100644 --- a/static/css/locale_eses.css +++ b/static/css/locale_eses.css @@ -3,16 +3,7 @@ width, left, background-position values may need adjustment! */ -div.modelviewer-quality div { - float: left; - width: 70px; - height: 22px; - margin-right: 10px; - background: url(../images/eses/modelviewer-picshures.gif) left center no-repeat; -} - div.modelviewer-model div { - margin-left: 40px; margin-right: 5px; float: left; width: 80px; diff --git a/static/css/locale_frfr.css b/static/css/locale_frfr.css index 46ba8b21..627ac340 100644 --- a/static/css/locale_frfr.css +++ b/static/css/locale_frfr.css @@ -1,13 +1,4 @@ -div.modelviewer-quality div { - float: left; - width: 61px; - height: 22px; - margin-right: 10px; - background: url(../images/frfr/modelviewer-picshures.gif) left center no-repeat; -} - div.modelviewer-model div { - margin-left: 25px; margin-right: 10px; float: left; width: 58px; diff --git a/static/css/locale_ruru.css b/static/css/locale_ruru.css index d9891b9b..137c1834 100644 --- a/static/css/locale_ruru.css +++ b/static/css/locale_ruru.css @@ -1,13 +1,4 @@ -div.modelviewer-quality div { - float: left; - width: 76px; - height: 22px; - margin-right: 10px; - background: url(../images/ruru/modelviewer-picshures.gif) left center no-repeat; -} - div.modelviewer-model div { - margin-left: 40px; margin-right: 10px; float: left; width: 61px; diff --git a/static/js/global.js b/static/js/global.js index 5e9081b3..21ce8bf7 100644 --- a/static/js/global.js +++ b/static/js/global.js @@ -19886,9 +19886,6 @@ var ModelViewer = new function() { modelType, equipList = [], optBak, - _w, - _o, - _z, modelDiv, raceSel1, raceSel2, @@ -19896,6 +19893,7 @@ var ModelViewer = new function() { oldHash, mode, readExtraPound, + animsLoaded = false, races = [ {id: 10, name: g_chr_races[10], model: 'bloodelf' }, @@ -19915,25 +19913,19 @@ var ModelViewer = new function() { {id: 1, name: LANG.female, model: 'female' } ]; - function clear() { - _w.style.display = 'none'; - _o.style.display = 'none'; - _z.style.display = 'none'; - } + function clear() { } function getRaceSex() { var race, sex; - if (raceSel1.style.display == '') { - race = (raceSel1.selectedIndex >= 0 ? raceSel1.options[raceSel1.selectedIndex].value : ''); - } - else { - race = (raceSel2.selectedIndex >= 0 ? raceSel2.options[raceSel2.selectedIndex].value : ''); - } + if (raceSel1.is(':visible')) + race = (raceSel1[0].selectedIndex >= 0 ? raceSel1.val() : ''); + else + race = (raceSel2[0].selectedIndex >= 0 ? raceSel2.val() : ''); - sex = (sexSel.selectedIndex >= 0 ? sexSel.options[sexSel.selectedIndex].value : 0); + sex = (sexSel[0].selectedIndex >= 0 ? sexSel.val() : 0); return { r: race, s: sex }; } @@ -19945,54 +19937,31 @@ var ModelViewer = new function() { } function render() { - if (mode == 2 && !f()) { - mode = 0; - } - if (mode == 2) { - var G = ''; - if (modelType == 16 && equipList.length) { - G += ''; - } - G += ''; - _z.innerHTML = G; - _z.style.display = ''; - } - else if (mode == 1) { - var G = ''; - if (modelType == 16 && equipList.length) { - G += ''; - } - G += ''; - _o.innerHTML = G; - _o.style.display = ''; - } - else { - var flashVars = { - model: model, - modelType: modelType, - // contentPath: 'http://static.wowhead.com/modelviewer/' - contentPath: g_staticUrl + '/modelviewer/' - }; + var flashVars = { + model: model, + modelType: modelType, + // contentPath: 'http://static.wowhead.com/modelviewer/' + contentPath: g_staticUrl + '/modelviewer/' + }; - var params = { - quality: 'high', - allowscriptaccess: 'always', - allowfullscreen: true, - menu: false, - bgcolor: '#181818', - wmode: 'direct' - }; + var params = { + quality: 'high', + allowscriptaccess: 'always', + allowfullscreen: true, + menu: false, + bgcolor: '#181818', + wmode: 'direct' + }; - var attributes = { }; + var attributes = { }; - if (modelType == 16 && equipList.length) { - flashVars.equipList = equipList.join(','); - } - - // swfobject.embedSWF('http://static.wowhead.com/modelviewer/ZAMviewerfp11.swf', 'modelviewer-generic', '600', '400', "11.0.0", 'http://static.wowhead.com/modelviewer/expressInstall.swf', flashVars, params, attributes); - swfobject.embedSWF(g_staticUrl + '/modelviewer/ZAMviewerfp11.swf', 'modelviewer-generic', '600', '400', "11.0.0", g_staticUrl + '/modelviewer/expressInstall.swf', flashVars, params, attributes); - _w.style.display = ''; + if (modelType == 16 && equipList.length) { + flashVars.equipList = equipList.join(','); } + + // swfobject.embedSWF('http://static.wowhead.com/modelviewer/ZAMviewerfp11.swf', 'modelviewer-generic', '600', '400', "11.0.0", 'http://static.wowhead.com/modelviewer/expressInstall.swf', flashVars, params, attributes); + swfobject.embedSWF(g_staticUrl + '/modelviewer/ZAMviewerfp11.swf', 'modelviewer-generic', '600', '400', "11.0.0", g_staticUrl + '/modelviewer/expressInstall.swf', flashVars, params, attributes); + var foo = getRaceSex(), race = foo.r, @@ -20027,6 +19996,9 @@ var ModelViewer = new function() { if (optBak.extraPound != null) { url += ':' + optBak.extraPound; } + + animsLoaded = false, + location.replace($WH.rtrim(url, ':')); } } @@ -20038,11 +20010,10 @@ var ModelViewer = new function() { sex = foo.s; if (!race) { - if (sexSel.style.display == 'none') { + if (!sexSel.is(':visible')) return; - } - sexSel.style.display = 'none'; + sexSel.hide(); model = equipList[1]; switch (optBak.slot) { @@ -20057,15 +20028,12 @@ var ModelViewer = new function() { } } else { - if (sexSel.style.display == 'none') { - sexSel.style.display = ''; - } + if (!sexSel.is(':visible')) + sexSel.show(); - var foo = function(x) { - return x.id; - }; + var foo = function(x) { return x.id; }; var raceIndex = $WH.in_array(races, race, foo); - var sexIndex = $WH.in_array(sexes, sex, foo); + var sexIndex = $WH.in_array(sexes, sex, foo); if (raceIndex != -1 && sexIndex != -1) { model = races[raceIndex].model + sexes[sexIndex].model; @@ -20079,25 +20047,50 @@ var ModelViewer = new function() { render(); } - function j(newMode) { - if (newMode == mode) { + function onAnimationChange() { + var viewer = $('#modelviewer-generic'); + if (viewer.length == 0) + return; + viewer = viewer[0]; + + var animList = $('select', animDiv); + if (animList.val() && viewer.isLoaded && viewer.isLoaded()) + viewer.setAnimation(animList.val()); + } + + function onAnimationMouseover() { + if (animsLoaded) + return; + + var viewer = $('#modelviewer-generic'); + if (viewer.length == 0) + return; + viewer = viewer[0]; + + var animList = $('select', animDiv); + animList.empty(); + if (!viewer.isLoaded || !viewer.isLoaded()) { + animList.append($('