Fix tests
This commit is contained in:
parent
cecbfb486b
commit
d2648d8db8
@ -132,13 +132,14 @@ public abstract class ProjectManager {
|
|||||||
_projectsMetadata.put(project.id, projectMetadata);
|
_projectsMetadata.put(project.id, projectMetadata);
|
||||||
if (_projectsTags == null)
|
if (_projectsTags == null)
|
||||||
_projectsTags = new HashMap<String, Integer>();
|
_projectsTags = new HashMap<String, Integer>();
|
||||||
|
if(projectMetadata.getTags()!=null) {
|
||||||
for (String tag : projectMetadata.getTags()) {
|
for (String tag : projectMetadata.getTags()) {
|
||||||
if (_projectsTags.containsKey(tag)) {
|
if (_projectsTags.containsKey(tag)) {
|
||||||
_projectsTags.put(tag, _projectsTags.get(tag) + 1);
|
_projectsTags.put(tag, _projectsTags.get(tag) + 1);
|
||||||
} else {
|
} else {
|
||||||
_projectsTags.put(tag, 1);
|
_projectsTags.put(tag, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ Refine.TagsManager.allProjectTags = [];
|
|||||||
|
|
||||||
Refine.TagsManager._getAllProjectTags = function() {
|
Refine.TagsManager._getAllProjectTags = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
if (self.allProjectTags.length == 0) {
|
if (self.allProjectTags.length === 0) {
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url : "command/core/get-all-project-tags",
|
url : "command/core/get-all-project-tags",
|
||||||
success : function(result) {
|
success : function(result) {
|
||||||
|
@ -282,8 +282,8 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
|||||||
|
|
||||||
$(tr.insertCell(tr.cells.length));
|
$(tr.insertCell(tr.cells.length));
|
||||||
var tags = project.tags;
|
var tags = project.tags;
|
||||||
for (var i = 0; i < tags.length; i++) {
|
for (var index = 0; index < tags.length; index++) {
|
||||||
var tag = tags[i];
|
var tag = tags[index];
|
||||||
$("<span/>")
|
$("<span/>")
|
||||||
.addClass("project-tag")
|
.addClass("project-tag")
|
||||||
.text(tag)
|
.text(tag)
|
||||||
@ -304,7 +304,7 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
|||||||
.click(function() {
|
.click(function() {
|
||||||
var oldTags = project.tags.join(",");
|
var oldTags = project.tags.join(",");
|
||||||
var newTags = window.prompt($.i18n._('core-index-open')["edit-tags-desc"],oldTags);
|
var newTags = window.prompt($.i18n._('core-index-open')["edit-tags-desc"],oldTags);
|
||||||
if (newTags === null || newTags == oldTags) {
|
if (newTags === null || newTags === oldTags) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
/* FILTERPORTFOLIO: pass in a class to show, all others will be hidden */
|
/* FILTERPORTFOLIO: pass in a class to show, all others will be hidden */
|
||||||
listElement.bind("filterMyList", function( e, classToShow ){
|
listElement.bind("filterMyList", function( e, classToShow ){
|
||||||
if(classToShow == settings.allTag){
|
if(classToShow === settings.allTag){
|
||||||
$(this).trigger("show");
|
$(this).trigger("show");
|
||||||
}else{
|
}else{
|
||||||
$(this).trigger("show", [ '.' + classToShow ] );
|
$(this).trigger("show", [ '.' + classToShow ] );
|
||||||
|
Loading…
Reference in New Issue
Block a user