removes unused/unneeded files
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
/**
|
||||
* @ngdoc controller
|
||||
* @name Umbraco.Editors.Template.EditController
|
||||
* @function
|
||||
*
|
||||
* @description
|
||||
* The controller for editing templates
|
||||
*/
|
||||
function TemplateEditController($scope, $http, assetsService, templateResource, $routeParams, $log) {
|
||||
|
||||
$scope.pageId = 1069;
|
||||
|
||||
$scope.rendering = false;
|
||||
$scope.aceLoaded = function(_editor) {
|
||||
// Options
|
||||
};
|
||||
|
||||
var render = _.throttle(function(){
|
||||
templateResource.saveAndRender($scope.template.content, $scope.template.id, $scope.pageId).then(
|
||||
function(response){
|
||||
var iframe = document.getElementById('mockingbird');
|
||||
iframe = (iframe.contentWindow) ? iframe.contentWindow : (iframe.contentDocument.document) ? iframe.contentDocument.document : iframe.contentDocument;
|
||||
iframe.document.open();
|
||||
iframe.document.write(response);
|
||||
iframe.document.close();
|
||||
$scope.rendering = false;
|
||||
},
|
||||
function(response){
|
||||
$log.log(response);
|
||||
$scope.rendering = false;
|
||||
}
|
||||
);
|
||||
|
||||
}, 1000);
|
||||
|
||||
$scope.aceChanged = function(e) {
|
||||
if(!$scope.rendering){
|
||||
$scope.rendering = true;
|
||||
render();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
templateResource.getById($routeParams.id).then(function(template){
|
||||
$scope.template = template;
|
||||
if(!$scope.rendering){
|
||||
$scope.rendering = true;
|
||||
render();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller("Umbraco.Editors.Template.EditController", TemplateEditController);
|
||||
@@ -1,26 +0,0 @@
|
||||
<div ng-form name="contentForm" val-form-manager>
|
||||
<umb-panel ng-controller="Umbraco.Editors.Template.EditController">
|
||||
|
||||
<umb-header>
|
||||
<h1>{{template.name}}</h1>
|
||||
</umb-header>
|
||||
|
||||
<div class="umb-panel-body umb-scrollable row-fluid">
|
||||
<div class="span6" style="position: relative; height: 100%">
|
||||
|
||||
<div style="width: 100%; height: 100%; top: 0; bottom: 0; position: absolute" ng-model="template.content" ui-ace="{
|
||||
useWrapMode : true,
|
||||
showGutter: true,
|
||||
theme:'twilight',
|
||||
mode: 'xml',
|
||||
onLoad: aceLoaded,
|
||||
onChange: aceChanged
|
||||
}"></div>
|
||||
</div>
|
||||
<div class="span6" style="position: relative; height: 100%">
|
||||
<iframe id="mockingbird" style="width: 100%; height: 100%; top: 0; bottom: 0; position: absolute" id="preview" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</umb-panel>
|
||||
</div>
|
||||
Reference in New Issue
Block a user