Skip to content

Commit 465451c

Browse files
committed
cleanup(): removed unused uio-angular tab component
1 parent 18e965c commit 465451c

File tree

5 files changed

+3
-341
lines changed

5 files changed

+3
-341
lines changed

public/app/partials/bootstrap/tab.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

public/app/partials/bootstrap/tabset.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

public/sass/components/_navs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
}
8888

8989
// temp hack
90-
.modal-body, .gf-box {
90+
.modal-body {
9191
.nav-tabs {
9292
border-bottom: none;
9393
}

public/sass/layout/_page.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@
6262
.admin-page {
6363
max-width: 800px;
6464
margin-left: 10px;
65-
.gf-box {
66-
margin-top: 0;
67-
}
68-
.gf-box-body {
69-
min-height: 0;
70-
}
7165
h2 {
7266
margin-left: 15px;
7367
margin-bottom: 0px;

public/vendor/angular-ui/ui-bootstrap-tpls.js

Lines changed: 2 additions & 320 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* Version: 0.13.4 - 2015-09-03
66
* License: MIT
77
*/
8-
angular.module("ui.bootstrap", ["ui.bootstrap.tpls","ui.bootstrap.position","ui.bootstrap.dateparser","ui.bootstrap.datepicker","ui.bootstrap.tabs"]);
9-
angular.module("ui.bootstrap.tpls", ["template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/tabs/tab.html","template/tabs/tabset.html"]);
8+
angular.module("ui.bootstrap", ["ui.bootstrap.tpls","ui.bootstrap.position","ui.bootstrap.dateparser","ui.bootstrap.datepicker"]);
9+
angular.module("ui.bootstrap.tpls", ["template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html"]);
1010
angular.module('ui.bootstrap.position', [])
1111

1212
/**
@@ -1180,302 +1180,6 @@ function($compile, $parse, $document, $rootScope, $position, dateFilter, datePar
11801180
});
11811181

11821182

1183-
/**
1184-
* @ngdoc overview
1185-
* @name ui.bootstrap.tabs
1186-
*
1187-
* @description
1188-
* AngularJS version of the tabs directive.
1189-
*/
1190-
1191-
angular.module('ui.bootstrap.tabs', [])
1192-
1193-
.controller('TabsetController', ['$scope', function TabsetCtrl($scope) {
1194-
var ctrl = this,
1195-
tabs = ctrl.tabs = $scope.tabs = [];
1196-
1197-
ctrl.select = function(selectedTab) {
1198-
angular.forEach(tabs, function(tab) {
1199-
if (tab.active && tab !== selectedTab) {
1200-
tab.active = false;
1201-
tab.onDeselect();
1202-
selectedTab.selectCalled = false;
1203-
}
1204-
});
1205-
selectedTab.active = true;
1206-
// only call select if it has not already been called
1207-
if (!selectedTab.selectCalled) {
1208-
selectedTab.onSelect();
1209-
selectedTab.selectCalled = true;
1210-
}
1211-
};
1212-
1213-
ctrl.addTab = function addTab(tab) {
1214-
tabs.push(tab);
1215-
// we can't run the select function on the first tab
1216-
// since that would select it twice
1217-
if (tabs.length === 1 && tab.active !== false) {
1218-
tab.active = true;
1219-
} else if (tab.active) {
1220-
ctrl.select(tab);
1221-
} else {
1222-
tab.active = false;
1223-
}
1224-
};
1225-
1226-
ctrl.removeTab = function removeTab(tab) {
1227-
var index = tabs.indexOf(tab);
1228-
//Select a new tab if the tab to be removed is selected and not destroyed
1229-
if (tab.active && tabs.length > 1 && !destroyed) {
1230-
//If this is the last tab, select the previous tab. else, the next tab.
1231-
var newActiveIndex = index == tabs.length - 1 ? index - 1 : index + 1;
1232-
ctrl.select(tabs[newActiveIndex]);
1233-
}
1234-
tabs.splice(index, 1);
1235-
};
1236-
1237-
var destroyed;
1238-
$scope.$on('$destroy', function() {
1239-
destroyed = true;
1240-
});
1241-
}])
1242-
1243-
/**
1244-
* @ngdoc directive
1245-
* @name ui.bootstrap.tabs.directive:tabset
1246-
* @restrict EA
1247-
*
1248-
* @description
1249-
* Tabset is the outer container for the tabs directive
1250-
*
1251-
* @param {boolean=} vertical Whether or not to use vertical styling for the tabs.
1252-
* @param {boolean=} justified Whether or not to use justified styling for the tabs.
1253-
*
1254-
* @example
1255-
<example module="ui.bootstrap">
1256-
<file name="index.html">
1257-
<tabset>
1258-
<tab heading="Tab 1"><b>First</b> Content!</tab>
1259-
<tab heading="Tab 2"><i>Second</i> Content!</tab>
1260-
</tabset>
1261-
<hr />
1262-
<tabset vertical="true">
1263-
<tab heading="Vertical Tab 1"><b>First</b> Vertical Content!</tab>
1264-
<tab heading="Vertical Tab 2"><i>Second</i> Vertical Content!</tab>
1265-
</tabset>
1266-
<tabset justified="true">
1267-
<tab heading="Justified Tab 1"><b>First</b> Justified Content!</tab>
1268-
<tab heading="Justified Tab 2"><i>Second</i> Justified Content!</tab>
1269-
</tabset>
1270-
</file>
1271-
</example>
1272-
*/
1273-
.directive('tabset', function() {
1274-
return {
1275-
restrict: 'EA',
1276-
transclude: true,
1277-
replace: true,
1278-
scope: {
1279-
type: '@'
1280-
},
1281-
controller: 'TabsetController',
1282-
templateUrl: 'template/tabs/tabset.html',
1283-
link: function(scope, element, attrs) {
1284-
scope.vertical = angular.isDefined(attrs.vertical) ? scope.$parent.$eval(attrs.vertical) : false;
1285-
scope.justified = angular.isDefined(attrs.justified) ? scope.$parent.$eval(attrs.justified) : false;
1286-
}
1287-
};
1288-
})
1289-
1290-
/**
1291-
* @ngdoc directive
1292-
* @name ui.bootstrap.tabs.directive:tab
1293-
* @restrict EA
1294-
*
1295-
* @param {string=} heading The visible heading, or title, of the tab. Set HTML headings with {@link ui.bootstrap.tabs.directive:tabHeading tabHeading}.
1296-
* @param {string=} select An expression to evaluate when the tab is selected.
1297-
* @param {boolean=} active A binding, telling whether or not this tab is selected.
1298-
* @param {boolean=} disabled A binding, telling whether or not this tab is disabled.
1299-
*
1300-
* @description
1301-
* Creates a tab with a heading and content. Must be placed within a {@link ui.bootstrap.tabs.directive:tabset tabset}.
1302-
*
1303-
* @example
1304-
<example module="ui.bootstrap">
1305-
<file name="index.html">
1306-
<div ng-controller="TabsDemoCtrl">
1307-
<button class="btn btn-small" ng-click="items[0].active = true">
1308-
Select item 1, using active binding
1309-
</button>
1310-
<button class="btn btn-small" ng-click="items[1].disabled = !items[1].disabled">
1311-
Enable/disable item 2, using disabled binding
1312-
</button>
1313-
<br />
1314-
<tabset>
1315-
<tab heading="Tab 1">First Tab</tab>
1316-
<tab select="alertMe()">
1317-
<tab-heading><i class="icon-bell"></i> Alert me!</tab-heading>
1318-
Second Tab, with alert callback and html heading!
1319-
</tab>
1320-
<tab ng-repeat="item in items"
1321-
heading="{{item.title}}"
1322-
disabled="item.disabled"
1323-
active="item.active">
1324-
{{item.content}}
1325-
</tab>
1326-
</tabset>
1327-
</div>
1328-
</file>
1329-
<file name="script.js">
1330-
function TabsDemoCtrl($scope) {
1331-
$scope.items = [
1332-
{ title:"Dynamic Title 1", content:"Dynamic Item 0" },
1333-
{ title:"Dynamic Title 2", content:"Dynamic Item 1", disabled: true }
1334-
];
1335-
1336-
$scope.alertMe = function() {
1337-
setTimeout(function() {
1338-
alert("You've selected the alert tab!");
1339-
});
1340-
};
1341-
};
1342-
</file>
1343-
</example>
1344-
*/
1345-
1346-
/**
1347-
* @ngdoc directive
1348-
* @name ui.bootstrap.tabs.directive:tabHeading
1349-
* @restrict EA
1350-
*
1351-
* @description
1352-
* Creates an HTML heading for a {@link ui.bootstrap.tabs.directive:tab tab}. Must be placed as a child of a tab element.
1353-
*
1354-
* @example
1355-
<example module="ui.bootstrap">
1356-
<file name="index.html">
1357-
<tabset>
1358-
<tab>
1359-
<tab-heading><b>HTML</b> in my titles?!</tab-heading>
1360-
And some content, too!
1361-
</tab>
1362-
<tab>
1363-
<tab-heading><i class="icon-heart"></i> Icon heading?!?</tab-heading>
1364-
That's right.
1365-
</tab>
1366-
</tabset>
1367-
</file>
1368-
</example>
1369-
*/
1370-
.directive('tab', ['$parse', '$log', function($parse, $log) {
1371-
return {
1372-
require: '^tabset',
1373-
restrict: 'EA',
1374-
replace: true,
1375-
templateUrl: 'template/tabs/tab.html',
1376-
transclude: true,
1377-
scope: {
1378-
active: '=?',
1379-
heading: '@',
1380-
onSelect: '&select', //This callback is called in contentHeadingTransclude
1381-
//once it inserts the tab's content into the dom
1382-
onDeselect: '&deselect'
1383-
},
1384-
controller: function() {
1385-
//Empty controller so other directives can require being 'under' a tab
1386-
},
1387-
link: function(scope, elm, attrs, tabsetCtrl, transclude) {
1388-
scope.$watch('active', function(active) {
1389-
if (active) {
1390-
tabsetCtrl.select(scope);
1391-
}
1392-
});
1393-
1394-
scope.disabled = false;
1395-
if (attrs.disable) {
1396-
scope.$parent.$watch($parse(attrs.disable), function(value) {
1397-
scope.disabled = !! value;
1398-
});
1399-
}
1400-
1401-
// Deprecation support of "disabled" parameter
1402-
// fix(tab): IE9 disabled attr renders grey text on enabled tab #2677
1403-
// This code is duplicated from the lines above to make it easy to remove once
1404-
// the feature has been completely deprecated
1405-
if (attrs.disabled) {
1406-
$log.warn('Use of "disabled" attribute has been deprecated, please use "disable"');
1407-
scope.$parent.$watch($parse(attrs.disabled), function(value) {
1408-
scope.disabled = !! value;
1409-
});
1410-
}
1411-
1412-
scope.select = function() {
1413-
if (!scope.disabled) {
1414-
scope.active = true;
1415-
}
1416-
};
1417-
1418-
tabsetCtrl.addTab(scope);
1419-
scope.$on('$destroy', function() {
1420-
tabsetCtrl.removeTab(scope);
1421-
});
1422-
1423-
//We need to transclude later, once the content container is ready.
1424-
//when this link happens, we're inside a tab heading.
1425-
scope.$transcludeFn = transclude;
1426-
}
1427-
};
1428-
}])
1429-
1430-
.directive('tabHeadingTransclude', function() {
1431-
return {
1432-
restrict: 'A',
1433-
require: '^tab',
1434-
link: function(scope, elm, attrs, tabCtrl) {
1435-
scope.$watch('headingElement', function updateHeadingElement(heading) {
1436-
if (heading) {
1437-
elm.html('');
1438-
elm.append(heading);
1439-
}
1440-
});
1441-
}
1442-
};
1443-
})
1444-
1445-
.directive('tabContentTransclude', function() {
1446-
return {
1447-
restrict: 'A',
1448-
require: '^tabset',
1449-
link: function(scope, elm, attrs) {
1450-
var tab = scope.$eval(attrs.tabContentTransclude);
1451-
1452-
//Now our tab is ready to be transcluded: both the tab heading area
1453-
//and the tab content area are loaded. Transclude 'em both.
1454-
tab.$transcludeFn(tab.$parent, function(contents) {
1455-
angular.forEach(contents, function(node) {
1456-
if (isTabHeading(node)) {
1457-
//Let tabHeadingTransclude know.
1458-
tab.headingElement = node;
1459-
} else {
1460-
elm.append(node);
1461-
}
1462-
});
1463-
});
1464-
}
1465-
};
1466-
1467-
function isTabHeading(node) {
1468-
return node.tagName && (
1469-
node.hasAttribute('tab-heading') ||
1470-
node.hasAttribute('data-tab-heading') ||
1471-
node.hasAttribute('x-tab-heading') ||
1472-
node.tagName.toLowerCase() === 'tab-heading' ||
1473-
node.tagName.toLowerCase() === 'data-tab-heading' ||
1474-
node.tagName.toLowerCase() === 'x-tab-heading'
1475-
);
1476-
}
1477-
});
1478-
14791183
angular.module("template/datepicker/datepicker.html", []).run(["$templateCache", function($templateCache) {
14801184
$templateCache.put("template/datepicker/datepicker.html",
14811185
"<div ng-switch=\"datepickerMode\" role=\"application\" ng-keydown=\"keydown($event)\">\n" +
@@ -1568,25 +1272,3 @@ angular.module("template/datepicker/year.html", []).run(["$templateCache", funct
15681272
"");
15691273
}]);
15701274

1571-
angular.module("template/tabs/tab.html", []).run(["$templateCache", function($templateCache) {
1572-
$templateCache.put("template/tabs/tab.html",
1573-
"<li ng-class=\"{active: active, disabled: disabled}\">\n" +
1574-
" <a href ng-click=\"select()\" tab-heading-transclude>{{heading}}</a>\n" +
1575-
"</li>\n" +
1576-
"");
1577-
}]);
1578-
1579-
angular.module("template/tabs/tabset.html", []).run(["$templateCache", function($templateCache) {
1580-
$templateCache.put("template/tabs/tabset.html",
1581-
"<div>\n" +
1582-
" <ul class=\"nav nav-{{type || 'tabs'}} nav-tabs-alt\" ng-class=\"{'nav-stacked': vertical, 'nav-justified': justified}\" ng-transclude></ul>\n" +
1583-
" <div class=\"tab-content\">\n" +
1584-
" <div class=\"tab-pane\" \n" +
1585-
" ng-repeat=\"tab in tabs\" \n" +
1586-
" ng-class=\"{active: tab.active}\"\n" +
1587-
" tab-content-transclude=\"tab\">\n" +
1588-
" </div>\n" +
1589-
" </div>\n" +
1590-
"</div>\n" +
1591-
"");
1592-
}]);

0 commit comments

Comments
 (0)