-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Template now added as class name on article items in the list manager #…
- Loading branch information
1 parent
f42068e
commit 145c22c
Showing
9 changed files
with
148 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* Not yet in use | ||
var ArlimaArticleFormBuilder = (function($) { | ||
var _createBoolFieldHTML = function(varName, selected) { | ||
return '<select><option value="1">Yes</option><option value="">Nej</option></select>'; | ||
}; | ||
return { | ||
$form : null, | ||
TYPES : { | ||
BOOL : 'boolean', | ||
TEXT : 'text' | ||
}, | ||
getFieldHTML : function(type, label, varName, value) { | ||
var html = '<div class="form-field"><strong>'+label+'</strong><div class="field">'; | ||
switch (type) { | ||
case this.TYPES.BOOL: | ||
html += _createBoolFieldHTML(label, varName, value); | ||
break; | ||
default : | ||
html += '<em>Unknown field type '+type+'</em>'; | ||
break; | ||
} | ||
return html + '</div></div>'; | ||
}, | ||
addFields : function(fields) { | ||
var html = '', | ||
_this = this; | ||
$.each(fields, function(i, f) { | ||
html += _this.getFieldHTML(f.type, f.label, f.varName, f.value); | ||
}); | ||
this.$form.append(html); | ||
}, | ||
removeField : function(varName) { | ||
this.$form.find('*[data-prop="'+varName+'"]').remove(); | ||
} | ||
}; | ||
})(jQuery); */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters