mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
implemented 'serverside cookies'
minor: - icons in summary-dropdown menu - improved handling of non-standard specs for weight-presets (mostly due to Profiler) - probably some things i forgott... :x
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
var wt_presets = {
|
var wt_presets = {
|
||||||
1: {
|
1: {
|
||||||
pve: {
|
pve: {
|
||||||
// arms: {__icon:'ability_warrior_savageblow'},
|
arms: {__icon:'ability_rogue_eviscerate'},
|
||||||
fury: {__icon:'ability_warrior_innerrage',exprtng:100,str:82,critstrkrtng:66,agi:53,armorpenrtng:52,hitrtng:48,hastertng:36,atkpwr:31,armor:5},
|
fury: {__icon:'ability_warrior_innerrage',exprtng:100,str:82,critstrkrtng:66,agi:53,armorpenrtng:52,hitrtng:48,hastertng:36,atkpwr:31,armor:5},
|
||||||
prot: {__icon:'ability_warrior_defensivestance',sta:100,dodgertng:90,defrtng:86,block:81,agi:67,parryrtng:67,blockrtng:48,str:48,exprtng:19,hitrtng:10,armorpenrtng:10,critstrkrtng:7,armor:6,hastertng:1,atkpwr:1}
|
prot: {__icon:'ability_warrior_defensivestance',sta:100,dodgertng:90,defrtng:86,block:81,agi:67,parryrtng:67,blockrtng:48,str:48,exprtng:19,hitrtng:10,armorpenrtng:10,critstrkrtng:7,armor:6,hastertng:1,atkpwr:1}
|
||||||
}
|
}
|
||||||
@@ -16,8 +16,8 @@ var wt_presets = {
|
|||||||
3: {
|
3: {
|
||||||
pve: {
|
pve: {
|
||||||
beast: {__icon:'ability_hunter_beasttaming',rgddps:213,hitrtng:100,agi:58,critstrkrtng:40,int:37,atkpwr:30,armorpenrtng:28,hastertng:21},
|
beast: {__icon:'ability_hunter_beasttaming',rgddps:213,hitrtng:100,agi:58,critstrkrtng:40,int:37,atkpwr:30,armorpenrtng:28,hastertng:21},
|
||||||
marks: {__icon:'ability_hunter_focusedaim',rgddps:379,hitrtng:100,agi:74,critstrkrtng:57,armorpenrtng:40,int:39,atkpwr:32,hastertng:24},
|
marks: {__icon:'ability_marksmanship',rgddps:379,hitrtng:100,agi:74,critstrkrtng:57,armorpenrtng:40,int:39,atkpwr:32,hastertng:24},
|
||||||
surv: {__icon:'inv_spear_02',rgddps:181,hitrtng:100,agi:76,critstrkrtng:42,int:35,hastertng:31,atkpwr:29,armorpenrtng:26}
|
surv: {__icon:'ability_hunter_swiftstrike',rgddps:181,hitrtng:100,agi:76,critstrkrtng:42,int:35,hastertng:31,atkpwr:29,armorpenrtng:26}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
4: {
|
4: {
|
||||||
@@ -29,7 +29,7 @@ var wt_presets = {
|
|||||||
},
|
},
|
||||||
5: {
|
5: {
|
||||||
pve: {
|
pve: {
|
||||||
disc: {__icon:'spell_holy_powerwordshield',splpwr:100,manargn:67,int:65,hastertng:59,critstrkrtng:48,spi:22},
|
disc: {__icon:'spell_holy_wordfortitude',splpwr:100,manargn:67,int:65,hastertng:59,critstrkrtng:48,spi:22},
|
||||||
holy: {__icon:'spell_holy_guardianspirit',manargn:100,int:69,splpwr:60,spi:52,critstrkrtng:38,hastertng:31},
|
holy: {__icon:'spell_holy_guardianspirit',manargn:100,int:69,splpwr:60,spi:52,critstrkrtng:38,hastertng:31},
|
||||||
shadow: {__icon:'spell_shadow_shadowwordpain',hitrtng:100,shasplpwr:76,splpwr:76,critstrkrtng:54,hastertng:50,spi:16,int:16}
|
shadow: {__icon:'spell_shadow_shadowwordpain',hitrtng:100,shasplpwr:76,splpwr:76,critstrkrtng:54,hastertng:50,spi:16,int:16}
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ var wt_presets = {
|
|||||||
7: {
|
7: {
|
||||||
pve: {
|
pve: {
|
||||||
elem: {__icon:'spell_nature_lightning',hitrtng:100,splpwr:60,hastertng:56,critstrkrtng:40,int:11},
|
elem: {__icon:'spell_nature_lightning',hitrtng:100,splpwr:60,hastertng:56,critstrkrtng:40,int:11},
|
||||||
enhance: {__icon:'spell_shaman_improvedstormstrike',mledps:135,hitrtng:100,exprtng:84,agi:55,int:55,critstrkrtng:55,hastertng:42,str:35,atkpwr:32,splpwr:29,armorpenrtng:26},
|
enhance: {__icon:'spell_nature_lightningshield',mledps:135,hitrtng:100,exprtng:84,agi:55,int:55,critstrkrtng:55,hastertng:42,str:35,atkpwr:32,splpwr:29,armorpenrtng:26},
|
||||||
resto: {__icon:'spell_nature_magicimmunity',manargn:100,int:85,splpwr:77,critstrkrtng:62,hastertng:35}
|
resto: {__icon:'spell_nature_magicimmunity',manargn:100,int:85,splpwr:77,critstrkrtng:62,hastertng:35}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -66,9 +66,9 @@ var wt_presets = {
|
|||||||
11: {
|
11: {
|
||||||
pve: {
|
pve: {
|
||||||
balance: {__icon:'spell_nature_starfall',hitrtng:100,splpwr:66,hastertng:54,critstrkrtng:43,spi:22,int:22},
|
balance: {__icon:'spell_nature_starfall',hitrtng:100,splpwr:66,hastertng:54,critstrkrtng:43,spi:22,int:22},
|
||||||
feraldps: {__icon:'ability_druid_catform',agi:100,armorpenrtng:90,str:80,critstrkrtng:55,exprtng:50,hitrtng:50,feratkpwr:40,atkpwr:40,hastertng:35},
|
|
||||||
feraltank: {__icon:'ability_racial_bearform',agi:100,sta:75,dodgertng:65,defrtng:60,exprtng:16,str:10,armor:10,hitrtng:8,hastertng:5,atkpwr:4,feratkpwr:4,critstrkrtng:3},
|
feraltank: {__icon:'ability_racial_bearform',agi:100,sta:75,dodgertng:65,defrtng:60,exprtng:16,str:10,armor:10,hitrtng:8,hastertng:5,atkpwr:4,feratkpwr:4,critstrkrtng:3},
|
||||||
resto: {__icon:'spell_nature_healingtouch',splpwr:100,manargn:73,hastertng:57,int:51,spi:32,critstrkrtng:11}
|
resto: {__icon:'spell_nature_healingtouch',splpwr:100,manargn:73,hastertng:57,int:51,spi:32,critstrkrtng:11},
|
||||||
|
feraldps: {__icon:'ability_druid_catform',agi:100,armorpenrtng:90,str:80,critstrkrtng:55,exprtng:50,hitrtng:50,feratkpwr:40,atkpwr:40,hastertng:35}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ class User
|
|||||||
'name' => self::$displayName ? self::$displayName : '',
|
'name' => self::$displayName ? self::$displayName : '',
|
||||||
'perms' => self::$perms ? self::$perms : 0,
|
'perms' => self::$perms ? self::$perms : 0,
|
||||||
'roles' => self::$groups ? self::$groups : 0,
|
'roles' => self::$groups ? self::$groups : 0,
|
||||||
|
'cookies' => []
|
||||||
);
|
);
|
||||||
|
|
||||||
if (self::$id > 0)
|
if (self::$id > 0)
|
||||||
@@ -280,7 +281,8 @@ class User
|
|||||||
'avatar' => self::$avatar,
|
'avatar' => self::$avatar,
|
||||||
'community' => self::$description,
|
'community' => self::$description,
|
||||||
'chars' => self::getCharacters(),
|
'chars' => self::getCharacters(),
|
||||||
'profiles' => self::getProfiles()
|
'profiles' => self::getProfiles(),
|
||||||
|
'cookies' => self::getCookies(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($_ = self::getWeightScales())
|
if ($_ = self::getWeightScales())
|
||||||
@@ -328,10 +330,10 @@ class User
|
|||||||
// todo: do after profiler
|
// todo: do after profiler
|
||||||
// existing chars on realm(s)
|
// existing chars on realm(s)
|
||||||
if ($asJSON)
|
if ($asJSON)
|
||||||
$chars = '[{"name":"ExampleChar", "realmname":"Example Realm", "region":"eu", "realm":"exrealm", icon:"inv_axe_04", "race":4, "gender":0, "classs":11, "level":80}]';
|
$chars = '[{"name":"ExampleChar", "realmname":"Example Realm", "region":"eu", "realm":"exrealm", icon:"inv_axe_04", "race":4, "gender":0, "classs":11, "level":80, "pinned":1}]';
|
||||||
else
|
else
|
||||||
$chars = array(
|
$chars = array(
|
||||||
array("name" => "ExampleChar", "realmname" => "Example Realm", "region" => "eu", "realm" => "exrealm", "icon" => "inv_axe_04", "race" => 4, "gender" => 0, "classs" => 11, "level" => 80)
|
array("name" => "ExampleChar", "realmname" => "Example Realm", "region" => "eu", "realm" => "exrealm", "icon" => "inv_axe_04", "race" => 4, "gender" => 0, "classs" => 11, "level" => 80, "pinned" => 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
self::$characters = $chars;
|
self::$characters = $chars;
|
||||||
@@ -358,6 +360,16 @@ class User
|
|||||||
return self::$profiles;
|
return self::$profiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getCookies()
|
||||||
|
{
|
||||||
|
$data = [];
|
||||||
|
|
||||||
|
if (self::$id)
|
||||||
|
$data = DB::Aowow()->selectCol('SELECT name AS ARRAY_KEY, data FROM ?_account_cookies WHERE userId = ?d', self::$id);
|
||||||
|
|
||||||
|
return json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
public static function writeCookie()
|
public static function writeCookie()
|
||||||
{
|
{
|
||||||
$cookie = self::$localeId.count(dechex(self::$id)).dechex(self::$id).base64_encode(self::$passHash);
|
$cookie = self::$localeId.count(dechex(self::$id)).dechex(self::$id).base64_encode(self::$passHash);
|
||||||
|
|||||||
31
index.php
31
index.php
@@ -55,6 +55,8 @@ switch ($pageCall)
|
|||||||
case 'races':
|
case 'races':
|
||||||
case 'skill':
|
case 'skill':
|
||||||
case 'skills':
|
case 'skills':
|
||||||
|
// case 'sound': // db: sounds for zone, creature, spell, ...
|
||||||
|
// case 'sounds':
|
||||||
case 'spell':
|
case 'spell':
|
||||||
case 'spells':
|
case 'spells':
|
||||||
case 'title':
|
case 'title':
|
||||||
@@ -73,23 +75,26 @@ switch ($pageCall)
|
|||||||
require 'pages/talent.php';
|
require 'pages/talent.php';
|
||||||
break;
|
break;
|
||||||
/* called by script */
|
/* called by script */
|
||||||
case 'contactus':
|
case 'cookie': // lossless cookies and user settings
|
||||||
if ($pageCall == 'contactus')
|
if (User::$id && $pageParam && !empty($_GET[$pageParam]))
|
||||||
{
|
{
|
||||||
// 0:ok; 1:captchaInvalid; 2:tooLong; 3:noReasonGiven; 7:alreadyReported; other:prints String
|
// don't panic .. again .... it get's escaped
|
||||||
die("not yet implemented:\n".print_r($_POST));
|
if (DB::Aowow()->query('REPLACE INTO ?_account_cookies VALUES (?d, ?, ?)', User::$id, $pageParam, urldecode($_GET[$pageParam])))
|
||||||
|
die('0'); // 0: success
|
||||||
|
else
|
||||||
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'contactus':
|
||||||
|
die("not yet implemented:\n".print_r($_POST)); // 0:ok; 1:captchaInvalid; 2:tooLong; 3:noReasonGiven; 7:alreadyReported; other:prints String
|
||||||
case 'comment':
|
case 'comment':
|
||||||
if ($pageParam == 'rating')
|
if ($pageParam == 'rating')
|
||||||
{
|
|
||||||
// why is this called via index...?
|
|
||||||
die('{"success":true,"error":"","up":7,"down":9}');
|
die('{"success":true,"error":"","up":7,"down":9}');
|
||||||
}
|
|
||||||
else if ($pageParam == 'rate')
|
else if ($pageParam == 'rate')
|
||||||
{
|
die('3'); // 0:success, 1:ratingban, 3:rated too often
|
||||||
// 0:success, 1:ratingban, 3:rated too often
|
|
||||||
die('3');
|
break;
|
||||||
}
|
|
||||||
case 'locale': // subdomain-workaround, change the language
|
case 'locale': // subdomain-workaround, change the language
|
||||||
User::setLocale($pageParam);
|
User::setLocale($pageParam);
|
||||||
User::writeCookie();
|
User::writeCookie();
|
||||||
@@ -117,13 +122,13 @@ switch ($pageCall)
|
|||||||
case 'build':
|
case 'build':
|
||||||
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
||||||
{
|
{
|
||||||
require 'setup/tools/dataset-assembler/'.$pageParam.'.php';
|
require 'setup/tools/dataset/'.$pageParam.'.php';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'sql':
|
case 'sql':
|
||||||
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
||||||
{
|
{
|
||||||
require 'setup/tools/sql/_'.$pageParam.'.php';
|
require 'setup/tools/database/_'.$pageParam.'.php';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'setup':
|
case 'setup':
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ $pageData = array(
|
|||||||
['path' => 'template/css/Summary_ie6.css', 'ieCond' => 'lte IE 6'],
|
['path' => 'template/css/Summary_ie6.css', 'ieCond' => 'lte IE 6'],
|
||||||
),
|
),
|
||||||
'reqJS' => array(
|
'reqJS' => array(
|
||||||
|
'template/js/profile.js',
|
||||||
'template/js/Draggable.js',
|
'template/js/Draggable.js',
|
||||||
'template/js/filters.js',
|
'template/js/filters.js',
|
||||||
'template/js/Summary.js',
|
'template/js/Summary.js',
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
id:{$user.id},
|
id:{$user.id},
|
||||||
name:'{$user.name|escape:"quotes"}',
|
name:'{$user.name|escape:"quotes"}',
|
||||||
roles:{$user.roles},
|
roles:{$user.roles},
|
||||||
permissions:{$user.perms}
|
permissions:{$user.perms},
|
||||||
|
cookies: {$user.cookies}
|
||||||
{if isset($user.chars)}, characters: {$user.chars} {/if}
|
{if isset($user.chars)}, characters: {$user.chars} {/if}
|
||||||
{if isset($user.profiles)}, profiles: {$user.profiles}{/if}
|
{if isset($user.profiles)}, profiles: {$user.profiles}{/if}
|
||||||
{if isset($user.weights)}, weightscales: {$user.weights}{/if}
|
{if isset($user.weights)}, weightscales: {$user.weights}{/if}
|
||||||
|
|||||||
@@ -713,8 +713,10 @@ Mapper.prototype = {
|
|||||||
this.sZoom.style.display = 'none';
|
this.sZoom.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* sarjuuk: thats one feature i never understood. the inflatable map is superior to the popup in every way possible
|
||||||
if(this.zoom)
|
if(this.zoom)
|
||||||
MapViewer.show({ mapper: this });
|
MapViewer.show({ mapper: this });
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
|
|
||||||
getShow: function() { return this.show; },
|
getShow: function() { return this.show; },
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ function Summary(opt) {
|
|||||||
this.level = parseInt(GET.l);
|
this.level = parseInt(GET.l);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var l = $WH.gc('compare_level');
|
var l = g_getWowheadCookie('compare_level');
|
||||||
if (l) {
|
if (l) {
|
||||||
this.level = l;
|
this.level = l;
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ function Summary(opt) {
|
|||||||
this.readGroups(GET.compare);
|
this.readGroups(GET.compare);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.readGroups($WH.gc('compare_groups'));
|
this.readGroups(g_getWowheadCookie('compare_groups'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ function Summary(opt) {
|
|||||||
this.readWeights(GET.weights);
|
this.readWeights(GET.weights);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.readWeights($WH.gc('compare_weights'));
|
this.readWeights(g_getWowheadCookie('compare_weights'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1298,10 +1298,10 @@ Summary.prototype = {
|
|||||||
|
|
||||||
// Enchant
|
// Enchant
|
||||||
if (this.canBeEnchanted(g_items[itemId].jsonequip.slotbak, g_items[itemId].jsonequip.subclass)) {
|
if (this.canBeEnchanted(g_items[itemId].jsonequip.slotbak, g_items[itemId].jsonequip.subclass)) {
|
||||||
var _ = [0, (item[2] ? LANG.pr_menu_repenchant : LANG.pr_menu_addenchant), this.openEnchantPicker.bind(this, col, i)];
|
var _ = [0, (item[2] ? LANG.pr_menu_repenchant : LANG.pr_menu_addenchant), this.openEnchantPicker.bind(this, col, i), null, {}];
|
||||||
|
|
||||||
if (item[2] && g_enchants[item[2]]) {
|
if (item[2] && g_enchants[item[2]]) {
|
||||||
_.tinyIcon = g_enchants[item[2]].icon;
|
_[4].tinyIcon = g_enchants[item[2]].icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.push(_);
|
menu.push(_);
|
||||||
@@ -1313,13 +1313,13 @@ Summary.prototype = {
|
|||||||
var
|
var
|
||||||
gemId = (item[k + 4] > 0 ? item[k + 4] : 0),
|
gemId = (item[k + 4] > 0 ? item[k + 4] : 0),
|
||||||
c = (extraSocket && k == len3 - 1 ? 14 : g_items[itemId].jsonequip['socket' + (k + 1)]),
|
c = (extraSocket && k == len3 - 1 ? 14 : g_items[itemId].jsonequip['socket' + (k + 1)]),
|
||||||
_ = [0, (gemId ? LANG.pr_menu_repgem : LANG.pr_menu_addgem), this.openGemPicker.bind(this, col, i, 4 + k, c)];
|
_ = [0, (gemId ? LANG.pr_menu_repgem : LANG.pr_menu_addgem), this.openGemPicker.bind(this, col, i, 4 + k, c), null, {}];
|
||||||
|
|
||||||
if (gemId) {
|
if (gemId) {
|
||||||
_.tinyIcon = g_gems[gemId].icon;
|
_[4].tinyIcon = g_gems[gemId].icon;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_.socketColor = c;
|
_[4].socketColor = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.push(_);
|
menu.push(_);
|
||||||
@@ -1648,12 +1648,9 @@ Summary.prototype = {
|
|||||||
saveComparison: function(refresh) {
|
saveComparison: function(refresh) {
|
||||||
window.onbeforeunload = null;
|
window.onbeforeunload = null;
|
||||||
|
|
||||||
// g_setWowheadCookie('compare_groups', this.getGroupData(), true);
|
g_setWowheadCookie('compare_groups', this.getGroupData(), true);
|
||||||
$WH.sc('compare_groups', 20, this.getGroupData(), '/', location.hostname);
|
g_setWowheadCookie('compare_weights', $WH.rtrim(this.getWeightData(1).join(';'), ';'), true);
|
||||||
// g_setWowheadCookie('compare_weights', $WH.rtrim(this.getWeightData(1).join(';'), ';'), true);
|
g_setWowheadCookie('compare_level', this.level, true);
|
||||||
$WH.sc('compare_weights', 20, $WH.rtrim(this.getWeightData(1).join(';'), ';'), '/', location.hostname);
|
|
||||||
// g_setWowheadCookie('compare_level', this.level, true);
|
|
||||||
$WH.sc('compare_level', 20, this.level, '/', location.hostname);
|
|
||||||
|
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
document.location.href = '?compare'
|
document.location.href = '?compare'
|
||||||
@@ -2046,7 +2043,7 @@ Summary.prototype = {
|
|||||||
a = this.createControl(LANG.su_autosaving, null, 'autosave-icon selected');
|
a = this.createControl(LANG.su_autosaving, null, 'autosave-icon selected');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($WH.gc('compare_groups')) {
|
if (g_getWowheadCookie('compare_groups')) {
|
||||||
a = this.createControl(LANG.su_viewsaved, 'su_viewsaved', 'save-icon', this.viewSavedComparison.bind(this, 1));
|
a = this.createControl(LANG.su_viewsaved, 'su_viewsaved', 'save-icon', this.viewSavedComparison.bind(this, 1));
|
||||||
$WH.ae(div, a);
|
$WH.ae(div, a);
|
||||||
}
|
}
|
||||||
@@ -2464,11 +2461,12 @@ Summary.prototype = {
|
|||||||
|
|
||||||
$WH.aE(this.searchName, 'keyup', this.onSearchKeyUp.bind(this, 333));
|
$WH.aE(this.searchName, 'keyup', this.onSearchKeyUp.bind(this, 333));
|
||||||
$WH.aE(this.searchName, 'keydown', this.onSearchKeyDown.bind(this));
|
$WH.aE(this.searchName, 'keydown', this.onSearchKeyDown.bind(this));
|
||||||
|
|
||||||
$WH.ae(sm, this.searchName);
|
$WH.ae(sm, this.searchName);
|
||||||
|
|
||||||
this.searchMsg = sp;
|
this.searchMsg = sp;
|
||||||
this.searchMsg.style.fontWeight = 'bold';
|
this.searchMsg.style.fontWeight = 'bold';
|
||||||
$WH.ae(sm, this.searchMsg);
|
$WH.ae(sm, this.searchMsg);
|
||||||
|
|
||||||
$WH.ae(div, sm);
|
$WH.ae(div, sm);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -3217,7 +3215,7 @@ Summary.prototype = {
|
|||||||
|
|
||||||
searchItems: function(search, type) {
|
searchItems: function(search, type) {
|
||||||
var
|
var
|
||||||
lv = g_listviews.items,
|
lv = g_listviews.items,
|
||||||
_this = this,
|
_this = this,
|
||||||
searchResults = [{ none: 1 }];
|
searchResults = [{ none: 1 }];
|
||||||
|
|
||||||
@@ -3236,7 +3234,7 @@ Summary.prototype = {
|
|||||||
new Ajax('?search=' + $WH.urlencode(search) + '&json&type=' + type + pr_getScaleFilter(this.currentScale, 1), {
|
new Ajax('?search=' + $WH.urlencode(search) + '&json&type=' + type + pr_getScaleFilter(this.currentScale, 1), {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
search: search,
|
search: search,
|
||||||
onSuccess: function(xhr, opt) {
|
onSuccess: function (xhr, opt) {
|
||||||
var text = xhr.responseText;
|
var text = xhr.responseText;
|
||||||
if (text.charAt(0) != '[' || text.charAt(text.length - 1) != ']') {
|
if (text.charAt(0) != '[' || text.charAt(text.length - 1) != ']') {
|
||||||
return;
|
return;
|
||||||
@@ -3245,7 +3243,7 @@ Summary.prototype = {
|
|||||||
var a = eval(text);
|
var a = eval(text);
|
||||||
if (search == opt.search && a.length == 3 && a[1].length) {
|
if (search == opt.search && a.length == 3 && a[1].length) {
|
||||||
for (var i = 0, len = a[1].length; i < len; ++i) {
|
for (var i = 0, len = a[1].length; i < len; ++i) {
|
||||||
var row = {};
|
var row = {};
|
||||||
row.id = a[1][i].id;
|
row.id = a[1][i].id;
|
||||||
row.name = row['name_' + g_locale.name] = a[1][i].name.substring(1);
|
row.name = row['name_' + g_locale.name] = a[1][i].name.substring(1);
|
||||||
row.quality = 7 - a[1][i].name.charAt(0);
|
row.quality = 7 - a[1][i].name.charAt(0);
|
||||||
@@ -5076,35 +5074,3 @@ Listview.templates.gempicker = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
/* sarjuuk: bandaid .. belongs to profile.js */
|
|
||||||
function pr_getScaleFilter(scale, noFilter) {
|
|
||||||
var temp = [];
|
|
||||||
|
|
||||||
if (scale) {
|
|
||||||
for (var i = 0, len = fi_filters.items.length; i < len; ++i) {
|
|
||||||
var f = fi_filters.items[i];
|
|
||||||
|
|
||||||
if (LANG.traits[f.name] && scale[f.name]) {
|
|
||||||
temp.push([f.id, scale[f.name]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
temp.sort(function(a, b) {
|
|
||||||
return -$WH.strcmp(a[1], b[1]);
|
|
||||||
});
|
|
||||||
|
|
||||||
var wt = [], wtv = [];
|
|
||||||
for (var i = 0, len = temp.length; i < len; ++i) {
|
|
||||||
wt.push(temp[i][0]);
|
|
||||||
wtv.push(temp[i][1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wt.length && wtv.length) {
|
|
||||||
return (noFilter ? '&' : ';gm=3;rf=1;') + 'wt=' + wt.join(':') + (noFilter ? '&' : ';') + 'wtv=' + wtv.join(':');
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ $WH.array_unique = function(a) {
|
|||||||
|
|
||||||
// Get element
|
// Get element
|
||||||
$WH.ge = function(z) {
|
$WH.ge = function(z) {
|
||||||
if(typeof z != 'string') {
|
if (typeof z != 'string') {
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,7 +545,7 @@ $WH.gc = function(z) {
|
|||||||
// Prevent element from being selected/dragged (IE only)
|
// Prevent element from being selected/dragged (IE only)
|
||||||
$WH.ns = function(a) {
|
$WH.ns = function(a) {
|
||||||
if ($WH.Browser.ie6789) {
|
if ($WH.Browser.ie6789) {
|
||||||
a.onfocus = tb;
|
a.onfocus = $WH.tb;
|
||||||
a.onmousedown = a.onselectstart = a.ondragstart = $WH.rf;
|
a.onmousedown = a.onselectstart = a.ondragstart = $WH.rf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1206,7 +1206,7 @@ $WH.g_convertScalingFactor = function(level, factor, dist, stat, json) {
|
|||||||
var scalingValues = $WH.g_convertScalingFactor.SV;
|
var scalingValues = $WH.g_convertScalingFactor.SV;
|
||||||
var scalingDistributions = $WH.g_convertScalingFactor.SD;
|
var scalingDistributions = $WH.g_convertScalingFactor.SD;
|
||||||
|
|
||||||
if(!scalingValues[level]) {
|
if (!scalingValues[level]) {
|
||||||
if (g_user.roles & U_GROUP_ADMIN) {
|
if (g_user.roles & U_GROUP_ADMIN) {
|
||||||
alert('There are no item scaling values for level ' + level);
|
alert('There are no item scaling values for level ' + level);
|
||||||
}
|
}
|
||||||
@@ -1765,7 +1765,7 @@ $WH.Tooltip = {
|
|||||||
c[0].style.whiteSpace = 'nowrap';
|
c[0].style.whiteSpace = 'nowrap';
|
||||||
|
|
||||||
var m = parseInt(tooltip.style.width);
|
var m = parseInt(tooltip.style.width);
|
||||||
if(!tooltip.slider || !m) {
|
if (!tooltip.slider || !m) {
|
||||||
if (c[1].offsetWidth > 300) {
|
if (c[1].offsetWidth > 300) {
|
||||||
m = Math.max(300, c[0].offsetWidth) + 20;
|
m = Math.max(300, c[0].offsetWidth) + 20;
|
||||||
}
|
}
|
||||||
@@ -1780,7 +1780,7 @@ $WH.Tooltip = {
|
|||||||
tooltip.style.width = m + 'px';
|
tooltip.style.width = m + 'px';
|
||||||
c[0].style.width = c[1].style.width = '100%';
|
c[0].style.width = c[1].style.width = '100%';
|
||||||
|
|
||||||
if(tooltip.slider) {
|
if (tooltip.slider) {
|
||||||
Slider.setSize(tooltip.slider, m - 6);
|
Slider.setSize(tooltip.slider, m - 6);
|
||||||
tooltip.className += ' tooltip-slider';
|
tooltip.className += ' tooltip-slider';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1190,6 +1190,10 @@ function fi_presetMatch(weights, stealth) {
|
|||||||
for (var l in wt_presets) {
|
for (var l in wt_presets) {
|
||||||
for (var k in wt_presets[l]) {
|
for (var k in wt_presets[l]) {
|
||||||
for (var v in wt_presets[l][k]) {
|
for (var v in wt_presets[l][k]) {
|
||||||
|
if (Object.keys(wt_presets[l][k][v]).length == 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
p = fi_convertWeights(wt_presets[l][k][v]);
|
p = fi_convertWeights(wt_presets[l][k][v]);
|
||||||
|
|
||||||
var match = true;
|
var match = true;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user