Last active
March 12, 2016 05:37
-
-
Save zx1986/62472611967fa0c272c2 to your computer and use it in GitHub Desktop.
Custom Redmine Parent Task Title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.each( $('td.parent'), function(key, element) { | |
var tmp = $(element).find('a'); | |
$(element).html(tmp); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("td.parent").each(function ( index ) { | |
if( $(this).html() ) { | |
var content = $(this).html().split(':'); | |
$(this).html(content[0]); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("td.parent").each(function ( index ) { | |
if( $(this).html() ) { | |
var content = $(this).html().split(':'); | |
$(this).html(content[0]); | |
} | |
}); | |
var cate_indexs = []; | |
$("select#project_quick_jump_box option").text( | |
function(index, text) { | |
var project_name = text.trim(); | |
if ( !project_name.startsWith('»') && | |
index !== 0 && index !== 1 | |
) { | |
cate_indexs.push(index); | |
} | |
} | |
); | |
$("#quick-search").append( document.createElement( "br" ) ); | |
for (i = 0; i < cate_indexs.length; i++) { | |
var key_ = cate_indexs[i+1]; | |
var key = cate_indexs[i]; | |
var new_id = 'box' + key.toString(); | |
var box = $("#project_quick_jump_box").clone(); | |
$(box).attr('id', new_id); | |
$(box).appendTo($("#quick-search")); | |
$('select#' + new_id + ' option').text( | |
function(index, text) { | |
if (index < key) { $(this).remove(); } | |
if (index >= key_) { $(this).remove(); } | |
} | |
); | |
} | |
$("#header").height('140px'); | |
$("#main-menu").css('top', '144px'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment