incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject svn commit: r994938 - /sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp
Date Wed, 08 Sep 2010 09:36:10 GMT
Author: mykee
Date: Wed Sep  8 09:36:10 2010
New Revision: 994938

URL: http://svn.apache.org/viewvc?rev=994938&view=rev
Log:
SLING-1713 jQuery JCR Explorer - step 1 - improvements

Modified:
    sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp

Modified: sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp?rev=994938&r1=994937&r2=994938&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp
(original)
+++ sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp
Wed Sep  8 09:36:10 2010
@@ -21,7 +21,8 @@
  
 <%
     var path = resource.path;
-    var readonly = false;    
+    var readonly = false; 
+	var dateFormatter = new Packages.java.text.SimpleDateFormat("dd.MM.yyyy HH:mm:ss");				
 
     var session = request.resourceResolver.adaptTo(Packages.javax.jcr.Session);
     if (session)
@@ -396,7 +397,7 @@
 		buttonImageOnly: true,
 		buttonImage: '/libs/sling/explorer/img/calendar.gif',
 		buttonText: 'Calendar',
-		dateFormat: 'yy-mm-dd hh:ii',
+		dateFormat: 'dd.mm.yy hh:ii:00',
 		changeYear: true,
 		changeMonth: true,
 		closeText: 'Confirm',
@@ -428,7 +429,7 @@
 <% function create_input_for_type( id, type, val, editable, omitName ) { 
 	switch ( type ) { 
 		case Packages.javax.jcr.PropertyType.DATE : %>
-			<input  class="prop_value text datepicker" <% if (!omitName) { %> name="<%=
id %>" <% } %> id="<%= id %>" value="<%= val %>" />
+			<input  class="prop_value text datepicker<% if(!editable) { %> protected<%}%>"
<% if (!omitName) { %> name="<%= id %>" <% } %> id="<%= id %>" value="<%=
dateFormatter.format( val.getDate().getTime() ) %>" />
 		<%
 		break; 
 		case Packages.javax.jcr.PropertyType.BOOLEAN : %>



Mime
View raw message