Commit 3048f306 authored by bingchuan's avatar bingchuan

[dev]version 0.2.6

parent bbbee2d4
Pipeline #48 failed with stages
{ {
"name": "angular-tour", "name": "angular-tour",
"version": "0.2.5", "version": "0.2.6",
"description": "An AngularJS directive for showcasing features of your website", "description": "An AngularJS directive for showcasing features of your website",
"keywords": [ "keywords": [
"angularjs", "angularjs",
......
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
angular.module('tour/tour.tpl.html', []).run([ angular.module('tour/tour.tpl.html', []).run([
'$templateCache', '$templateCache',
function ($templateCache) { function ($templateCache) {
$templateCache.put('tour/tour.tpl.html', '<div class="tour-tip">\n' + ' <span class="tour-arrow tt-{{ ttPlacement }}" ng-hide="centered"></span>\n' + ' <div class="tour-content-wrapper">\n' + ' <p ng-bind="ttContent"></p>\n' + ' <a ng-click="proceed()" ng-bind="ttNextLabel" class="small button tour-next-tip"></a>\n' + ' </div>\n' + '</div>'); $templateCache.put('tour/tour.tpl.html', '<div class="tour-tip">\n' + ' <span class="tour-arrow tt-{{ ttPlacement }}" ng-hide="centered"></span>\n' + ' <div class="tour-content-wrapper">\n' + ' <h3 ng-bind="ttTitle"></h3>\n' + ' <p ng-bind="ttContent"></p>\n' + ' <button class="btn btn-primary tour-next-tip" ng-click="proceed()" ng-bind="ttNextLabel" ></button> \n' + ' <a ng-click="closeTour()" class="tour-close-tip">&times;</a>\n' + ' </div>\n' + '</div>\n' + '');
} }
]); ]);
angular.module('angular-tour.tour', []).constant('tourConfig', { angular.module('angular-tour.tour', []).constant('tourConfig', {
...@@ -117,6 +119,14 @@ ...@@ -117,6 +119,14 @@
if (angular.isDefined(attrs.postTour)) { if (angular.isDefined(attrs.postTour)) {
scope.$parent.$eval(attrs.postTour); scope.$parent.$eval(attrs.postTour);
} }
if (!completed) {
if(angular.isDefined(attrs.tourClose)){
scope.$parent.$eval(attrs.tourClose);
}
else{
scope.$parent.$eval(attrs.tourComplete);
}
}
}; };
ctrl.postStepCallback = function () { ctrl.postStepCallback = function () {
if (angular.isDefined(attrs.postStep)) { if (angular.isDefined(attrs.postStep)) {
......
...@@ -19,39 +19,10 @@ ...@@ -19,39 +19,10 @@
margin: 0 0 1.125em; margin: 0 0 1.125em;
} }
.tour-tip button,
.tour-tip .button {
background-color: #189DAF;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
transition: background-color 300ms ease-out;
cursor: pointer;
font-family: inherit;
font-weight: 700;
line-height: 1;
position: relative;
text-decoration: none;
text-align: center;
display: inline-block;
font-size: .8em;
color: #FFF;
border-style: solid;
border-width: 0;
margin: 0 0 1.25em;
padding: .5em 1.25em .6em;
border-radius: 8px;
}
.tour-tip button small,
.tour-tip .button small {
padding-top: .625em;
padding-bottom: .5625em;
-webkit-appearance: none;
}
.tour-tip button:hover,
.tour-tip .button:hover {
background-color: #0A87A1;
}
.tour-tip .tour-arrow { .tour-tip .tour-arrow {
display: block; display: block;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment