Enable any Detail Page to also be a New and Clone Page

  • 3
  • Idea
  • Updated 1 year ago




Snippet on Master Page
// toggle to edit each item/record that is new
var modelArray = arguments[0],
	$ = skuid.$;

	$.each(modelArray, function(m,model){
        $.each(model.registeredItems, function(i, item){
            if (item.row.Id.length < 15){
                item.toggleEdit();
            }
        });
	});

Inline on Detail Page
(function(skuid){
	var $ = skuid.$;

	$(document.body).one('pageload',function(){
	    var modelArray = [],
	        UserStory_Detail = skuid.$M('UserStory_Detail'),
	        snip = skuid.snippet.getSnippet('autoToggleEditMode');
	   
	    modelArray.push(UserStory_Detail);
	
	    snip(modelArray);
	   
	});
})(skuid);
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb

Posted 1 year ago

  • 3
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Nice work, Pat!
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb
Thanks. This is likely to be version 1.