Skip to content

Instantly share code, notes, and snippets.

@zx1986 zx1986/issues_list.js
Last active Mar 12, 2016

Embed
What would you like to do?
Custom Redmine Parent Task Title
$.each( $('td.parent'), function(key, element) {
var tmp = $(element).find('a');
$(element).html(tmp);
});
$("td.parent").each(function ( index ) {
if( $(this).html() ) {
var content = $(this).html().split(':');
$(this).html(content[0]);
}
});
$("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
You can’t perform that action at this time.