-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement server-side on() events #28
Conversation
…ify template name.
I am OK with the remaining 4 code-climate issues. I don't want to disable them because we will need to address them at some point. |
|
||
$buttons->on('click', '.button', $b3->js()->hide()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong example!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is major overhaul on js.rst in the next PR.
@@ -478,7 +495,7 @@ public function getHTML() | |||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no description what $extra parameter is for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's changed in the next PR, so leaving.
return $r->jsRender(); | ||
}, $actions)); | ||
|
||
echo json_encode(['success'=>true, 'message'=>'Hello World', 'eval'=>$ajaxec]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello world???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is changed in the next PR, so i'll leave it to avoid conflicts.
exit; | ||
}); | ||
|
||
$thisAction->api(['on'=>'now', 'url'=>$cb->getURL(), 'obj'=>new jsExpression('this')]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$thisAction->api ? what is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's Semantic UI ;)
* Provides replacement for json_encode that will respect jsExpressionable objects | ||
* and call jsRender() for them instead of escaping. | ||
* | ||
* @param mixed @arg anything |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be $arg instead of @arg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -0,0 +1,19 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this class for? where is it used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing it, it's confusing.
This pull requests aims to make this code work:
Clicking a button here would execute request to the server that would generate the new label for a button.