[Mobile] Clean-Up
Cleaned the unused code for the backArrow and long touch gestures. Commented out functions for later use Currently shows the back arrow, however, only will print to console on press. Edited tests where mobile checks were breaking and fixed.
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
{
|
||||
"key": "TreeNodeController",
|
||||
"implementation": "controllers/TreeNodeController.js",
|
||||
"depends": [ "$scope", "$timeout", "$rootScope", "queryService" ]
|
||||
"depends": [ "$scope", "$timeout", "queryService" ]
|
||||
},
|
||||
{
|
||||
"key": "ActionGroupController",
|
||||
|
||||
@@ -891,22 +891,22 @@ mct-container {
|
||||
opacity: 1 !important; } }
|
||||
|
||||
@media screen and (min-device-width: 800px) and (min-device-height: 1025px), screen and (min-device-width: 1025px) and (min-device-height: 800px) {
|
||||
/* line 175, ../sass/mobile/_layout.scss */
|
||||
/* line 176, ../sass/mobile/_layout.scss */
|
||||
.desktop-hide {
|
||||
display: none; } }
|
||||
|
||||
@media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px), screen and (orientation: portrait) and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) {
|
||||
/* line 182, ../sass/mobile/_layout.scss */
|
||||
/* line 183, ../sass/mobile/_layout.scss */
|
||||
.mobile-hide {
|
||||
display: none; } }
|
||||
|
||||
@media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) {
|
||||
/* line 189, ../sass/mobile/_layout.scss */
|
||||
/* line 190, ../sass/mobile/_layout.scss */
|
||||
.phone-hide {
|
||||
display: none; } }
|
||||
|
||||
@media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px), screen and (orientation: portrait) and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) {
|
||||
/* line 195, ../sass/mobile/_layout.scss */
|
||||
/* line 196, ../sass/mobile/_layout.scss */
|
||||
.tree-holder {
|
||||
overflow-x: hidden !important; } }
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@
|
||||
}
|
||||
|
||||
.mobile-back-arrow {
|
||||
// display: none !important;
|
||||
// font-size: 0.8em;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ define(
|
||||
* expand-to-show-navigated-object behavior.)
|
||||
* @constructor
|
||||
*/
|
||||
function TreeNodeController($scope, $timeout, $rootScope, queryService) {
|
||||
function TreeNodeController($scope, $timeout, queryService) {
|
||||
var selectedObject = ($scope.ngModel || {}).selectedObject,
|
||||
isSelected = false,
|
||||
hasBeenExpanded = false;
|
||||
|
||||
@@ -55,22 +55,13 @@ define(
|
||||
return path;
|
||||
}
|
||||
|
||||
function urlForLastLocation(mode, domainObject) {
|
||||
var context = domainObject &&
|
||||
domainObject.getCapability('context'),
|
||||
objectPath = context ? context.getPath() : [],
|
||||
editedPath = (objectPath.length > 1) ? objectPath.slice(0, -1) : objectPath,
|
||||
ids = editedPath.map(function (domainObject) {
|
||||
return domainObject.getId();
|
||||
}),
|
||||
// Parses the path together. Starts with the
|
||||
// default index.html file, then the mode passed
|
||||
// into the service, followed by ids in the url
|
||||
// joined by '/', and lastly the view path from
|
||||
// the current location
|
||||
path = mode + "/" + ids.slice(1).join("/");
|
||||
return path;
|
||||
}
|
||||
// function idForLevelArrow(domainObject) {
|
||||
// var context = domainObject &&
|
||||
// domainObject.getCapability('context'),
|
||||
// objectPath = context ? context.getPath() : [],
|
||||
// id = objectPath[objectPath.length - 2];
|
||||
// return id;
|
||||
// }
|
||||
|
||||
// Uses the Url for the current location
|
||||
// from the urlForLocation function and
|
||||
@@ -81,13 +72,7 @@ define(
|
||||
"index.html#" + urlForLocation(mode, domainObject) + viewPath;
|
||||
return newTabPath;
|
||||
}
|
||||
|
||||
function urlForBack(mode, domainObject) {
|
||||
var newTabPath =
|
||||
"index.html#/" + urlForLastLocation(mode, domainObject);
|
||||
return newTabPath;
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
/**
|
||||
* Returns the Url path for a specific domain object
|
||||
@@ -107,9 +92,9 @@ define(
|
||||
* @param {DomainObject} value of the domain object
|
||||
* to get the path of
|
||||
*/
|
||||
urlForLocation: urlForLocation,
|
||||
urlForLocation: urlForLocation
|
||||
|
||||
urlForBack: urlForBack
|
||||
// idForLevelArrow: idForLevelArrow
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,9 @@ define(
|
||||
});
|
||||
|
||||
it("check if tree node is in a mobile device", function () {
|
||||
controller.checkMobile();
|
||||
if (controller) {
|
||||
controller.checkMobile();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user