mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
implemented Itemset detail page
- while the code and strings are there, no rules have been set concerning availability User: - HTTP_ACCEPT_LANGUAGE may not be set. Compare: - removed some relic code, that, once uppon a time, was used to link virtual item sets with real item sets or something.. Titles: - fixed a few forgotten changes Lang: - hide DND-entries for locks BaseType: - improved getField to automaticaly cast numerics to float - improved __construct to check for numeric instead of int
This commit is contained in:
94
template/itemset.tpl
Normal file
94
template/itemset.tpl
Normal file
@@ -0,0 +1,94 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
{if !empty($announcements)}
|
||||
{foreach from=$announcements item=item}
|
||||
{include file='bricks/announcement.tpl' an=$item}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
{include file='bricks/community.tpl'}
|
||||
var g_pageInfo = {ldelim}type: {$page.type}, typeId: {$page.typeId}, name: '{$lvData.page.name|escape:"quotes"}'{rdelim};
|
||||
g_initPath({$page.path});
|
||||
</script>
|
||||
|
||||
{include file='bricks/infobox.tpl'}
|
||||
|
||||
<div class="text">
|
||||
<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur(); Links.show({ldelim} type: 4, typeId: {$lvData.page.id} {rdelim});"><em><b><i>{$lang.links}</i></b><span>{$lang.links}</span></em></a>
|
||||
<a href="javascript:;" id="view3D-button" class="button-red" onclick="this.blur(); ModelViewer.show({ldelim} type: 4, typeId: {$lvData.page.id}, equipList: {$lvData.view3D} {rdelim})"><em><b><i>{$lang.view3D}</i></b><span>{$lang.view3D}</span></em></a>
|
||||
<a href="javascript:;" class="button-red" onclick="this.blur(); su_addToSaved('{':'|implode:$lvData.compare.items}', {$lvData.compare.qty})"><em><b><i>{$lang.compare}</i></b><span>{$lang.compare}</span></em></a>
|
||||
<a href="{if $lvData.page.id > 0}http://old.wowhead.com/?{$query[0]}={$query[1]}{else}javascript:;{/if}" class="button-red{if $lvData.page.id < 0} button-red-disabled{/if}"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
|
||||
<h1>{$lvData.page.name}</h1>
|
||||
|
||||
{if $lvData.article}
|
||||
<div id="article-generic" class="left"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
Markup.printHtml("{$lvData.article}", "article-generic", {ldelim}mode:Markup.MODE_ARTICLE{rdelim});
|
||||
//]]></script>
|
||||
{/if}
|
||||
|
||||
{$lvData.page.description}
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{section name=i loop=$lvData.pieces}
|
||||
g_items.add({$lvData.pieces[i].id}, {ldelim}name_{$user.language}:'{$lvData.pieces[i].name|escape:'javascript'}', quality:{$lvData.pieces[i].quality}, icon:'{$lvData.pieces[i].icon}', jsonequip:{$lvData.pieces[i].json}{rdelim});
|
||||
{/section}
|
||||
//]]></script>
|
||||
|
||||
<table class="iconlist">
|
||||
{section name=i loop=$lvData.pieces}
|
||||
<tr><th align="right" id="iconlist-icon{$smarty.section.i.index + 1}"></th><td><span class="q{$lvData.pieces[i].quality}"><a href="?item={$lvData.pieces[i].id}">{$lvData.pieces[i].name}</a></span></td></tr>
|
||||
{/section}
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
{section name=i loop=$lvData.pieces}
|
||||
ge('iconlist-icon{$smarty.section.i.index + 1}').appendChild(g_items.createIcon({$lvData.pieces[i].id}, 0, 0));
|
||||
{/section}
|
||||
</script>
|
||||
|
||||
{if $lvData.page.unavailable}
|
||||
<div class="pad"></div><b style="color: red">{$lang._unavailable}</b>
|
||||
{/if}
|
||||
|
||||
<h3>{$lang._setBonuses}{$lvData.page.bonusExt}</h3>
|
||||
|
||||
{$lang._conveyBonus}
|
||||
<ul>
|
||||
{section name=i loop=$lvData.spells}
|
||||
<li><div>{$lvData.spells[i].bonus} {$lang._pieces}: <a href="?spell={$lvData.spells[i].id}">{$lvData.spells[i].desc}</a></div></li>
|
||||
{/section}
|
||||
</ul>
|
||||
|
||||
<h2 class="clear">Summary</h2>
|
||||
|
||||
<div id="summary-generic"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
new Summary({ldelim} id: 'itemset', template: 'itemset', parent: 'summary-generic', groups: [[[{']],[['|implode:$lvData.compare.items}]]], level: {$lvData.compare.level}{rdelim});
|
||||
//]]></script>
|
||||
|
||||
<h2 class="clear">{$lang.related}</h2>
|
||||
</div>
|
||||
|
||||
<div id="tabs-generic"></div>
|
||||
<div id="listview-generic" class="listview"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var tabsRelated = new Tabs({ldelim}parent: ge('tabs-generic'){rdelim});
|
||||
{if !empty($lvData.related)} {include file='bricks/listviews/itemset.tpl' data=$lvData.related.data params=$lvData.related.params} {/if}
|
||||
new Listview({ldelim}template: 'comment', id: 'comments', name: LANG.tab_comments, tabs: tabsRelated, parent: 'listview-generic', data: lv_comments{rdelim});
|
||||
new Listview({ldelim}template: 'screenshot', id: 'screenshots', name: LANG.tab_screenshots, tabs: tabsRelated, parent: 'listview-generic', data: lv_screenshots{rdelim});
|
||||
if (lv_videos.length || (g_user && g_user.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO)))
|
||||
new Listview({ldelim}template: 'video', id: 'videos', name: LANG.tab_videos, tabs: tabsRelated, parent: 'listview-generic', data: lv_videos{rdelim});
|
||||
tabsRelated.flush();
|
||||
//]]></script>
|
||||
|
||||
{include file='bricks/contribute.tpl'}
|
||||
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
{include file='footer.tpl'}
|
||||
@@ -1091,7 +1091,7 @@ Mapper.prototype = {
|
||||
var scroll = g_getScroll();
|
||||
|
||||
this.mouseX = Math.floor((e.clientX + scroll.x - c[0] - 3) / Mapper.sizes[this.zoom][0] * 1000) / 10;
|
||||
this.mouseY = Math.floor((e.clientY + scroll.y - c[1] - 3) / Mapper.sizes[this.zoom][1] * 1000) / 10;
|
||||
this.mouseY = Math.floor((e.clientY + scroll.y - c[1] - 3) / Mapper.sizes[this.zoom][1] * 1000) / 10;
|
||||
|
||||
if(this.mouseX < 0) this.mouseX = 0;
|
||||
else if(this.mouseX > 100) this.mouseX = 100;
|
||||
|
||||
@@ -1093,26 +1093,24 @@ Summary.prototype = {
|
||||
|
||||
if (col.id == 'name') {
|
||||
ae(th, this.selectLevel);
|
||||
if (this.editable) {
|
||||
|
||||
var s = ce('select');
|
||||
s.onchange = (function(s) {
|
||||
this.level = s.options[s.selectedIndex].value;
|
||||
this.refreshAll();
|
||||
}).bind(this, s);
|
||||
var s = ce('select');
|
||||
s.onchange = (function(s) {
|
||||
this.level = s.options[s.selectedIndex].value;
|
||||
this.refreshAll();
|
||||
}).bind(this, s);
|
||||
|
||||
for (var i = 80; i > 0; --i) {
|
||||
var o = ce('option');
|
||||
if (i == this.level) {
|
||||
o.selected = true;
|
||||
}
|
||||
st(o, i);
|
||||
ae(s, o);
|
||||
for (var i = 80; i > 0; --i) {
|
||||
var o = ce('option');
|
||||
if (i == this.level) {
|
||||
o.selected = true;
|
||||
}
|
||||
|
||||
ae(this.selectLevel, ct(LANG.su_level + ' '));
|
||||
ae(this.selectLevel, s);
|
||||
st(o, i);
|
||||
ae(s, o);
|
||||
}
|
||||
|
||||
ae(this.selectLevel, ct(LANG.su_level + ' '));
|
||||
ae(this.selectLevel, s);
|
||||
}
|
||||
|
||||
if (col.group) {
|
||||
|
||||
@@ -3267,7 +3267,7 @@ function su_addToSaved(c, d, a, e) {
|
||||
title: LANG.dialog_compare,
|
||||
width: 400,
|
||||
height: 138,
|
||||
buttons: ["okay", "cancel"],
|
||||
buttons: [['okay', LANG.ok], ['cancel', LANG.cancel]],
|
||||
fields: [{
|
||||
id: "selecteditems",
|
||||
type: "caption",
|
||||
@@ -14713,19 +14713,22 @@ var ModelViewer = new function() {
|
||||
|
||||
if (!optBak.noPound) {
|
||||
var url = '#modelviewer';
|
||||
switch (optBak.type) {
|
||||
case 1: // npc
|
||||
url += ':1:' + optBak.displayId + ':' + (optBak.humanoid | 0);
|
||||
break;
|
||||
case 2: // object
|
||||
url += ':2:' + optBak.displayId;
|
||||
break;
|
||||
case 3: // item
|
||||
url += ':3:' + optBak.displayId + ':' + (optBak.slot | 0);
|
||||
break;
|
||||
case 4: // item set
|
||||
url += ':4:' + equipList.join(';');
|
||||
break;
|
||||
var foo = ge('view3D-button');
|
||||
if (!foo) {
|
||||
switch (optBak.type) {
|
||||
case 1: // npc
|
||||
url += ':1:' + optBak.displayId + ':' + (optBak.humanoid | 0);
|
||||
break;
|
||||
case 2: // object
|
||||
url += ':2:' + optBak.displayId;
|
||||
break;
|
||||
case 3: // item
|
||||
url += ':3:' + optBak.displayId + ':' + (optBak.slot | 0);
|
||||
break;
|
||||
case 4: // item set
|
||||
url += ':4:' + equipList.join(';');
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (race && sex) {
|
||||
url += ':' + race + '+' + sex;
|
||||
@@ -15141,7 +15144,7 @@ var ModelViewer = new function() {
|
||||
readExtraPound(parts[1]);
|
||||
}
|
||||
else {
|
||||
var foo = ge('dsgndslgn464d');
|
||||
var foo = ge('view3D-button');
|
||||
if (foo) {
|
||||
foo.onclick();
|
||||
}
|
||||
@@ -16086,13 +16089,6 @@ var
|
||||
a.onclick = _processForm.bind(a, button[0]);
|
||||
a.className = 'dialog-' + button[0];
|
||||
ae(a, ct(button[1]));
|
||||
/* custom for lost buttons texture, no longer in use on 2.5.2012
|
||||
a.onclick = _processForm.bind(a, button);
|
||||
a.className = 'dialog-' + button;
|
||||
var sp = ce('span');
|
||||
sp.innerHTML = button;
|
||||
ae(a, sp);
|
||||
end custom */
|
||||
ae(dest, a);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user