Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't show complex values in adm_config_report
To save page space, don't show complex values in adm_config_report page. Use an on-demand retrieval of the content through a rest api call.
- Loading branch information
Showing
4 changed files
with
144 additions
and
52 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
# Mantis - a php based bugtracking system | ||
# Copyright 2000 - 2002 Kenzaburo Ito - kenito@300baud.org | ||
# Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net | ||
# Mantis is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Mantis is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Mantis. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
$(document).ready( function() { | ||
$('.adm_config_expand .expand_hide').hide().removeClass('hidden'); | ||
$('.adm_config_expand .expand_hide .toggle') | ||
.click(function(event) { | ||
event.preventDefault(); | ||
var container = $(this).closest('.adm_config_expand'); | ||
container.find('.expand_hide').hide(); | ||
container.find('.expand_show').show(); | ||
container.find('.expand_content').hide(); | ||
}); | ||
$('.adm_config_expand .expand_show .toggle') | ||
.click(function(event) { | ||
event.preventDefault(); | ||
var container = $(this).closest('.adm_config_expand'); | ||
container.find('.expand_hide').show(); | ||
container.find('.expand_show').hide(); | ||
// Load contents if not already done and display | ||
var content = container.find('.expand_content'); | ||
if (content[0].childElementCount == 0) { | ||
var req_data = { | ||
'config_id': container.data('config_id'), | ||
'project_id': container.data('project_id'), | ||
'user_id': container.data('user_id') | ||
}; | ||
content.load('api/rest/internal/config_display',req_data); | ||
} | ||
content.show(); | ||
}); | ||
}); |