isocial-svn Mailing List for isocial (Page 5)
Status: Pre-Alpha
Brought to you by:
aguidrevitch
You can subscribe to this list here.
2008 |
Jan
|
Feb
(11) |
Mar
(80) |
Apr
(22) |
May
(90) |
Jun
(28) |
Jul
(33) |
Aug
(12) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
---|
From: <agu...@us...> - 2008-05-15 14:38:30
|
Revision: 204 http://isocial.svn.sourceforge.net/isocial/?rev=204&view=rev Author: aguidrevitch Date: 2008-05-15 07:38:24 -0700 (Thu, 15 May 2008) Log Message: ----------- cursor: hand; removed Modified Paths: -------------- public/stylesheets/Profile.css public/stylesheets/common/Application.css public/stylesheets/common/Form.css public/stylesheets/common/Input.css Modified: public/stylesheets/Profile.css =================================================================== --- public/stylesheets/Profile.css 2008-05-15 09:21:41 UTC (rev 203) +++ public/stylesheets/Profile.css 2008-05-15 14:38:24 UTC (rev 204) @@ -1,3 +1,21 @@ -.imselect { - margin-left: 10px; -} \ No newline at end of file +.im { + margin-bottom: 4px; +} + +.im input { + float: left; +} + +.im select { + float: left; +} + +.im .delete { + float: left; + cursor: pointer; + width: 16px; + height: 16px; + margin: 2px; + background: url('/images/delete.png') no-repeat left white; +} + Modified: public/stylesheets/common/Application.css =================================================================== --- public/stylesheets/common/Application.css 2008-05-15 09:21:41 UTC (rev 203) +++ public/stylesheets/common/Application.css 2008-05-15 14:38:24 UTC (rev 204) @@ -362,7 +362,6 @@ .lock { cursor: pointer; - cursor: hand; display: block; padding-left: 20px; background: url('/images/lock_inactive.png') no-repeat 2px; Modified: public/stylesheets/common/Form.css =================================================================== --- public/stylesheets/common/Form.css 2008-05-15 09:21:41 UTC (rev 203) +++ public/stylesheets/common/Form.css 2008-05-15 14:38:24 UTC (rev 204) @@ -65,6 +65,7 @@ .formrow .formcol .middle { float: left; + width: 350px; } .formrow .formcol .third { Modified: public/stylesheets/common/Input.css =================================================================== --- public/stylesheets/common/Input.css 2008-05-15 09:21:41 UTC (rev 203) +++ public/stylesheets/common/Input.css 2008-05-15 14:38:24 UTC (rev 204) @@ -8,7 +8,6 @@ .submitinput, .buttoninput, .cancelinput { cursor: pointer; - cursor: hand; color: white; background-color: #3b5998; padding-right: 15px; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-05-15 09:21:39
|
Revision: 203 http://isocial.svn.sourceforge.net/isocial/?rev=203&view=rev Author: dim0s77 Date: 2008-05-15 02:21:41 -0700 (Thu, 15 May 2008) Log Message: ----------- complete page 'discussion board: topics list' Modified Paths: -------------- app/controllers/groupapp/board_controller.php app/controllers/groupapp/group_controller.php app/locales/groupapp/board/ru.php app/models/groupapp_member.php app/views/groupapp/board/_head.tpl app/views/groupapp/board/index.tpl app/views/groupapp/board/show_topic.tpl config/routes.php public/stylesheets/groupapp/Board.css timesheet/dim0s77.txt Modified: app/controllers/groupapp/board_controller.php =================================================================== --- app/controllers/groupapp/board_controller.php 2008-05-14 17:07:32 UTC (rev 202) +++ app/controllers/groupapp/board_controller.php 2008-05-15 09:21:41 UTC (rev 203) @@ -8,16 +8,16 @@ if (!empty($this->params['id'])) { $messages = $this->GroupappMessage->find('all', array( - 'conditions' => array("group_id = ?", $this->params['id']) + 'conditions' => array("group_id = ?", $this->params['id']), + 'include' => 'user' ) ); + $group = $this->GroupappGroup->findFirst(array( 'id = ?' => $this->params['id'] )); $topics = array(); - $persons = array(); if(!empty($messages)) { foreach ($messages as $message_loop_key => $message) { if (!isset($topics[$message->topic_id])) { $topics[$message->topic_id]['first'] = $message; - } else { } isset($topics[$message->topic_id]['posts']) ? $topics[$message->topic_id]['posts']++ : @@ -29,8 +29,10 @@ $topics[$message->topic_id]['persons'] = 1; } $topics[$message->topic_id]['last'] = $message; + $topics[$message->topic_id]['last'] = $message; } } + $this->group = $group; $this->topics = $topics; } } @@ -68,7 +70,7 @@ 'user_id' => $this->current_user->getId() )); if ($member) { - $message = $member->message->build(); + $message = $member->message->build(); $message->setAttributes($this->params['topic']); if (empty($message->subject)) { $message->subject = $this->t('(no topic)'); @@ -77,7 +79,7 @@ if (!$message->topic_id) { $message->topic_id = $message->getId(); if ($message->save()) { - $this->redirectTo(array('action' => 'show_topic', 'id' => $topic->getId())); + $this->redirectTo(array('action' => 'show_topic', 'id' => $message->getId())); return; } } Modified: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php 2008-05-14 17:07:32 UTC (rev 202) +++ app/controllers/groupapp/group_controller.php 2008-05-15 09:21:41 UTC (rev 203) @@ -40,14 +40,14 @@ return; } } else if (!empty($this->params['id']) && $this->GroupappGroup->find($this->params['id'])) { - $this->group = $this->GroupappGroup->find($this->params['id']); + $this->group = $this->GroupappGroup->findFirst($this->params['id']); } $this->importErrors( $this->GroupappGroup->getErrors() ); } function edit_group () { if (!empty($this->params['group']) && !empty($this->params['id'])){ - $group = $this->GroupappGroup->findFirst(array( 'id' => $this->params['id'] )); + $group = $this->GroupappGroup->findFirst(array( 'id = ?' => $this->params['id'] )); $group->setAttributes($this->params['group']); if ($this->Request->isPost() && $group->save()) { $this->group = $group; Modified: app/locales/groupapp/board/ru.php =================================================================== --- app/locales/groupapp/board/ru.php 2008-05-14 17:07:32 UTC (rev 202) +++ app/locales/groupapp/board/ru.php 2008-05-15 09:21:41 UTC (rev 203) @@ -4,7 +4,7 @@ $dictionary = array(); $dictionary['Discussions'] = 'Обсуждения'; -$dictionary['Back to'] = 'Обратно в'; +$dictionary['Back to group'] = 'Обратно в группу'; $dictionary['Discussion Board'] = 'Список обсуждений'; $dictionary['Topic View'] = 'Просмотр темы'; $dictionary['Start New Topic'] = 'Начать новую тему'; @@ -23,6 +23,13 @@ $dictionary['Search all topics'] = 'Искать все темы'; $dictionary['There are no discussions'] ='Обсуждений пока нет'; +$dictionary['The total number of discussion topics'] = 'Общее число обсуждаемых тем'; +$dictionary['Latest post'] = 'Последнее сообщение'; +$dictionary['by'] = 'написал(а)'; +$dictionary['Posted on'] = ''; +$dictionary['Created on'] = 'Тема создана'; +$dictionary['posts'] = 'сообщений'; +$dictionary['persons'] = 'участников'; $dictionary['Topic'] = 'Тема'; $dictionary['Create new Topic'] = 'Создать новую тему'; $dictionary['Delete Topic'] = 'Удалить тему'; Modified: app/models/groupapp_member.php =================================================================== --- app/models/groupapp_member.php 2008-05-14 17:07:32 UTC (rev 202) +++ app/models/groupapp_member.php 2008-05-15 09:21:41 UTC (rev 203) @@ -2,8 +2,10 @@ class GroupappMember extends ActiveRecord { - var $belongs_to = array('user' => array('class_name' => 'User', 'primary_key_name' => 'user_id'), - 'role' => array('class_name' => 'GroupMemberRole', 'primary_key_name' => 'role_id') + var $belongs_to = array('user' => array('class_name' => 'User', + 'primary_key_name' => 'user_id'), + 'role' => array('class_name' => 'GroupMemberRole', + 'primary_key_name' => 'role_id') ); var $has_many = array( 'messages' => array('class_name' => 'GroupappMessage', 'foreign_key' => 'user_id') ); Modified: app/views/groupapp/board/_head.tpl =================================================================== --- app/views/groupapp/board/_head.tpl 2008-05-14 17:07:32 UTC (rev 202) +++ app/views/groupapp/board/_head.tpl 2008-05-15 09:21:41 UTC (rev 203) @@ -4,10 +4,10 @@ </div> <div class="info"> <div class="header"> - <div class="name groupapp">{group.name?} _{Discussions}</div> + <div class="name groupapp">{group.name?}: _{Discussions}</div> </div> <div class="clearfix"></div> - <div class="subheader"><a href="/groupapp/group/show_group/{group.id?}">_{Back to} {group.name?}</a></div> + <div class="subheader"><a href="/groupapp/group/show_group/{group.id?}">_{Back to group} {group.name?}</a></div> </div> </div> <div class="clearfix"></div> Modified: app/views/groupapp/board/index.tpl =================================================================== --- app/views/groupapp/board/index.tpl 2008-05-14 17:07:32 UTC (rev 202) +++ app/views/groupapp/board/index.tpl 2008-05-15 09:21:41 UTC (rev 203) @@ -23,27 +23,32 @@ </label> </div> - <input class="mediumtextinput search right" id="searchfield" name="" type="text" value="_{Search all topics}" onclick="on_search_topic_click(this)" onblur="on_search_topic_blur(this)" /> - </div> <div class="clearfix"></div> {?topics} <div class="messages_list"> - <div class="info">Displaying all 2 topics.</div> + <div class="info"> + <div class="left">_{The total number of discussion topics}: <?= count($topics) ?></div> + <input class="mediumtextinput search" id="searchfield" name="" type="text" value="_{Search all topics}" onclick="on_search_topic_click(this)" onblur="on_search_topic_blur(this)" /> + </div> + <div class="clearfix"></div> + <div class="container"> {loop topics} <div class="row<? if ($topic_loop_counter == 1) echo ' first'; ?>"> <div class="topic_info"> - <div class="subject"><a href="#">{topic-first.subject?}</a></div> - <span class="subtext black">{topic-posts?} post by {topic-persons?} person</span> - <span class="subtext">Created on {topic-first.created_at?}</span> + <div class="subject"><a href="/groupapp/board/show_topic/{topic-first.topic_id?}">{topic-first.subject?}</a></div> + <div class="subtext black">_{posts}: {topic-posts?}; _{persons}: {topic-persons?}</div> + <div class="subtext">_{Created on} {topic-first.created_at?}</div> </div> <div class="latest_post_info"> - <div class="sender">Latest post by</div> - <div class="subtext">Posted on {topic-last.created_at?}</div> + <div class="sender"> + <a href="/groupapp/board/show_topic/{topic-last.topic_id}#{topic-last.id}">_{Latest post}</a> _{by} + <a href="/profile/show/{topic-last.user.id?}">{topic-last.user.name?}</a></div> + <div class="subtext">_{Posted on} {topic-last.created_at?}</div> </div> <div class="clearfix"></div> Modified: app/views/groupapp/board/show_topic.tpl =================================================================== --- app/views/groupapp/board/show_topic.tpl 2008-05-14 17:07:32 UTC (rev 202) +++ app/views/groupapp/board/show_topic.tpl 2008-05-15 09:21:41 UTC (rev 203) @@ -17,7 +17,7 @@ <?= $controller->renderErrors() ?> <div class="messages_list"> - <div class="info">Displaying all 3 posts by 2 people.</div> + <div class="info"> </div> {loop messages} <div class="row"> @@ -36,7 +36,6 @@ <a href="/profile/show/{message.user_id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> <div class="subtext">#{message_loop_counter}</div> <input id="message_id{message.id?}" name="message_id{message.id?}" type="hidden" value="{message_loop_counter}" /> - <div class="subtext black">_{replies}: </div> </div> <div class="message"> Modified: config/routes.php =================================================================== --- config/routes.php 2008-05-14 17:07:32 UTC (rev 202) +++ config/routes.php 2008-05-15 09:21:41 UTC (rev 203) @@ -3,8 +3,11 @@ // You can find more about routes on /lib/AkRouters.php and /test/test_AkRouter.php $Map->connect('/', array('controller' => 'default', 'action' => 'index')); -$Map->connect('/groupapp/:controller/:action/:id', array('controller' => 'group', 'action' => 'index', 'module' => 'groupapp')); -$Map->connect('/photoapp/:controller/:action/:id', array('controller' => 'album', 'action' => 'index', 'module' => 'photoapp')); +$Map->connect('/groupapp', array('controller' => 'group', 'action' => 'index', 'module' => 'groupapp')); +$Map->connect('/groupapp/board/:id', array('controller' => 'board', 'action' => 'index', 'module' => 'groupapp')); +$Map->connect('/groupapp/board/:action/:id', array('controller' => 'board', 'module' => 'groupapp')); +$Map->connect('/groupapp/group/:action/:id', array('controller' => 'group', 'module' => 'groupapp')); +$Map->connect('/photoapp/:controller/:action/:id', array('controller' => 'album', 'module' => 'photoapp')); $Map->connect('/preview/:action/:size/:path',array('controller' => 'preview', 'action' => 'index') ); $Map->connect('/:controller/:action/:id', array('controller' => 'default', 'action' => 'index')); $Map->connect('/:controller/:action/:from/:id', array('controller' => 'message', 'action' => 'show')); Modified: public/stylesheets/groupapp/Board.css =================================================================== --- public/stylesheets/groupapp/Board.css 2008-05-14 17:07:32 UTC (rev 202) +++ public/stylesheets/groupapp/Board.css 2008-05-15 09:21:41 UTC (rev 203) @@ -16,9 +16,16 @@ } .messages_list .info { - padding: 0px 0px 5px 20px; + padding: 0px 10px 5px 20px; + margin-bottom: 5px; + text-align: right; } +.messages_list .info .left { + float: left; + padding-top: 5px; +} + .messages_list .container { border-top: solid 1px #dddddd; background: #f7f7f7; Modified: timesheet/dim0s77.txt =================================================================== --- timesheet/dim0s77.txt 2008-05-14 17:07:32 UTC (rev 202) +++ timesheet/dim0s77.txt 2008-05-15 09:21:41 UTC (rev 203) @@ -18,3 +18,6 @@ 2008-05-13,16:30,17:40,groupapp,RT:3,"Add functionality to the 'show topic' tab" 2008-05-14,12:40,13:35,groupapp,RT:3,"discussions for group (replying to topic)" +2008-05-14,15:00,16:35,groupapp,RT:3,"discussions for group (replying to topic)" + +2008-05-15,10:20,12:20,groupapp,RT:3,"discussion board: topics list" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-14 17:07:28
|
Revision: 202 http://isocial.svn.sourceforge.net/isocial/?rev=202&view=rev Author: fsnobody Date: 2008-05-14 10:07:32 -0700 (Wed, 14 May 2008) Log Message: ----------- design edit photo v1 Modified Paths: -------------- app/controllers/photoapp/album_controller.php public/stylesheets/photoapp/Album.css timesheet/eerunov.txt Added Paths: ----------- app/views/photoapp/album/edit_photo.tpl Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-14 10:34:38 UTC (rev 201) +++ app/controllers/photoapp/album_controller.php 2008-05-14 17:07:32 UTC (rev 202) @@ -21,7 +21,13 @@ return; } - function search () { + function edit_photo () { + if (!empty($this->params['id']) && $this->PhotoappPhoto->find($this->params['id'])) { + $this->photo = $this->PhotoappPhoto->find($this->params['id']); + $this->album = $this->PhotoappAlbum->find($this->photo->album_id); + $this->albums = $this->PhotoappAlbum->find('all', array('conditions' => array('owner = ' . $this->current_user->getId()))); + } + //$this->redirectTo(array('action' => 'edit_photo', 'id' => $album->id)); } function my_photos () { Added: app/views/photoapp/album/edit_photo.tpl =================================================================== --- app/views/photoapp/album/edit_photo.tpl (rev 0) +++ app/views/photoapp/album/edit_photo.tpl 2008-05-14 17:07:32 UTC (rev 202) @@ -0,0 +1,61 @@ +<?= $controller->renderPartial("edit_title") ?> + +<?= $controller->renderPartial("edit_menu") ?> + +<?= $controller->renderErrors() ?> + +<div class="uploaded_container"> + <?= $form_tag_helper->start_form_tag(array('action'=>'edit_photo', 'id' => $photo->get('get'))) ?> + <?= $form_helper->hidden_field('photo', 'action_edit', array('value' => 'do_edit'))?> + <div class="edit_container"> + + <div class="photo_comment"> + <div class="img_medium"><img src="/preview/index/300x270/<?= $photo->get('img')?>" /></div> + <div class="data_medium"> + + <div class="form_create_row"> + <label >_{Name}:</label> + <div class="form_create_col"> + <?= $form_helper->text_field('photo', 'name', array('class' => 'textinput small')) ?> + </div> + </div><div class="clearfix"></div> + + <div class="form_create_row"> + <label >_{Description}:</label> + <div class="form_create_col"> + <?= $form_helper->text_area('photo', 'caption', array('rows' => '5', 'class' => 'small')) ?> + </div> + </div><div class="clearfix"></div> + + <div class="form_create_row"> + <label >_{Cover}:</label> + <div class="form_create_col"> + <?= $form_helper->check_box('photo', 'is_cover') ?> + </div> + </div><div class="clearfix"></div> + + <div class="form_create_row"> + <label >_{Move to}:</label> + <div class="form_create_col"> + <?= $form_options_helper->select('photo', 'album_id', $PhotoappAlbum->collect($PhotoappAlbum->find('all', array ('conditions' => array('owner = ' . $current_user->getId()))), 'name', 'id')); ?> + + </div> + </div><div class="clearfix"></div> + + + </div> + + </div><div class="clearfix"></div> + + <div class="form_create_row"> + <label class="medium"> </label> + <div class="form_create_col"> + <input class="submitinput" type="submit" value="_{Save}"/> + </div> + </div><div class="clearfix"></div> + + + </div><div class="clearfix"></div> + + </form> +</div><div class="clearfix"></div> Modified: public/stylesheets/photoapp/Album.css =================================================================== --- public/stylesheets/photoapp/Album.css 2008-05-14 10:34:38 UTC (rev 201) +++ public/stylesheets/photoapp/Album.css 2008-05-14 17:07:32 UTC (rev 202) @@ -188,6 +188,21 @@ text-align: center; padding-top: 10px; } + +.photo_comment .img_medium { + float: left; + width: 320px; + height: 270px; + text-align: center; + padding-top: 10px; +} + +.photo_comment .data_medium { + float: left; + width: 300px; + height: 270px; +} + .photo_view .img { height: 100px; } Modified: timesheet/eerunov.txt =================================================================== --- timesheet/eerunov.txt 2008-05-14 10:34:38 UTC (rev 201) +++ timesheet/eerunov.txt 2008-05-14 17:07:32 UTC (rev 202) @@ -11,3 +11,4 @@ 2008-05-08,09:00,11:00,photoapp,RT:2,"preview controller use + add photo designet and part functional" 2008-05-12,09:00,11:00,photoapp,RT:2,"comment uploaded + cover onoad" 2008-05-13,07:00,09:10,photoapp,RT:2,"photo list + delete" +2008-05-14,09:00,11:00.photoapp,RT:2,"change img storage + design edit photo v1" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-05-14 10:34:31
|
Revision: 201 http://isocial.svn.sourceforge.net/isocial/?rev=201&view=rev Author: dim0s77 Date: 2008-05-14 03:34:38 -0700 (Wed, 14 May 2008) Log Message: ----------- added templates for replying to message and topic Modified Paths: -------------- app/controllers/groupapp/board_controller.php app/locales/groupapp/board/ru.php app/views/groupapp/board/show_topic.tpl app/views/groupapp/board/start_topic.tpl timesheet/dim0s77.txt Added Paths: ----------- app/views/groupapp/board/reply_to_post.tpl app/views/groupapp/board/reply_to_topic.tpl Modified: app/controllers/groupapp/board_controller.php =================================================================== --- app/controllers/groupapp/board_controller.php 2008-05-14 10:32:30 UTC (rev 200) +++ app/controllers/groupapp/board_controller.php 2008-05-14 10:34:38 UTC (rev 201) @@ -68,15 +68,15 @@ 'user_id' => $this->current_user->getId() )); if ($member) { - $topic = $member->message->build(); - $topic->setAttributes($this->params['topic']); - if (empty($topic->subject)) { - $topic->subject = $this->t('(no topic)'); + $message = $member->message->build(); + $message->setAttributes($this->params['topic']); + if (empty($message->subject)) { + $message->subject = $this->t('(no topic)'); } - if ($topic->save()) { - if (!$topic->topic_id) { - $topic->topic_id = $topic->getId(); - if ($topic->save()) { + if ($message->save()) { + if (!$message->topic_id) { + $message->topic_id = $message->getId(); + if ($message->save()) { $this->redirectTo(array('action' => 'show_topic', 'id' => $topic->getId())); return; } @@ -94,6 +94,17 @@ } } + + function reply_to_topic () { + if (!empty($this->params['id'])) { + } + } + + function reply_to_post () { + if (!empty($this->params['id'])) { + } + } + } ?> Modified: app/locales/groupapp/board/ru.php =================================================================== --- app/locales/groupapp/board/ru.php 2008-05-14 10:32:30 UTC (rev 200) +++ app/locales/groupapp/board/ru.php 2008-05-14 10:34:38 UTC (rev 201) @@ -24,6 +24,7 @@ $dictionary['There are no discussions'] ='Обсуждений пока нет'; $dictionary['Topic'] = 'Тема'; +$dictionary['Create new Topic'] = 'Создать новую тему'; $dictionary['Delete Topic'] = 'Удалить тему'; $dictionary['Reply to Topic'] = 'Ответить по теме'; $dictionary['You'] = 'Вы'; @@ -32,7 +33,7 @@ $dictionary['Reply'] = 'Ответить'; $dictionary['to Your Post'] = 'себе'; $dictionary['replies'] = 'ответов'; -$dictionary['Post'] = ''; +$dictionary['Post'] = 'Сообщение'; $dictionary['Mark as Irrelevant'] = 'Пометить как неуместное'; $dictionary['Delete Post'] = 'Удалить сообщение'; $dictionary['Report'] = 'Пожаловаться'; Added: app/views/groupapp/board/reply_to_post.tpl =================================================================== --- app/views/groupapp/board/reply_to_post.tpl (rev 0) +++ app/views/groupapp/board/reply_to_post.tpl 2008-05-14 10:34:38 UTC (rev 201) @@ -0,0 +1,25 @@ +<?= $controller->renderPartial("head") ?> + +<?= $controller->renderErrors() ?> + +<form action="/groupapp/board/reply_to_post" method="post"> + <div class="editform"> + <div class="formrow"> + <label>_{Topic}:</label> + <?= $form_helper->text_field('topic', 'subject', array('class' => 'textinput'))?> + </div> + <div class="formrow"> + <label>_{Post}:</label> + <?= $form_helper->text_area('topic', 'body', array('class' => 'textinput'))?> + </div> + <div class="formrow"> + <label> + {?topic.group_id}<input id="topic_group_id" name="topic[group_id]" type="hidden" value="{topic.group_id?}" />{end} + {?topic.topic_id}<input id="topic_topic_id" name="topic[topic_id]" type="hidden" value="{topic.topic_id?}" />{end} + {?topic.reply_message_id}<input id="topic_reply_topic_id" name="topic[reply_message_id]" type="hidden" value="{topic.reply_message_id?}" />{end} + </label> + <input class="submitinput" type="submit" value="_{Post}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + </div> +</form> Added: app/views/groupapp/board/reply_to_topic.tpl =================================================================== --- app/views/groupapp/board/reply_to_topic.tpl (rev 0) +++ app/views/groupapp/board/reply_to_topic.tpl 2008-05-14 10:34:38 UTC (rev 201) @@ -0,0 +1,25 @@ +<?= $controller->renderPartial("head") ?> + +<?= $controller->renderErrors() ?> + +<form action="/groupapp/board/reply_to_topic" method="post"> + <div class="editform"> + <div class="formrow"> + <label>_{Topic}:</label> + <?= $form_helper->text_field('topic', 'subject', array('class' => 'textinput'))?> + </div> + <div class="formrow"> + <label>_{Post}:</label> + <?= $form_helper->text_area('topic', 'body', array('class' => 'textinput'))?> + </div> + <div class="formrow"> + <label> + {?topic.group_id}<input id="topic_group_id" name="topic[group_id]" type="hidden" value="{topic.group_id?}" />{end} + {?topic.topic_id}<input id="topic_topic_id" name="topic[topic_id]" type="hidden" value="{topic.topic_id?}" />{end} + {?topic.reply_message_id}<input id="topic_reply_message_id" name="topic[reply_message_id]" type="hidden" value="{topic.reply_message_id?}" />{end} + </label> + <input class="submitinput" type="submit" value="_{Post}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + </div> +</form> Modified: app/views/groupapp/board/show_topic.tpl =================================================================== --- app/views/groupapp/board/show_topic.tpl 2008-05-14 10:32:30 UTC (rev 200) +++ app/views/groupapp/board/show_topic.tpl 2008-05-14 10:34:38 UTC (rev 201) @@ -8,7 +8,7 @@ </div> <div class="menu_block right"> - <a href="#">_{Delete Topic}</a> | <a href="#">_{Reply to Topic}</a> + <a href="/groupapp/board/reply_to_topic/{messages-0.topic_id?}">_{Reply to Topic}</a> </div> </div> @@ -23,18 +23,18 @@ <div class="actions"> <ul class="actions_list"> - <li><a href="/groupapp/">_{Reply} <? if ($current_user->getId() == $message->user_id) echo $text_helper->translate('to Your Post'); ?></a></li> + <li><a href="/groupapp/board/reply_to_post/{message.id?}">_{Reply} <? if ($current_user->getId() == $message->user_id) echo $text_helper->translate('to Your Post'); ?></a></li> <? if ($current_user->getId() != $message->user_id) { ?> - <li><a href="/groupapp/group/edit_info/{group.id?}">_{Mark as Irrelevant}</a></li> - <li><a href="/groupapp/group/edit_members/{group.id?}">_{Report}</a></li> + <li><a href="#">_{Mark as Irrelevant}</a></li> + <li><a href="#">_{Report}</a></li> <? } ?> - <li><a href="/groupapp/group/edit_members/{group.id?}">_{Delete Post}</a></li> + <li><a href="#">_{Delete Post}</a></li> </ul> </div> <div class="avatar"> <a href="/profile/show/{message.user_id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> - <div class="subtext">_{Post} #{message_loop_counter}</div> + <div class="subtext">#{message_loop_counter}</div> <input id="message_id{message.id?}" name="message_id{message.id?}" type="hidden" value="{message_loop_counter}" /> <div class="subtext black">_{replies}: </div> </div> Modified: app/views/groupapp/board/start_topic.tpl =================================================================== --- app/views/groupapp/board/start_topic.tpl 2008-05-14 10:32:30 UTC (rev 200) +++ app/views/groupapp/board/start_topic.tpl 2008-05-14 10:34:38 UTC (rev 201) @@ -13,8 +13,10 @@ <?= $form_helper->text_area('topic', 'body', array('class' => 'textinput'))?> </div> <div class="formrow"> - <label><input id="topic_group_id" name="topic[group_id]" type="hidden" value="{topic.group_id?}" /></label> - <input class="submitinput" type="submit" value="_{Post new topic}"> + <label> + {?topic.group_id}<input id="topic_group_id" name="topic[group_id]" type="hidden" value="{topic.group_id?}" />{end} + </label> + <input class="submitinput" type="submit" value="_{Create new Topic}"> <input class="cancelinput" type="button" value="_{Cancel}"> </div> </div> Modified: timesheet/dim0s77.txt =================================================================== --- timesheet/dim0s77.txt 2008-05-14 10:32:30 UTC (rev 200) +++ timesheet/dim0s77.txt 2008-05-14 10:34:38 UTC (rev 201) @@ -16,3 +16,5 @@ 2008-05-09,12:00,15:00,groupapp,RT:3,"create template for topics" 2008-05-13,16:30,17:40,groupapp,RT:3,"Add functionality to the 'show topic' tab" + +2008-05-14,12:40,13:35,groupapp,RT:3,"discussions for group (replying to topic)" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-14 10:32:23
|
Revision: 200 http://isocial.svn.sourceforge.net/isocial/?rev=200&view=rev Author: fsnobody Date: 2008-05-14 03:32:30 -0700 (Wed, 14 May 2008) Log Message: ----------- change location strore path, delimiter = @ Modified Paths: -------------- app/controllers/photoapp/album_controller.php app/controllers/preview_controller.php app/views/photoapp/album/uploaded.tpl timesheet/eerunov.txt Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-13 18:14:45 UTC (rev 199) +++ app/controllers/photoapp/album_controller.php 2008-05-14 10:32:30 UTC (rev 200) @@ -134,13 +134,19 @@ if ($_FILES['album']['error'][$field] == 0 ) { // copy file; save photo - $copy_to = PROJECT_DIR . "public/images/uploaded/" . $_FILES['album']['name'][$field]; + $photo_name = microtime(true) . ".jpeg"; + $user_path = PROJECT_DIR . "public/images/uploaded/" . $this->current_user->getId(); + if(!file_exists($user_path)) { + `mkdir $user_path`; + `chmod 777 $user_path`; + } + $copy_to = $user_path . "/" . $photo_name;//$_FILES['album']['name'][$field]; $copy_from = $_FILES['album']['tmp_name'][$field]; if (move_uploaded_file($copy_from, $copy_to)) { $album = $this->PhotoappAlbum->find($this->params['id']); $photo = new PhotoappPhoto (); - $photo->img = $_FILES['album']['name'][$field]; + $photo->img = $this->current_user->getId() . "@" . $photo_name; $photo->album_id = $album->getId(); if( empty($album->img)) { $photo->is_cover = 1; Modified: app/controllers/preview_controller.php =================================================================== --- app/controllers/preview_controller.php 2008-05-13 18:14:45 UTC (rev 199) +++ app/controllers/preview_controller.php 2008-05-14 10:32:30 UTC (rev 200) @@ -10,6 +10,7 @@ @list($width, $height, $type) = explode('x', $this->params['size']); if ($width > 10 && $height > 10) { //$filename = join(DS, $this->params['path']); + $this->params['path'] = str_replace("@", "/", $this->params['path']); $file = AK_PUBLIC_DIR . "/images/uploaded/" . $this->params['path']; if (file_exists($file) && !is_dir($file)) { Modified: app/views/photoapp/album/uploaded.tpl =================================================================== --- app/views/photoapp/album/uploaded.tpl 2008-05-13 18:14:45 UTC (rev 199) +++ app/views/photoapp/album/uploaded.tpl 2008-05-14 10:32:30 UTC (rev 200) @@ -17,6 +17,7 @@ {loop uploaded_photos} <div class="photo_comment"> <div class="img"> + <img src="/preview/index/100x100/<?= $uploaded_photo->get('img')?>" /> </div> <div class="data"> Modified: timesheet/eerunov.txt =================================================================== --- timesheet/eerunov.txt 2008-05-13 18:14:45 UTC (rev 199) +++ timesheet/eerunov.txt 2008-05-14 10:32:30 UTC (rev 200) @@ -10,3 +10,4 @@ 2008-05-07,14:00,15:30,photoapp,RT:2,"photo controller" 2008-05-08,09:00,11:00,photoapp,RT:2,"preview controller use + add photo designet and part functional" 2008-05-12,09:00,11:00,photoapp,RT:2,"comment uploaded + cover onoad" +2008-05-13,07:00,09:10,photoapp,RT:2,"photo list + delete" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 18:21:11
|
Revision: 199 http://isocial.svn.sourceforge.net/isocial/?rev=199&view=rev Author: aguidrevitch Date: 2008-05-13 11:14:45 -0700 (Tue, 13 May 2008) Log Message: ----------- minor fix in new city dialog Modified Paths: -------------- app/helpers/city_helper.php Modified: app/helpers/city_helper.php =================================================================== --- app/helpers/city_helper.php 2008-05-13 18:10:43 UTC (rev 198) +++ app/helpers/city_helper.php 2008-05-13 18:14:45 UTC (rev 199) @@ -95,6 +95,8 @@ new Ajax.Updater(\'ncdlg_regions_list\' + object._data, \'/city/get_regions\', { postBody: $(\'city_addition_form\' + object._data).serialize() }); + } else { + $(\'ncdlg_regions_list\' + object._data).update(); } } }', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 18:20:23
|
Revision: 198 http://isocial.svn.sourceforge.net/isocial/?rev=198&view=rev Author: aguidrevitch Date: 2008-05-13 11:10:43 -0700 (Tue, 13 May 2008) Log Message: ----------- IE6 dialogs compatibility issues adressed Modified Paths: -------------- app/helpers/access_field_helper.php app/helpers/city_helper.php app/helpers/dialog_helper.php app/views/message/inbox.tpl app/views/message/outbox.tpl public/stylesheets/dialog.css Modified: app/helpers/access_field_helper.php =================================================================== --- app/helpers/access_field_helper.php 2008-05-13 18:09:45 UTC (rev 197) +++ app/helpers/access_field_helper.php 2008-05-13 18:10:43 UTC (rev 198) @@ -13,18 +13,18 @@ $hidden = $this->_controller->form_helper->hidden_field($object, $method); $dialog = $this->_controller->dialog_helper->dialog('access_dialog', 'hidden, title', array( - 'class' => 'access_dialog', - 'title' => $this->t('Who can see this?'), - 'yes' => $this->t('Save'), - 'cancel' => $this->t('Cancel'), - 'body' => TagHelper::content_tag('div', '', array('id' => 'access_title', 'class' => 'field')) . + 'classname' => 'access_dialog', + 'title' => $this->t('Who can see this?'), + 'yes' => $this->t('Save'), + 'cancel' => $this->t('Cancel'), + 'body' => TagHelper::content_tag('div', '', array('id' => 'access_title', 'class' => 'field')) . "<select id='access_select'> <option value='0'>$everyone</option> <option value='1'>$friendsoffriends</option> <option value='2'>$onlyfriends</option> <option value='4'>$onlyme</option> </select>", - 'onShow' => 'function (object) { + 'onShow' => 'function (object) { object._data = \'access_select_\' + Math.round(Math.random() * 1000000); $(\'access_title\').id += object._data; Modified: app/helpers/city_helper.php =================================================================== --- app/helpers/city_helper.php 2008-05-13 18:09:45 UTC (rev 197) +++ app/helpers/city_helper.php 2008-05-13 18:10:43 UTC (rev 198) @@ -57,12 +57,12 @@ $text_country = $this->t('Country'); $Country = new Country (); $dialog = $this->_controller->dialog_helper->dialog('city_dialog', 'input, hidden', array( - 'class' => 'city_dialog', - 'autohide' => false, - 'title' => $this->t('Add New City'), - 'yes' => $this->t('Save'), - 'cancel' => $this->t('Cancel'), - 'body' => " + 'classname' => 'city_dialog', + 'autohide' => false, + 'title' => $this->t('Add New City'), + 'yes' => $this->t('Save'), + 'cancel' => $this->t('Cancel'), + 'body' => " <form id='city_addition_form'> <div class='editform'> <div id='ncdlg_errors'></div> @@ -78,7 +78,7 @@ </div> </form>", - 'onShow' => 'function (object) { + 'onShow' => 'function (object) { object._data = Math.round(Math.random() * 1000000); // updating ids @@ -99,7 +99,7 @@ } }', - 'onYes' => 'function (object) { + 'onYes' => 'function (object) { new Ajax.Request(\'/city/add\', { postBody: $(\'city_addition_form\' + object._data).serialize(), onSuccess: function (response) { @@ -117,7 +117,7 @@ }); }', - 'onCancel' => 'function (object) { + 'onCancel' => 'function (object) { object.hide(); }', )); Modified: app/helpers/dialog_helper.php =================================================================== --- app/helpers/dialog_helper.php 2008-05-13 18:09:45 UTC (rev 197) +++ app/helpers/dialog_helper.php 2008-05-13 18:10:43 UTC (rev 198) @@ -15,7 +15,9 @@ $params = 'element, ' . $params; - $function = "function {$function_name} ({$params}) { new Dialog.Box(element, " . $this->_options_for_dialog($js_options) . "); }"; + $function = "function {$function_name} ({$params}) { + return new Dialog.Box(element, " . $this->_options_for_dialog($js_options) . "); +}"; return JavaScriptHelper::javascript_tag($function); } @@ -27,19 +29,19 @@ else if ($v === true) $options[$k] = 'true'; } - foreach (array('onShow', 'onHide', 'onYes', 'onNo', 'onCancel', 'autoshow', 'autohide', 'unique') as $k) { - if ( array_key_exists($k, $options) ) $_js_options[] = "$k: {$options[$k]}"; + foreach (array('onShow', 'onHide', 'onYes', 'onNo', 'onCancel', 'autoshow', 'autohide') as $k) { + if ( array_key_exists($k, $options) ) $_js_options[] = " '$k': {$options[$k]}"; } - foreach (array('title', 'body', 'yes', 'no', 'cancel', 'hfloat', 'vfloat', 'class') as $k) { + foreach (array('title', 'body', 'yes', 'no', 'cancel', 'hfloat', 'vfloat', 'classname') as $k) { if ( array_key_exists($k, $options) ) { $options[$k] = addslashes($options[$k]); - $options[$k] = preg_replace('/\n/', '\n', $options[$k]); - $_js_options[] = "$k: \"{$options[$k]}\""; + $options[$k] = preg_replace('/\n/', "\"\n + \"", $options[$k]); + $_js_options[] = " '$k': \"{$options[$k]}\""; } } - return '{'.join(', ',$_js_options).'}'; + return "{\n".join(",\n",$_js_options)."\n}"; } } Modified: app/views/message/inbox.tpl =================================================================== --- app/views/message/inbox.tpl 2008-05-13 18:09:45 UTC (rev 197) +++ app/views/message/inbox.tpl 2008-05-13 18:10:43 UTC (rev 198) @@ -91,10 +91,11 @@ function delete_threads (element) { new Dialog.Box(element, { - title: '_{Delete Threads}', - body: '_{Are you sure you want to delete selected threads}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + classname: 'delete_dialog', + title: '_{Delete Threads}', + body: '_{Are you sure you want to delete selected threads}?', + yes: '_{Delete}', + cancel: '_{Cancel}', onYes : function () { new Ajax.Updater('messages', '/message/delete_inbox_thread', { parameters:$('messages_form').serialize(), @@ -109,10 +110,11 @@ function delete_single_thread (element) { new Dialog.Box(element, { - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + classname: 'delete_dialog', + title: '_{Delete Thread}', + body: '_{Are you sure you want to delete this thread}?', + yes: '_{Delete}', + cancel: '_{Cancel}', onYes : function () { new Ajax.Updater('messages', '/message/delete_inbox_thread', { parameters: 'check_messages[]=' + element.name, Modified: app/views/message/outbox.tpl =================================================================== --- app/views/message/outbox.tpl 2008-05-13 18:09:45 UTC (rev 197) +++ app/views/message/outbox.tpl 2008-05-13 18:10:43 UTC (rev 198) @@ -58,6 +58,7 @@ function delete_threads (element) { new Dialog.Box(element, { + classname: 'delete_dialog', title: '_{Delete Threads}', body: '_{Are you sure you want to delete selected threads}?', yes: '_{Delete}', @@ -77,6 +78,7 @@ function delete_single_thread (element) { new Dialog.Box(element, { + classname: 'delete_dialog', title: '_{Delete Thread}', body: '_{Are you sure you want to delete this thread}?', yes: '_{Delete}', Modified: public/stylesheets/dialog.css =================================================================== --- public/stylesheets/dialog.css 2008-05-13 18:09:45 UTC (rev 197) +++ public/stylesheets/dialog.css 2008-05-13 18:10:43 UTC (rev 198) @@ -32,8 +32,8 @@ /* particular dialogs */ -.loading_dialog { - width: 300px; +.delete_dialog { + width: 450px; } .city_dialog { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 18:12:06
|
Revision: 197 http://isocial.svn.sourceforge.net/isocial/?rev=197&view=rev Author: aguidrevitch Date: 2008-05-13 11:09:45 -0700 (Tue, 13 May 2008) Log Message: ----------- better event firing order for dialogs Modified Paths: -------------- public/javascripts/dialog.js Modified: public/javascripts/dialog.js =================================================================== --- public/javascripts/dialog.js 2008-05-13 15:41:44 UTC (rev 196) +++ public/javascripts/dialog.js 2008-05-13 18:09:45 UTC (rev 197) @@ -1,5 +1,5 @@ var Dialog = {}; -Dialog._collection = new Hash (); +Dialog._collection = {}; Dialog.Box = Class.create(); Object.extend(Dialog.Box.prototype, { @@ -11,16 +11,18 @@ } this.reference = $(element); + if (this.reference.id && Dialog._collection[this.reference.id]) { + return; + } this.options = Object.extend({ hfloat: 'right', vfloat: 'bottom', autoshow: true, - autohide: true, + autohide: true }, options || {}); - this.id = 'dlg' + Dialog._collection.keys().size(); - this.dialog = new Element('div', { id: this.id, class: "action_dialog" }); + this.dialog = new Element('div', { id: this.id, 'class': "action_dialog", style: 'display: none' }); this.title = new Element('div', { id: "dlgheader" }); this.body = new Element('div', { id: "dlgbody" }); this.footer = new Element('div', { id: "dlgfooter" }); @@ -28,19 +30,19 @@ // initializing buttons if (this.options.yes) { - this.yesButton = new Element('input', { id: "dlgyes", type: "button", class: 'submitinput', value: this.options.yes }); + this.yesButton = new Element('input', { id: "dlgyes", type: "button", 'class': 'submitinput', value: this.options.yes }); this.yesButton.observe('click', this.onYes.bind(this)); this.buttons.insert(this.yesButton); } if (this.options.no) { - this.noButton = new Element('input', { id: "dlgno", type: "button", class: 'submitinput', value: this.options.no }); + this.noButton = new Element('input', { id: "dlgno", type: "button", 'class': 'submitinput', value: this.options.no }); this.noButton.observe('click', this.onNo.bind(this)); this.buttons.insert(this.noButton); } if (this.options.cancel) { - this.cancelButton = new Element('input', { id: "dlgcancel", type: "button", class: 'cancelinput', value: this.options.cancel }); + this.cancelButton = new Element('input', { id: "dlgcancel", type: "button", 'class': 'cancelinput', value: this.options.cancel }); this.cancelButton.observe('click', this.onCancel.bind(this)); this.buttons.insert(this.cancelButton); } @@ -54,7 +56,7 @@ } this.footer.insert(this.buttons); - this.footer.insert(new Element('div', { class: "clearfix" })); + this.footer.insert(new Element('div', { 'class': "clearfix" })); this.dialog.insert(this.title); this.dialog.insert(this.body); @@ -78,11 +80,17 @@ this.dialog.style.bottom = offset.top + "px"; } - if (this.options.class) - this.dialog.addClassName(this.options.class); + // class property doesn't work in IE6, accessing by key + if (this.options.classname) + this.dialog.addClassName(this.options.classname); - Dialog._collection[this.id] = this; - if (this.options.autoshow) this.show(); + if (!this.reference.id) + this.reference.id = 'refdlg' + Math.round(Math.random() * 1000000); + + Dialog._collection[this.reference.id] = this; + + if (this.options.autoshow) + this.show(); }, fixIEOverlapping: function () { @@ -95,6 +103,12 @@ show: function (event) { Element.insert(document.body, this.dialog); + // calling onShow before actually displaying it + if (this.options.onShow) { + this.options.onShow(this, event); + } + + // drawing it if(!this.iefix && Prototype.Browser.IE && Element.getStyle(this.dialog, 'position')=='absolute') { new Insertion.After(this.dialog, '<iframe id="' + this.dialog.id + '_iefix" '+ @@ -103,16 +117,18 @@ this.iefix = $(this.dialog.id+'_iefix'); } - if (this.options.onShow) { - this.options.onShow(this, event); - } + this.dialog.show(); - this.dialog.show(); - if (this.iefix) this.fixIEOverlapping(); + if (this.iefix) + this.fixIEOverlapping(); }, hide: function (event) { + if (this.options.onHide) { + this.options.onHide(this, event); + } + if(this.iefix) { this.iefix.hide(); this.iefix.remove(); @@ -121,27 +137,25 @@ this.dialog.hide(); this.dialog.remove(); - if (this.options.onHide) { - this.options.onHide(this, event); - } + Dialog._collection[this.reference.id] = null; }, onYes: function (event) { - if (this.options.autohide) this.hide(); if (this.options.onYes) { this.options.onYes(this, event); } + if (this.options.autohide) this.hide(); }, onNo: function (event) { - if (this.options.autohide) this.hide(); if (this.options.onNo) { this.options.onNo(this, event); } + if (this.options.autohide) this.hide(); }, onCancel: function (event) { - if (this.options.autohide) this.hide(); if (this.options.onCancel) { this.options.onCancel(this, event); } + if (this.options.autohide) this.hide(); } }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-05-13 15:41:41
|
Revision: 196 http://isocial.svn.sourceforge.net/isocial/?rev=196&view=rev Author: dim0s77 Date: 2008-05-13 08:41:44 -0700 (Tue, 13 May 2008) Log Message: ----------- timesheeting Modified Paths: -------------- timesheet/dim0s77.txt Modified: timesheet/dim0s77.txt =================================================================== --- timesheet/dim0s77.txt 2008-05-13 14:41:01 UTC (rev 195) +++ timesheet/dim0s77.txt 2008-05-13 15:41:44 UTC (rev 196) @@ -14,3 +14,5 @@ 2008-05-07,19:00,20:40,groupapp,RT:3,"create template for topic messages" 2008-05-09,12:00,15:00,groupapp,RT:3,"create template for topics" + +2008-05-13,16:30,17:40,groupapp,RT:3,"Add functionality to the 'show topic' tab" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-05-13 14:40:57
|
Revision: 195 http://isocial.svn.sourceforge.net/isocial/?rev=195&view=rev Author: dim0s77 Date: 2008-05-13 07:41:01 -0700 (Tue, 13 May 2008) Log Message: ----------- Added functionality to the 'show topic' tab Modified Paths: -------------- app/controllers/groupapp/board_controller.php app/locales/groupapp/board/ru.php app/models/groupapp_message.php app/views/groupapp/board/show_topic.tpl public/stylesheets/groupapp/Board.css Modified: app/controllers/groupapp/board_controller.php =================================================================== --- app/controllers/groupapp/board_controller.php 2008-05-13 14:25:40 UTC (rev 194) +++ app/controllers/groupapp/board_controller.php 2008-05-13 14:41:01 UTC (rev 195) @@ -7,8 +7,9 @@ function index () { if (!empty($this->params['id'])) { $messages = $this->GroupappMessage->find('all', - array('conditions' => - array("group_id = ?", $this->params['id'])) + array( + 'conditions' => array("group_id = ?", $this->params['id']) + ) ); $topics = array(); $persons = array(); @@ -37,8 +38,10 @@ function show_topic () { if (!empty($this->params['id'])) { $messages = $this->GroupappMessage->find('all', - array('conditions' => - array("topic_id = ?", $this->params['id'])) + array( + 'conditions' => array("topic_id = ?", $this->params['id']), + 'include' => 'user' + ) ); if ($messages) { $member = $this->GroupappMember->findFirst(array( 'group_id' => $messages[0]->group_id, Modified: app/locales/groupapp/board/ru.php =================================================================== --- app/locales/groupapp/board/ru.php 2008-05-13 14:25:40 UTC (rev 194) +++ app/locales/groupapp/board/ru.php 2008-05-13 14:41:01 UTC (rev 195) @@ -23,4 +23,18 @@ $dictionary['Search all topics'] = 'Искать все темы'; $dictionary['There are no discussions'] ='Обсуждений пока нет'; +$dictionary['Topic'] = 'Тема'; +$dictionary['Delete Topic'] = 'Удалить тему'; +$dictionary['Reply to Topic'] = 'Ответить по теме'; +$dictionary['You'] = 'Вы'; +$dictionary['wrote'] = 'по теме'; +$dictionary['replied to post'] = 'в ответ на сообщение'; +$dictionary['Reply'] = 'Ответить'; +$dictionary['to Your Post'] = 'себе'; +$dictionary['replies'] = 'ответов'; +$dictionary['Post'] = ''; +$dictionary['Mark as Irrelevant'] = 'Пометить как неуместное'; +$dictionary['Delete Post'] = 'Удалить сообщение'; +$dictionary['Report'] = 'Пожаловаться'; + ?> Modified: app/models/groupapp_message.php =================================================================== --- app/models/groupapp_message.php 2008-05-13 14:25:40 UTC (rev 194) +++ app/models/groupapp_message.php 2008-05-13 14:41:01 UTC (rev 195) @@ -2,11 +2,11 @@ class GroupappMessage extends ActiveRecord { - var $has_one = array('user' => array('class_name' => 'User', - 'foreign_key' => 'user_id'), - 'group' => array('class_name' => 'GroupappGroup', - 'foreign_key' => 'group_id') - ); + var $belongs_to = array('user' => array('class_name' => 'User', + 'foreign_key' => 'user_id'), + 'group' => array('class_name' => 'GroupappGroup', + 'foreign_key' => 'group_id') + ); /* function validateOnCreate () */ /* { */ Modified: app/views/groupapp/board/show_topic.tpl =================================================================== --- app/views/groupapp/board/show_topic.tpl 2008-05-13 14:25:40 UTC (rev 194) +++ app/views/groupapp/board/show_topic.tpl 2008-05-13 14:41:01 UTC (rev 195) @@ -23,29 +23,38 @@ <div class="actions"> <ul class="actions_list"> - <li><a href="/groupapp/">_{Reply to}</a></li> + <li><a href="/groupapp/">_{Reply} <? if ($current_user->getId() == $message->user_id) echo $text_helper->translate('to Your Post'); ?></a></li> + <? if ($current_user->getId() != $message->user_id) { ?> <li><a href="/groupapp/group/edit_info/{group.id?}">_{Mark as Irrelevant}</a></li> <li><a href="/groupapp/group/edit_members/{group.id?}">_{Report}</a></li> + <? } ?> <li><a href="/groupapp/group/edit_members/{group.id?}">_{Delete Post}</a></li> </ul> </div> <div class="avatar"> - <a href="/profile/show/{sender.id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> - <div class="subtext">Post #{message_loop_counter}</div> - <div class="subtext black">1 reply</div> + <a href="/profile/show/{message.user_id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> + <div class="subtext">_{Post} #{message_loop_counter}</div> + <input id="message_id{message.id?}" name="message_id{message.id?}" type="hidden" value="{message_loop_counter}" /> + <div class="subtext black">_{replies}: </div> </div> <div class="message"> <div class="head"> - <div class="sender">{message.user?}</div> + <span class="sender"> + <? if ($current_user->getId() == $message->user_id) { ?><span class="current_user">_{You}</span> + <? } else { ?><a href="/profile/show/{message.user_id?}"><span class="other_user">{message.user.name?}</span></a><? } ?> + </span> + {?message.reply_message_id} + <span>_{replied to post} #<script>document.write($('message_id{message.reply_message_id?}').readAttribute('value'));</script></span> + {else}_{wrote}{end} <div class="subtext">{message.created_at?}</div> </div> <div class="body">{message.body?}</div> </div> + <div class="clearfix"></div> </div> - <div class="clearfix"></div> {end} </div> <div class="clearfix"></div> Modified: public/stylesheets/groupapp/Board.css =================================================================== --- public/stylesheets/groupapp/Board.css 2008-05-13 14:25:40 UTC (rev 194) +++ public/stylesheets/groupapp/Board.css 2008-05-13 14:41:01 UTC (rev 195) @@ -89,6 +89,13 @@ background: #f7f7f7; } +.message .head .sender .current_user { +} + +.message .head .sender .other_user { + font-weight: bold; +} + .messages_list .row .message .body { background: #ffffff; padding: 10px 3px 10px 3px; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 14:25:42
|
Revision: 194 http://isocial.svn.sourceforge.net/isocial/?rev=194&view=rev Author: aguidrevitch Date: 2008-05-13 07:25:40 -0700 (Tue, 13 May 2008) Log Message: ----------- aguidrevitch's timesheet Modified Paths: -------------- timesheet/aguidrevitch.txt Modified: timesheet/aguidrevitch.txt =================================================================== --- timesheet/aguidrevitch.txt 2008-05-13 14:24:46 UTC (rev 193) +++ timesheet/aguidrevitch.txt 2008-05-13 14:25:40 UTC (rev 194) @@ -6,3 +6,4 @@ 2008-05-12,21:00,22:45,main,RT:1,"rewriting dialogs" 2008-05-13,10:10,13:10,main,RT:1,"rewriting dialogs" 2008-05-13,13:10,13:30,main,RT:1,"helping dimos with models" +2008-05-13,14:20,17:30,main,RT:1,"improving city selector" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 14:24:39
|
Revision: 193 http://isocial.svn.sourceforge.net/isocial/?rev=193&view=rev Author: aguidrevitch Date: 2008-05-13 07:24:46 -0700 (Tue, 13 May 2008) Log Message: ----------- city selector improved Modified Paths: -------------- app/controllers/city_controller.php app/helpers/city_helper.php app/models/city.php public/stylesheets/autocomplete.css Modified: app/controllers/city_controller.php =================================================================== --- app/controllers/city_controller.php 2008-05-13 11:51:13 UTC (rev 192) +++ app/controllers/city_controller.php 2008-05-13 14:24:46 UTC (rev 193) @@ -23,7 +23,7 @@ empty($this->regions) ? $this->renderNothing() : $this->renderPartial('regions'); } - function _get_conditions_for_city( $to_ascii = true) { + function _get_conditions_for_city( $to_ascii = true ) { $query = $this->params['city']; $aquery = utf8_to_ascii($query); if ($to_ascii && $aquery != $query) { @@ -51,6 +51,20 @@ ) ); + $aquery = utf8_to_ascii($this->params['city']); + + $native = array(); + $alternate = array(); + foreach ($entries as $entry) { + if (strpos($entry->name, $aquery) === false) { + array_push($native, $entry); + } else { + $entry->_alternate = true; + array_push($alternate, $entry); + } + } + $entries = array_merge($native, $alternate); + $this->renderText(empty($entries) ? ' ' : $this->city_helper->auto_complete_result($entries, $this->params['city'])); } } @@ -59,13 +73,13 @@ if (empty($this->params['city'])) { $this->renderNothing(); } else { - $entry = $this->City->findFirst( + $entries = $this->City->findFirst( array( 'conditions' => $this->_get_conditions_for_city(false), ) ); - - $this->renderText(empty($entry) ? ' ' : $entry->toJson()); + + $this->renderText(empty($entries) ? ' ' : $entries->toJson()); } } } Modified: app/helpers/city_helper.php =================================================================== --- app/helpers/city_helper.php 2008-05-13 11:51:13 UTC (rev 192) +++ app/helpers/city_helper.php 2008-05-13 14:24:46 UTC (rev 193) @@ -16,7 +16,7 @@ : TextHelper::h($city->name); $item = TagHelper::content_tag('div', $name) ; $comment = TagHelper::content_tag('div', $city->country->name, array('class' => 'informal')) ; - $items[] = TagHelper::content_tag('li', $name . $comment, array('id' => $city->getId())); + $items[] = TagHelper::content_tag('li', $name . $comment, array_merge(array('id' => $city->getId()), ($city->_alternate ? array('class' => 'alternate') : array() ))); } return TagHelper::content_tag('ul', join('', array_unique($items))); } @@ -124,7 +124,8 @@ $new_city = TagHelper::tag('input', array( 'class' => 'submitinput', - 'type' => 'button', + 'type' => 'button', + 'tabindex' => "0", 'value' => $this->t('Not Listed') . "?", 'onclick' => "city_dialog(this, 'auto_{$object}_{$method}', '{$object}_{$method}')")); Modified: app/models/city.php =================================================================== --- app/models/city.php 2008-05-13 11:51:13 UTC (rev 192) +++ app/models/city.php 2008-05-13 14:24:46 UTC (rev 193) @@ -5,6 +5,7 @@ var $belongs_to = array('Country', 'Region'); var $votes_model = 'CityVote'; var $strtolower = false; + var $_alternate = false; function findConditions () { return array('conditions' => array("country_id = ? AND region_id = ? AND name LIKE ?", $this->country_id, $this->region_id, $this->name)); Modified: public/stylesheets/autocomplete.css =================================================================== --- public/stylesheets/autocomplete.css 2008-05-13 11:51:13 UTC (rev 192) +++ public/stylesheets/autocomplete.css 2008-05-13 14:24:46 UTC (rev 193) @@ -29,12 +29,19 @@ list-style-type:none; } + div.auto_complete ul li { margin: 0; border-bottom: 1px solid #bdc7d8; padding: 4px; cursor: pointer; } + +div.auto_complete ul li.alternate { + background-color: #eeeeee; + color: #bdc7d8; +} + div.auto_complete ul li .informal { color: #bdc7d8; font-weight: bold; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 11:51:09
|
Revision: 192 http://isocial.svn.sourceforge.net/isocial/?rev=192&view=rev Author: aguidrevitch Date: 2008-05-13 04:51:13 -0700 (Tue, 13 May 2008) Log Message: ----------- city autocompletion updated Modified Paths: -------------- public/javascripts/autocomplete.js Modified: public/javascripts/autocomplete.js =================================================================== --- public/javascripts/autocomplete.js 2008-05-13 10:29:34 UTC (rev 191) +++ public/javascripts/autocomplete.js 2008-05-13 11:51:13 UTC (rev 192) @@ -20,7 +20,7 @@ // now we should re-check // whether the city is in the database and put it's id to the hidden - new Ajax.Request('/profile/get_id_for_city', { + new Ajax.Request('/city/get_id_for_city', { postBody: 'city=' + $F(input), onSuccess: function(response) { if (response.responseText.isJSON()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 10:29:27
|
Revision: 191 http://isocial.svn.sourceforge.net/isocial/?rev=191&view=rev Author: aguidrevitch Date: 2008-05-13 03:29:34 -0700 (Tue, 13 May 2008) Log Message: ----------- aguidrevitch's timesheet Modified Paths: -------------- timesheet/aguidrevitch.txt Modified: timesheet/aguidrevitch.txt =================================================================== --- timesheet/aguidrevitch.txt 2008-05-13 10:22:29 UTC (rev 190) +++ timesheet/aguidrevitch.txt 2008-05-13 10:29:34 UTC (rev 191) @@ -5,3 +5,4 @@ 2008-05-03,14:10,17:20,main,RT:1,"working on dialogs (fixing ie6 bug)" 2008-05-12,21:00,22:45,main,RT:1,"rewriting dialogs" 2008-05-13,10:10,13:10,main,RT:1,"rewriting dialogs" +2008-05-13,13:10,13:30,main,RT:1,"helping dimos with models" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 10:22:23
|
Revision: 190 http://isocial.svn.sourceforge.net/isocial/?rev=190&view=rev Author: aguidrevitch Date: 2008-05-13 03:22:29 -0700 (Tue, 13 May 2008) Log Message: ----------- religious views duplication fixed Modified Paths: -------------- app/controllers/profile_controller.php Modified: app/controllers/profile_controller.php =================================================================== --- app/controllers/profile_controller.php 2008-05-13 10:08:47 UTC (rev 189) +++ app/controllers/profile_controller.php 2008-05-13 10:22:29 UTC (rev 190) @@ -23,7 +23,8 @@ if (!empty($this->params['basic_profile']['religious_view_id'])) { $this->ReligiousView->setAttributes(array('name' => $this->params['basic_profile']['religious_view_id'])); $this->ReligiousView->voteOrCreate($this->current_user); - $this->basic_profile->religious_view->assign($this->ReligiousView); + // ->assign creates an extra religious view, is this a bug ? + $this->basic_profile->religious_view_id = $this->ReligiousView->id; } if ($this->basic_profile->save()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-13 10:08:42
|
Revision: 189 http://isocial.svn.sourceforge.net/isocial/?rev=189&view=rev Author: aguidrevitch Date: 2008-05-13 03:08:47 -0700 (Tue, 13 May 2008) Log Message: ----------- dialogs rewritten Modified Paths: -------------- app/helpers/access_field_helper.php app/helpers/city_helper.php app/helpers/dialog_helper.php app/models/city.php app/views/message/inbox.tpl app/views/message/outbox.tpl public/javascripts/dialog.js public/stylesheets/common/Error.css public/stylesheets/dialog.css timesheet/aguidrevitch.txt Removed Paths: ------------- app/controllers/dialog_controller.php app/views/dialog/ Deleted: app/controllers/dialog_controller.php =================================================================== --- app/controllers/dialog_controller.php 2008-05-13 09:16:01 UTC (rev 188) +++ app/controllers/dialog_controller.php 2008-05-13 10:08:47 UTC (rev 189) @@ -1,16 +0,0 @@ -<?php - -class DialogController extends ApplicationController -{ - var $models = array('Country', 'Region'); - - function access () { - return $this->renderPartial('access'); - } - - function new_city () { - return $this->renderPartial('new_city'); - } -} - -?> \ No newline at end of file Modified: app/helpers/access_field_helper.php =================================================================== --- app/helpers/access_field_helper.php 2008-05-13 09:16:01 UTC (rev 188) +++ app/helpers/access_field_helper.php 2008-05-13 10:08:47 UTC (rev 189) @@ -6,18 +6,40 @@ { function access_field ($object, $method, $options = array()) { - $this->object =& $this->_controller->{$object}; + $everyone = $this->t('Everyone'); + $friendsoffriends = $this->t('Friends of Friends'); + $onlyfriends = $this->t('Only Friends'); + $onlyme = $this->t('Only Me'); - if ($this->object) { - $value = $this->object->get($method); - } + $hidden = $this->_controller->form_helper->hidden_field($object, $method); + $dialog = $this->_controller->dialog_helper->dialog('access_dialog', 'hidden, title', array( + 'class' => 'access_dialog', + 'title' => $this->t('Who can see this?'), + 'yes' => $this->t('Save'), + 'cancel' => $this->t('Cancel'), + 'body' => TagHelper::content_tag('div', '', array('id' => 'access_title', 'class' => 'field')) . + "<select id='access_select'> + <option value='0'>$everyone</option> + <option value='1'>$friendsoffriends</option> + <option value='2'>$onlyfriends</option> + <option value='4'>$onlyme</option> + </select>", + 'onShow' => 'function (object) { + object._data = \'access_select_\' + Math.round(Math.random() * 1000000); + + $(\'access_title\').id += object._data; + $(\'access_select\').id += object._data; + + $(\'access_title\' + object._data).update(title); + $(\'access_select\' + object._data).setValue($F(hidden)); + }', + 'onYes' => 'function (object) { + $(hidden).setValue($F(\'access_select\' + object._data)); + }' + )); - $hidden = $this->_controller->form_helper->hidden_field($object, $method); - $id = $this->_controller->dialog_helper->generateid(); - $options = array_merge(array('reference_element' => $id, 'hidden' => "{$object}_{$method}"), $options); - $dialog = $this->_controller->dialog_helper->dialog('/dialog/access', $options); - $div = TagHelper::content_tag('div', '', array('id' => $id, 'class' => 'lock short', 'onclick' => $dialog)); - return $hidden . $div; + $div = TagHelper::content_tag('div', '', array('class' => 'lock short', 'onclick' => "access_dialog(this, '{$object}_{$method}', '" . addslashes($this->t(@$options['title'])) . "')")); + return $dialog . $hidden . $div; } } Modified: app/helpers/city_helper.php =================================================================== --- app/helpers/city_helper.php 2008-05-13 09:16:01 UTC (rev 188) +++ app/helpers/city_helper.php 2008-05-13 10:08:47 UTC (rev 189) @@ -52,18 +52,83 @@ $text_field = $this->_controller->form_helper->text_field(null, null, $tag_options); $div = TagHelper::content_tag('div', '', array('id' => "auto_{$object}_{$method}_auto_complete", 'class' => 'auto_complete')); $javascript = $this->auto_complete_field("auto_{$object}_{$method}", $completion_options); - $id = $this->_controller->dialog_helper->generateid(); - $dialog = $this->_controller->dialog_helper->dialog( - '/dialog/new_city', - array('reference_element' => $id, 'input' => $tag_options['id'], 'hidden' => "{$object}_{$method}")); + + $text_city_name = $this->t('City Name'); + $text_country = $this->t('Country'); + $Country = new Country (); + $dialog = $this->_controller->dialog_helper->dialog('city_dialog', 'input, hidden', array( + 'class' => 'city_dialog', + 'autohide' => false, + 'title' => $this->t('Add New City'), + 'yes' => $this->t('Save'), + 'cancel' => $this->t('Cancel'), + 'body' => " + <form id='city_addition_form'> + <div class='editform'> + <div id='ncdlg_errors'></div> + <div class='formrow'> + <label>{$text_city_name}</label>" . $this->_controller->form_helper->text_field('city', 'name', array('class' => 'mediumtextinput')) . + "</div> + <div class='formrow'> + <label>{$text_country}</label> " . + $this->_controller->form_options_helper->select('city', 'country_id', $Country->collect($Country->find(), 'name', 'id'), array(), array('prompt' => $this->t('Select Country:'))) . + "</div> + <div id='ncdlg_regions_list' class='formrow'> + </div> + </div> + </form>", + + 'onShow' => 'function (object) { + object._data = Math.round(Math.random() * 1000000); + + // updating ids + $(\'city_addition_form\').id += object._data; + $(\'ncdlg_errors\').id += object._data; + $(\'ncdlg_regions_list\').id += object._data; + $(\'city_country_id\').id += object._data; + $(\'city_name\').id += object._data; + + // preparing + $(\'city_name\' + object._data).setValue($F(input)); + $(\'city_country_id\' + object._data).onchange = function () { + if ($F(this)) { + new Ajax.Updater(\'ncdlg_regions_list\' + object._data, \'/city/get_regions\', { + postBody: $(\'city_addition_form\' + object._data).serialize() + }); + } + } + }', + + 'onYes' => 'function (object) { + new Ajax.Request(\'/city/add\', { + postBody: $(\'city_addition_form\' + object._data).serialize(), + onSuccess: function (response) { + if (response.responseText.isJSON()) { + var data = response.responseText.evalJSON(true); + if (data.id) { + $(hidden).setValue(data.id); + $(input).setValue(data.name); + object.hide(); + } + } else { + $(\'ncdlg_errors\' + object._data).update(response.responseText); + } + } + }); + }', + + 'onCancel' => 'function (object) { + object.hide(); + }', + )); + $new_city = TagHelper::tag('input', array( - 'id' => $id, 'class' => 'submitinput', 'type' => 'button', 'value' => $this->t('Not Listed') . "?", - 'onclick' => $dialog)); + 'onclick' => "city_dialog(this, 'auto_{$object}_{$method}', '{$object}_{$method}')")); - return $hidden . $hidden_prev . $text_field . $new_city . $div . $javascript; + return $hidden . $hidden_prev . $text_field . $dialog . $new_city . $div . $javascript; } } Modified: app/helpers/dialog_helper.php =================================================================== --- app/helpers/dialog_helper.php 2008-05-13 09:16:01 UTC (rev 188) +++ app/helpers/dialog_helper.php 2008-05-13 10:08:47 UTC (rev 189) @@ -1,24 +1,45 @@ <?php -require_once(AK_LIB_DIR.DS.'AkActionView'.DS.'helpers'.DS.'javascript_helper.php'); -require_once(AK_LIB_DIR.DS.'AkActionView'.DS.'helpers'.DS.'url_helper.php'); - class DialogHelper extends AkActionViewHelper { - var $current = 1; + var $drawn = array(); + + function dialog ($function_name, $params = array(), $js_options = array()) { - function generateid () { - return "dialog_trigger_" . $this->current++; + if (!empty($this->drawn[$function_name])) + return ''; + + $this->drawn[$function_name] = true; + + if (is_array($params)) $params = join(", ", $params); + $params = 'element, ' . $params; + + + $function = "function {$function_name} ({$params}) { new Dialog.Box(element, " . $this->_options_for_dialog($js_options) . "); }"; + return JavaScriptHelper::javascript_tag($function); } + + function _options_for_dialog($options) { + $_js_options = array(); + + foreach ($options as $k => $v) { + if ($v === false) $options[$k] = 'false'; + else if ($v === true) $options[$k] = 'true'; + } - function dialog ($url, $request_parameters = array()) { + foreach (array('onShow', 'onHide', 'onYes', 'onNo', 'onCancel', 'autoshow', 'autohide', 'unique') as $k) { + if ( array_key_exists($k, $options) ) $_js_options[] = "$k: {$options[$k]}"; + } - if (empty($request_parameters['reference_element'])) { - return "alert('id of element that triggered the dialog should be passed, please contact developers on this subject')"; + foreach (array('title', 'body', 'yes', 'no', 'cancel', 'hfloat', 'vfloat', 'class') as $k) { + if ( array_key_exists($k, $options) ) { + $options[$k] = addslashes($options[$k]); + $options[$k] = preg_replace('/\n/', '\n', $options[$k]); + $_js_options[] = "$k: \"{$options[$k]}\""; + } } - $request_parameters = JavaScriptHelper::_options_for_javascript(array_map(create_function('$e', 'return "\'$e\'";'), $request_parameters)); - return "__remote_dialog('$url', {$request_parameters})"; + return '{'.join(', ',$_js_options).'}'; } } Modified: app/models/city.php =================================================================== --- app/models/city.php 2008-05-13 09:16:01 UTC (rev 188) +++ app/models/city.php 2008-05-13 10:08:47 UTC (rev 189) @@ -4,6 +4,7 @@ { var $belongs_to = array('Country', 'Region'); var $votes_model = 'CityVote'; + var $strtolower = false; function findConditions () { return array('conditions' => array("country_id = ? AND region_id = ? AND name LIKE ?", $this->country_id, $this->region_id, $this->name)); Modified: app/views/message/inbox.tpl =================================================================== --- app/views/message/inbox.tpl 2008-05-13 09:16:01 UTC (rev 188) +++ app/views/message/inbox.tpl 2008-05-13 10:08:47 UTC (rev 189) @@ -74,70 +74,59 @@ }; function mark_as_unread (element) { - new Ajax.Updater('messages', - '/message/mark_unread', - { method:'post', asynchronous:true, parameters:$('messages_form').serialize()}); + new Ajax.Updater('messages', '/message/mark_unread', { + parameters:$('messages_form').serialize() + }); disable_action_links(); return false; } function mark_as_read (element) { - new Ajax.Updater('messages', - '/message/mark_read', - { method:'post', asynchronous:true, parameters:$('messages_form').serialize()}); + new Ajax.Updater('messages', '/message/mark_read', { + parameters:$('messages_form').serialize() + }); disable_action_links(); return false; } function delete_threads (element) { - new Dialog.Box('dlg', { - reference: element, - title: '_{Delete Threads}', - body: '_{Are you sure you want to delete selected threads}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + new Dialog.Box(element, { + title: '_{Delete Threads}', + body: '_{Are you sure you want to delete selected threads}?', + yes: '_{Delete}', + cancel: '_{Cancel}', onYes : function () { - new Ajax.Updater('messages', - '/message/delete_inbox_thread', - { method:'post', - asynchronous:true, - parameters:$('messages_form').serialize(), - onSuccess: function () { - disable_action_links(); - } - }); - } - }); - + new Ajax.Updater('messages', '/message/delete_inbox_thread', { + parameters:$('messages_form').serialize(), + onSuccess: function () { + disable_action_links(); + } + }); + } + }); return false; } function delete_single_thread (element) { - new Dialog.Box('dlg', { - reference: element, - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + new Dialog.Box(element, { + title: '_{Delete Thread}', + body: '_{Are you sure you want to delete this thread}?', + yes: '_{Delete}', + cancel: '_{Cancel}', onYes : function () { - new Ajax.Updater('messages', - '/message/delete_inbox_thread', - { method:'post', - asynchronous:true, - parameters: 'check_messages[]=' + element.name, - onComplete: function () { - disable_action_links(); - tocheck = new Array(); - $$('input[type=checkbox]').each( - function (el) { - if (checkids.indexOf(el.value) != -1) { tocheck.push(el); } - }); - tocheck.invoke('click'); - } - }); - } - }); - + new Ajax.Updater('messages', '/message/delete_inbox_thread', { + parameters: 'check_messages[]=' + element.name, + onComplete: function () { + disable_action_links(); + tocheck = new Array(); + $$('input[type=checkbox]').each( function (el) { + if (checkids.indexOf(el.value) != -1) { tocheck.push(el); } + }); + tocheck.invoke('click'); + } + }); + } + }); return false; } @@ -149,28 +138,22 @@ } function onread (row_id) { - new Ajax.Updater(row_id, - '/message/mark_read_row', - { method:'post', - asynchronous: true, - parameters: 'row_id=' + row_id, - onSuccess: function () { - $(row_id).removeClassName('new_message'); - } - }); + new Ajax.Updater(row_id, '/message/mark_read_row', { + parameters: 'row_id=' + row_id, + onSuccess: function () { + $(row_id).removeClassName('new_message'); + } + }); return false; } function onunread (row_id) { - new Ajax.Updater(row_id, - '/message/mark_unread_row', - { method:'post', - asynchronous: true, - parameters: 'row_id=' + row_id, - onSuccess: function () { - $(row_id).addClassName('new_message'); - } - }); + new Ajax.Updater(row_id, '/message/mark_unread_row', { + parameters: 'row_id=' + row_id, + onSuccess: function () { + $(row_id).addClassName('new_message'); + } + }); } </script> Modified: app/views/message/outbox.tpl =================================================================== --- app/views/message/outbox.tpl 2008-05-13 09:16:01 UTC (rev 188) +++ app/views/message/outbox.tpl 2008-05-13 10:08:47 UTC (rev 189) @@ -51,60 +51,51 @@ if (checkboxes.length) { /* bug , see http://dev.rubyonrails.org/ticket/9976 checkboxes.invoke('click'); - */ + */ checkboxes.each( function(el) { el.click(); }); } }; function delete_threads (element) { - new Dialog.Box('dlg', { - reference: Element.extend(element), - title: '_{Delete Threads}', - body: '_{Are you sure you want to delete selected threads}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + new Dialog.Box(element, { + title: '_{Delete Threads}', + body: '_{Are you sure you want to delete selected threads}?', + yes: '_{Delete}', + cancel: '_{Cancel}', hfloat: 'left', onYes : function () { - new Ajax.Updater('messages', - '/message/delete_outbox_thread', - { method:'post', - asynchronous:true, - parameters:$('messages_form').serialize(), - onSuccess: function () { - $("delete_link").addClassName('disabled'); - } - } - ); - } + new Ajax.Updater('messages', '/message/delete_outbox_thread', { + parameters:$('messages_form').serialize(), + onSuccess: function () { + $("delete_link").addClassName('disabled'); + } + }); + } }); + return false; } function delete_single_thread (element) { - new Dialog.Box('dlg', { - reference: Element.extend(element), - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', + new Dialog.Box(element, { + title: '_{Delete Thread}', + body: '_{Are you sure you want to delete this thread}?', + yes: '_{Delete}', cancel: '_{Cancel}', onYes : function () { - new Ajax.Updater('messages', - '/message/delete_outbox_thread', - { method:'post', - asynchronous:true, - parameters: 'check_messages[]=' + element.name, - onComplete: function () { - $("delete_link").addClassName('disabled'); - tocheck = new Array(); - $$('input[type=checkbox]').each( - function (el) { - if (checkids.indexOf(el.value) != -1) { tocheck.push(el); } - }); - tocheck.invoke('click'); - } - } - ); - } + new Ajax.Updater('messages', '/message/delete_outbox_thread', { + parameters: 'check_messages[]=' + element.name, + onComplete: function () { + $("delete_link").addClassName('disabled'); + tocheck = new Array(); + $$('input[type=checkbox]').each(function (el) { + if (checkids.indexOf(el.value) != -1) { tocheck.push(el); } + }); + tocheck.invoke('click'); + } + }); + } }); + return false; } </script> Modified: public/javascripts/dialog.js =================================================================== --- public/javascripts/dialog.js 2008-05-13 09:16:01 UTC (rev 188) +++ public/javascripts/dialog.js 2008-05-13 10:08:47 UTC (rev 189) @@ -1,68 +1,98 @@ var Dialog = {}; -Dialog._collection = {}; +Dialog._collection = new Hash (); Dialog.Box = Class.create(); Object.extend(Dialog.Box.prototype, { + initialize: function(element, options) { + if (!$(element)) { + alert('Reference element is not specified'); + return; + } + + this.reference = $(element); + this.options = Object.extend({ - hfloat: 'right', - vfloat: 'bottom', - hide: true, - clone: true + hfloat: 'right', + vfloat: 'bottom', + autoshow: true, + autohide: true, }, options || {}); - this.reference = this.options['reference'] ? $(this.options['reference']) : null; - if (!this.reference) { - alert('Reference element is not specified'); - return; + this.id = 'dlg' + Dialog._collection.keys().size(); + this.dialog = new Element('div', { id: this.id, class: "action_dialog" }); + this.title = new Element('div', { id: "dlgheader" }); + this.body = new Element('div', { id: "dlgbody" }); + this.footer = new Element('div', { id: "dlgfooter" }); + this.buttons = new Element('div', { id: "dlgbuttons" }); + + // initializing buttons + if (this.options.yes) { + this.yesButton = new Element('input', { id: "dlgyes", type: "button", class: 'submitinput', value: this.options.yes }); + this.yesButton.observe('click', this.onYes.bind(this)); + this.buttons.insert(this.yesButton); } - this.dialog = $(element); + if (this.options.no) { + this.noButton = new Element('input', { id: "dlgno", type: "button", class: 'submitinput', value: this.options.no }); + this.noButton.observe('click', this.onNo.bind(this)); + this.buttons.insert(this.noButton); + } + if (this.options.cancel) { + this.cancelButton = new Element('input', { id: "dlgcancel", type: "button", class: 'cancelinput', value: this.options.cancel }); + this.cancelButton.observe('click', this.onCancel.bind(this)); + this.buttons.insert(this.cancelButton); + } + + if (this.options.title) { + this.title.update(this.options.title); + } + + if (this.options.body) { + this.body.update(this.options.body); + } + + this.footer.insert(this.buttons); + this.footer.insert(new Element('div', { class: "clearfix" })); + + this.dialog.insert(this.title); + this.dialog.insert(this.body); + this.dialog.insert(this.footer); + + var offset = this.reference.viewportOffset(); var dimensions = this.reference.getDimensions(); var vdimensions = document.viewport.getDimensions(); var vscrolloffset = document.viewport.getScrollOffsets(); - //alert(vdimensions.width + " : " + offset.left + " : " + dimensions.width); - if (this.options['hfloat'] == 'right') { + if (this.options.hfloat == 'right') { this.dialog.style.right = vdimensions.width - offset.left - dimensions.width + "px"; } else { this.dialog.style.left = offset.left + "px"; } - if (this.options['vfloat'] == 'bottom') { + if (this.options.vfloat == 'bottom') { this.dialog.style.top = vscrolloffset.top + offset.top + dimensions.height + "px"; } else { this.dialog.style.bottom = offset.top + "px"; } - - this.title = this._getDescendant('dlgheader'); - this.body = this._getDescendant('dlgbody'); - this.yesButton = this._getDescendant('dlgyes'); - this.noButton = this._getDescendant('dlgno'); - this.cancelButton = this._getDescendant('dlgcancel'); - if (this.options.title) this.title.update(this.options.title); - if (this.options.body) this.body.update(this.options.body); + if (this.options.class) + this.dialog.addClassName(this.options.class); - if (this.yesButton) this.yesButton.observe('click', this.onYes.bind(this)); - if (this.noButton) this.noButton.observe('click', this.onNo.bind(this)); - if (this.cancelButton) this.cancelButton.observe('click', this.onCancel.bind(this)); - - Dialog._collection[$(this.options.reference).id] = this; - + Dialog._collection[this.id] = this; + if (this.options.autoshow) this.show(); }, fixIEOverlapping: function () { Element.clonePosition(this.iefix, this.dialog); - this.iefix.style.zIndex = 1; + this.iefix.style.zIndex = 1; this.dialog.style.zIndex = 2; this.iefix.show(); }, show: function (event) { - this.dialog.hide(); Element.insert(document.body, this.dialog); if(!this.iefix && Prototype.Browser.IE && Element.getStyle(this.dialog, 'position')=='absolute') { @@ -73,59 +103,45 @@ this.iefix = $(this.dialog.id+'_iefix'); } - this.dialog.show(); - if (this.iefix) this.fixIEOverlapping(); - if (this.options.onShow) { this.options.onShow(this, event); } + + this.dialog.show(); + if (this.iefix) this.fixIEOverlapping(); }, hide: function (event) { - if(this.iefix) + + if(this.iefix) { this.iefix.hide(); + this.iefix.remove(); + } + this.dialog.hide(); + this.dialog.remove(); + if (this.options.onHide) { this.options.onHide(this, event); } }, - _getDescendant: function (id) { - return this.dialog.down('#' + id) || - this.dialog.descendants().find( function (d) { return d.id == id; }); - }, - onYes: function (event) { - if (this.options.hide) this.hide(); + if (this.options.autohide) this.hide(); if (this.options.onYes) { this.options.onYes(this, event); } }, onNo: function (event) { - if (this.options.hide) this.hide(); + if (this.options.autohide) this.hide(); if (this.options.onNo) { this.options.onNo(this, event); } }, onCancel: function (event) { - if (this.options.hide) this.hide(); + if (this.options.autohide) this.hide(); if (this.options.onCancel) { this.options.onCancel(this, event); } } }); - -function __remote_dialog (url, parameters) { - if (Dialog._collection[parameters.reference_element]) { - Dialog._collection[parameters.reference_element].show(); - } else { - new Ajax.Request(url, { - method: 'get', - parameters: parameters, - onSuccess: function (response) { - var html = new Element('div', { style: "display: none"}).update(response.responseText); - Element.insert(document.body, html); // triggering execution of javascripts - } - }); - } -} Modified: public/stylesheets/common/Error.css =================================================================== --- public/stylesheets/common/Error.css 2008-05-13 09:16:01 UTC (rev 188) +++ public/stylesheets/common/Error.css 2008-05-13 10:08:47 UTC (rev 189) @@ -1,5 +1,5 @@ .error { - margin: 0px 10px 10px 10px; + margin: 10px 10px 10px 10px; padding: 10px; border: 1px solid #dd3c10; background-color: #ffebe8; Modified: public/stylesheets/dialog.css =================================================================== --- public/stylesheets/dialog.css 2008-05-13 09:16:01 UTC (rev 188) +++ public/stylesheets/dialog.css 2008-05-13 10:08:47 UTC (rev 189) @@ -25,7 +25,7 @@ padding: 5px; } -.action_dialog #dlgfooter .buttons { +.action_dialog #dlgbuttons { margin: 0px 6px 0px 0px; float: right; } @@ -37,7 +37,7 @@ } .city_dialog { - width: 435px; + width: 500px; } .access_dialog { Modified: timesheet/aguidrevitch.txt =================================================================== --- timesheet/aguidrevitch.txt 2008-05-13 09:16:01 UTC (rev 188) +++ timesheet/aguidrevitch.txt 2008-05-13 10:08:47 UTC (rev 189) @@ -3,3 +3,5 @@ 2008-05-02,18:30,22:30,main,RT:1,"working on contact form, working around ie6 select bug" 2008-05-03,12:10,13:30,main,RT:1,"working on dialogs (fixing ie6 bug)" 2008-05-03,14:10,17:20,main,RT:1,"working on dialogs (fixing ie6 bug)" +2008-05-12,21:00,22:45,main,RT:1,"rewriting dialogs" +2008-05-13,10:10,13:10,main,RT:1,"rewriting dialogs" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-13 09:15:53
|
Revision: 188 http://isocial.svn.sourceforge.net/isocial/?rev=188&view=rev Author: fsnobody Date: 2008-05-13 02:16:01 -0700 (Tue, 13 May 2008) Log Message: ----------- delete photo from view album Modified Paths: -------------- app/controllers/photoapp/album_controller.php app/views/photoapp/album/view.tpl Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-13 08:51:32 UTC (rev 187) +++ app/controllers/photoapp/album_controller.php 2008-05-13 09:16:01 UTC (rev 188) @@ -29,10 +29,27 @@ function photos_of_you () { } -/* - function create () { + + function delete_photo () { + if (!empty($this->params['id']) ){ + //$this->debug($this->params); + $photo = $this->PhotoappPhoto->findFirst(array('id' => $this->params['id'])); + if ($photo) { + $album = $this->PhotoappAlbum->findFirst(array('id' => $photo->album_id)); + if ($album && $album->owner == $this->current_user->getId()) { + if ($photo->destroyAll("id = " . $photo->id)) { + $album->photos_count = $album->photos_count - 1; + $album->save(); + $this->redirectTo(array('action' => 'view', 'id' => $album->id)); + } else { + $this->importErrors( $this->PhotoappPhoto->getErrors() ); + } + } + } + } + return; } -*/ + function uploaded () { if (!empty($this->params['photo']) && $this->Request->isPost() && $this->params['photo']['action_comment'] == 'do_comment'){ unset($this->params['photo']['action_comment']); Modified: app/views/photoapp/album/view.tpl =================================================================== --- app/views/photoapp/album/view.tpl 2008-05-13 08:51:32 UTC (rev 187) +++ app/views/photoapp/album/view.tpl 2008-05-13 09:16:01 UTC (rev 188) @@ -25,10 +25,6 @@ <li><a href="/photoapp/album/delete_photo/<?= $photo->get('id')?>">_{Delete Photo}</a></li> </ul> </div> -<!-- - <div><a href="#">_{Edit}</a></div> - <div><a href="#">_{Delete}</a></div> ---> </div> {end} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-13 08:51:28
|
Revision: 187 http://isocial.svn.sourceforge.net/isocial/?rev=187&view=rev Author: fsnobody Date: 2008-05-13 01:51:32 -0700 (Tue, 13 May 2008) Log Message: ----------- album view design v2 Modified Paths: -------------- app/views/photoapp/album/view.tpl public/stylesheets/photoapp/Album.css Modified: app/views/photoapp/album/view.tpl =================================================================== --- app/views/photoapp/album/view.tpl 2008-05-13 05:48:43 UTC (rev 186) +++ app/views/photoapp/album/view.tpl 2008-05-13 08:51:32 UTC (rev 187) @@ -19,6 +19,16 @@ <div class="img"> <img src="/preview/index/100x100/<?= $photo->get('img')?>" /> </div> + <div class="links"> + <ul class="actions_list"> + <li><a href="/photoapp/album/edit_photo/<?= $photo->get('id')?>">_{Edit Photo}</a></li> + <li><a href="/photoapp/album/delete_photo/<?= $photo->get('id')?>">_{Delete Photo}</a></li> + </ul> + </div> +<!-- + <div><a href="#">_{Edit}</a></div> + <div><a href="#">_{Delete}</a></div> +--> </div> {end} Modified: public/stylesheets/photoapp/Album.css =================================================================== --- public/stylesheets/photoapp/Album.css 2008-05-13 05:48:43 UTC (rev 186) +++ public/stylesheets/photoapp/Album.css 2008-05-13 08:51:32 UTC (rev 187) @@ -188,6 +188,9 @@ text-align: center; padding-top: 10px; } +.photo_view .img { + height: 100px; +} .photo_comment .data { float: left; @@ -288,7 +291,7 @@ float: left; border: 1px solid #dedeee; width: 110px; - height: 120px; + height: 136px; padding: 3px; margin: 2px 3px; text-align: center; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-13 05:48:38
|
Revision: 186 http://isocial.svn.sourceforge.net/isocial/?rev=186&view=rev Author: fsnobody Date: 2008-05-12 22:48:43 -0700 (Mon, 12 May 2008) Log Message: ----------- view album desifn v1 Modified Paths: -------------- app/controllers/photoapp/album_controller.php app/views/photoapp/album/_edit_menu.tpl app/views/photoapp/album/uploaded.tpl public/stylesheets/photoapp/Album.css Added Paths: ----------- app/views/photoapp/album/view.tpl Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-13 05:09:48 UTC (rev 185) +++ app/controllers/photoapp/album_controller.php 2008-05-13 05:48:43 UTC (rev 186) @@ -13,7 +13,12 @@ $this->count_albums = 0; } - function show () { + function view () { + if (!empty($this->params['id']) && $this->PhotoappAlbum->find($this->params['id'])) { + $this->album = $this->PhotoappAlbum->find($this->params['id']); + } + $this->photos = $this->PhotoappPhoto->find('all', array('conditions' => array("album_id =" . $this->params['id']))); + return; } function search () { @@ -58,13 +63,10 @@ $this->importErrors( $this->PhotoappAlbum->getErrors() ); } } - } function add_photo () { - if (!empty($this->params['album']) && !empty($_FILES)){ - // $this->_upload($this->params); } else if ($this->params['id']) { $this->album = $this->PhotoappAlbum->find($this->params['id']); @@ -87,7 +89,6 @@ $this->album = $this->PhotoappAlbum->find($this->params['id']); return; } - } function help () { @@ -98,7 +99,6 @@ // delete $album = $this->PhotoappAlbum->find($this->params['id']); if ($album->get('owner') == $this->current_user->getId() && $this->Request->isPost()) { - if( $this->PhotoappPhoto->destroyAll("album_id = " . $this->params['id']) && $this->PhotoappAlbum->destroyAll("id = " . $this->params['id'])) { $this->redirectTo(array('action' => 'index')); return; @@ -131,7 +131,6 @@ } $photo->save(); $album->photos_count += 1; - $album->save(); } } Modified: app/views/photoapp/album/_edit_menu.tpl =================================================================== --- app/views/photoapp/album/_edit_menu.tpl 2008-05-13 05:09:48 UTC (rev 185) +++ app/views/photoapp/album/_edit_menu.tpl 2008-05-13 05:48:43 UTC (rev 186) @@ -2,6 +2,7 @@ <div class="left"> <ul class="toggle_tabs"> <li class="first"><a href="/photoapp/album/add_photo/{id}" class="<?= $controller->getActionName() == 'add_photo' ? 'selected' : '' ?>">_{Add Photos}</a></li><? + ?><li class="first"><a href="/photoapp/album/view/{id}" class="<?= $controller->getActionName() == 'view' ? 'selected' : '' ?>">_{View}</a></li><? ?><li class="first"><a href="/photoapp/album/uploaded/{id}" class="<?= $controller->getActionName() == 'uploaded' ? 'selected' : '' ?>">_{Edit uploaded}</a></li><? ?><li><a href="/photoapp/album/edit/{id}" class="last <?= $controller->getActionName() == 'edit' ? 'selected' : '' ?>">_{Edit Info}</a></li><? ?><li><a href="/photoapp/album/delete/{id}" class="last <?= $controller->getActionName() == 'delete' ? 'selected' : '' ?>">_{Delete}</a></li> Modified: app/views/photoapp/album/uploaded.tpl =================================================================== --- app/views/photoapp/album/uploaded.tpl 2008-05-13 05:09:48 UTC (rev 185) +++ app/views/photoapp/album/uploaded.tpl 2008-05-13 05:48:43 UTC (rev 186) @@ -2,6 +2,7 @@ <?= $controller->renderPartial("edit_menu") ?> +<?= $controller->renderErrors() ?> <div class="uploaded_container"> <?= $form_tag_helper->start_form_tag(array('action'=>'uploaded')) ?> Added: app/views/photoapp/album/view.tpl =================================================================== --- app/views/photoapp/album/view.tpl (rev 0) +++ app/views/photoapp/album/view.tpl 2008-05-13 05:48:43 UTC (rev 186) @@ -0,0 +1,33 @@ +<?= $controller->renderPartial("edit_title") ?> + +<?= $controller->renderPartial("edit_menu") ?> + +<?= $controller->renderErrors() ?> + +<div class="uploaded_container"> + <?= $form_tag_helper->start_form_tag(array('action'=>'view')) ?> + <?= $form_helper->hidden_field('photo', 'action_view', array('value' => 'do_view'))?> + <? if ($photos == 0) {?> + <div class="noalbums"> + _{You have no any uploaded photos to this album}. + </div> + <? } else {?> + + <div class="edit_container"> + {loop photos} + <div class="photo_view"> + <div class="img"> + <img src="/preview/index/100x100/<?= $photo->get('img')?>" /> + </div> + </div> + + {end} + + </div> + <div class="clearfix"></div> + <? }?> + + + </form> +</div> +<div class="clearfix"></div> Modified: public/stylesheets/photoapp/Album.css =================================================================== --- public/stylesheets/photoapp/Album.css 2008-05-13 05:09:48 UTC (rev 185) +++ public/stylesheets/photoapp/Album.css 2008-05-13 05:48:43 UTC (rev 186) @@ -282,4 +282,14 @@ .formbtns { text-align: right; +} + +.photo_view { + float: left; + border: 1px solid #dedeee; + width: 110px; + height: 120px; + padding: 3px; + margin: 2px 3px; + text-align: center; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-13 05:09:41
|
Revision: 185 http://isocial.svn.sourceforge.net/isocial/?rev=185&view=rev Author: fsnobody Date: 2008-05-12 22:09:48 -0700 (Mon, 12 May 2008) Log Message: ----------- minor changes in templates Modified Paths: -------------- app/controllers/photoapp/album_controller.php app/views/photoapp/album/_edit_title.tpl app/views/photoapp/album/add_photo.tpl app/views/photoapp/album/delete.tpl app/views/photoapp/album/edit.tpl public/stylesheets/photoapp/Album.css Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-12 16:37:04 UTC (rev 184) +++ app/controllers/photoapp/album_controller.php 2008-05-13 05:09:48 UTC (rev 185) @@ -34,12 +34,14 @@ foreach ($this->params['photo'] as $k => $v) { $photo = $this->PhotoappPhoto->findFirst(array('id' => $k)); $photo->setAttributes($v); - //$photo->name = $v['name']; - //$photo->caption = $v['description']; $photo->save(); } $this->redirectTo(array('action' => 'index')); } else { + if (!empty($this->params['id']) && $this->PhotoappAlbum->find($this->params['id'])) { + // pre delete + $this->album = $this->PhotoappAlbum->find($this->params['id']); + } $this->uploaded_photos = $this->PhotoappPhoto->find('all', array('conditions' => array("name =''", "caption =''"))); return; } @@ -134,7 +136,7 @@ } } } // for - $this->redirectTo(array('action' => 'uploaded')); + $this->redirectTo(array('action' => 'uploaded', 'id' => $this->params['id'])); } Modified: app/views/photoapp/album/_edit_title.tpl =================================================================== --- app/views/photoapp/album/_edit_title.tpl 2008-05-12 16:37:04 UTC (rev 184) +++ app/views/photoapp/album/_edit_title.tpl 2008-05-13 05:09:48 UTC (rev 185) @@ -1,7 +1,7 @@ <div class="title_bar"> <div class="info"> <div class="header"> - <div class="name">_{Edit Album}</div> + <div class="name">_{Edit Album} - <span><?= $album->get('name'); ?></span></div> </div> <div class="clearfix"></div> </div> Modified: app/views/photoapp/album/add_photo.tpl =================================================================== --- app/views/photoapp/album/add_photo.tpl 2008-05-12 16:37:04 UTC (rev 184) +++ app/views/photoapp/album/add_photo.tpl 2008-05-13 05:09:48 UTC (rev 185) @@ -1,18 +1,10 @@ +<?= $controller->renderPartial("edit_title") ?> +<?= $controller->renderPartial("edit_menu") ?> + <?= $controller->renderErrors() ?> -<div class="title_bar"> - <div class="info"> - <div class="header"> - <div class="name">_{Edit Album}</div> - </div> - <div class="clearfix"></div> - </div> -</div> -<div class="clearfix"></div> -<?= $controller->renderPartial("edit_menu") ?> - <div class="album_step"> <?= $form_tag_helper->start_form_tag(array('action'=>'add_photo', 'id' => $album->getId()), array('multipart' => true)) ?> Modified: app/views/photoapp/album/delete.tpl =================================================================== --- app/views/photoapp/album/delete.tpl 2008-05-12 16:37:04 UTC (rev 184) +++ app/views/photoapp/album/delete.tpl 2008-05-13 05:09:48 UTC (rev 185) @@ -1,18 +1,10 @@ +<?= $controller->renderPartial("edit_title") ?> +<?= $controller->renderPartial("edit_menu") ?> + <?= $controller->renderErrors() ?> -<div class="title_bar"> - <div class="info"> - <div class="header"> - <div class="name">_{Edit Album}</div> - </div> - <div class="clearfix"></div> - </div> -</div> -<div class="clearfix"></div> -<?= $controller->renderPartial("edit_menu") ?> - <div class="delete_album"> <div class="delete_form"> <form action="/photoapp/album/delete/{id}" method="post"> Modified: app/views/photoapp/album/edit.tpl =================================================================== --- app/views/photoapp/album/edit.tpl 2008-05-12 16:37:04 UTC (rev 184) +++ app/views/photoapp/album/edit.tpl 2008-05-13 05:09:48 UTC (rev 185) @@ -1,18 +1,10 @@ -<div class="title_bar"> - <div class="info"> - <div class="header"> - <div class="name">_{Edit Album}</div> - </div> - <div class="clearfix"></div> - </div> -</div> -<div class="clearfix"></div> +<?= $controller->renderPartial("edit_title") ?> -<?= $controller->renderErrors() ?> - <?= $controller->renderPartial("edit_menu") ?> +<?= $controller->renderErrors() ?> + <div class="album_step"> <?= $form_tag_helper->start_form_tag(array('action'=>'edit', 'id' => $album->getId())) ?> <?= $controller->renderPartial("form") ?> Modified: public/stylesheets/photoapp/Album.css =================================================================== --- public/stylesheets/photoapp/Album.css 2008-05-12 16:37:04 UTC (rev 184) +++ public/stylesheets/photoapp/Album.css 2008-05-13 05:09:48 UTC (rev 185) @@ -37,6 +37,10 @@ padding: 7px 0px 7px 22px; } +.name span{ + font-weight: normal; +} + .title_bar .info .subheader { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-12 16:39:57
|
Revision: 184 http://isocial.svn.sourceforge.net/isocial/?rev=184&view=rev Author: fsnobody Date: 2008-05-12 09:37:04 -0700 (Mon, 12 May 2008) Log Message: ----------- time Modified Paths: -------------- timesheet/eerunov.txt Modified: timesheet/eerunov.txt =================================================================== --- timesheet/eerunov.txt 2008-05-12 16:35:27 UTC (rev 183) +++ timesheet/eerunov.txt 2008-05-12 16:37:04 UTC (rev 184) @@ -9,3 +9,4 @@ 2008-05-06,09:00,10:20,photoapp,RT:2,"share create form + changes in installer + fixes + add_photo form design" 2008-05-07,14:00,15:30,photoapp,RT:2,"photo controller" 2008-05-08,09:00,11:00,photoapp,RT:2,"preview controller use + add photo designet and part functional" +2008-05-12,09:00,11:00,photoapp,RT:2,"comment uploaded + cover onoad" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-12 16:36:53
|
Revision: 183 http://isocial.svn.sourceforge.net/isocial/?rev=183&view=rev Author: fsnobody Date: 2008-05-12 09:35:27 -0700 (Mon, 12 May 2008) Log Message: ----------- comment uploaded Modified Paths: -------------- app/controllers/photoapp/album_controller.php app/views/photoapp/album/index.tpl app/views/photoapp/album/uploaded.tpl public/stylesheets/photoapp/Album.css Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-12 09:43:21 UTC (rev 182) +++ app/controllers/photoapp/album_controller.php 2008-05-12 16:35:27 UTC (rev 183) @@ -29,8 +29,20 @@ } */ function uploaded () { - $this->uploaded_photos = $this->PhotoappPhoto->find('all', array('conditions' => array("name =''", "caption =''"))); - return; + if (!empty($this->params['photo']) && $this->Request->isPost() && $this->params['photo']['action_comment'] == 'do_comment'){ + unset($this->params['photo']['action_comment']); + foreach ($this->params['photo'] as $k => $v) { + $photo = $this->PhotoappPhoto->findFirst(array('id' => $k)); + $photo->setAttributes($v); + //$photo->name = $v['name']; + //$photo->caption = $v['description']; + $photo->save(); + } + $this->redirectTo(array('action' => 'index')); + } else { + $this->uploaded_photos = $this->PhotoappPhoto->find('all', array('conditions' => array("name =''", "caption =''"))); + return; + } } function add () { Modified: app/views/photoapp/album/index.tpl =================================================================== --- app/views/photoapp/album/index.tpl 2008-05-12 09:43:21 UTC (rev 182) +++ app/views/photoapp/album/index.tpl 2008-05-12 16:35:27 UTC (rev 183) @@ -26,7 +26,10 @@ <div class="container"> {loop my_albums} <div class="album"> - <div class="img"><img src="/preview/index/100x100/<?= $my_album->get('img')?>" /></div> + <div class="img"><? if ($my_album->get('img')) {?><img src="/preview/index/100x100/<?= $my_album->get('img')?>" /><? + } else {?>No Cover choosed<? + } + ?></div> <div class="info"> <div class="name_album"><a href="/photoapp/album/view/<?= $my_album->get('id')?>"><?= $my_album->get('name') ?></a></div> <div class="photos_count">_{photos}: <?= $my_album->get('photos_count')?> </div> Modified: app/views/photoapp/album/uploaded.tpl =================================================================== --- app/views/photoapp/album/uploaded.tpl 2008-05-12 09:43:21 UTC (rev 182) +++ app/views/photoapp/album/uploaded.tpl 2008-05-12 16:35:27 UTC (rev 183) @@ -3,23 +3,51 @@ <?= $controller->renderPartial("edit_menu") ?> -<div class="album_step"> +<div class="uploaded_container"> <?= $form_tag_helper->start_form_tag(array('action'=>'uploaded')) ?> - + <?= $form_helper->hidden_field('photo', 'action_comment', array('value' => 'do_comment'))?> <? if ($uploaded_photos == 0) {?> <div class="noalbums"> _{You have no any uploaded and not edited photos}. </div> <? } else {?> - <div class="container"> + <div class="edit_container"> {loop uploaded_photos} - <div class="album"> - <div class="img red"> + <div class="photo_comment"> + <div class="img"> <img src="/preview/index/100x100/<?= $uploaded_photo->get('img')?>" /> </div> + <div class="data"> + + <div class="form_create_row"> + <label >_{Name}:</label> + <div class="form_create_col"> + <?= $form_helper->text_field('photo[' . $uploaded_photo->get('id') . ']', 'name', array('class' => 'text_input small')) ?> + </div> + </div> + <div class="clearfix"></div> + + <div class="form_create_row"> + <label >_{Description}:</label> + <div class="form_create_col"> + <?= $form_helper->text_area('photo[' . $uploaded_photo->get('id') . ']', 'caption', array('rows' => '5', 'class' => 'small')) ?> + </div> + </div> + <div class="clearfix"></div> + + </div> </div> + <div class="clearfix"></div> {end} + + <div class="form_create_row"> + <label class="medium"> </label> + <div class="form_create_col"> + <input class="submitinput" type="submit" value="_{Update Info}"/> + </div> + </div> + <div class="clearfix"></div> </div> <div class="clearfix"></div> <? }?> Modified: public/stylesheets/photoapp/Album.css =================================================================== --- public/stylesheets/photoapp/Album.css 2008-05-12 09:43:21 UTC (rev 182) +++ public/stylesheets/photoapp/Album.css 2008-05-12 16:35:27 UTC (rev 183) @@ -119,6 +119,17 @@ } +.form_create_row .medium { + font-size: 10px; + display: block; + width: 200px; + float: left; + margin: 0px; + height: 30px; + line-height: 30px; + +} + .form_create_col { float: left; width: 200px; @@ -161,6 +172,25 @@ } +.uploaded_container { + padding: 10px 10px; + background: #ffffff; +} + +.photo_comment .img { + float: left; + width: 120px; + height: 170px; + text-align: center; + padding-top: 10px; +} + +.photo_comment .data { + float: left; + width: 500px; + height: 170px; +} + .album { border: 1px solid #cccccc; background: #ffffff; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-12 09:43:16
|
Revision: 182 http://isocial.svn.sourceforge.net/isocial/?rev=182&view=rev Author: fsnobody Date: 2008-05-12 02:43:21 -0700 (Mon, 12 May 2008) Log Message: ----------- album cover, force delete photos when delete album Modified Paths: -------------- app/controllers/photoapp/album_controller.php app/views/photoapp/album/index.tpl app/views/photoapp/album/uploaded.tpl Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-12 09:21:48 UTC (rev 181) +++ app/controllers/photoapp/album_controller.php 2008-05-12 09:43:21 UTC (rev 182) @@ -111,7 +111,14 @@ $photo = new PhotoappPhoto (); $photo->img = $_FILES['album']['name'][$field]; $photo->album_id = $album->getId(); + if( empty($album->img)) { + $photo->is_cover = 1; + $album->img = $photo->img; + } $photo->save(); + $album->photos_count += 1; + + $album->save(); } } } // for Modified: app/views/photoapp/album/index.tpl =================================================================== --- app/views/photoapp/album/index.tpl 2008-05-12 09:21:48 UTC (rev 181) +++ app/views/photoapp/album/index.tpl 2008-05-12 09:43:21 UTC (rev 182) @@ -26,7 +26,7 @@ <div class="container"> {loop my_albums} <div class="album"> - <div class="img">IMG</div> + <div class="img"><img src="/preview/index/100x100/<?= $my_album->get('img')?>" /></div> <div class="info"> <div class="name_album"><a href="/photoapp/album/view/<?= $my_album->get('id')?>"><?= $my_album->get('name') ?></a></div> <div class="photos_count">_{photos}: <?= $my_album->get('photos_count')?> </div> Modified: app/views/photoapp/album/uploaded.tpl =================================================================== --- app/views/photoapp/album/uploaded.tpl 2008-05-12 09:21:48 UTC (rev 181) +++ app/views/photoapp/album/uploaded.tpl 2008-05-12 09:43:21 UTC (rev 182) @@ -15,7 +15,7 @@ <div class="container"> {loop uploaded_photos} <div class="album"> - <div class="img"> + <div class="img red"> <img src="/preview/index/100x100/<?= $uploaded_photo->get('img')?>" /> </div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-12 09:21:43
|
Revision: 181 http://isocial.svn.sourceforge.net/isocial/?rev=181&view=rev Author: fsnobody Date: 2008-05-12 02:21:48 -0700 (Mon, 12 May 2008) Log Message: ----------- can upload up to 5 img Modified Paths: -------------- app/controllers/photoapp/album_controller.php app/views/photoapp/album/uploaded.tpl Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-09 12:13:00 UTC (rev 180) +++ app/controllers/photoapp/album_controller.php 2008-05-12 09:21:48 UTC (rev 181) @@ -83,9 +83,12 @@ if (!empty($this->params['album']) ){ // delete $album = $this->PhotoappAlbum->find($this->params['id']); - if ($album->get('owner') == $this->current_user->getId() && $this->Request->isPost() && $this->PhotoappAlbum->destroyAll("id = " . $this->params['id'])) { - $this->redirectTo(array('action' => 'index')); - return; + if ($album->get('owner') == $this->current_user->getId() && $this->Request->isPost()) { + + if( $this->PhotoappPhoto->destroyAll("album_id = " . $this->params['id']) && $this->PhotoappAlbum->destroyAll("id = " . $this->params['id'])) { + $this->redirectTo(array('action' => 'index')); + return; + } } } else if (!empty($this->params['id']) && $this->PhotoappAlbum->find($this->params['id'])) { // pre delete @@ -97,6 +100,7 @@ //$this->debug($_FILES); for ($i = 1 ; $i < 6 ; $i++) { $field = 'photo' . $i; + if ($_FILES['album']['error'][$field] == 0 ) { // copy file; save photo $copy_to = PROJECT_DIR . "public/images/uploaded/" . $_FILES['album']['name'][$field]; @@ -104,11 +108,10 @@ if (move_uploaded_file($copy_from, $copy_to)) { $album = $this->PhotoappAlbum->find($this->params['id']); - $this->PhotoappPhoto->img = $copy_to; - $this->PhotoappPhoto->album_id = $album->getId(); - - $this->PhotoappPhoto->setAttributes($atr); - $this->PhotoappPhoto->save(); + $photo = new PhotoappPhoto (); + $photo->img = $_FILES['album']['name'][$field]; + $photo->album_id = $album->getId(); + $photo->save(); } } } // for Modified: app/views/photoapp/album/uploaded.tpl =================================================================== --- app/views/photoapp/album/uploaded.tpl 2008-05-09 12:13:00 UTC (rev 180) +++ app/views/photoapp/album/uploaded.tpl 2008-05-12 09:21:48 UTC (rev 181) @@ -16,8 +16,7 @@ {loop uploaded_photos} <div class="album"> <div class="img"> - IMG: <?= $uploaded_photo->get('img')?> - <img src="/preview/index/100x100/Supermassive_Black_Hole_by_Remind_me.jpg" /> + <img src="/preview/index/100x100/<?= $uploaded_photo->get('img')?>" /> </div> </div> {end} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-05-09 12:13:41
|
Revision: 180 http://isocial.svn.sourceforge.net/isocial/?rev=180&view=rev Author: dim0s77 Date: 2008-05-09 05:13:00 -0700 (Fri, 09 May 2008) Log Message: ----------- Created template for topics. Basis logic for board implemented Modified Paths: -------------- app/controllers/groupapp/board_controller.php app/views/groupapp/board/index.tpl app/views/groupapp/board/show_topic.tpl public/stylesheets/groupapp/Board.css timesheet/dim0s77.txt Modified: app/controllers/groupapp/board_controller.php =================================================================== --- app/controllers/groupapp/board_controller.php 2008-05-08 15:55:34 UTC (rev 179) +++ app/controllers/groupapp/board_controller.php 2008-05-09 12:13:00 UTC (rev 180) @@ -2,24 +2,51 @@ class Groupapp_BoardController extends ApplicationController { - var $models = array('GroupappMessage', 'GroupappGroup', 'GroupappMember'); + var $models = array('GroupappMessage', 'GroupappGroup', 'GroupappMember', 'User'); function index () { + if (!empty($this->params['id'])) { + $messages = $this->GroupappMessage->find('all', + array('conditions' => + array("group_id = ?", $this->params['id'])) + ); + $topics = array(); + $persons = array(); + if(!empty($messages)) { + foreach ($messages as $message_loop_key => $message) { + if (!isset($topics[$message->topic_id])) { + $topics[$message->topic_id]['first'] = $message; + } else { + } + isset($topics[$message->topic_id]['posts']) ? + $topics[$message->topic_id]['posts']++ : + $topics[$message->topic_id]['posts'] = 1; + if (!isset($persons[$message->topic_id][$message->user_id])) { + $persons[$message->topic_id][$message->user_id] = 1; + isset($topics[$message->topic_id]['persons']) ? + $topics[$message->topic_id]['persons']++ : + $topics[$message->topic_id]['persons'] = 1; + } + $topics[$message->topic_id]['last'] = $message; + } + } + $this->topics = $topics; + } } function show_topic () { if (!empty($this->params['id'])) { - $topic = $this->GroupappMessage->find('all', + $messages = $this->GroupappMessage->find('all', array('conditions' => array("topic_id = ?", $this->params['id'])) ); - if ($topic) { - $member = $this->GroupappMember->findFirst(array( 'group_id' => $topic[0]->group_id, + if ($messages) { + $member = $this->GroupappMember->findFirst(array( 'group_id' => $messages[0]->group_id, 'user_id' => $this->current_user->getId() )); - $group = $this->GroupappGroup->findFirst(array( 'id' => $topic[0]->group_id )); + $group = $this->GroupappGroup->findFirst(array( 'id' => $messages[0]->group_id )); if (($group && $group->access == 1) || $member) { - $this->topic = $topic; + $this->messages = $messages; } else { $this->addError('_common', 'Access denied', 'Group id closed. You can\'t to see this topic'); } Modified: app/views/groupapp/board/index.tpl =================================================================== --- app/views/groupapp/board/index.tpl 2008-05-08 15:55:34 UTC (rev 179) +++ app/views/groupapp/board/index.tpl 2008-05-09 12:13:00 UTC (rev 180) @@ -28,9 +28,35 @@ </div> <div class="clearfix"></div> +{?topics} +<div class="messages_list"> + <div class="info">Displaying all 2 topics.</div> + <div class="container"> + {loop topics} + <div class="row<? if ($topic_loop_counter == 1) echo ' first'; ?>"> + + <div class="topic_info"> + <div class="subject"><a href="#">{topic-first.subject?}</a></div> + <span class="subtext black">{topic-posts?} post by {topic-persons?} person</span> + <span class="subtext">Created on {topic-first.created_at?}</span> + </div> + + <div class="latest_post_info"> + <div class="sender">Latest post by</div> + <div class="subtext">Posted on {topic-last.created_at?}</div> + </div> + <div class="clearfix"></div> + + </div> + + {end} + </div> +</div> +{else} <div class="nodiscus"> _{There are no discussions}. </div> +{end} <div class="clearfix"></div> <script> Modified: app/views/groupapp/board/show_topic.tpl =================================================================== --- app/views/groupapp/board/show_topic.tpl 2008-05-08 15:55:34 UTC (rev 179) +++ app/views/groupapp/board/show_topic.tpl 2008-05-09 12:13:00 UTC (rev 180) @@ -1,10 +1,10 @@ <?= $controller->renderPartial("head") ?> -{?topic} +{?messages} <div class="submenu"> <div class="menu_block"> - <div class="header">_{Topic}: {topic-0.subject?}</div> + <div class="header">_{Topic}: {messages-0.subject?}</div> </div> <div class="menu_block right"> @@ -13,11 +13,12 @@ </div> <div class="clearfix"></div> -{end} + <?= $controller->renderErrors() ?> <div class="messages_list"> <div class="info">Displaying all 3 posts by 2 people.</div> + {loop messages} <div class="row"> <div class="actions"> @@ -31,21 +32,23 @@ <div class="avatar"> <a href="/profile/show/{sender.id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> - <div class="subtext">Post # </div> + <div class="subtext">Post #{message_loop_counter}</div> <div class="subtext black">1 reply</div> </div> <div class="message"> <div class="head"> - <div class="sender">wrote</div> - <div class="subtext">datetime </div> + <div class="sender">{message.user?}</div> + <div class="subtext">{message.created_at?}</div> </div> - <div class="body"> - body - </div> + <div class="body">{message.body?}</div> </div> </div> <div class="clearfix"></div> + {end} </div> <div class="clearfix"></div> +{else} +<?= $controller->renderErrors() ?> +{end} Modified: public/stylesheets/groupapp/Board.css =================================================================== --- public/stylesheets/groupapp/Board.css 2008-05-08 15:55:34 UTC (rev 179) +++ public/stylesheets/groupapp/Board.css 2008-05-09 12:13:00 UTC (rev 180) @@ -19,6 +19,37 @@ padding: 0px 0px 5px 20px; } +.messages_list .container { + border-top: solid 1px #dddddd; + background: #f7f7f7; + padding: 10px; +} + +.messages_list .container .row { + background: #ffffff; + border: 1px solid #cccccc; + display: block; + padding: 10px 20px 10px 20px; +} + +.messages_list .container .row.first { + border-bottom: 0px; +} + +.messages_list .container .row .topic_info { + float: left; +} + +.messages_list .container .row .topic_info .subject { + font-size: 12px; + font-weight: bold; +} + +.messages_list .container .row .latest_post_info { + float: right; + width: 240px; +} + .messages_list .row { border-top: 1px solid #cccccc; display: block; @@ -36,7 +67,6 @@ } .subtext { - display: block; padding: 2px 0px 0px 0px; font-size: 9px; color: #777777; Modified: timesheet/dim0s77.txt =================================================================== --- timesheet/dim0s77.txt 2008-05-08 15:55:34 UTC (rev 179) +++ timesheet/dim0s77.txt 2008-05-09 12:13:00 UTC (rev 180) @@ -12,3 +12,5 @@ 2008-05-06,19:30,20:50,groupapp,RT:3,"complete 'start new topic' and begin 'show topics'" 2008-05-07,19:00,20:40,groupapp,RT:3,"create template for topic messages" + +2008-05-09,12:00,15:00,groupapp,RT:3,"create template for topics" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |