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