Commits

Sylvain Rouquette committed 4303fe9

added arrows to move skills

Comments (0)

Files changed (3)

 
 var FILTER_SKILL_LI = '\
 	<li class="skill" data-skill="{slug_skill}">\
+		<div class="move">\
+			<a href="#" class="up icon-16 icon-16-uarrow">up</a>\
+			<a href="#" class="down icon-16 icon-16-darrow">do</a>\
+		</div>\
 		<a class="desc" href="{href_skill}" data-hash="{hash_skill}" target="blank_">\
 			<div>\
 				<span class="d3-icon d3-icon-skill d3-icon-skill-42" style="background-image: url(\'{icon_skill}\');">\
 		else if ($('#build .skills').children().length >= 6)
 			return false;
 		else {
+			skill.attr('style', '');
 			skill.attr('href', $(this).attr('href'));
 			$('#build .skills').append(skill);
 		}
 	});
 
 	$('#build .skills a').live('click', function() {
+		if ($(this).parent().hasClass('move'))
+			return false;
 		$(this).parents('.skill').remove();
 		refreshUrl();
 		return false;
 	});
+	$('#build .skills .up').live('click', function() {
+		if ($(this).parent().parent().prev()) {
+			$(this).parent().parent().after($(this).parent().parent().prev());
+			refreshUrl();
+		}
+	});
+	$('#build .skills .down').live('click', function() {
+		if ($(this).parents().parent().next()) {
+			$(this).parent().parent().before($(this).parent().parent().next());
+			refreshUrl();
+		}
+	});
 }
 
 
 		var cssUrl = URL_CSS.replace('{region}', scriptRegion || 'us');
 
 		$.getStyle(cssUrl + 'tooltips.css');
+		//$.getStyle(cssUrl + 'd3.css');
 		if($.Browser.ie6) {
 			$.getStyle(cssUrl + 'tooltips-ie6.css');
 		}
 	overflow-y: auto;
 	clear: both;
 }
-#filter .rune_name {
+#filter .rune_name,
+#filter .move {
 	display: none;
 }
 .skill {
 .runes li {
 	float: right;
 }
+#build .move {
+	float: left;
+	opacity: 0.1;
+}
+#build .move:hover {
+	opacity: 1;
+}
+#build .up, #build .down {
+	display: block;
+	text-decoration: none;
+	margin: 6px 0px;
+}
 #build .skills {
 	text-align: left;
 }
 #build .legend, #build .traits {
-	display: inline-block;
+	display: inline-block !important;
 }
 #build .legend {
 	position: relative;
 }
 #build .traits li {
 	background-color: #000;
-	display: inline;
+	display: inline !important;
 }
 #build .traits .desc {
-	display: inline;
+	display: inline !important;
 	width: auto;
 }
 .rune_name {
 	display: none !important;
 }
 
+/* taken from d3.css */
+.icon-16 { display: inline-block; width: 24px; height: 24px; vertical-align: middle; background: url("img/sprite.png") no-repeat; font-size: 1px; }
+.icon-16 { width: 16px; height: 16px; }
+
+/* mini */
+.icon-16-plus { background-position: -52px 0; }
+.icon-16-rarrow { background-position: -52px -16px; }
+.icon-16-larrow { background-position: -52px -32px; }
+.icon-16-uarrow { background-position: -52px -48px; }
+.icon-16-darrow { background-position: -52px -64px; }
+.icon-16-close { background-position: -52px -80px; }
+.icon-16-return { background-position: -52px -96px; }
+.icon-16-jump { background-position: -52px -112px; }
+.icon-16-rarrow-small { background-position: -52px -128px; }
+.icon-16-gold { background-position: -52px -288px; }
+.icon-16-reset { background-position: -52px -304px; }
+.icon-16-search { background-position: -52px -320px; }
+
+a:hover .icon-16-plus { background-position: -68px 0; }
+a:hover .icon-16-rarrow { background-position: -68px -16px; }
+a:hover .icon-16-larrow { background-position: -68px -32px; }
+a:hover .icon-16-uarrow { background-position: -68px -48px; }
+a:hover .icon-16-darrow { background-position: -68px -64px; }
+a:hover .icon-16-close { background-position: -68px -80px; }
+a:hover .icon-16-return { background-position: -68px -96px; }
+a:hover .icon-16-jump { background-position: -68px -112px; }
+a:hover .icon-16-rarrow-small { background-position: -68px -128px; }
+