去掉复制按钮,同时更新一下详情逻辑
This commit is contained in:
parent
1117c89a99
commit
3059b18bf8
|
|
@ -1,4 +1,4 @@
|
||||||
app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', 'bookmarkService', 'pubSubService', function($scope, $state, $timeout, $sce, bookmarkService, pubSubService) {
|
app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', '$window', '$filter', 'bookmarkService', 'pubSubService', function($scope, $state, $timeout, $sce, $window, $filter, bookmarkService, pubSubService) {
|
||||||
console.log("Hello bookmarkInfoCtr");
|
console.log("Hello bookmarkInfoCtr");
|
||||||
$scope.bookmark = {}
|
$scope.bookmark = {}
|
||||||
$scope.content = '';
|
$scope.content = '';
|
||||||
|
|
@ -6,7 +6,9 @@ app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', 'book
|
||||||
|
|
||||||
pubSubService.subscribe('TagCtr.showBookmarkInfo', $scope, function(event, bookmark) {
|
pubSubService.subscribe('TagCtr.showBookmarkInfo', $scope, function(event, bookmark) {
|
||||||
console.log('subscribe TagCtr.showBookmarkInfo', bookmark);
|
console.log('subscribe TagCtr.showBookmarkInfo', bookmark);
|
||||||
$('.ui.modal.js-bookmark-info').modal('show');
|
$('.ui.modal.js-bookmark-info').modal({
|
||||||
|
closable: false,
|
||||||
|
}).modal('show');
|
||||||
$scope.bookmark = bookmark;
|
$scope.bookmark = bookmark;
|
||||||
$scope.content = '';
|
$scope.content = '';
|
||||||
var params = {
|
var params = {
|
||||||
|
|
@ -27,4 +29,15 @@ app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', 'book
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.jumpToUrl = function(url, id) {
|
||||||
|
$window.open(url, '_blank');
|
||||||
|
if ($scope.bookmark.own) {
|
||||||
|
bookmarkService.clickBookmark({
|
||||||
|
id: id
|
||||||
|
});
|
||||||
|
$scope.bookmark.click_count += 1;
|
||||||
|
$scope.bookmark.last_click = $filter("date")(new Date(), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
||||||
|
|
||||||
$scope.detailBookmark = function(b) {
|
$scope.detailBookmark = function(b) {
|
||||||
var bookmark = $.extend(true, {}, b); // 利用jQuery执行深度拷贝
|
var bookmark = $.extend(true, {}, b); // 利用jQuery执行深度拷贝
|
||||||
console.log(JSON.stringify(bookmark), ' ddddd ', JSON.stringify(b));
|
bookmark.own = true;
|
||||||
if ($scope.showStyle == 'navigate') {
|
if ($scope.showStyle == 'navigate') {
|
||||||
bookmark.last_click = bookmark.last_click.substring(0, 10);
|
bookmark.last_click = bookmark.last_click.substring(0, 10);
|
||||||
bookmark.created_at = bookmark.created_at.substring(0, 10);
|
bookmark.created_at = bookmark.created_at.substring(0, 10);
|
||||||
|
|
@ -104,9 +104,6 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
||||||
id: bookmark.id
|
id: bookmark.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$scope.copyBookmark = function(bookmarkUrl) {
|
|
||||||
toastr.warning('功能暂未实现。。。', "警告");
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.jumpToTags = function(tagId) {
|
$scope.jumpToTags = function(tagId) {
|
||||||
$state.go('tags', {
|
$state.go('tags', {
|
||||||
|
|
|
||||||
|
|
@ -98,10 +98,6 @@ app.controller('searchCtr', ['$scope', '$state', '$stateParams', '$filter', '$wi
|
||||||
pubSubService.publish('TagCtr.showBookmarkInfo', bookmark);
|
pubSubService.publish('TagCtr.showBookmarkInfo', bookmark);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.copyBookmark = function(bookmarkUrl) {
|
|
||||||
toastr.warning('功能暂未实现。。。', "警告");
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.search = function() {
|
$scope.search = function() {
|
||||||
var params = {}
|
var params = {}
|
||||||
params.userRange = $('.js-user-range').dropdown('get value');
|
params.userRange = $('.js-user-range').dropdown('get value');
|
||||||
|
|
|
||||||
|
|
@ -118,16 +118,13 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.detailBookmark = function(bookmark) {
|
$scope.detailBookmark = function(bookmark) {
|
||||||
|
bookmark.own = true;
|
||||||
pubSubService.publish('TagCtr.showBookmarkInfo', bookmark);
|
pubSubService.publish('TagCtr.showBookmarkInfo', bookmark);
|
||||||
bookmarkService.clickBookmark({
|
bookmarkService.clickBookmark({
|
||||||
id: bookmark.id
|
id: bookmark.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.copyBookmark = function(bookmarkUrl) {
|
|
||||||
toastr.warning('功能暂未实现。。。', "警告");
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.toggleMode = function() {
|
$scope.toggleMode = function() {
|
||||||
$scope.edit = !$scope.edit;
|
$scope.edit = !$scope.edit;
|
||||||
if (!$scope.edit) {
|
if (!$scope.edit) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="ui vertically divided grid">
|
<div class="ui vertically divided grid">
|
||||||
<div class="one column row">
|
<div class="one column row">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<i class="internet explorer icon"></i>网页地址:{{bookmark.url}}
|
<i class="internet explorer icon" ng-click="jumpToUrl(bookmark.url, bookmark.id)" style="cursor:pointer;"></i><span ng-click="jumpToUrl(bookmark.url, bookmark.id)" style="cursor:pointer;">网页地址</span>:{{bookmark.url}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="two column row">
|
<div class="two column row">
|
||||||
|
|
@ -59,6 +59,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button class="positive ui right button">确定</button>
|
<div class="ui right button" ng-click="jumpToUrl(bookmark.url, bookmark.id)">跳转到原页面</div>
|
||||||
|
<button class="positive ui right button">关闭页面</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
<th style="width:100px;">创建日期</th>
|
<th style="width:100px;">创建日期</th>
|
||||||
<th style="width:100px;">最后点击</th>
|
<th style="width:100px;">最后点击</th>
|
||||||
<th style="width:150px;">分类</th>
|
<th style="width:150px;">分类</th>
|
||||||
<th style="width:105px;">操作</th>
|
<th style="width:88px;">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -76,7 +76,6 @@
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/delete.png" ng-click="delBookmark(bookmark)" title="删除书签">
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/delete.png" ng-click="delBookmark(bookmark)" title="删除书签">
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)" title="编辑书签">
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)" title="编辑书签">
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark)" title="书签详情">
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark)" title="书签详情">
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/copy.png" ng-click="copyBookmark(bookmark.url)" title="复制书签">
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@
|
||||||
<th style="width:100px;">创建日期</th>
|
<th style="width:100px;">创建日期</th>
|
||||||
<th style="width:100px;">最后点击</th>
|
<th style="width:100px;">最后点击</th>
|
||||||
<th style="width:150px;">分类</th>
|
<th style="width:150px;">分类</th>
|
||||||
<th style="width:105px;">操作</th>
|
<th style="width:88px;">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -154,7 +154,6 @@
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)" title="编辑书签">
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)" title="编辑书签">
|
||||||
</span>
|
</span>
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark)" title="书签详情">
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark)" title="书签详情">
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/copy.png" ng-click="copyBookmark(bookmark.url)" title="复制链接">
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
<th style="width:100px;">创建日期</th>
|
<th style="width:100px;">创建日期</th>
|
||||||
<th style="width:100px;">最后点击</th>
|
<th style="width:100px;">最后点击</th>
|
||||||
<th style="width:150px;">分类</th>
|
<th style="width:150px;">分类</th>
|
||||||
<th style="width:105px;">操作</th>
|
<th style="width:88px;">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -80,7 +80,6 @@
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/delete.png" ng-click="delBookmark(bookmark)" title="删除书签">
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/delete.png" ng-click="delBookmark(bookmark)" title="删除书签">
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)" title="编辑书签">
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)" title="编辑书签">
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark)" title="书签详情">
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark)" title="书签详情">
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/copy.png" ng-click="copyBookmark(bookmark.url)" title="复制书签">
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue