Changes

Jump to navigation Jump to search
no edit summary
Line 54: Line 54:  
e.preventDefault();
 
e.preventDefault();
 
if(dflt.type == "item") {
 
if(dflt.type == "item") {
 +
            mw.notify("on click activated")
 
    var selection = $(this).prev('input').data('entityselector').selectedEntity();
 
    var selection = $(this).prev('input').data('entityselector').selectedEntity();
 
    quickpresets_additemstatement(qid, dflt.pid, dflt.name, selection.id.substring(1), selection.label);
 
    quickpresets_additemstatement(qid, dflt.pid, dflt.name, selection.id.substring(1), selection.label);
 
}
 
}
 
else if(dflt.type == "string") {
 
else if(dflt.type == "string") {
 +
mw.notify("on click activated")
 
    quickpresets_addstringstatement(qid, dflt.pid, dflt.name, $(this).prev('input')[0].value);
 
    quickpresets_addstringstatement(qid, dflt.pid, dflt.name, $(this).prev('input')[0].value);
 
}
 
}
Line 111: Line 113:  
  */
 
  */
 
function quickpresets_additemstatement(qid, pid, pname, toqid, toname) {
 
function quickpresets_additemstatement(qid, pid, pname, toqid, toname) {
 +
mw.notify("adding item statement")
 
     var claim = {
 
     var claim = {
 
id: (new wb.utilities.ClaimGuidGenerator("q" + qid)).newGuid(),
 
id: (new wb.utilities.ClaimGuidGenerator("q" + qid)).newGuid(),
Line 147: Line 150:  
  */
 
  */
 
function quickpresets_addstringstatement(qid, pid, pname, str) {
 
function quickpresets_addstringstatement(qid, pid, pname, str) {
 +
mw.notify("adding string statement")
 
mw.notify("adding str "+qid+" "+pid+" "+pname+" "+str)
 
mw.notify("adding str "+qid+" "+pid+" "+pname+" "+str)
 
     var claim = {
 
     var claim = {

Navigation menu