This commit is contained in:
Henrique Dias
2015-09-20 20:42:22 +01:00
parent 69efc2d70f
commit 6df32165b1
8 changed files with 192 additions and 86 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -81,7 +81,7 @@ $(document).on('ready pjax:success', function() {
var value = $(this).val(),
splited = value.split(":"),
filename = "",
archtype = "";
archetype = "";
if (value == "") {
notification({
@@ -95,17 +95,17 @@ $(document).on('ready pjax:success', function() {
filename = value;
} else if (splited.length == 2) {
filename = splited[0];
archtype = splited[1];
archetype = splited[1];
} else {
notification({
text: "Hmm... I don't understand you. Try writing something like 'name[:archtype]'.",
text: "Hmm... I don't understand you. Try writing something like 'name[:archetype]'.",
type: 'error'
});
return false;
}
var content = '{"filename": "' + filename + '", "archtype": "' + archtype + '"}';
var content = '{"filename": "' + filename + '", "archetype": "' + archetype + '"}';
$.ajax({
type: 'POST',
@@ -262,6 +262,10 @@ $(document).on('ready pjax:success', function() {
type = "object";
}
if (title.is('h2')) {
type = "object"
}
if (type == "object") {
title.after('<input id="new" placeholder="Write the field name and press enter..."></input>');
element = $("#new");

View File

@@ -115,6 +115,7 @@ div[data-type="array-item"] {
label:hover > .actions,
h1:hover > .actions,
h2:hover > .actions,
h3:hover > .actions,
div[data-type="array-item"]:hover .actions {
opacity: .7;