| 1: | <?php
|
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: |
|
| 7: |
|
| 8: | include_once(SphpBase::sphp_settings()->php_path . "/classes/base/CompGroup.php");
|
| 9: | include_once(SphpBase::sphp_settings()->slib_path . "/comp/bs/form/TextField.php");
|
| 10: |
|
| 11: |
|
| 12: | class Comps extends CompGroup{
|
| 13: |
|
| 14: | public function onstart(){
|
| 15: | global $JQuery;
|
| 16: | $this->addComponent(new TextField('df1'));
|
| 17: | $this->setFrontFile(new FrontFile($this->mypath."demo2.front"));
|
| 18: | $JQuery->getJQKit();
|
| 19: | }
|
| 20: | protected function oncompcreate($element){
|
| 21: |
|
| 22: | }
|
| 23: | public function page_new(){
|
| 24: |
|
| 25: | }
|
| 26: |
|
| 27: | protected function onjsrender(){
|
| 28: | $tmp = $this->getFrontControl('txa1');
|
| 29: | $tmp->setInnerHTMLApp($this->innerHTML);
|
| 30: | $this->innerHTML = "";
|
| 31: | }
|
| 32: |
|
| 33: | public function sjs_df1_ofjs_drag($eventer){
|
| 34: | $jq->get('#df1')->val("drag1");
|
| 35: | }
|
| 36: | public function sjs_df2_ofjs_dragstart($eventer){
|
| 37: | $jq->get('#df1')->val("drag start");
|
| 38: | }
|
| 39: | public function sjs_df2_ofjs_dragstop($eventer){
|
| 40: | $jq->get('#df1')->val("drag stop");
|
| 41: | }
|
| 42: | public function sjs_dt1_ofjs_resize($eventer){
|
| 43: |
|
| 44: | }
|
| 45: | public function sjs_txa1_ofjs_drop($eventer){
|
| 46: |
|
| 47: | $eventer->obj->append($jq->get($eventer->ui->draggable)->outerHTML());
|
| 48: | }
|
| 49: | public function sjs_df2_ofjs_click($eventer){
|
| 50: | $data = "{dsm: 'hello2' }";
|
| 51: | }
|
| 52: | public function sjs_df2_sphp_click($eventer){
|
| 53: | $JSServer->addJSONBlock('jsp','proces',"alert('".$_REQUEST['dsm']."')");
|
| 54: | }
|
| 55: |
|
| 56: | }
|
| 57: | ?> |