Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1655 → Rev 1670

/branches/v3/impl/src/web/layout/themes/scripts-default.jsp
700,7 → 700,7
function(){
 
//invokeChosenSelects();
$("select[class!='chosenOff']").chosen();
$("select:not([class~='chosenOff'])").chosen();
//$("select:not(.tablesorter-filter)").chosen({width: "50%"});
}
);
736,3 → 736,7
});
</script>
 
 
 
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/bpmn/css/bpmn.css" />
 
/branches/v3/impl/src/web/layout/headerTools.jsp
266,6 → 266,57
<script>
var GLOBAL_BacoAngularAppDependencies = [];
var bacoAngularApp = angular.module('BacoAngularApp', GLOBAL_BacoAngularAppDependencies);
 
 
 
 
/* Isto daria para colocar numa app nossa lá no meio para adicionar material vindo do Ajax
bacoAngularApp.directive('dynamic', function ($compile) {
return {
replace: true,
link: function (scope, ele, attrs) {
scope.$watch(attrs.dynamic, function(html) {
if (!html) {
return;
}
ele.html((typeof(html) === 'string') ? html : html.data);
$compile(ele.contents())(scope);
});
}
};
});
*/
/**
* AngularHelper : Contains methods that help using angular without being in the scope of an angular controller or directive
*/
var AngularHelper = (function () {
var AngularHelper = function () { };
 
/**
* ApplicationName : Default application name for the helper
*/
var defaultApplicationName = "myDefaultAppName";
 
/**
* Compile : Compile html with the rootScope of an application
* and replace the content of a target element with the compiled html
* @$targetDom : The dom in which the compiled html should be placed
* @htmlToCompile : The html to compile using angular
* @applicationName : (Optionnal) The name of the application (use the default one if empty)
*/
AngularHelper.Compile = function ($targetDom, htmlToCompile, applicationName) {
var $injector = angular.injector(["ng", applicationName || defaultApplicationName]);
 
$injector.invoke(["$compile", "$rootScope", function ($compile, $rootScope) {
//Get the scope of the target, use the rootScope if it does not exists
var $scope = $targetDom.html(htmlToCompile).scope();
$compile($targetDom)($scope || $rootScope);
$rootScope.$digest();
}]);
}
 
return AngularHelper;
})();
</script>