Skip to content

Commit

Permalink
_DC.Button - Add default content of 'Okay'
Browse files Browse the repository at this point in the history
_DC.ResettButton - change base class to _html.button and add default content of 'Reset'
_JQ - modify Handler to send isAPLJax header with request
HTTPRequest - check for isAPLJax header to see if request came from APL-JavaScript framework
  • Loading branch information
bpbecker committed Oct 5, 2016
1 parent 706b198 commit fec776c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Core/HTTPRequest.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@

risAPLJax
:Access public instance
r'XMLHttpRequest'GetHeader'x-requested-with'
r'true'GetHeader'isAPLJax'

risPost
Expand Down
4 changes: 2 additions & 2 deletions HTML/_DC/Button.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:Access public
:Implements constructor
argseis(~0args)args
(Content name value attrs)args defaultArgs''UNDEF UNDEF''
(Content name value attrs)args defaultArgs'Okay'UNDEF UNDEF''
type'button'

Expand All @@ -29,4 +29,4 @@
r⎕BASE.Render

:endclass
:endclass
6 changes: 3 additions & 3 deletions HTML/_DC/ResetButton.dyalog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:class ResetButton : #._html.input
:class ResetButton : #._html.button
Description:: Dyalog Reset Button widget
Constructor:: [content [name [value [attrs]]]]
content - the content of the button (what shows up on the button's face)
Expand All @@ -17,7 +17,7 @@
:Access public
:Implements constructor
argseis(~0args)args
(Content name value attrs)args defaultArgs''UNDEF UNDEF''
(Content name value attrs)args defaultArgs'Reset'UNDEF UNDEF''
Content''
type'reset'
Expand All @@ -28,4 +28,4 @@
r⎕BASE.Render

:endclass
:endclass
2 changes: 1 addition & 1 deletion HTML/_JQ.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@
dtype'"json"'
success'success: function(obj){APLJaxReturn(obj);document.body.style.cursor="default";}'
status'statusCode:{ 408: function(){alert("Session timed out");',removehg,'}}'
ajax(JavaScript ine JavaScript,(';'=¯1JavaScript)';'),useajax/hg,'$.ajax({url: ',(quote Page),', cache: false, type: "POST", dataType: ',dtype,', data: {',data,'}, ',success,', ',status,'});'
ajax(JavaScript ine JavaScript,(';'=¯1JavaScript)';'),useajax/hg,'$.ajax({url: ',(quote Page),', cache: false, type: "POST", dataType: ',dtype,', headers:{"isAPLJax": "true"}, data: {',data,'}, ',success,', ',status,'});'

:If widget
:If force
Expand Down

0 comments on commit fec776c

Please sign in to comment.