DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB

Starting isdirty

[TFS Changeset #59811]
This commit is contained in:
slace
2009-10-07 08:40:18 +00:00
parent 94a51a83a6
commit 19b191cd06
5 changed files with 64 additions and 24 deletions

View File

@@ -1,10 +1,12 @@
<%@ Page Title="Edit content" Language="c#" MasterPageFile="masterpages/umbracoPage.Master" CodeBehind="editContent.aspx.cs" ValidateRequest="false" AutoEventWireup="True" Inherits="umbraco.cms.presentation.editContent" Trace="false" %>
<%@ Page Title="Edit content" Language="c#" MasterPageFile="masterpages/umbracoPage.Master"
CodeBehind="editContent.aspx.cs" ValidateRequest="false" AutoEventWireup="True"
Inherits="umbraco.cms.presentation.editContent" Trace="false" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
<script type="text/javascript">
// Save handlers for IDataFields
var saveHandlers = new Array();
@@ -31,22 +33,34 @@
invokeSaveHandlers();
document.getElementById("TabView1_tab01layer_save").click();
}
</script>
$(function() {
var inputs = $('#__controls input:not(.editorIcon), #__controls textarea');
//Sys.Debug.traceDump(inputs);
inputs.change(function() {
UmbClientMgr.set_isDirty(true);
});
$('input.editorIcon').click(function() { UmbClientMgr.set_isDirty(false); });
});
</script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="body" runat="server">
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="js/umbracoCheckKeys.js" PathNameAlias="UmbracoRoot" />
<table style="height:38px;width:371px;border:none 0px;" cellspacing="0" cellpadding="0">
<tr valign="top">
<td height="20">
</td>
<td>
<asp:PlaceHolder ID="plc" runat="server"></asp:PlaceHolder>
</td>
</tr>
</table>
<input id="doSave" type="hidden" name="doSave" runat="server" />
<input id="doPublish" type="hidden" name="doPublish" runat="server" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="js/umbracoCheckKeys.js" PathNameAlias="UmbracoRoot" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="ui/jquery.js" PathNameAlias="UmbracoClient"
Priority="0" />
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="ui/jqueryui.js" PathNameAlias="UmbracoClient"
Priority="1" />
<table style="height: 38px; width: 371px; border: none 0px;" cellspacing="0" cellpadding="0" id="__controls">
<tr valign="top">
<td height="20">
</td>
<td>
<asp:PlaceHolder ID="plc" runat="server"></asp:PlaceHolder>
</td>
</tr>
</table>
<input id="doSave" type="hidden" name="doSave" runat="server" />
<input id="doPublish" type="hidden" name="doPublish" runat="server" />
</asp:Content>

View File

@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -22,6 +22,24 @@ namespace umbraco.cms.presentation {
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// JsInclude2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude2;
/// <summary>
/// JsInclude3 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude3;
/// <summary>
/// plc control.
/// </summary>

View File

@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

View File

@@ -13,13 +13,12 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
/// </summary>
return {
_isDirty: false,
_debug: false,
_mainTree: null,
_appActions: null,
_rootPath: "/umbraco", //this is the default
setUmbracoPath: function(strPath) {
/// <summary>
/// sets the Umbraco root path folder
@@ -39,6 +38,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
/// Sometimes an Umbraco page will need to be opened without being contained in the iFrame from the main window
/// so this method is will construct a false tree to be returned if this is the case as to avoid errors.
/// </summary>
/// <returns type="Umbraco.Controls.UmbracoTree" />
if (this._mainTree == null) {
if (this.mainWindow().jQuery == null
@@ -114,10 +114,20 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
if (this._isDebug) {
Sys.Debug.trace("UmbClientMgr: " + strMsg);
}
},
get_isDirty: function() {
return this._isDirty;
},
set_isDirty: function(value) {
this._isDirty = value;
},
setUp: function() {
console.log(this.mainTree().find('a'));
}
}
}
})(jQuery);
//define alias for use throughout application
var UmbClientMgr = new Umbraco.Application.ClientManager();
var UmbClientMgr = new Umbraco.Application.ClientManager();
UmbClientMgr.setUp();

View File

@@ -364,7 +364,6 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
/// </summary>
/// <param name="supressEvent">If set to true, will select the node but will supress the onSelected event</param>
/// <param name="reselect">If set to true, will call the select_branch method even if the node is already selected</param>
this._debug("selectNode, edit mode? " + this._isEditMode);
@@ -504,7 +503,6 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
onSelect: function(NODE, TREE_OBJ) {
/// <summary>Fires the JS associated with the node, if the tree is in edit mode, allows for rename instead</summary>
this._debug("onSelect, edit mode? " + this._isEditMode);
if (this._isEditMode) {
this._tree.rename(NODE);