From 51ff02433798a9a2396bb5da2020a46c3be3327f Mon Sep 17 00:00:00 2001 From: gschwab Date: Wed, 9 Apr 2014 09:48:36 +0200 Subject: [PATCH] removed userProfileView.* --- .../frontend/js/templates/userProfileView.ejs | 93 ----------------- .../frontend/js/views/userProfileView.js | 99 ------------------- js/apps/system/aardvark/test/karma/files.json | 4 - 3 files changed, 196 deletions(-) delete mode 100644 js/apps/system/aardvark/frontend/js/templates/userProfileView.ejs delete mode 100644 js/apps/system/aardvark/frontend/js/views/userProfileView.js diff --git a/js/apps/system/aardvark/frontend/js/templates/userProfileView.ejs b/js/apps/system/aardvark/frontend/js/templates/userProfileView.ejs deleted file mode 100644 index 0129ac64af..0000000000 --- a/js/apps/system/aardvark/frontend/js/templates/userProfileView.ejs +++ /dev/null @@ -1,93 +0,0 @@ - diff --git a/js/apps/system/aardvark/frontend/js/views/userProfileView.js b/js/apps/system/aardvark/frontend/js/views/userProfileView.js deleted file mode 100644 index b5f32b1336..0000000000 --- a/js/apps/system/aardvark/frontend/js/views/userProfileView.js +++ /dev/null @@ -1,99 +0,0 @@ -/*jslint indent: 2, nomen: true, maxlen: 100, vars: true, white: true, plusplus: true */ -/*global window, document, Backbone, EJS, SwaggerUi */ -/*global hljs, $, arangoHelper, templateEngine, CryptoJS */ -(function() { - - "use strict"; - - window.userProfileView = Backbone.View.extend({ - el: '#content', - - template: templateEngine.createTemplate("userProfileView.ejs"), - - events: { - "click #profileContent" : "editUserProfile", - "click #submitEditUserProfile" : "submitEditUserProfile" - }, - - initialize: function() { - this.collection.fetch({async:false}); - this.user = this.collection.findWhere({loggedIn: true}); - }, - - render: function(){ - var img = this.getAvatarSource(this.user.get("extra").img); - $(this.el).html(this.template.render({ - img : img, - name : this.user.get("extra").name, - username : this.user.get("user") - - })); - - $("[data-toggle=tooltip]").tooltip(); - - $('.modalInfoTooltips').tooltip({ - placement: "left" - }); - - return this; - }, - - editUserProfile : function() { - this.collection.fetch(); - $('#editUsername').html(this.user.get("user")); - $('#editName').val(this.user.get("extra").name); - $('#editUserProfileImg').val(this.user.get("extra").img); - - this.showModal('#editUserProfileModal'); - }, - - submitEditUserProfile : function() { - var name = $('#editName').val(); - var img = $('#editUserProfileImg').val(); - - img = this.parseImgString(img); -/* if (!this.validateName(name)) { - $('#editName').closest("th").css("backgroundColor", "red"); - return; - }*/ - - this.user.save({"extra": {"name":name, "img":img}}); - this.hideModal('#editUserProfileModal'); - this.updateUserProfile(); - }, - - updateUserProfile: function() { - var self = this; - this.collection.fetch({ - success: function() { - self.render(); - } - }); - }, - - - - showModal: function(dialog) { - $(dialog).modal('show'); - }, - - hideModal: function(dialog) { - $(dialog).modal('hide'); - }, - - - getAvatarSource: function(img) { - var result = ''; - return result; - } - - }); -}()); diff --git a/js/apps/system/aardvark/test/karma/files.json b/js/apps/system/aardvark/test/karma/files.json index c9e6ea0eb8..61ef9b8ce7 100755 --- a/js/apps/system/aardvark/test/karma/files.json +++ b/js/apps/system/aardvark/test/karma/files.json @@ -163,13 +163,10 @@ "frontend/js/views/appDocumentationView.js", "frontend/js/views/graphView.js", "frontend/js/views/graphManagementView.js", - "frontend/js/views/addNewGraphView.js", - "frontend/js/views/deleteGraphView.js", "frontend/js/views/dbSelectionView.js", "frontend/js/views/editListEntryView.js", "frontend/js/views/loginView.js", "frontend/js/views/userManagementView.js", - "frontend/js/views/userProfileView.js", "frontend/js/views/userBarView.js", "frontend/js/views/statisticBarView.js", @@ -261,7 +258,6 @@ "test/specs/views/documentsViewSpec.js", "test/specs/views/documentViewSpec.js", "test/specs/views/graphManagementViewSpec.js", - "test/specs/views/addNewGraphViewSpec.js", "test/specs/views/newLogsViewSpec.js", "test/specs/router/routerSpec.js", "test/specs/router/clusterRouterSpec.js"