ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 11239


Ignore:
Timestamp:
Apr 8, 2009, 1:45:52 PM (14 years ago)
Author:
ShogoKawahara
Message:

#3691:added gadgets for login screen of the mobile

Location:
OpenPNE3/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/config/mobile_frontendConfiguration.class.php

    r11111 r11239  
    2727      ini_set('session.use_trans_sid', 1);
    2828    }
     29
     30    sfWidgetFormSchema::setDefaultFormFormatterName('mobile');
    2931  }
    3032}
  • OpenPNE3/trunk/apps/mobile_frontend/modules/default/actions/components.class.php

    r10277 r11239  
    1919  {
    2020  }
     21
     22  public function executeFreeAreaBox()
     23  {
     24  }
     25
     26  public function executeLoginFormBox()
     27  {
     28    $this->forms = $this->getUser()->getAuthForms();
     29  }
    2130}
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/actions/actions.class.php

    r11224 r11239  
    5757
    5858    return parent::executeHome($request);
     59  }
     60
     61 /**
     62  * Executes login action
     63  *
     64  * @param sfWebRequest $request A request object
     65  */
     66  public function executeLogin($request)
     67  {
     68    $gadgets = GadgetPeer::retrieveGadgetsByTypesName('mobileLogin');
     69    $this->mobileLoginContentsGadgets = $gadgets['mobileLoginContents'];
     70     
     71    return parent::executeLogin($request);
    5972  }
    6073
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/templates/loginSuccess.php

    r8757 r11239  
    1 <?php foreach ($forms as $form) : ?>
    2 
    3 <?php include_login_parts('Login', $form, 'member/login'); ?>
    4 
     1<?php if (isset($mobileLoginContentsGadgets)) : ?>
     2<?php foreach ($mobileLoginContentsGadgets as $gadget) : ?>
     3<?php if ($gadget->isEnabled()) : ?>
     4<?php include_component($gadget->getComponentModule(), $gadget->getComponentAction(), array('gadget' => $gadget)) ?>
     5<?php endif; ?>
    56<?php endforeach; ?>
     7<?php endif; ?>
  • OpenPNE3/trunk/apps/pc_backend/modules/design/actions/actions.class.php

    r11224 r11239  
    149149    $this->gadgetConfig = sfConfig::get('op_mobile_gadget_list');
    150150
     151    return sfView::SUCCESS;
     152  }
     153
     154  /**
     155   * Executes mobile login gadget plot action
     156   *
     157   * @param sfWebRequest $request A request object
     158   */
     159  public function executeMobileLoginGadgetPlot(sfWebRequest $request)
     160  {
     161    $this->gadgets = GadgetPeer::retrieveGadgetsByTypesName('mobileLogin');
     162    $this->gadgetConfig = sfConfig::get('op_mobile_login_gadget_list');
     163   
    151164    return sfView::SUCCESS;
    152165  }
  • OpenPNE3/trunk/apps/pc_backend/modules/design/config/view.yml

    r10800 r11239  
    2525mobileHomeGadgetPlotSuccess:
    2626  <<: *homeGadgetPlotSuccess
     27
     28mobileLoginGadgetPlotSuccess:
     29  <<: *homeGadgetPlotSuccess
  • OpenPNE3/trunk/apps/pc_backend/modules/design/templates/_plotGadget.php

    r11224 r11239  
    11<div id="plot<?php echo ucfirst($type) ?>">
     2<?php if ($gadgets instanceof sfOutputEscaperArrayDecorator) : ?>
    23<?php foreach ($gadgets as $gadget) : ?>
    34<div class="sortable" id="plot<?php echo ucfirst($type) ?>_gadget_<?php echo $gadget->getId() ?>">
     
    78</div>
    89<?php endforeach; ?>
     10<?php endif; ?>
    911<div class="emptyGadget">
    1012<?php echo link_to_function(__('ガジェットを追加'), 'showModalOnParent(\''.url_for('design/addGadget?type='.$type).'\')') ?>
  • OpenPNE3/trunk/data/fixtures/005_import_gadgets.yml

    r10800 r11239  
    3939    name: "loginForm"
    4040    sort_order: 10
     41
     42  mobile_login_gadget_login_form_box:
     43    type: "mobileLoginContents"
     44    name: "loginForm"
     45    sort_order: 10
  • OpenPNE3/trunk/lib/config/config/gadget_config.yml

    r11224 r11239  
    2424    default: layoutE
    2525  plot_action: [design, mobileHomeGadgetPlot]
     26
     27mobileLogin:
     28  name: "携帯版ログイン画面"
     29  layout:
     30    default: layoutD
     31  plot_action: [design, mobileLoginGadgetPlot]
  • OpenPNE3/trunk/lib/config/config/mobile_gadget.yml

    r10260 r11239  
    1313      IsRequired: false
    1414
     15freeArea:
     16  caption:
     17    ja_JP: "フリーエリア"
     18  description:
     19    ja_JP: "フリーエリアを設置できます"
     20  component: [default, freeAreaBox]
     21  config:
     22    title:
     23      Name:       "title"
     24      Caption:    "タイトル"
     25      FormType:   "input"
     26      ValueType:  "text"
     27      IsRequired: false
     28    value:
     29      Name:       "value"
     30      Caption:    "内容"
     31      FormType:   "rich_textarea"
     32      IsRequired: false
  • OpenPNE3/trunk/lib/filter/sfOpenPNEExecutionFilter.class.php

    r10582 r11239  
    4949  }
    5050
    51   protected function executeView($moduleName, $actionName, $viewName, $viewAttributes)
    52   {
    53     if (sfConfig::get('app_is_mobile'))
    54     {
    55       foreach ($viewAttributes as $key => $attribute)
    56       {
    57         $this->setFormFormatterForMobile($attribute);
    58         $viewAttributes[$key] = $attribute;
    59       }
    60     }
    61 
    62     parent::executeView($moduleName, $actionName, $viewName, $viewAttributes);
    63   }
    64 
    65   protected function setFormFormatterForMobile(&$form)
    66   {
    67     if (is_array($form))
    68     {
    69       array_map(array($this, 'setFormFormatterForMobile'), $form);
    70     }
    71     elseif ($form instanceof sfForm)
    72     {
    73       $form->getWidgetSchema()->setFormFormatterName('mobile');
    74     }
    75   }
    76 
    7751  protected function forwardToErrorAction()
    7852  {
  • OpenPNE3/trunk/web/css/gadgetPlot.css

    r10800 r11239  
    8181#plotMobileTop div,
    8282#plotMobileContents div,
    83 #plotMobileBottom div
     83#plotMobileBottom div,
     84#plotMobileLoginContents div
    8485{
    8586  width: 100%;
     
    103104#plotMobileTop div.emptyGadget,
    104105#plotMobileContents div.emptyGadget,
    105 #plotMobileBottom div.emptyGadget
     106#plotMobileBottom div.emptyGadget,
     107#plotMobileLoginContents div.emptyGadget
    106108{
    107109  background-color: transparent;
Note: See TracChangeset for help on using the changeset viewer.