| author | Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr> |
| Mon, 02 Mar 2015 14:39:22 +0100 | |
| changeset 47 | ddba4624d661 |
| parent 38 | d1bc73ce855a |
| child 59 | 54eb90122a72 |
| permissions | -rw-r--r-- |
|
0
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
1 |
var CatEditScripts=CatEditScripts||(function(){ |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
2 |
var propertyCount=0; |
|
2
f7bc7942969a
removed log folder from repo + changed property edition form + started refactoring property list so adding a new property is easier
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
0
diff
changeset
|
3 |
var createdProperties=0; |
|
0
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
4 |
|
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
5 |
return { |
|
2
f7bc7942969a
removed log folder from repo + changed property edition form + started refactoring property list so adding a new property is easier
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
0
diff
changeset
|
6 |
initCreatedProperties : function(initValue){ |
|
f7bc7942969a
removed log folder from repo + changed property edition form + started refactoring property list so adding a new property is easier
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
0
diff
changeset
|
7 |
createdProperties=initValue; |
|
f7bc7942969a
removed log folder from repo + changed property edition form + started refactoring property list so adding a new property is easier
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
0
diff
changeset
|
8 |
}, |
|
0
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
9 |
|
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
10 |
initPropertyCount : function(divName,initValue){ |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
11 |
propertyCount=initValue; |
|
38
d1bc73ce855a
Finished WTForms support for properties + Refactored API so it doesn't handle form parsing anymore + added version.py and edited setup.py, version is now displayed in the footer of every page + reworked config to condense every persistence parameter and logging parameter
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
23
diff
changeset
|
12 |
if (propertyCount >= 0) { |
|
0
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
13 |
document.getElementById(divName).className="visible"; |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
14 |
} |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
15 |
}, |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
16 |
|
|
38
d1bc73ce855a
Finished WTForms support for properties + Refactored API so it doesn't handle form parsing anymore + added version.py and edited setup.py, version is now displayed in the footer of every page + reworked config to condense every persistence parameter and logging parameter
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
23
diff
changeset
|
17 |
addProperty : function(divToReveal, divToAddFieldsTo, csrfToken){ |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
18 |
var selectElement = document.getElementById('property_selector'); |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
19 |
if (selectElement.options[selectElement.selectedIndex].id != "property_type_default") { |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
20 |
var selectedOptionValue = selectElement.options[selectElement.selectedIndex].value; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
21 |
var selectedOptionText = selectElement.options[selectElement.selectedIndex].text; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
22 |
var propertyOptionObjectType = selectElement.options[selectElement.selectedIndex].label; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
23 |
var propertyObjectValue = "default: something went wrong" |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
24 |
switch(propertyOptionObjectType) { |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
25 |
case "literal": |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
26 |
propertyObjectValue = document.getElementById('literal-field').value; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
27 |
propertyObjectText = document.getElementById('literal-field').value; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
28 |
break; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
29 |
case "uriref-category": |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
30 |
var selectingCatBox = document.getElementById('uriref-category-field'); |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
31 |
propertyObjectText = selectingCatBox[selectingCatBox.selectedIndex].innerHTML; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
32 |
propertyObjectValue = selectingCatBox.value; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
33 |
break; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
34 |
case "uriref-link": |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
35 |
propertyObjectValue = document.getElementById('uriref-link-field').value; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
36 |
propertyObjectText = document.getElementById('uriref-link-field').value; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
37 |
break; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
38 |
default: |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
39 |
optionObject='<span class="glyphicon glyphicon-exclamation-sign"/>' |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
40 |
} |
|
2
f7bc7942969a
removed log folder from repo + changed property edition form + started refactoring property list so adding a new property is easier
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
0
diff
changeset
|
41 |
|
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
42 |
if (((propertyObjectValue != "") && (propertyOptionObjectType == "literal")) || |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
43 |
((propertyObjectValue != "") && (propertyOptionObjectType == "uriref-link")) || |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
44 |
((propertyObjectValue != "default") && (propertyOptionObjectType == "uriref-category"))) { |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
45 |
var newProperty = document.createElement('tr'); |
|
38
d1bc73ce855a
Finished WTForms support for properties + Refactored API so it doesn't handle form parsing anymore + added version.py and edited setup.py, version is now displayed in the footer of every page + reworked config to condense every persistence parameter and logging parameter
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
23
diff
changeset
|
46 |
newProperty.setAttribute('id','properties-'+(createdProperties+1)); |
|
d1bc73ce855a
Finished WTForms support for properties + Refactored API so it doesn't handle form parsing anymore + added version.py and edited setup.py, version is now displayed in the footer of every page + reworked config to condense every persistence parameter and logging parameter
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
23
diff
changeset
|
47 |
var newPropertyHTML = '<input id="properties-'+(createdProperties+1)+'-csrf_token" name="properties-'+(createdProperties+1)+'-csrf_token" value="'+(csrfToken)+'" type="hidden"> \ |
|
d1bc73ce855a
Finished WTForms support for properties + Refactored API so it doesn't handle form parsing anymore + added version.py and edited setup.py, version is now displayed in the footer of every page + reworked config to condense every persistence parameter and logging parameter
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
23
diff
changeset
|
48 |
<input type="hidden" id="property_predicate'+(createdProperties+1)+'" name="properties-'+(createdProperties+1)+'-property_predicate" value="'+selectedOptionValue+'"> \ |
|
d1bc73ce855a
Finished WTForms support for properties + Refactored API so it doesn't handle form parsing anymore + added version.py and edited setup.py, version is now displayed in the footer of every page + reworked config to condense every persistence parameter and logging parameter
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
23
diff
changeset
|
49 |
<input type="hidden" id="property_object'+(createdProperties+1)+'" name="properties-'+(createdProperties+1)+'-property_object" value="'+propertyObjectValue+'"> \ |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
50 |
<td id="predicate_td'+(createdProperties+1)+'"> \ |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
51 |
<strong>'+selectedOptionText+'</strong> \ |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
52 |
</td> \ |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
53 |
<td id="object_td'+(createdProperties+1)+'">' |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
54 |
+propertyObjectText+ |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
55 |
'</td> \ |
|
23
877c3b66313a
Removed references to REPOSITORY_NAME + some refactoring of cat_editor in views.py (wtforms)
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
14
diff
changeset
|
56 |
<td id="delete_button'+(createdProperties+1)+'" class="text-center"> \ |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
57 |
<input type="button" id="property_delete_button'+(createdProperties+1)+'" class="btn btn-default property-delete-button" onClick="CatEditScripts.removeProperty('+(createdProperties+1)+',properties)" value="Supprimer"> \ |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
58 |
</td>'; |
|
2
f7bc7942969a
removed log folder from repo + changed property edition form + started refactoring property list so adding a new property is easier
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
0
diff
changeset
|
59 |
|
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
60 |
newProperty.innerHTML = newPropertyHTML ; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
61 |
parentElement=document.getElementById(divToAddFieldsTo) ; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
62 |
parentElement.insertBefore(newProperty, parentElement.firstChild); |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
63 |
createdProperties++; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
64 |
propertyCount++; |
|
38
d1bc73ce855a
Finished WTForms support for properties + Refactored API so it doesn't handle form parsing anymore + added version.py and edited setup.py, version is now displayed in the footer of every page + reworked config to condense every persistence parameter and logging parameter
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
23
diff
changeset
|
65 |
if (propertyCount >= 0) { |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
66 |
document.getElementById(divToReveal).className="visible"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
67 |
} |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
68 |
} |
|
0
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
69 |
} |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
70 |
}, |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
71 |
|
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
72 |
removeProperty : function(index, divToReveal){ |
|
0
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
73 |
if (propertyCount > 0) { |
|
38
d1bc73ce855a
Finished WTForms support for properties + Refactored API so it doesn't handle form parsing anymore + added version.py and edited setup.py, version is now displayed in the footer of every page + reworked config to condense every persistence parameter and logging parameter
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
23
diff
changeset
|
74 |
divItem=document.getElementById("properties-"+index); |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
75 |
divItem.parentNode.removeChild(divItem); |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
76 |
propertyCount--; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
77 |
if (propertyCount == 0) { |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
78 |
document.getElementById(divToReveal).className="hidden"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
79 |
} |
|
0
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
80 |
} |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
81 |
}, |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
82 |
|
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
83 |
displayCorrespondingField : function() { |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
84 |
propertySelectItem = document.getElementById("property_selector"); |
|
47
ddba4624d661
Added cache support for getting issues, commits and comments + reworked workshop page, now displaying latest changes and latest opened issues and links to changeset and issues list + changeset page now displays a change summary
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
38
diff
changeset
|
85 |
switch(propertySelectItem[propertySelectItem.selectedIndex].className) |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
86 |
{ |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
87 |
case "property_type_default": |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
88 |
document.getElementById("literal-field").className = "hidden form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
89 |
document.getElementById("uriref-category-field").className = "hidden form-control"; |
|
14
fc63b1a3d2ef
Added support for making multiple changes in a single commit, using the flask dict "session" (keys used are "modified_categories" and "deleted_categories") + Added a view for editing categories that allows the user to see what he has added, deleted or edited + Made it so an unauthenticated user should not generate any Github api request (you have to be logged to see the categories now).
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
3
diff
changeset
|
90 |
document.getElementById("uriref-category-field-text").className = "hidden"; |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
91 |
document.getElementById("uriref-link-field").className = "hidden form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
92 |
break; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
93 |
case "literal": |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
94 |
document.getElementById("literal-field").className = "visible form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
95 |
document.getElementById("uriref-category-field").className = "hidden form-control"; |
|
14
fc63b1a3d2ef
Added support for making multiple changes in a single commit, using the flask dict "session" (keys used are "modified_categories" and "deleted_categories") + Added a view for editing categories that allows the user to see what he has added, deleted or edited + Made it so an unauthenticated user should not generate any Github api request (you have to be logged to see the categories now).
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
3
diff
changeset
|
96 |
document.getElementById("uriref-category-field-text").className = "hidden"; |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
97 |
document.getElementById("uriref-link-field").className = "hidden form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
98 |
break; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
99 |
case "uriref-category": |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
100 |
document.getElementById("literal-field").className = "hidden form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
101 |
document.getElementById("uriref-category-field").className = "visible form-control"; |
|
14
fc63b1a3d2ef
Added support for making multiple changes in a single commit, using the flask dict "session" (keys used are "modified_categories" and "deleted_categories") + Added a view for editing categories that allows the user to see what he has added, deleted or edited + Made it so an unauthenticated user should not generate any Github api request (you have to be logged to see the categories now).
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
3
diff
changeset
|
102 |
document.getElementById("uriref-category-field-text").className = "visible"; |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
103 |
document.getElementById("uriref-link-field").className = "hidden form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
104 |
break; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
105 |
case "uriref-link": |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
106 |
document.getElementById("literal-field").className = "hidden form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
107 |
document.getElementById("uriref-category-field").className = "hidden form-control"; |
|
14
fc63b1a3d2ef
Added support for making multiple changes in a single commit, using the flask dict "session" (keys used are "modified_categories" and "deleted_categories") + Added a view for editing categories that allows the user to see what he has added, deleted or edited + Made it so an unauthenticated user should not generate any Github api request (you have to be logged to see the categories now).
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
3
diff
changeset
|
108 |
document.getElementById("uriref-category-field-text").className = "hidden"; |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
109 |
document.getElementById("uriref-link-field").className = "visible form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
110 |
break; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
111 |
default: |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
112 |
document.getElementById("literal-field").className = "hidden form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
113 |
document.getElementById("uriref-category-field").className = "hidden form-control"; |
|
14
fc63b1a3d2ef
Added support for making multiple changes in a single commit, using the flask dict "session" (keys used are "modified_categories" and "deleted_categories") + Added a view for editing categories that allows the user to see what he has added, deleted or edited + Made it so an unauthenticated user should not generate any Github api request (you have to be logged to see the categories now).
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
3
diff
changeset
|
114 |
document.getElementById("uriref-category-field-text").className = "hidden"; |
|
3
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
115 |
document.getElementById("uriref-link-field").className = "hidden form-control"; |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
116 |
} |
|
73b18cb88583
Updated property edition + cache to "get" method so it doesn't generate as many requests to Github API
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
2
diff
changeset
|
117 |
} |
|
0
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
118 |
}; |
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
119 |
|
|
54f4e0f9d636
Initial commit
Nicolas DURAND <nicolas.durand@iri.centrepompidou.fr>
parents:
diff
changeset
|
120 |
}()); |