Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
4805b4d6
Commit
4805b4d6
authored
Oct 11, 2016
by
zhangle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor index page. add favorites function module
parent
ad476b41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
33 deletions
+1
-33
index.html
apollo-portal/src/main/resources/static/index.html
+1
-16
IndexController.js
...in/resources/static/scripts/controller/IndexController.js
+0
-17
No files found.
apollo-portal/src/main/resources/static/index.html
View file @
4805b4d6
...
...
@@ -93,27 +93,12 @@
<aside
class=
"media-body"
>
<div
class=
"app-panel col-md-2 text-center"
ng-repeat=
"app in visitedApps"
ng-click=
"goToAppHomePage(app.appId)"
ng-mouseover=
"toggleOperationBtn(app)"
ng-mouseout=
"toggleOperationBtn(app)"
>
ng-click=
"goToAppHomePage(app.appId)"
>
<div
class=
"thumbnail hover"
>
<h4
ng-bind=
"app.appId"
></h4>
<h5
ng-bind=
"app.name"
></h5>
<p
class=
"operate-panel"
ng-show=
"app.showOperationBtn"
>
<button
class=
"btn btn-default btn-xs"
title=
"收藏"
ng-click=
"addFavorite(app.appId);$event.stopPropagation();"
>
<img
src=
"img/unlike.png"
class=
"i-15"
>
</button>
</p>
</div>
</div>
<!--<div class="col-md-2 text-center" ng-repeat="appId in visitedApps"-->
<!--ng-click="goToAppHomePage(appId)">-->
<!--<div class="thumbnail hover cursor-pointer">-->
<!--<h4 ng-bind="appId"></h4>-->
<!--</div>-->
<!--</div>-->
</aside>
</section>
</div>
...
...
apollo-portal/src/main/resources/static/scripts/controller/IndexController.js
View file @
4805b4d6
...
...
@@ -8,7 +8,6 @@ function IndexController($scope, $window, toastr, AppUtil, AppService, UserServi
$scope
.
getUserCreatedApps
=
getUserCreatedApps
;
$scope
.
getUserFavorites
=
getUserFavorites
;
$scope
.
addFavorite
=
addFavorite
;
$scope
.
goToAppHomePage
=
goToAppHomePage
;
$scope
.
goToCreateAppPage
=
goToCreateAppPage
;
...
...
@@ -102,22 +101,6 @@ function IndexController($scope, $window, toastr, AppUtil, AppService, UserServi
}
function
addFavorite
(
appId
)
{
var
favorite
=
{
userId
:
$scope
.
userId
,
appId
:
appId
};
FavoriteService
.
addFavorite
(
favorite
)
.
then
(
function
(
result
)
{
$scope
.
favoriteId
=
result
.
id
;
toastr
.
success
(
"收藏成功"
);
reload
();
},
function
(
result
)
{
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"收藏失败"
);
})
};
function
goToCreateAppPage
()
{
$window
.
location
.
href
=
"/app.html"
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment