Changeset 15526 for events/phpframework
- Timestamp:
- 07/09/08 01:06:26 (5 years ago)
- Location:
- events/phpframework/piece_framework/trunk
- Files:
-
- 1 added
- 5 modified
-
imports/pear/Piece/Unity/Plugin/Renderer/Runemaster/Continuation.php (modified) (1 diff)
-
web/frontend/webapp/actions/SelfAction.php (modified) (2 diffs)
-
web/frontend/webapp/config/flows/Self.flow (modified) (2 diffs)
-
web/frontend/webapp/config/piece-unity-config.yaml (modified) (1 diff)
-
web/frontend/webapp/templates/Self/Form.html (modified) (4 diffs)
-
web/frontend/webapp/templates/Self/UpdateStatus.html (added)
Legend:
- Unmodified
- Added
- Removed
-
events/phpframework/piece_framework/trunk/imports/pear/Piece/Unity/Plugin/Renderer/Runemaster/Continuation.php
r14232 r15526 116 116 continue; 117 117 } 118 if ($node->type !== 'submit' && $node->type !== 'image') { 118 if ($node->type !== 'submit' 119 && $node->type !== 'image' 120 && $node->type !== 'button' 121 ) { 119 122 continue; 120 123 } -
events/phpframework/piece_framework/trunk/web/frontend/webapp/actions/SelfAction.php
r15136 r15526 13 13 require_once 'Piece/Unity/Service/FlowAction.php'; 14 14 require_once 'Piece/Unity/Service/Runemaster.php'; 15 require_once 'Piece/ORM.php'; 15 16 require_once 'Phwittr/Self.php'; 16 17 … … 90 91 function processUpdate() 91 92 { 92 $request = new stdClass(); 93 if (!$this->_context->getValidation()->validate('StatusUpdate', $request)) { 94 return 'DisplayForm'; 93 $this->_request = new stdClass(); 94 if (!$this->_context->getValidation()->validate('StatusUpdate', 95 $this->_request 96 ) 97 ) { 98 return; 95 99 } 96 100 97 $this->_s elf->update($request->status);101 $this->_statusId = $this->_self->update($this->_request->status); 98 102 99 return 'DisplayForm'; 103 return 'DisplayUpdateStatus'; 104 } 105 106 function displayUpdateStatus() 107 { 108 $mapper = Piece_ORM::getMapper('Statuses'); 109 $criteria->id = $this->_statusId; 110 $criteria->userId = $this->_self->id; 111 112 $viewElement = $this->_context->getViewElement(); 113 $viewElement->setElementByRef('status', $mapper->findById($criteria)); 100 114 } 101 115 -
events/phpframework/piece_framework/trunk/web/frontend/webapp/config/flows/Self.flow
r14939 r15526 8 8 activity: 9 9 method: displayForm 10 transition: 11 - event: update 12 nextState: ProcessUpdate 13 - event: page 14 nextState: displayForm 15 16 - name: DisplayUpdateStatus 17 view: UpdateStatus 18 activity: 19 method: displayUpdateStatus 10 20 transition: 11 21 - event: update … … 26 36 method: processUpdate 27 37 transition: 28 - event: Display Form29 nextState: Display Form38 - event: DisplayUpdateStatus 39 nextState: DisplayUpdateStatus 30 40 31 41 # Local Variables: -
events/phpframework/piece_framework/trunk/web/frontend/webapp/config/piece-unity-config.yaml
r15227 r15526 101 101 type: configuration 102 102 value: templates 103 - name: turnOffLayoutByHTTPAccept 104 type: configuration 105 value: true 103 106 104 107 - name: ConfiguratorChain -
events/phpframework/piece_framework/trunk/web/frontend/webapp/templates/Self/Form.html
r15507 r15526 1 1 <div id="wrapper"> 2 2 <div id="main"> 3 <form name="StatusUpdate"> 3 <form id="StatusUpdate" name="StatusUpdate" 4 onsubmit="if( $('status').value.length > 140 ) { alert('That update is over 140 characters!'); return false;}; new Ajax.Request('/status/update', { asynchronous:true, evalScripts:true, requestHeaders: { Accept: 'application/x-piece-html-fragment'}, onComplete: function(transport){ $('timeline_table').insert({ top: transport.responseText }); $('status').value = '';updateStatusTextCharCounter($('status').value);$('status').focus();},parameters: Form.serialize(this) }); return false;"> 4 5 <div id="post"> 5 6 <span class="whatdoing">イマナニシテル?</span> … … 11 12 class="message" name="status" id="status"></textarea> 12 13 <p class="btn btnSpace"> 13 <input name="commit" id="commit" class="formBtn" type=" submit" value="つぶやく" p:event="update" />14 <input name="commit" id="commit" class="formBtn" type="button" value="つぶやく" p:event="update" onclick="$('StatusUpdate').onsubmit();" /> 14 15 </p> 15 16 </div> … … 24 25 25 26 <div id="timeline"> 26 <table class="statuslist" >27 <table class="statuslist" id="timeline_table"> 27 28 28 29 <tr foreach="statusList" as="status"> 29 30 <td class="friendicon"> 30 31 31 <img src="/profile_images/{status.userId}/{status.imageNormal}" id="profile-image" alt="{status.userName}" class="friendicon" if="status.image" /> 32 32 <img src="/profile_images/default_profile_normal.png" id="profile-image" alt="Default_profile_normal" class="friendicon" if="!status.image" /> 33 34 33 </td> 35 34 <td class="status"> … … 131 130 }); 132 131 </script> 132 133 <script type="text/javascript"> 134 </script>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)