Skip to content
Snippets Groups Projects
Commit 22b1d32b authored by Tim Repke's avatar Tim Repke
Browse files

- added angular-strap for tooltips

- price-edit and price table working now
-----
- begin of moving data handling to external module
- thats done for shopping
parent 57dc43d8
No related branches found
No related tags found
No related merge requests found
Showing
with 6935 additions and 99 deletions
......@@ -78,6 +78,8 @@ else {
<script type="text/javascript" src="../view/js/angular.min.js"></script>
<script type="text/javascript" src="../view/js/xeditable.js"></script>
<script type="text/javascript" src="../view/js/toastr.min.js"></script>
<script type="text/javascript" src="../view/js/angular-strap.min.js"></script>
<script type="text/javascript" src="../view/js/angular-strap.tpl.js"></script>
<script type="text/javascript" src="pages_cost/pages_cost.js"></script>
<link type="text/css" rel="stylesheet" href="pages_cost/pages_cost.css" />
<link type="text/css" rel="stylesheet" href="../view/css/toastr.css" />';
......@@ -107,6 +109,16 @@ else {
<table-moneyio></table-moneyio>
</div>
</div>
<div class="cost-anmerkung">
Achtung:<br />
<ul>
<li>Zurückgezogene Registrierungen werden hier nicht beachtet! Wenn Bezahlung erhalten unbedingt seperat auf dem Notizzettel verwalten!</li>
<li></li>
<li></li>
</ul>
</div>
';
......
......@@ -7,10 +7,17 @@
border: 1px solid black;
background-color: lightcyan;
position: absolute;
top: 100px;
left: 100px;
top: 50px;
left: 50px;
padding: 15px;
}
.pages-cost-edit td{
border-right: 1px dotted darkgray;
padding: 3pt 5pt;
}
.deviderrow td{
border-top: 1px dotted darkgray;
}
.cost-table td{
border: 0;
}
......@@ -78,3 +85,102 @@
margin: 2.5pt 4pt 0 0;
}
/* == / end buttons == */
.tooltip {
position: absolute;
z-index: 1070;
display: block;
font-size: 12px;
line-height: 1.4;
visibility: visible;
filter: alpha(opacity=0);
opacity: 0;
}
.tooltip.in {
filter: alpha(opacity=90);
opacity: .9;
}
.tooltip.top {
padding: 5px 0;
margin-top: -3px;
}
.tooltip.right {
padding: 0 5px;
margin-left: 3px;
}
.tooltip.bottom {
padding: 5px 0;
margin-top: 3px;
}
.tooltip.left {
padding: 0 5px;
margin-left: -3px;
}
.tooltip-inner {
max-width: 200px;
padding: 3px 8px;
color: #fff;
text-align: center;
text-decoration: none;
background-color: #000;
border-radius: 4px;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.top-left .tooltip-arrow {
bottom: 0;
left: 5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.top-right .tooltip-arrow {
right: 5px;
bottom: 0;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #000;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #000;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
.tooltip.bottom-left .tooltip-arrow {
top: 0;
left: 5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
.tooltip.bottom-right .tooltip-arrow {
top: 0;
right: 5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
......@@ -2,6 +2,106 @@
* Created by tim on 10/4/14.
*/
var defaultData = [];
defaultData.price = {
ALL: { // Stuff all have to pay, no matter when the come or leave
B_FIX: "4", // Fixkosten (z.B. Kurzreisezuschlag)
C_BW: "4.5", // Bettwäsche
E_ESS:"5", // Verpflegung gekauft durch uns
REFRA: "42" // Förderung durch RefRat
},
VAR: { // stuff that has to be paid depending on certain variables
"F_FR": [ // Frühstück
{ "val": "", "ind": false, "an": false, "ab": false },
{ "val": "3", "ind": true, "an": false, "ab": true },
{ "val": "3", "ind": true, "an": true, "ab": true }
],
"G_MI": [ // Mittag
{ "val": "", "ind": false, "an": false, "ab": false },
{ "val": "", "ind": false, "an": false, "ab": false },
{ "val": "", "ind": false, "an": false, "ab": false }
],
"H_AB": [ // Abendbrot
{ "val": "4", "ind": true, "an": true, "ab": false },
{ "val": "4.5", "ind": true, "an": true, "ab": false },
{ "val": "", "ind": false, "an": false, "ab": false }
],
"D_UE": [ // Übernachtung
{ "val": "12.5", "ind": true, "an": true, "ab": false },
{ "val": "12.5", "ind": true, "an": true, "ab": false },
{ "val": "", "ind": false, "an": false, "ab": false }
],
"A_FAHRT": [ // Fahrtkosten (z.B. Bus, Bahn)
{ "val": "2.5", "ind": false, "an": true, "ab": false },
{ "val": "", "ind": false, "an": false, "ab": false },
{ "val": "2.5", "ind": false, "an": false, "ab": true }
]
}
};
defaultData.shopping= [
{ "pos": "Limonade", "cnt": "76", "price": "1.43" },
{ "pos": "Brause", "cnt": "42", "price": "0.83" },
{ "pos": "Lutscher", "cnt": "1", "price": "0.5" }
];
defaultData.receipt = [
{ "pos": "Bettwäsche", "cnt": "1", "mul": "40", "price": "1.43" },
{ "pos": "Grillnutzung", "cnt": "1", "mul": "40", "price": "0.3" },
{ "pos": "Halbpension", "cnt": "2", "mul": "40", "price": "12.30" },
{ "pos": "Klodeckel", "cnt": 1, "mul": 1, "price": "33" }
];
defaultData.moneyio = {
"in": [
{ "pos": "Förderung", "val": "1200" },
{ "pos": "Pfand", "val": "31" }
], "out": [
{ "pos": "Einkaufen", "val": "354" },
{ "pos": "Busfahrt Hin", "val": "35" },
{ "pos": "Busfahrt Rück", "val": "40" },
{ "pos": "Kaution", "val": "100" }
]
};
var dataapp = angular.module("dataapp", []);
dataapp.service('shoppingData', ["$http", "$rootScope", function ($http, $rootScope) {
var table = this;
table.entries = [];
$http.get('?page=cost&ajax=get-shopping-json').success(function(data){
if(data !== ""){
table.entries = data;
console.log("got shopping table from DB");
} else{
table.entries = defaultData.shopping;
console.error("Shopping table not loaded from DB - took default!");
}
$rootScope.$broadcast('data::shoppingUpdated', table.entries);
});
// === basic table functions ===
table.rowSum = function(row){
console.log("this.shopping.rowSum");
return row.cnt*row.price;
};
table.sum = function(){
var ret = 0;
for(var run = 0; run < table.entries.length; run++)
if(!table.entries[run].isDeleted)
ret += table.rowSum(table.entries[run]);
return ret;
};
}]);
/* MAIN module */
(function() {
var app = angular.module('pages-cost', ['price','shopping','receipt','moneyio']);
......@@ -44,7 +144,7 @@
* pricetable module
*/
(function() {
var app = angular.module('price', []);
var app = angular.module('price', ['mgcrea.ngStrap.tooltip']);
app.directive("tablePrice", function() {
return {
......@@ -53,28 +153,46 @@
};
});
app.directive("tablePriceEdit", function() {
app.directive("tablePriceEdit", function() {
return {
restrict: 'E',
templateUrl: "pages_cost/table-price-edit.html"
templateUrl: "pages_cost/table-price-edit.html",
link: function(scope, parent){
scope.tooltip = [];
scope.tooltip.ind = {
"title": "Auch für individuell Reisende zu zahlen",
"checked": false
};
scope.tooltip.an = {
"title": "Auch zu zahlen, wenn Anreise an dem Tag",
"checked": false
};
scope.tooltip.ab = {
"title": "Auch zu zahlen, wenn Abreise an dem Tagn",
"checked": false
};
}
};
});
app.controller('TablePriceController', ["$http", function($http){
app.controller('TablePriceController', ["$http", "$scope", function($http, $scope){
var table = this;
table.editmode = false;
table.base = [];
table.edit = [];
$http.get('?page=cost&ajax=get-price-json').success(function(data){
if(data !== ""){
table.base = data;
table.base = data;
} else {
table.base = defaultData.price;
console.error("Price table not loaded from DB - took default!");
}
});
// == table manipulation functions ==
table.toggleEditmode = function(){
table.editmode = table.editmode == false;
}
......@@ -94,51 +212,186 @@
table.edit = [];
table.toggleEditmode();
}
}]);
table.editUpdateAll = function(val, pos){
console.log(val);
table.edit.ALL[pos] = val;
}
// == table data functions ==
table.bez = {
A_FAHRT: "Fahrt",
B_FIX: "Fix",
C_BW: "Bettwäsche",
D_UE: "Übernachtung",
E_ESS: "Essen (wir)",
F_FR: "Frühstück",
G_MI: "Mittag",
H_AB: "Abend"
,
FAHRT: "Fahrtkosten",
ESSEN: "Verpflegung",
FIX: "Fixkosten",
WIR: "Zusatzverpflegung",
UE: "Übernachtung",
REFRA: "(Förderung)"
};
table.calc = {
FAHRT: {
"pos": table.bez.FAHRT,
"sum": function(){
if(!table.base.VAR || !table.base.VAR.A_FAHRT)
return 0;
var tmp = 0;
for(var len = table.base.VAR.A_FAHRT.length; len--;)
tmp += (table.base.VAR.A_FAHRT[len].val * 1);
return tmp;
},
"cnt": function(){
if(!table.base.VAR || !table.base.VAR.A_FAHRT)
return 0;
var tmp = 0;
for(var len = table.base.VAR.A_FAHRT.length; len--;)
if(table.base.VAR.A_FAHRT[len].val > 0)
tmp++;
return tmp;
},
"val": function(){
var tmp = table.calc.FAHRT.cnt();
if(tmp > 0)
return table.calc.FAHRT.sum() / tmp;
return table.calc.FAHRT.sum();
}
},
ESSEN: {
"pos": table.bez.ESSEN,
"sum": function(){
if(!table.base.VAR || !table.base.VAR.H_AB || !table.base.VAR.F_FR || !table.base.VAR.G_MI)
return 0;
var tmp = 0;
for(var len = table.base.VAR.H_AB.length; len--;)
tmp += (table.base.VAR.H_AB[len].val * 1);
for(var len = table.base.VAR.F_FR.length; len--;)
tmp += (table.base.VAR.F_FR[len].val * 1);
for(var len = table.base.VAR.G_MI.length; len--;)
tmp += (table.base.VAR.G_MI[len].val * 1);
return tmp;
},
"cnt": function(){
if(!table.base.VAR || !table.base.VAR.H_AB || !table.base.VAR.F_FR || !table.base.VAR.G_MI)
return 0;
var tmp = 0;
for(var len = table.base.VAR.F_FR.length; len--;)
if(table.base.VAR.F_FR[len].val > 0)
tmp++;
for(var len = table.base.VAR.G_MI.length; len--;)
if(table.base.VAR.G_MI[len].val > 0)
tmp++;
for(var len = table.base.VAR.H_AB.length; len--;)
if(table.base.VAR.H_AB[len].val > 0)
tmp++;
return tmp;
},
"val": function(){
var tmp = table.calc.ESSEN.cnt();
if(tmp > 0)
return table.calc.ESSEN.sum() / tmp;
return table.calc.ESSEN.sum();
}
},
FIX: {
"pos": table.bez.FIX,
"sum": function(){
if(!table.base.ALL || !table.base.ALL.B_FIX || !table.base.ALL.C_BW)
return 0;
return (table.base.ALL.B_FIX * 1) + (table.base.ALL.C_BW * 1);
},
"cnt": function(){
if(!table.base.ALL || !table.base.ALL.B_FIX || !table.base.ALL.C_BW)
return 0;
return (table.base.ALL.B_FIX > 0 ? 1 : 0) + (table.base.ALL.C_BW > 0 ? 1 : 0);
},
"val": function(){
var tmp = table.calc.FIX.cnt();
if(tmp > 0)
return table.calc.FIX.sum() / tmp;
return table.calc.FIX.sum();
}
},
UE: {
"pos": table.bez.UE,
"sum": function(){
if(!table.base.VAR || !table.base.VAR.D_UE)
return 0;
var tmp = 0;
for(var len = table.base.VAR.D_UE.length; len--;)
tmp += (table.base.VAR.D_UE[len].val * 1);
return tmp;
},
"cnt": function(){
if(!table.base.VAR || !table.base.VAR.D_UE)
return 0;
var tmp = 0;
for(var len = table.base.VAR.D_UE.length; len--;)
if(table.base.VAR.D_UE[len].val > 0)
tmp++;
return tmp;
},
"val": function(){
var tmp = table.calc.UE.cnt();
if(tmp > 0)
return table.calc.UE.sum() / tmp;
return table.calc.UE.sum();
}
},
WIR: {
"pos": table.bez.WIR,
"sum": function(){
if(!table.base.ALL || !table.base.ALL.E_ESS)
return 0;
return table.base.ALL.E_ESS * 1;
},
"cnt": function(){
if(!table.base.ALL || !table.base.ALL.E_ESS)
return 0;
return table.base.ALL.E_ESS > 0 ? 1 : 0;
},
"val": function(){
var tmp = table.calc.WIR.cnt();
if(tmp>0)
return table.calc.WIR.sum() / tmp;
return table.calc.WIR.sum();
}
},
X_REFRA: {
"pos": table.bez.REFRA,
"sum": function(){
if(!table.base.ALL || !table.base.ALL.REFRA)
return 0;
return table.base.ALL.REFRA;
},
"cnt": function(){
return 1;
},
"val": function(){
return table.calc.X_REFRA.sum();
}
}
};
table.sum = function(){
return table.calc.ESSEN.sum() + table.calc.WIR.sum() + table.calc.FAHRT.sum() + table.calc.FIX.sum() + table.calc.UE.sum();
}
}]);
var tmp = {
"Fahrt": [
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false}
],
"Fix": [
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false}
],
"Bettwäsche": [
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false}
],
"Übernachtung": [
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false}
],
"Essen(wir)": [
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false}
],
"Früh": [
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false}
],
"Mittag": [
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false}
],
"Abend": [
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false},
{"val": 0, "ind": true, "an": true, "ab": false}
]
};
})();
......@@ -148,7 +401,7 @@
* shoppingtable module
*/
(function() {
var app = angular.module('shopping', ["xeditable"]);
var app = angular.module('shopping', ["xeditable", "dataapp"]);
app.run(function(editableOptions) {
editableOptions.theme = 'bs3';
......@@ -161,29 +414,29 @@
};
});
app.controller('TableShoppingController', ["$scope", "$filter", "$q", "$http", function($scope, $filter, $q, $http){
app.controller('TableShoppingController', ["$scope", "$filter", "$q", "$http", "shoppingData", function($scope, $filter, $q, $http, shoppingData){
var table = this;
table.entries = [];
$http.get('?page=cost&ajax=get-shopping-json').success(function(data){
if(data !== ""){
table.entries = data;
}
// === Data Binding stuff ==
$scope.dataService = shoppingData;
table.entries = $scope.dataService.entries;
$scope.$on('data::shoppingUpdated', function(event, newTab) {
table.entries = newTab;
console.log("data in shopping controller received");
console.log(newTab);
});
// === basic table functions ===
$scope.$watch('table.entries', function() {
if(table.entries && $scope.dataService.entries){
$scope.dataService.entries = table.entries;
}
});
table.rowSum = function(row){
return row.cnt*row.price;
};
table.sum = function(){
var ret = 0;
for(var run = 0; run < table.entries.length; run++)
if(!table.entries[run].isDeleted)
ret += table.rowSum(table.entries[run]);
return ret;
};
// === edit table functions ===
......@@ -255,8 +508,6 @@
})();
/* ****************************************************************
* receipttable module
*/
......@@ -278,6 +529,10 @@
$http.get('?page=cost&ajax=get-receipt-json').success(function(data){
if(data !== "")
table.entries = data;
else{
table.entries = defaultData.receipt;
console.error("Receipt table not loaded from DB - took default!");
}
});
// === basic table functions ===
......@@ -421,6 +676,10 @@
$http.get('?page=cost&ajax=get-moneyio-json').success(function(data){
if(data !== "")
table.entries = data;
else {
table.entries = defaultData.moneyio;
console.error("MoneyIO table not loaded from DB - took default!");
}
});
// === basic table functions ===
......@@ -528,12 +787,6 @@
/* ======================================================================================================
Mülltonne
*/
......
<table class="cost-table">
<thead>
<tr>
<th>Position{{io}}</th>
<th>Position - {{io}}</th>
<th>Summe</th>
<th ng-show="tform.$visible"></th>
</tr>
......@@ -14,7 +14,7 @@
</span>
</td>
<td class="cost-table-numeric">
<!--span editable-text="row.val" e-form="tableform" e-style="width: 35pt" e-ng-change="chang(row, 'val', $data)"-->
<span editable-text="row.val" e-form="tableform" e-style="width: 35pt" e-ng-change="chang(row, 'val', $data)">
{{row.val || 0 | currency}}
</td>
......
......@@ -9,15 +9,23 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="(key,row) in table.edit">
<td>{{key}}</td>
<tr ng-repeat="(key,row) in table.edit.VAR">
<td>{{table.bez[key]}}</td>
<td ng-repeat="col in row">
<input ng-model="col.val" type="input" name="{{key}}.val" />
<input ng-model="col.ind" type="checkbox" name="{{key}}.ind" />
<input ng-model="col.an" type="checkbox" name="{{key}}.an" />
<input ng-model="col.ab" type="checkbox" name="{{key}}.ab" />
<input ng-model="col.ind" type="checkbox" name="{{key}}.ind" data-placement="top-left" data-type="info" data-title="{{tooltip.ind.title}}" bs-tooltip />
<input ng-model="col.an" type="checkbox" name="{{key}}.an" data-placement="top-left" data-type="info" data-title="{{tooltip.an.title}}" bs-tooltip />
<input ng-model="col.ab" type="checkbox" name="{{key}}.ab" data-placement="top-left" data-type="info" data-title="{{tooltip.ab.title}}" bs-tooltip />
</td>
</tr>
<tr class="deviderrow"><td colspan="4"></td></tr>
<tr ng-repeat="(key,val) in table.edit.ALL">
<td>{{table.bez[key]}}</td>
<td colspan="3">
<input ng-model="val" type="text" name="{{key}}" ng-change="table.editUpdateAll(val,'{{key}}')" />
</td>
</tr>
</tbody>
</table>
......
......@@ -3,16 +3,16 @@
<tr>
<th>Position</th>
<th>Anzahl (normal)</th>
<th>Satz</th>
<th>Satz (est)</th>
<th>Summe</th>
</tr>
</thead>
<tbody>
<tr>
<td class="edita" id='celltest1'>Reisekosten</td>
<td class="cost-table-numeric edita" id='celltest2'>2</td>
<td class="cost-table-numeric edita" id='celltest3'>1,90 €</td>
<td class="cost-table-numeric edita" id='celltest4'>3,80 €</td>
<tr ng-repeat="row in table.calc">
<td>{{row.pos}}</td>
<td class="cost-table-numeric">{{row.cnt()}}</td>
<td class="cost-table-numeric">{{row.val() | currency}}</td>
<td class="cost-table-numeric">{{row.sum() | currency}}</td>
</tr>
</tbody>
<tfoot>
......@@ -20,14 +20,13 @@
<td class="cost-table-invisible"></td>
<td class="cost-table-invisible"></td>
<td class="cost-table-invisible"></td>
<td>45,70 €</td>
<td>{{table.sum() | currency}}</td>
</tr>
</tfoot>
</table>
<button type="button" ng-click="table.editTable()" class="button-edit" ng-hide="table.editmode">edit</button>
<button type="button" ng-click="table.editTable()" class="button-edit" ng-hide="table.editmode" >edit</button>
<table-price-edit></table-price-edit>
<div class="debug" style="margin-top: 30px;">
{{ table.base | json }}
</div>
\ No newline at end of file
......@@ -27,7 +27,7 @@
{{row.price || 0 | currency}}
</span>
</td>
<td class="cost-table-numeric">{{table.rowSum(row) | currency}}</td>
<td class="cost-table-numeric">{{dataService.rowSum(row) | currency}}</td>
<td><button type="button" ng-show="tableform.$visible" ng-click="deleteRow($index)" class="button-delete">del</button></td>
</tr>
</tbody>
......@@ -36,7 +36,7 @@
<td class="cost-table-invisible"></td>
<td class="cost-table-invisible"></td>
<td class="cost-table-invisible"></td>
<td>{{table.sum() | currency}}</td>
<td>{{dataService.sum() | currency}}</td>
<td></td>
</tr>
</tfoot>
......@@ -54,5 +54,8 @@
</form>
<div class="debug" style="margin-top: 30px;">
{{ table.entries | json }}
{{ table.entries || "&nbsp;" | json }}
</div>
<div class="debug" style="margin-top: 30px;">
{{ dataService.entries || "&nbsp;" | json }}
</div>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/**
* angular-strap
* @version v2.1.1 - 2014-09-26
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
(function(window, document, undefined) {
'use strict';
// Source: aside.tpl.js
angular.module('mgcrea.ngStrap.aside').run(['$templateCache', function($templateCache) {
$templateCache.put('aside/aside.tpl.html', '<div class="aside" tabindex="-1" role="dialog"><div class="aside-dialog"><div class="aside-content"><div class="aside-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="aside-title" ng-bind="title"></h4></div><div class="aside-body" ng-bind="content"></div><div class="aside-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>');
}]);
// Source: alert.tpl.js
angular.module('mgcrea.ngStrap.alert').run(['$templateCache', function($templateCache) {
$templateCache.put('alert/alert.tpl.html', '<div class="alert" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-if="dismissable" ng-click="$hide()">&times;</button> <strong ng-bind="title"></strong>&nbsp;<span ng-bind-html="content"></span></div>');
}]);
// Source: datepicker.tpl.js
angular.module('mgcrea.ngStrap.datepicker').run(['$templateCache', function($templateCache) {
$templateCache.put('datepicker/datepicker.tpl.html', '<div class="dropdown-menu datepicker" ng-class="\'datepicker-mode-\' + $mode" style="max-width: 320px"><table style="table-layout: fixed; height: 100%; width: 100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)"><i class="{{$iconLeft}}"></i></button></th><th colspan="{{ rows[0].length - 2 }}"><button tabindex="-1" type="button" class="btn btn-default btn-block text-strong" ng-click="$toggleMode()"><strong style="text-transform: capitalize" ng-bind="title"></strong></button></th><th><button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)"><i class="{{$iconRight}}"></i></button></th></tr><tr ng-show="showLabels" ng-bind-html="labels"></tr></thead><tbody><tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%"><td class="text-center" ng-repeat="(j, el) in row"><button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{\'btn-primary\': el.selected, \'btn-info btn-today\': el.isToday && !el.selected}" ng-click="$select(el.date)" ng-disabled="el.disabled"><span ng-class="{\'text-muted\': el.muted}" ng-bind="el.label"></span></button></td></tr></tbody></table></div>');
}]);
// Source: dropdown.tpl.js
angular.module('mgcrea.ngStrap.dropdown').run(['$templateCache', function($templateCache) {
$templateCache.put('dropdown/dropdown.tpl.html', '<ul tabindex="-1" class="dropdown-menu" role="menu"><li role="presentation" ng-class="{divider: item.divider}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" target="{{item.target || \'\'}}" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>');
}]);
// Source: modal.tpl.js
angular.module('mgcrea.ngStrap.modal').run(['$templateCache', function($templateCache) {
$templateCache.put('modal/modal.tpl.html', '<div class="modal" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body" ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>');
}]);
// Source: popover.tpl.js
angular.module('mgcrea.ngStrap.popover').run(['$templateCache', function($templateCache) {
$templateCache.put('popover/popover.tpl.html', '<div class="popover"><div class="arrow"></div><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind="content"></div></div>');
}]);
// Source: select.tpl.js
angular.module('mgcrea.ngStrap.select').run(['$templateCache', function($templateCache) {
$templateCache.put('select/select.tpl.html', '<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li ng-if="$showAllNoneButtons"><div class="btn-group" style="margin-bottom: 5px; margin-left: 5px"><button class="btn btn-default btn-xs" ng-click="$selectAll()">All</button> <button class="btn btn-default btn-xs" ng-click="$selectNone()">None</button></div></li><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><span ng-bind="match.label"></span> <i class="{{$iconCheckmark}} pull-right" ng-if="$isMultiple && $isActive($index)"></i></a></li></ul>');
}]);
// Source: tab.tpl.js
angular.module('mgcrea.ngStrap.tab').run(['$templateCache', function($templateCache) {
$templateCache.put('tab/tab.tpl.html', '<ul class="nav" ng-class="$navClass" role="tablist"><li ng-repeat="$pane in $panes" ng-class="$index == $panes.$active ? $activeClass : \'\'"><a role="tab" data-toggle="tab" ng-click="$setActive($index)" data-index="{{ $index }}" ng-bind-html="$pane.title"></a></li></ul><div ng-transclude class="tab-content"></div>');
}]);
// Source: timepicker.tpl.js
angular.module('mgcrea.ngStrap.timepicker').run(['$templateCache', function($templateCache) {
$templateCache.put('timepicker/timepicker.tpl.html', '<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 0)"><i class="{{ $iconUp }}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 1)"><i class="{{ $iconUp }}"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showAM">&nbsp;</td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 0)"><i class="{{ $iconDown }}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 1)"><i class="{{ $iconDown }}"></i></button></th></tr></tfoot></table></div>');
}]);
// Source: tooltip.tpl.js
angular.module('mgcrea.ngStrap.tooltip').run(['$templateCache', function($templateCache) {
$templateCache.put('tooltip/tooltip.tpl.html', '<div class="tooltip in" ng-show="title"><div class="tooltip-arrow"></div><div class="tooltip-inner" ng-bind="title"></div></div>');
}]);
// Source: typeahead.tpl.js
angular.module('mgcrea.ngStrap.typeahead').run(['$templateCache', function($templateCache) {
$templateCache.put('typeahead/typeahead.tpl.html', '<ul tabindex="-1" class="typeahead dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $index == $activeIndex}"><a role="menuitem" tabindex="-1" ng-click="$select($index, $event)" ng-bind="match.label"></a></li></ul>');
}]);
})(window, document);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment