Fix tests

This commit is contained in:
xseris 2017-11-28 00:16:08 +01:00
parent cecbfb486b
commit d2648d8db8
4 changed files with 13 additions and 12 deletions

View File

@ -132,7 +132,7 @@ public abstract class ProjectManager {
_projectsMetadata.put(project.id, projectMetadata);
if (_projectsTags == null)
_projectsTags = new HashMap<String, Integer>();
if(projectMetadata.getTags()!=null) {
for (String tag : projectMetadata.getTags()) {
if (_projectsTags.containsKey(tag)) {
_projectsTags.put(tag, _projectsTags.get(tag) + 1);
@ -142,6 +142,7 @@ public abstract class ProjectManager {
}
}
}
}
/**
* Load project metadata from data storage

View File

@ -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) {

View File

@ -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({

View File

@ -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 ] );