css-template editor tweaks, more compat polish
This commit is contained in:
@@ -114,7 +114,10 @@ module.exports = function (grunt) {
|
||||
},
|
||||
|
||||
vs: {
|
||||
files: [{ dest: '<%= vsdir %>', src : '**', expand: true, cwd: '<%= distdir %>' }]
|
||||
files: [{ dest: '<%= vsdir %>/js', src : '**', expand: true, cwd: '<%= distdir %>/js/' }]
|
||||
},
|
||||
packages: {
|
||||
files: [{ dest: '<%= vsdir %>/../App_Plugins', src : '**', expand: true, cwd: 'src/packages/' }]
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
22
src/Umbraco.Web.UI.Client/lib/umbraco/compat.js
Normal file
22
src/Umbraco.Web.UI.Client/lib/umbraco/compat.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/* contains random bits and pieces we neede to make the U6 UI behave */
|
||||
jQuery(document).ready(function () {
|
||||
scaleScrollables("body");
|
||||
|
||||
jQuery(window).bind("resize", function () {
|
||||
scaleScrollables("body");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function scaleScrollables(selector){
|
||||
jQuery(".umb-scrollable").each(function () {
|
||||
var el = jQuery(this);
|
||||
var totalOffset = 0;
|
||||
var offsety = el.data("offset-y");
|
||||
|
||||
if (offsety != undefined)
|
||||
totalOffset += offsety;
|
||||
|
||||
el.height($(window).height() - (el.offset().top + totalOffset));
|
||||
});
|
||||
}
|
||||
@@ -12,103 +12,113 @@ angular.module('umbraco.services')
|
||||
modalClass = options.modalClass || "umb-modalcolumn",
|
||||
templateUrl = options.template || "views/common/notfound.html";
|
||||
|
||||
var callback = options.callback;
|
||||
var $modal = $('<div class="modal umb-modal hide" data-backdrop="false" tabindex="-1"></div>');
|
||||
var id = templateUrl.replace('.html', '').replace(/[\/|\.|:]/g, "-") + '-' + scope.$id;
|
||||
|
||||
$modal
|
||||
.attr('id', id)
|
||||
.addClass(animationClass)
|
||||
.addClass(modalClass);
|
||||
var callback = options.callback;
|
||||
var $modal = $('<div class="modal umb-modal hide" data-backdrop="false" tabindex="-1"></div>');
|
||||
var id = templateUrl.replace('.html', '').replace(/[\/|\.|:]/g, "-") + '-' + scope.$id;
|
||||
|
||||
$rootScope.$on("closeDialogs", function () {
|
||||
$modal.modal("hide");
|
||||
});
|
||||
$modal
|
||||
.attr('id', id)
|
||||
.addClass(animationClass)
|
||||
.addClass(modalClass);
|
||||
|
||||
$rootScope.$on("closeDialogs", function () {
|
||||
$modal.modal("hide");
|
||||
|
||||
$modal.remove();
|
||||
$("#" + $modal.attr("id")).remove();
|
||||
});
|
||||
|
||||
|
||||
if(options.iframe) {
|
||||
var html = $("<iframe auto-scale='0' src='" + templateUrl + "' style='width: 100%; height: 100%;'></iframe>");
|
||||
$modal.html(html);
|
||||
$('body').append($modal);
|
||||
|
||||
if(width){
|
||||
$modal.css("width", width);
|
||||
}
|
||||
|
||||
if(options.iframe) {
|
||||
var html = $("<iframe src='" + templateUrl + "' style='width: 100%; height: 100%;'></iframe>");
|
||||
$modal.html(html);
|
||||
$('body').append($modal);
|
||||
|
||||
//Autoshow
|
||||
if (options.show) {
|
||||
$modal.modal('show');
|
||||
}
|
||||
|
||||
return $modal;
|
||||
} else {
|
||||
if (options.show) {
|
||||
$modal.modal('show');
|
||||
}
|
||||
|
||||
return $modal;
|
||||
} else {
|
||||
return $q.when($templateCache.get(templateUrl) || $http.get(templateUrl, { cache: true }).then(function (res) { return res.data; }))
|
||||
.then(function onSuccess(template) {
|
||||
.then(function onSuccess(template) {
|
||||
|
||||
// Build modal object
|
||||
$modal
|
||||
.html(template);
|
||||
// Build modal object
|
||||
$modal
|
||||
.html(template);
|
||||
|
||||
|
||||
$('body').append($modal);
|
||||
$('body').append($modal);
|
||||
|
||||
// Compile modal content
|
||||
$timeout(function () {
|
||||
$compile($modal)(scope);
|
||||
});
|
||||
// Compile modal content
|
||||
$timeout(function () {
|
||||
$compile($modal)(scope);
|
||||
});
|
||||
|
||||
//Scope to handle data from the modal form
|
||||
scope.dialogData = {};
|
||||
scope.dialogData.selection = [];
|
||||
//Scope to handle data from the modal form
|
||||
scope.dialogData = {};
|
||||
scope.dialogData.selection = [];
|
||||
|
||||
// Provide scope display functions
|
||||
scope.$modal = function (name) {
|
||||
$modal.modal(name);
|
||||
};
|
||||
// Provide scope display functions
|
||||
scope.$modal = function (name) {
|
||||
$modal.modal(name);
|
||||
};
|
||||
|
||||
scope.hide = function () {
|
||||
$modal.modal('hide');
|
||||
$('body').remove($modal);
|
||||
};
|
||||
scope.hide = function () {
|
||||
$modal.modal('hide');
|
||||
|
||||
$modal.remove();
|
||||
$("#" + $modal.attr("id")).remove();
|
||||
};
|
||||
|
||||
scope.show = function () {
|
||||
$modal.modal('show');
|
||||
};
|
||||
scope.show = function () {
|
||||
$modal.modal('show');
|
||||
};
|
||||
|
||||
scope.submit = function (data) {
|
||||
$modal.modal('hide');
|
||||
$('body').remove($modal);
|
||||
scope.submit = function (data) {
|
||||
if(callback){
|
||||
callback(data);
|
||||
}
|
||||
|
||||
callback(data);
|
||||
};
|
||||
$modal.modal('hide');
|
||||
|
||||
scope.select = function (item) {
|
||||
if (scope.dialogData.selection.indexOf(item) < 0) {
|
||||
scope.dialogData.selection.push(item);
|
||||
}
|
||||
};
|
||||
$modal.remove();
|
||||
$("#" + $modal.attr("id")).remove();
|
||||
};
|
||||
|
||||
scope.dismiss = scope.hide;
|
||||
scope.select = function (item) {
|
||||
if (scope.dialogData.selection.indexOf(item) < 0) {
|
||||
scope.dialogData.selection.push(item);
|
||||
}
|
||||
};
|
||||
|
||||
// Emit modal events
|
||||
angular.forEach(['show', 'shown', 'hide', 'hidden'], function (name) {
|
||||
$modal.on(name, function (ev) {
|
||||
scope.$emit('modal-' + name, ev);
|
||||
});
|
||||
});
|
||||
scope.dismiss = scope.hide;
|
||||
|
||||
// Support autofocus attribute
|
||||
$modal.on('shown', function (event) {
|
||||
$('input[autofocus]', $modal).first().trigger('focus');
|
||||
});
|
||||
// Emit modal events
|
||||
angular.forEach(['show', 'shown', 'hide', 'hidden'], function (name) {
|
||||
$modal.on(name, function (ev) {
|
||||
scope.$emit('modal-' + name, ev);
|
||||
});
|
||||
});
|
||||
|
||||
// Support autofocus attribute
|
||||
$modal.on('shown', function (event) {
|
||||
$('input[autofocus]', $modal).first().trigger('focus');
|
||||
});
|
||||
|
||||
//Autoshow
|
||||
if (options.show) {
|
||||
$modal.modal('show');
|
||||
if (options.show) {
|
||||
$modal.modal('show');
|
||||
}
|
||||
|
||||
$rootScope.$on("closeDialogs", function () {
|
||||
$modal.modal("hide");
|
||||
});
|
||||
|
||||
//Return the modal object
|
||||
return $modal;
|
||||
});
|
||||
return $modal;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -13,7 +12,6 @@ body {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.padded {
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
/* CONTAINS ALL HACKS AND OTHER QUICK-FIXES THAT WE MUST HANDLE BEFORE A RELEASE */
|
||||
|
||||
/*ensures dialogs doesnt have side-by-side labels */
|
||||
.umbracoDialog .controls-row{margin-left: 0px !important;}
|
||||
|
||||
.controls-row img {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="searchPreview" ng-controller="Umbraco.Editors.SimpleEditorController">
|
||||
|
||||
|
||||
<h3><a href="#">{{content.name}}</a></h3>
|
||||
<a href="#">http://localhost/{{content.name}}</a>
|
||||
<p>{{tab.properties[1].value}}</p>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.searchPreview h3{
|
||||
font-size: 16px !Important;
|
||||
line-height: 16px !Important;
|
||||
padding: 0px; margin: 0px;
|
||||
}
|
||||
|
||||
.searchPreview h3 a{
|
||||
color: #12c; text-decoration: underline;}
|
||||
|
||||
.searchPreview a{
|
||||
color: #009933;
|
||||
font-size: 14px;
|
||||
|
||||
}
|
||||
|
||||
.searchPreview p{
|
||||
color: #444;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,6 @@
|
||||
(function () {
|
||||
angular.module("umbraco").controller("Umbraco.Editors.SimpleEditorController",
|
||||
function ($rootScope, $scope, notificationsService, dialogService) {
|
||||
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
propertyEditors: [
|
||||
{
|
||||
id: "0BA0F832-D759-4526-9B3E-95BBFC98F82E",
|
||||
name: "My Simple Editor",
|
||||
editor: {
|
||||
view: "~/App_Plugins/SimpleEditor/PropertyEditors/Views/simpleeditor.html"
|
||||
}
|
||||
}
|
||||
],
|
||||
javascript: [
|
||||
'~/App_Plugins/SimpleEditor/PropertyEditors/Js/SimpleEditor.js'
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<div ng-controller="uComponents.Editors.MNTPController">
|
||||
<ul class="nav nav-stacked">
|
||||
<li ng-repeat="node in model.value">
|
||||
<a href="#" prevent-default>
|
||||
<i class="icon umb-tree-icon sprTree {{node.icon}}"></i>
|
||||
{{node.name}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#" ng-click="openContentPicker(model.value)" prevent-default>
|
||||
<i class="icon icon-plus"></i> Add
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<br/><br/>
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
//this controller simply tells the dialogs service to open a mediaPicker window
|
||||
//with a specified callback, this callback will receive an object with a selection on it
|
||||
angular.module('umbraco')
|
||||
.controller("uComponents.Editors.MNTPController",
|
||||
function($scope, dialogService){
|
||||
|
||||
alert("node!");
|
||||
|
||||
$scope.openContentPicker =function(value){
|
||||
var d = dialogService.contentPicker({scope: $scope, callback: populate});
|
||||
};
|
||||
|
||||
function populate(data){
|
||||
$scope.model.value = data.selection;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
propertyEditors: [
|
||||
{
|
||||
id: "7e062c13-7c41-4ad9-b389-41d88aeef87c",
|
||||
name: "Multinode treepicker",
|
||||
editor: {
|
||||
view: "~/App_Plugins/property editors/mntp/mntp.html"
|
||||
}
|
||||
}
|
||||
]
|
||||
,
|
||||
javascript: [
|
||||
'~/App_Plugins/property editors/mntp/mntp.js'
|
||||
]
|
||||
}
|
||||
@@ -33,10 +33,7 @@ angular.module("umbraco")
|
||||
var imagePropVal = umbImageHelper.getImagePropertyVaue({imageModel: img, scope: $scope});
|
||||
|
||||
var data = {
|
||||
src: (imagePropVal != null && imagePropVal != "")
|
||||
? imagePropVal
|
||||
: "nothing.jpg",
|
||||
style: 'width: 100px; height: 100px',
|
||||
src: (imagePropVal != null && imagePropVal != "") ? imagePropVal: "nothing.jpg",
|
||||
id: '__mcenew'
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<cc1:UmbracoClientDependencyLoader runat="server" ID="ClientLoader" />
|
||||
|
||||
<!-- Default script and style -->
|
||||
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="ui/default.css" PathNameAlias="UmbracoClient" />
|
||||
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="assets/css/umbraco.css" PathNameAlias="UmbracoRoot" />
|
||||
|
||||
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="Application/NamespaceManager.js" PathNameAlias="UmbracoClient" Priority="0" />
|
||||
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="ui/jquery.js" PathNameAlias="UmbracoClient" Priority="1" />
|
||||
@@ -18,20 +18,18 @@
|
||||
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="Application/UmbracoClientManager.js" PathNameAlias="UmbracoClient" Priority="2" />
|
||||
<umb:JsInclude ID="JsInclude11" runat="server" FilePath="UI/knockout.js" PathNameAlias="UmbracoClient" Priority="3" />
|
||||
<umb:JsInclude ID="JsInclude12" runat="server" FilePath="UI/knockout.mapping.js" PathNameAlias="UmbracoClient" Priority="4" />
|
||||
|
||||
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="ui/default.js" PathNameAlias="UmbracoClient" Priority="5" />
|
||||
|
||||
<asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
|
||||
</head>
|
||||
|
||||
<body class="umbracoDialog" style="margin: 15px 10px 0px 10px;">
|
||||
|
||||
|
||||
<form id="form1" runat="server">
|
||||
<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server"></asp:ScriptManager>
|
||||
<asp:ContentPlaceHolder ID="body" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
</form>
|
||||
|
||||
<asp:ContentPlaceHolder ID="footer" runat="server"></asp:ContentPlaceHolder>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<umb:JsInclude ID="JsIncludeHotkeys" runat="server" FilePath="Application/jQuery/jquery.hotkeys.js" PathNameAlias="UmbracoClient" Priority="10" />
|
||||
|
||||
<umb:JsInclude runat="server" FilePath="lib/bootstrap/js/bootstrap.min.js" PathNameAlias="UmbracoRoot" Priority="10" />
|
||||
<umb:JsInclude runat="server" FilePath="lib/umbraco/compat.js" PathNameAlias="UmbracoRoot" Priority="10" />
|
||||
|
||||
<asp:ContentPlaceHolder ID="head" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
|
||||
@@ -39,19 +39,23 @@
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="608px" Height="336px" hasMenu="true">
|
||||
<cc1:Pane ID="Pane7" runat="server" Height="44px" Width="528px">
|
||||
<cc1:TabView ID="Panel1" runat="server" Width="608px" Height="336px" hasMenu="true">
|
||||
<cc1:Pane ID="Pane7" runat="server" Height="44px" Width="528px">
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" CodeBase="JavaScript" ClientSaveMethod="doSubmit"
|
||||
runat="server" AutoResize="true" OffSetX="47" OffSetY="47" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane ID="Pane8" runat="server" Height="44px" Width="528px">
|
||||
<cc1:PropertyPanel runat="server" ID="pp_name">
|
||||
<asp:TextBox ID="NameTxt" Width="350px" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel runat="server" ID="pp_path">
|
||||
<asp:Literal ID="lttPath" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" CodeBase="JavaScript" ClientSaveMethod="doSubmit"
|
||||
runat="server" AutoResize="true" OffSetX="47" OffSetY="47" />
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
</cc1:TabView>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -36,17 +36,21 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" CssClass="panel" hasMenu="true">
|
||||
<cc1:TabView ID="Panel1" runat="server" CssClass="panel" hasMenu="true">
|
||||
|
||||
<cc1:Pane ID="Pane7" CssClass="pane" runat="server">
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" CodeBase="Css" OffSetX="37" OffSetY="54" AutoResize="true" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane ID="Pane8" CssClass="pane" runat="server">
|
||||
<cc1:PropertyPanel ID="pp_name" runat="server">
|
||||
<asp:TextBox ID="NameTxt" Width="350px" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel ID="pp_path" runat="server">
|
||||
<asp:Literal ID="lttPath" runat="server"></asp:Literal>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" CodeBase="Css" OffSetX="37" OffSetY="54" AutoResize="true" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
</cc1:TabView>
|
||||
</asp:Content>
|
||||
|
||||
@@ -52,7 +52,14 @@
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="608px" Height="336px" hasMenu="true">
|
||||
<cc1:TabView ID="Panel1" runat="server" Width="608px" Height="336px" hasMenu="true">
|
||||
|
||||
<cc1:Pane ID="Pane8" runat="server" Height="44px" Width="528px">
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" runat="server" CodeBase="Razor" ClientSaveMethod="doSubmit" AutoResize="true" OffSetX="37" OffSetY="54"/>
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane ID="Pane7" runat="server" Height="44px" Width="528px">
|
||||
|
||||
<cc1:PropertyPanel ID="pp_name" runat="server">
|
||||
@@ -67,11 +74,10 @@
|
||||
<asp:DropDownList ID="MasterTemplate" Width="350px" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" runat="server" CodeBase="Razor" ClientSaveMethod="doSubmit" AutoResize="true" OffSetX="37" OffSetY="54"/>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
|
||||
|
||||
</cc1:TabView>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
|
||||
public partial class EditView : global::umbraco.BasePages.UmbracoEnsuredPage
|
||||
{
|
||||
private Template _template;
|
||||
protected MenuIconI SaveButton;
|
||||
public MenuButton SaveButton;
|
||||
|
||||
public EditView()
|
||||
{
|
||||
@@ -151,11 +151,20 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
|
||||
}
|
||||
|
||||
Panel1.hasMenu = true;
|
||||
var editor = Panel1.NewTabPage(ui.Text("template"));
|
||||
editor.Controls.Add(Pane8);
|
||||
|
||||
var props = Panel1.NewTabPage(ui.Text("properties"));
|
||||
props.Controls.Add(Pane7);
|
||||
|
||||
|
||||
SaveButton = Panel1.Menu.NewButton();
|
||||
SaveButton.Icon = "save";
|
||||
SaveButton.OnClientClick = "doSubmit()";
|
||||
SaveButton.Text = ui.Text("save");
|
||||
SaveButton.ButtonType = MenuButtonType.Primary;
|
||||
SaveButton.ID = "save";
|
||||
|
||||
SaveButton = Panel1.Menu.NewIcon();
|
||||
SaveButton.ImageURL = SystemDirectories.Umbraco + "/images/editor/save.gif";
|
||||
SaveButton.AltText = ui.Text("save");
|
||||
SaveButton.ID = "save";
|
||||
|
||||
Panel1.Text = ui.Text("edittemplate");
|
||||
pp_name.Text = ui.Text("name", base.getUser());
|
||||
@@ -163,8 +172,7 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
|
||||
pp_masterTemplate.Text = ui.Text("mastertemplate", base.getUser());
|
||||
|
||||
// Editing buttons
|
||||
Panel1.Menu.InsertSplitter();
|
||||
MenuIconI umbField = Panel1.Menu.NewIcon();
|
||||
MenuIconI umbField = editorSource.Menu.NewIcon();
|
||||
umbField.ImageURL = UmbracoPath + "/images/editor/insField.gif";
|
||||
umbField.OnClickCommand =
|
||||
ClientTools.Scripts.OpenModalWindow(
|
||||
@@ -174,7 +182,7 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
|
||||
|
||||
|
||||
// TODO: Update icon
|
||||
MenuIconI umbDictionary = Panel1.Menu.NewIcon();
|
||||
MenuIconI umbDictionary = editorSource.Menu.NewIcon();
|
||||
umbDictionary.ImageURL = GlobalSettings.Path + "/images/editor/dictionaryItem.gif";
|
||||
umbDictionary.OnClickCommand =
|
||||
ClientTools.Scripts.OpenModalWindow(
|
||||
@@ -188,7 +196,7 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
|
||||
ClientCallbackInsertMacroMarkup = "function(alias) {editViewEditor.insertMacroMarkup(alias);}",
|
||||
ClientCallbackOpenMacroModel = "function(alias) {editViewEditor.openMacroModal(alias);}"
|
||||
};
|
||||
Panel1.Menu.InsertNewControl(macroSplitButton, 40);
|
||||
editorSource.Menu.InsertNewControl(macroSplitButton, 40);
|
||||
|
||||
if (_template == null)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,34 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views {
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.UmbracoPanel Panel1;
|
||||
protected global::umbraco.uicontrols.TabView Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Pane8 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Pane Pane8;
|
||||
|
||||
/// <summary>
|
||||
/// pp_source control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.PropertyPanel pp_source;
|
||||
|
||||
/// <summary>
|
||||
/// editorSource control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.CodeArea editorSource;
|
||||
|
||||
/// <summary>
|
||||
/// Pane7 control.
|
||||
@@ -92,23 +119,5 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views {
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList MasterTemplate;
|
||||
|
||||
/// <summary>
|
||||
/// pp_source control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.PropertyPanel pp_source;
|
||||
|
||||
/// <summary>
|
||||
/// editorSource control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.CodeArea editorSource;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,20 +34,23 @@
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="608px" Height="336px" hasMenu="true">
|
||||
<cc1:Tabview ID="Panel1" runat="server" Width="608px" Height="336px" hasMenu="true">
|
||||
<cc1:Pane ID="Pane7" runat="server" Height="44px" Width="528px">
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" CodeBase="JavaScript" ClientSaveMethod="doSubmit"
|
||||
runat="server" AutoResize="true" OffSetX="47" OffSetY="47" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
<cc1:Pane ID="Pane8" runat="server" Height="44px" Width="528px">
|
||||
<cc1:PropertyPanel runat="server" ID="pp_name">
|
||||
<asp:TextBox ID="NameTxt" Width="350px" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel runat="server" ID="pp_path">
|
||||
<asp:Literal ID="lttPath" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" CodeBase="JavaScript" ClientSaveMethod="doSubmit"
|
||||
runat="server" AutoResize="true" OffSetX="47" OffSetY="47" />
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
</cc1:Tabview>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
|
||||
@@ -27,9 +27,10 @@ namespace umbraco.cms.presentation.settings.scripts
|
||||
|
||||
}
|
||||
protected System.Web.UI.HtmlControls.HtmlForm Form1;
|
||||
protected uicontrols.UmbracoPanel Panel1;
|
||||
protected uicontrols.TabView Panel1;
|
||||
protected System.Web.UI.WebControls.TextBox NameTxt;
|
||||
protected uicontrols.Pane Pane7;
|
||||
protected uicontrols.Pane Pane8;
|
||||
|
||||
protected System.Web.UI.WebControls.Literal lttPath;
|
||||
protected System.Web.UI.WebControls.Literal editorJs;
|
||||
@@ -37,7 +38,7 @@ namespace umbraco.cms.presentation.settings.scripts
|
||||
protected umbraco.uicontrols.PropertyPanel pp_name;
|
||||
protected umbraco.uicontrols.PropertyPanel pp_path;
|
||||
|
||||
protected MenuIconI SaveButton;
|
||||
protected MenuButton SaveButton;
|
||||
|
||||
private string file;
|
||||
|
||||
@@ -106,9 +107,18 @@ namespace umbraco.cms.presentation.settings.scripts
|
||||
else if (file.EndsWith("master"))
|
||||
editorSource.CodeBase = uicontrols.CodeArea.EditorType.HTML;
|
||||
|
||||
SaveButton = Panel1.Menu.NewIcon();
|
||||
SaveButton.ImageURL = SystemDirectories.Umbraco + "/images/editor/save.gif";
|
||||
SaveButton.AltText = "Save File";
|
||||
|
||||
var editor = Panel1.NewTabPage(ui.Text("script"));
|
||||
editor.Controls.Add(Pane7);
|
||||
|
||||
var props = Panel1.NewTabPage(ui.Text("properties"));
|
||||
props.Controls.Add(Pane8);
|
||||
|
||||
|
||||
SaveButton = Panel1.Menu.NewButton();
|
||||
SaveButton.Icon = "save";
|
||||
SaveButton.Text = ui.Text("save");
|
||||
SaveButton.ButtonType = MenuButtonType.Primary;
|
||||
SaveButton.ID = "save";
|
||||
|
||||
if (editorSource.CodeBase == uicontrols.CodeArea.EditorType.HTML)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
|
||||
{
|
||||
private StyleSheet stylesheet;
|
||||
|
||||
protected MenuIconI SaveButton;
|
||||
protected MenuButton SaveButton;
|
||||
|
||||
public editstylesheet()
|
||||
{
|
||||
@@ -28,9 +28,18 @@ namespace umbraco.cms.presentation.settings.stylesheet
|
||||
{
|
||||
base.OnInit(e);
|
||||
|
||||
SaveButton = Panel1.Menu.NewIcon();
|
||||
SaveButton.ImageURL = SystemDirectories.Umbraco + "/images/editor/save.gif";
|
||||
SaveButton.AltText = "Save stylesheet";
|
||||
|
||||
var editor = Panel1.NewTabPage(ui.Text("stylesheet"));
|
||||
editor.Controls.Add(Pane7);
|
||||
|
||||
var props = Panel1.NewTabPage(ui.Text("properties"));
|
||||
props.Controls.Add(Pane8);
|
||||
|
||||
|
||||
SaveButton = Panel1.Menu.NewButton();
|
||||
SaveButton.Icon = "save";
|
||||
SaveButton.Text = ui.Text("save");
|
||||
SaveButton.ButtonType = MenuButtonType.Primary;
|
||||
SaveButton.ID = "save";
|
||||
}
|
||||
|
||||
@@ -74,7 +83,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.UmbracoPanel Panel1;
|
||||
protected global::umbraco.uicontrols.TabView Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Pane7 control.
|
||||
@@ -84,6 +93,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::umbraco.uicontrols.Pane Pane7;
|
||||
protected global::umbraco.uicontrols.Pane Pane8;
|
||||
|
||||
/// <summary>
|
||||
/// pp_name control.
|
||||
|
||||
@@ -6,7 +6,7 @@ using Umbraco.Core.IO;
|
||||
|
||||
namespace umbraco.uicontrols
|
||||
{
|
||||
internal class MenuButton : System.Web.UI.WebControls.LinkButton
|
||||
public class MenuButton : System.Web.UI.WebControls.LinkButton
|
||||
{
|
||||
public MenuButtonType ButtonType { get; set; }
|
||||
internal DataAttributes Data { get; private set; }
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace umbraco.uicontrols
|
||||
return menu;
|
||||
}
|
||||
|
||||
internal MenuButton NewButton(int index = -1)
|
||||
public MenuButton NewButton(int index = -1)
|
||||
{
|
||||
MenuButton btn = new MenuButton();
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace umbraco.uicontrols {
|
||||
if (this.ID == parent.ActiveTabId)
|
||||
activeClass = "active";
|
||||
|
||||
writer.WriteLine("<div id='" + this.ID + "' class='umb-tab-pane tab-pane form-horizontal " + activeClass + " " + parent.ActiveTabId + "'>");
|
||||
writer.WriteLine("<div id='" + this.ID + "' class='umb-tab-pane tab-pane form-horizontal umb-scrollable " + activeClass + " " + parent.ActiveTabId + "'>");
|
||||
writer.WriteLine("<div class='umb-tab-pane-inner' id='" + this.ClientID + "_contentlayer'>");
|
||||
|
||||
this.RenderChildren(writer);
|
||||
|
||||
Reference in New Issue
Block a user