深圳全飞鸿

标题: radphp框架二次开发 [打印本页]

作者: e54f    时间: 2019-5-29 15:20
标题: radphp框架二次开发
  1. Execute start!
  2. [UPDATE]E:\project.syant\0002MES\delphi\TOOLS\WebControl\Kernel\SFC\XC-20190302\smt\rpcl\jquerymobile\js\functions.js 2018-11-05 23:34:12 > 2011-08-26 04:00:00
  3. [UPDATE]E:\project.syant\0002MES\delphi\TOOLS\WebControl\Kernel\SFC\XC-20190302\smt\rpcl\jquerymobile\forms.inc.php 2018-11-17 00:53:22 > 2011-08-26 04:00:00
  4. [UPDATE]E:\project.syant\0002MES\delphi\TOOLS\WebControl\Kernel\SFC\XC-20190302\smt\rpcl\jquerymobile\jmobile.inc.php 2018-09-18 19:33:14 > 2011-08-26 04:00:00
  5. Execute finish!
复制代码

作者: e54f    时间: 2019-5-29 15:25
functions.js



  1. // This function calls the uri page for JSONP data and injects the results on the elements on the page,
  2. // If there is an error displays a standard error message
  3. function AjaxCall(uri,extradata)
  4. {
  5.   var formdata= jQuery('.ui-page-active').find('form').serialize();
  6.   if(extradata)
  7.     formdata=formdata+'&'+extradata;

  8.   jQuery.mobile.pageLoading();
  9.   jQuery.ajax({
  10.     url:uri+"?callback=json",
  11.     dataType: 'json',
  12.     type: 'POST',
  13.     data: formdata,
  14.     crossDomain: true,
  15.     success:function(data){
  16.       //data=jQuery.parseJSON(data);
  17.       jQuery.each(data,function(i,v){
  18.         jQuery('.ui-page-active').find('#'+i).html(Base64.decode(v));
  19.       });
  20.       jQuery('.ui-page-active').page("destroy").page();
  21.       jQuery.mobile.pageLoading(true);
  22.         eval('nagomes(7)');
  23.       return false;
  24.     },
  25.     error:function(){
  26.       jQuery.mobile.pageLoading(true);
  27.       var page=jQuery('.ui-page-active form').attr('id');
  28.       eval(page+'JSAjaxCallError()');
  29.     }
  30.   });


  31. }
复制代码



作者: e54f    时间: 2019-5-29 15:28
jquerymobile\forms.inc.php




  1.   /**
  2.     * If UseAjax is set to true and an Ajax call is made all conntrols included in the MPage
  3.     * are rendered as a JSONP object and coded with Base64 so we don't include any illegal character on the JSONP Object
  4.     */
  5.    function processAjax()
  6.    {
  7.       $callback = $this->input->callback;

  8.       if(is_object($callback))
  9.       {
  10.          reset($this->components->items);
  11.          while(list($k, $v) = each($this->components->items))
  12.          {
  13.             if($v->inheritsFrom('Control'))
  14.             {
  15.                if($v->canShow())
  16.                {
  17.                   if(substr($v->Name,0,3)=="AJ_")
  18.                   //if(true)
  19.                   {
  20.                   ob_start();
  21.                   $v->dumpContents();
  22.                   $output = ob_get_contents();
  23.                   ob_end_clean();                             //utf8_encode
  24.                   $elements[]= "\"{$v->Name}_outer\":\"" . base64_encode(($output)) . "\"";
  25.                   }
  26.                }
  27.             }
  28.          }


  29.          header("Content-type: application/json");
  30.          echo "{";
  31.          if(count($elements)>0)
  32.           echo implode(",",$elements);
  33.          echo "}";
  34.          exit;
  35.       }

  36.    }
复制代码

作者: e54f    时间: 2019-5-29 15:32
jquerymobile\jmobile.inc.php

修正了MList控件:



  1.    /**
  2.     * Generates the content of the MList
  3.     */
  4.    function fillMList()
  5.    {
  6.            ...
  7.             else
  8.             {

  9.                //the link
  10.                if(isset($item['Link']) && $item['Link'] != "")
  11.                {
  12.                   $ajax = "";
  13.                   if(isset($item['AjaxLink']) && $item['AjaxLink'] == 'true')
  14.                   {
  15.                      $ajax = " data-ajax=\"true\" rel=\"external\" ";

  16.                   }
  17.                   if(isset($item['NoAjax']) && $item['NoAjax'] == 'true')
  18.                   {
  19.                      $ajax = "  rel=\"external\" ";

  20.                   }
  21.                   echo "<a $style href=\"" . $item['Link'] . "\"$ajax>";
  22.                }
复制代码





欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2