diff --git a/public/index.html b/public/index.html
index a612e24..e3ca2b0 100644
--- a/public/index.html
+++ b/public/index.html
@@ -44,11 +44,7 @@
-
-
-
-
-
+
diff --git a/public/scripts/controllers/edit-controller.js b/public/scripts/controllers/edit-controller.js
index cd9a511..ad55938 100644
--- a/public/scripts/controllers/edit-controller.js
+++ b/public/scripts/controllers/edit-controller.js
@@ -176,23 +176,6 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
.catch((err) => console.log('getTags err', err));
}
- // 元素构造完成之后,开始使用jquery初始化
- $scope.$on('viewContentLoaded', function(elementRenderFinishedEvent) {
- console.log('edit ui dropdown viewContentLoaded')
- $('.ui.modal.js-add-bookmark .ui.dropdown').removeClass('loading');
- $('.ui.dropdown.js-tags').dropdown({
- forceSelection: false,
- maxSelections: maxSelections,
- action: 'combo',
- onChange: function(value, text, $choice) {
- var selectedTags = $('.ui.modal.js-add-bookmark .ui.dropdown').dropdown('get value');
- $timeout(function() {
- $scope.tagsError = (selectedTags.length == 0 || selectedTags.length > maxSelections) && ($('.ui.modal.js-add-bookmark').modal('is active'));
- });
- }
- });
- });
-
function initJsTags() {
setTimeout(function() {
$('.ui.modal.js-add-bookmark .ui.dropdown').removeClass('loading');
diff --git a/public/scripts/controllers/tags-controller.js b/public/scripts/controllers/tags-controller.js
index fef510f..6088fcc 100644
--- a/public/scripts/controllers/tags-controller.js
+++ b/public/scripts/controllers/tags-controller.js
@@ -309,10 +309,12 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
toastr.info('您还没有书签分类,请点击菜单栏的添加按钮进行添加', "提示");
}
$scope.loadTags = false;
+ updateEditPos();
})
.catch((err) => {
console.log('getTags err', err);
$scope.loadTags = false;
+ updateEditPos();
});
pubSubService.publish('Common.menuActive', {
diff --git a/public/scripts/directives/bookmark-info-directive.js b/public/scripts/directives/bookmark-info-directive.js
deleted file mode 100644
index 5210811..0000000
--- a/public/scripts/directives/bookmark-info-directive.js
+++ /dev/null
@@ -1,7 +0,0 @@
-app.directive('bookmarkinfo', function() {
- return {
- restrict: 'EAC',
- templateUrl: '/views/bookmark-info.html',
- replace: true
- }
-});
diff --git a/public/scripts/directives/edit-directive.js b/public/scripts/directives/edit-directive.js
deleted file mode 100644
index 824729d..0000000
--- a/public/scripts/directives/edit-directive.js
+++ /dev/null
@@ -1,7 +0,0 @@
-app.directive('edit', function() {
- return {
- restrict: 'EAC',
- templateUrl: '/views/edit.html',
- replace: true
- }
-});
diff --git a/public/scripts/directives/element-render-finish-directive.js b/public/scripts/directives/element-render-finish-directive.js
deleted file mode 100644
index 52a2ae6..0000000
--- a/public/scripts/directives/element-render-finish-directive.js
+++ /dev/null
@@ -1,12 +0,0 @@
-app.directive('onFinishRenderFilters', ['$timeout', function($timeout) {
- return {
- restrict: 'A',
- link: function(scope, element, attr) {
- if (scope.$last === true) {
- $timeout(function() {
- scope.$emit('elementRenderFinished');
- });
- }
- }
- };
-}]);
diff --git a/public/scripts/directives/menus-directive.js b/public/scripts/directives/menus-directive.js
deleted file mode 100644
index fd68afe..0000000
--- a/public/scripts/directives/menus-directive.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// 不要使用已有的html作为指令,如menu,否则angular会陷入死循环
-app.directive('menus', function() {
- return {
- restrict: 'EAC',
- templateUrl: '/views/menus.html',
- replace: true
- }
-});
diff --git a/public/scripts/directives/module-directive.js b/public/scripts/directives/module-directive.js
new file mode 100644
index 0000000..8001924
--- /dev/null
+++ b/public/scripts/directives/module-directive.js
@@ -0,0 +1,33 @@
+app.directive('bookmarkinfo', function() {
+ return {
+ restrict: 'EAC',
+ templateUrl: '/views/bookmark-info.html',
+ replace: true
+ }
+});
+
+app.directive('edit', function() {
+ return {
+ restrict: 'EAC',
+ templateUrl: '/views/edit.html',
+ replace: true
+ }
+});
+
+// 不要使用已有的html作为指令,如menu,否则angular会陷入死循环
+app.directive('menus', function() {
+ return {
+ restrict: 'EAC',
+ templateUrl: '/views/menus.html',
+ replace: true
+ }
+});
+
+app.directive('pagination', function() {
+ return {
+ restrict: 'EA',
+ templateUrl: '/views/pagination.html',
+ replace: true,
+ link: function(scope, element, attrs) {}
+ }
+});
diff --git a/public/scripts/directives/pagination-directive.js b/public/scripts/directives/pagination-directive.js
deleted file mode 100644
index 22071c6..0000000
--- a/public/scripts/directives/pagination-directive.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// 不要使用已有的html作为指令,如menu,否则angular会陷入死循环
-app.directive('pagination', function() {
- return {
- restrict: 'EA',
- templateUrl: '/views/pagination.html',
- replace: true,
- // scope: {
- // conf: '='
- // },
- link: function(scope, element, attrs) {}
- }
-});