Thread: [Isocial-svn] SF.net SVN: isocial: [37] public/stylesheets
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <agu...@us...> - 2008-03-03 18:03:25
|
Revision: 37 http://isocial.svn.sourceforge.net/isocial/?rev=37&view=rev Author: aguidrevitch Date: 2008-03-03 10:02:41 -0800 (Mon, 03 Mar 2008) Log Message: ----------- profile editing stubs added, minor css updates Modified Paths: -------------- akelos.diff app/controllers/default_controller.php app/controllers/user_controller.php app/locales/layout/en.php app/locales/layout/ru.php app/views/default/index.tpl app/views/message/_menu.tpl app/views/message/send.tpl app/views/shared/loggedin/compiled/sidebar.tpl.php app/views/shared/loggedin/pageheader.tpl app/views/shared/loggedin/sidebar.tpl app/views/user/forgot_password.tpl app/views/user/laststep.tpl app/views/user/login.tpl app/views/user/register.tpl app/views/user/reset_password.tpl app/views/user/thankyou.tpl public/stylesheets/Application.css public/stylesheets/Default.css public/stylesheets/Message.css public/stylesheets/User.css Added Paths: ----------- app/controllers/profile_controller.php app/installers/basic_profile_installer.php app/installers/country_installer.php app/installers/political_view_installer.php app/installers/sex_installer.php app/locales/profile/ app/locales/profile/en.php app/locales/profile/ru.php app/models/country.php app/models/political_view.php app/models/sex.php app/views/default/_sidebar.tpl app/views/profile/ app/views/profile/_menu.tpl app/views/profile/basic.tpl app/views/profile/contact.tpl app/views/profile/groups.tpl app/views/profile/index.tpl app/views/profile/personal.tpl app/views/profile/picture.tpl app/views/profile/relationships.tpl public/images/group.png public/images/lock.png public/images/magnifier.png public/images/photo.png public/stylesheets/Profile.css Modified: akelos.diff =================================================================== --- akelos.diff 2008-02-29 16:43:08 UTC (rev 36) +++ akelos.diff 2008-03-03 18:02:41 UTC (rev 37) @@ -1,6 +1,6 @@ Index: lib/Ak.php =================================================================== ---- lib/Ak.php (revision 478) +--- lib/Ak.php (revision 500) +++ lib/Ak.php (working copy) @@ -186,6 +186,11 @@ return @$string[$try_whith_lang]; @@ -23,3 +23,16 @@ }else { $string = isset($framework_dictionary[$string]) ? $framework_dictionary[$string] : $string; } +Index: lib/AkActiveRecord.php +=================================================================== +--- lib/AkActiveRecord.php (revision 500) ++++ lib/AkActiveRecord.php (working copy) +@@ -4721,7 +4721,7 @@ + $resulting_array = array(); + if(!empty($source_array) && is_array($source_array)) { + foreach ($source_array as $source_item){ +- $resulting_array[$source_item->get($key_index)] = $source_item->get($value_index); ++ $resulting_array[$source_item->get($key_index, false)] = $source_item->get($value_index, false); + } + } + return $resulting_array; Modified: app/controllers/default_controller.php =================================================================== --- app/controllers/default_controller.php 2008-02-29 16:43:08 UTC (rev 36) +++ app/controllers/default_controller.php 2008-03-03 18:02:41 UTC (rev 37) @@ -14,7 +14,7 @@ function renderSidebar() { - return $this->renderShared("default/sidebar"); + return $this->renderPartial("sidebar"); } function renderPageHeader() Added: app/controllers/profile_controller.php =================================================================== --- app/controllers/profile_controller.php (rev 0) +++ app/controllers/profile_controller.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,30 @@ +<?php + +class ProfileController extends ApplicationController +{ + var $models = 'user, basic_profile, sex, country, political_view'; + + function index () { + } + + function basic () { + } + + function contact () { + } + + function relationships () { + } + + function personal () { + } + + function groups () { + } + + function picture () { + } + +} + +?> \ No newline at end of file Modified: app/controllers/user_controller.php =================================================================== --- app/controllers/user_controller.php 2008-02-29 16:43:08 UTC (rev 36) +++ app/controllers/user_controller.php 2008-03-03 18:02:41 UTC (rev 37) @@ -80,8 +80,8 @@ if ($confirmation->uuid == $this->params['uuid']) { $user->active = 1; if ($user->save()) { + $confirmation->destroy(); $this->sendMail($user->email); - $confirmation->destroy(); return; } } Added: app/installers/basic_profile_installer.php =================================================================== --- app/installers/basic_profile_installer.php (rev 0) +++ app/installers/basic_profile_installer.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,33 @@ +<?php +class BasicProfileInstaller extends AkInstaller +{ + function up_1() + { + $this->execute( + "CREATE TABLE `basic_profiles` ( + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `sex_id` int(11), + `country_id` int(11), + `hometown` char(255) NOT NULL DEFAULT '', + `birthdate` datetime DEFAULT NULL, + `political_view_id` int(11), + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + FOREIGN KEY (user_id) REFERENCES users(id), + FOREIGN KEY (sex_id) REFERENCES sexes(id), + FOREIGN KEY (country_id) REFERENCES countries(id), + FOREIGN KEY (political_view_id) REFERENCES political_views(id) + ) ENGINE=InnoDB"); + + } + + function down_1() + { + /**/ + $this->dropTable('basic_profiles'); + /**/ + } +} + +?> Added: app/installers/country_installer.php =================================================================== --- app/installers/country_installer.php (rev 0) +++ app/installers/country_installer.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,269 @@ +<?php +class CountryInstaller extends AkInstaller +{ + function up_1() + { + $this->execute( + "CREATE TABLE `countries` ( + `id` int(11) PRIMARY KEY + ) ENGINE=InnoDB"); + + $fields = array(); + foreach (Ak::langs() as $lang) { + $fields[] = $lang . "_name"; + $this->execute("ALTER TABLE countries ADD column ${lang}_name char(255) NOT NULL DEFAULT \"\""); + } + $fields = join(", ", $fields); + + foreach (array(1 => "Åland Islands", + 2 => "Afghanistan", + 3 => "Albania", + 4 => "Algeria", + 5 => "American Samoa", + 6 => "Andorra", + 7 => "Angola", + 8 => "Anguilla", + 9 => "Antigua and Barbuda", + 10 => "Argentina", + 11 => "Armenia", + 12 => "Aruba", + 13 => "Australia", + 14 => "Austria", + 15 => "Azerbaijan", + 16 => "Bahamas", + 17 => "Bahrain", + 18 => "Bangladesh", + 19 => "Barbados", + 20 => "Belarus", + 21 => "Belgium", + 22 => "Belize", + 23 => "Benin", + 24 => "Bermuda", + 25 => "Bhutan", + 26 => "Bolivia", + 27 => "Bosnia and Herzegovina", + 28 => "Botswana", + 29 => "Brazil", + 30 => "British Virgin Islands", + 31 => "Brunei Darussalam", + 32 => "Bulgaria", + 33 => "Burkina Faso", + 34 => "Burundi", + 35 => "Côte d'Ivoire", + 36 => "Cambodia", + 37 => "Cameroon", + 38 => "Canada", + 39 => "Cape Verde", + 40 => "Cayman Islands", + 41 => "Central African Republic", + 42 => "Chad", + 43 => "Chile", + 44 => "China", + 45 => "Colombia", + 46 => "Comoros", + 47 => "Congo, Democratic Republic", + 48 => "Congo", + 49 => "Cook Islands", + 50 => "Costa Rica", + 51 => "Croatia", + 52 => "Cuba", + 53 => "Cyprus", + 54 => "Czech Republic", + 55 => "Denmark", + 56 => "Djibouti", + 57 => "Dominican Republic", + 58 => "Dominica", + 59 => "Ecuador", + 60 => "Egypt", + 61 => "El Salvador", + 62 => "Equatorial Guinea", + 63 => "Eritrea", + 64 => "Estonia", + 65 => "Ethiopia", + 66 => "Faeroe Islands", + 67 => "Falkland Islands (Malvinas)", + 68 => "Fiji", + 69 => "Finland", + 70 => "France", + 71 => "French Guiana", + 72 => "French Polynesia", + 73 => "Gabon", + 74 => "Gambia", + 75 => "Georgia", + 76 => "Germany", + 77 => "Ghana", + 78 => "Gibraltar", + 79 => "Greece", + 80 => "Greenland", + 81 => "Grenada", + 82 => "Guadeloupe", + 83 => "Guam", + 84 => "Guatemala", + 85 => "Guinea-Bissau", + 86 => "Guinea", + 87 => "Guyana", + 88 => "Haiti", + 89 => "Honduras", + 90 => "Hong Kong", + 91 => "Hungary", + 92 => "Iceland", + 93 => "India", + 94 => "Indonesia", + 95 => "Iran (Islamic Republic of)", + 96 => "Iraq", + 97 => "Ireland", + 98 => "Isle of Man", + 99 => "Israel", + 100 => "Italy", + 101 => "Jamaica", + 102 => "Japan", + 103 => "Jordan", + 104 => "Kazakhstan", + 105 => "Kenya", + 106 => "Kiribati", + 107 => "Korea, Republic of", + 108 => "Korea, South", + 109 => "Kuwait", + 110 => "Kyrgyzstan", + 111 => "Lao People's Democratic Republic", + 112 => "Latvia", + 113 => "Lebanon", + 114 => "Lesotho", + 115 => "Liberia", + 116 => "Libyan Arab Jamahiriya", + 117 => "Liechtenstein", + 118 => "Lithuania", + 119 => "Luxembourg", + 120 => "Macao", + 121 => "Macedonia", + 122 => "Madagascar", + 123 => "Malawi", + 124 => "Malaysia", + 125 => "Maldives", + 126 => "Mali", + 127 => "Malta", + 128 => "Marshall Islands", + 129 => "Martinique", + 130 => "Mauritania", + 131 => "Mauritius", + 132 => "Mayotte", + 133 => "Mexico", + 134 => "Micronesia", + 135 => "Monaco", + 136 => "Mongolia", + 137 => "Montserrat", + 138 => "Morocco", + 139 => "Mozambique", + 140 => "Myanmar", + 141 => "Namibia", + 142 => "Nauru", + 143 => "Nepal", + 144 => "Netherlands Antilles", + 145 => "Netherlands", + 146 => "New Caledonia", + 147 => "New Zealand", + 148 => "Nicaragua", + 149 => "Nigeria", + 150 => "Niger", + 151 => "Niue", + 152 => "Norfolk Island", + 153 => "Northern Mariana Islands", + 154 => "Norway", + 155 => "Occupied Palestinian Territory", + 156 => "Oman", + 157 => "Pakistan", + 158 => "Palau", + 159 => "Panama", + 160 => "Papua New Guinea", + 161 => "Paraguay", + 162 => "Peru", + 163 => "Philippines", + 164 => "Pitcairn", + 165 => "Poland", + 166 => "Portugal", + 167 => "Puerto Rico", + 168 => "Qatar", + 169 => "Réunion", + 170 => "Republic of Moldova", + 171 => "Romania", + 172 => "Russian Federation", + 173 => "Rwanda", + 174 => "Saint Helena", + 175 => "Saint Kitts and Nevis", + 176 => "Saint Lucia", + 177 => "Saint Pierre and Miquelon", + 178 => "Saint Vincent and the Grenadines", + 179 => "Samoa", + 180 => "San Marino", + 181 => "Sao Tome and Principe", + 182 => "Saudi Arabia", + 183 => "Senegal", + 184 => "Serbia and Montenegro", + 185 => "Seychelles", + 186 => "Sierra Leone", + 187 => "Singapore", + 188 => "Slovakia", + 189 => "Slovenia", + 190 => "Solomon Islands", + 191 => "Somalia", + 192 => "South Africa", + 193 => "Spain", + 194 => "Sri Lanka", + 195 => "Sudan", + 196 => "Suriname", + 197 => "Svalbard and Jan Mayen Islands", + 198 => "Swaziland", + 199 => "Sweden", + 200 => "Switzerland", + 201 => "Syrian Arab Republic", + 202 => "Tajikistan", + 203 => "Tanzania", + 204 => "Thailand", + 205 => "Timor-Leste", + 206 => "Togo", + 207 => "Tokelau", + 208 => "Tonga", + 209 => "Trinidad and Tobago", + 210 => "Tunisia", + 211 => "Turkey", + 212 => "Turkmenistan", + 213 => "Turks and Caicos Islands", + 214 => "Tuvalu", + 215 => "Uganda", + 216 => "Ukraine", + 217 => "United Arab Emirates", + 218 => "United Kingdom", + 219 => "United States Virgin Islands", + 220 => "United States", + 221 => "Uruguay", + 222 => "Uzbekistan", + 223 => "Vanuatu", + 224 => "Vatican City State (Holy See)", + 225 => "Venezuela", + 226 => "Viet Nam", + 227 => "Wallis and Futuna Islands", + 228 => "Western Sahara", + 229 => "Yemen", + 230 => "Zambia", + 231 => "Zimbabwe") as $id => $country) + { + + $values = array(); + foreach (Ak::langs() as $lang) { + Ak::lang($lang); + $values[] = '"' . Ak::t($country) . '"'; + } + $values = join(", ", $values); + $this->execute("INSERT INTO countries (id, $fields) VALUES ($id, $values)"); + } + } + + function down_1() + { + /**/ + $this->dropTable('countries'); + /**/ + } +} + +?> Added: app/installers/political_view_installer.php =================================================================== --- app/installers/political_view_installer.php (rev 0) +++ app/installers/political_view_installer.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,46 @@ +<?php +class PoliticalViewInstaller extends AkInstaller +{ + function up_1() + { + $this->execute( + "CREATE TABLE `political_views` ( + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT + ) ENGINE=InnoDB"); + + $fields = array(); + foreach (Ak::langs() as $lang) { + $fields[] = $lang . "_name"; + $this->execute("ALTER TABLE political_views ADD column ${lang}_name char(255) NOT NULL DEFAULT \"\""); + } + $fields = join(", ", $fields); + + foreach (array(1 => "Very Liberal", + 2 => "Liberal", + 3 => "Moderate", + 4 => "Conservative", + 5 => "Very Conservative", + 6 => "Apathetic", + 7 => "Libertarian", + ) as $id => $view) + { + + $values = array(); + foreach (Ak::langs() as $lang) { + Ak::lang($lang); + $values[] = '"' . Ak::t($view) . '"'; + } + $values = join(", ", $values); + $this->execute("INSERT INTO political_views (id, $fields) VALUES ($id, $values)"); + } + } + + function down_1() + { + /**/ + $this->dropTable('political_views'); + /**/ + } +} + +?> Added: app/installers/sex_installer.php =================================================================== --- app/installers/sex_installer.php (rev 0) +++ app/installers/sex_installer.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,39 @@ +<?php +class SexInstaller extends AkInstaller +{ + function up_1() + { + $this->execute( + "CREATE TABLE `sexes` ( + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT + ) ENGINE=InnoDB"); + + $fields = array(); + foreach (Ak::langs() as $lang) { + $fields[] = $lang . "_name"; + $this->execute("ALTER TABLE sexes ADD column ${lang}_name char(255) NOT NULL DEFAULT \"\""); + } + $fields = join(", ", $fields); + + foreach (array(1 => "Male", + 2 => "Female") as $id => $sex) + { + $values = array(); + foreach (Ak::langs() as $lang) { + Ak::lang($lang); + $values[] = '"' . Ak::t($sex) . '"'; + } + $values = join(", ", $values); + $this->execute("INSERT INTO sexes (id, $fields) VALUES ($id, $values)"); + } + } + + function down_1() + { + /**/ + $this->dropTable('sexes'); + /**/ + } +} + +?> Modified: app/locales/layout/en.php =================================================================== --- app/locales/layout/en.php 2008-02-29 16:43:08 UTC (rev 36) +++ app/locales/layout/en.php 2008-03-03 18:02:41 UTC (rev 37) @@ -16,4 +16,8 @@ $dictionary['Sign Up'] = 'Sign Up'; $dictionary['Everyone Can Join'] = 'Everyone Can Join'; + +$dictionary['PhotoApp'] = 'Photos'; +$dictionary['GroupApp'] = 'Groups'; + ?> Modified: app/locales/layout/ru.php =================================================================== --- app/locales/layout/ru.php 2008-02-29 16:43:08 UTC (rev 36) +++ app/locales/layout/ru.php 2008-03-03 18:02:41 UTC (rev 37) @@ -17,7 +17,14 @@ $dictionary['Everyone Can Join'] = 'Подключиться может каждый'; $dictionary['or'] = 'или'; $dictionary['Profile'] = 'Профиль'; +$dictionary['edit'] = 'настроить'; $dictionary['Friends'] = 'Друзья'; $dictionary['Messages'] = 'Сообщения'; +$dictionary['Save Changes'] = 'Сохранить'; +$dictionary['Cancel'] = 'Отмена'; + +$dictionary['PhotoApp'] = 'Фото'; +$dictionary['GroupApp'] = 'Группы'; + ?> Added: app/locales/profile/en.php =================================================================== --- app/locales/profile/en.php (rev 0) +++ app/locales/profile/en.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,7 @@ +<?php + +// File created on: 2008-02-17 15:13:51 + +$dictionary = array(); + +?> Added: app/locales/profile/ru.php =================================================================== --- app/locales/profile/ru.php (rev 0) +++ app/locales/profile/ru.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,47 @@ +<?php + +// File created on: 2008-02-17 15:13:51 + +$dictionary = array(); + +$dictionary['Basic'] = 'Основные'; +$dictionary['Contact'] = 'Контакты'; +$dictionary['Relationships'] = 'Семейное положение'; +$dictionary['Personal'] = 'Интересы'; +$dictionary['Groups'] = 'Группы'; +$dictionary['Picture'] = 'Фото'; + +$dictionary['Sex'] = 'Пол'; +$dictionary['Select Sex:'] = 'Выберите пол:'; + +$dictionary['Birthday'] = 'Дата рождения'; +$dictionary['Country'] = 'Страна'; +$dictionary['Select Country:'] = 'Выберите страну:'; +$dictionary['Hometown'] = 'Родной город'; + +$dictionary['Political views'] = 'Политические взгляды'; +$dictionary['Select Political Views:'] = 'Выберите политические взгляды:'; + +$dictionary['Religious views'] = 'Религия'; + +$dictionary['Only my friends'] = 'Только для друзей'; +$dictionary['Emails'] = 'Адреса Email'; +$dictionary['IM Screen Name(s)'] = 'IM'; +$dictionary['Mobile phone'] = 'Мобильный номер'; +$dictionary['Land phone'] = 'Домашний номер'; +$dictionary['City'] = 'Город'; +$dictionary['Address'] = 'Адрес'; +$dictionary['Website'] = 'Веб сайт'; + +$dictionary['Relationship status'] = 'Семейное положение'; +$dictionary['Select Status:'] = 'Выберите положение:'; +$dictionary['Former Name'] = 'Девичья фамилия'; +$dictionary['Interested In'] = 'Ищу'; +$dictionary['Looking for'] = 'Для'; + +$dictionary['Activities'] = 'Род занятий'; +$dictionary['Interests'] = 'Интересы'; +$dictionary['Favorite Music'] = 'Любимая музыка'; +$dictionary['Favorite TV Shows'] = 'Любимые ТВ шоу'; + +?> Added: app/models/country.php =================================================================== --- app/models/country.php (rev 0) +++ app/models/country.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,7 @@ +<?php + +class Country extends ActiveRecord +{ +} + +?> Added: app/models/political_view.php =================================================================== --- app/models/political_view.php (rev 0) +++ app/models/political_view.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,7 @@ +<?php + +class PoliticalView extends ActiveRecord +{ +} + +?> Added: app/models/sex.php =================================================================== --- app/models/sex.php (rev 0) +++ app/models/sex.php 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,7 @@ +<?php + +class Sex extends ActiveRecord +{ +} + +?> Added: app/views/default/_sidebar.tpl =================================================================== --- app/views/default/_sidebar.tpl (rev 0) +++ app/views/default/_sidebar.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,20 @@ +<div id="quicklogin"> + <form action="/user/login" method="post"> + <label> + <span>_{Email}:</span> + <input class="sidetextinput" type="text" name="email"> + </label> + <label> + <span>_{Password}:</span> + <input class="sidetextinput" type="password" name="password"> + </label> + <label class="persistent"> + <input class="checkboxinput" type="checkbox" name="remember_me"> + <span>_{Remember me}</span> + </label> + <input class="submitinput" type="submit" value="_{Login}"> + + </form> + + <a href="/user/forgot_password">_{Forgot Password?}</a> +</div> \ No newline at end of file Modified: app/views/default/index.tpl =================================================================== --- app/views/default/index.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/default/index.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -1 +1,3 @@ +<p> <a class="linkbutton" href="/user/register"><div>_{Sign Up}</div></a> +</p> \ No newline at end of file Modified: app/views/message/_menu.tpl =================================================================== --- app/views/message/_menu.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/message/_menu.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -1,7 +1,8 @@ <div class="tabs"> <div class="left"> <ul class="toggle_tabs"> - <li class="first"><a href="/message/inbox" class="<?= $controller->getActionName() == 'inbox' ? 'selected' : '' ?>">_{Inbox}</a></li><li><a href="/message/outbox" class="last <?= $controller->getActionName() == 'outbox' ? 'selected' : '' ?>">_{Outbox}</a></li> + <li class="first"><a href="/message/inbox" class="<?= $controller->getActionName() == 'inbox' ? 'selected' : '' ?>">_{Inbox}</a></li><? + ?><li><a href="/message/outbox" class="last <?= $controller->getActionName() == 'outbox' ? 'selected' : '' ?>">_{Outbox}</a></li> </ul> </div> <div class="right"> Modified: app/views/message/send.tpl =================================================================== --- app/views/message/send.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/message/send.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -3,7 +3,7 @@ <?= $controller->renderErrors() ?> <form action="/message/send" method="post"> - <div class="messageform"> + <div class="editform"> <div class="formrow"> <label>_{To}:</label> <?= $form_helper->text_field('message', '', array('class' => 'textinput') )?> Added: app/views/profile/_menu.tpl =================================================================== --- app/views/profile/_menu.tpl (rev 0) +++ app/views/profile/_menu.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,13 @@ +<div class="tabs"> + <div class="left"> + <ul class="toggle_tabs"> + <li class="first"> + <a href="/profile/basic" class="<?= $controller->getActionName() == 'basic' ? 'selected' : '' ?>">_{Basic}</a></li><? + ?><li><a href="/profile/contact" class="<?= $controller->getActionName() == 'contact' ? 'selected' : '' ?>">_{Contact}</a></li><? + ?><li><a href="/profile/relationships" class="<?= $controller->getActionName() == 'relationships' ? 'selected' : '' ?>">_{Relationships}</a></li><? + ?><li><a href="/profile/personal" class="<?= $controller->getActionName() == 'personal' ? 'selected' : '' ?>">_{Personal}</a></li><? + ?><li><a href="/profile/groups" class="<?= $controller->getActionName() == 'groups' ? 'selected' : '' ?>">_{Groups}</a></li><? + ?><li><a href="/profile/picture" class="last <?= $controller->getActionName() == 'picture' ? 'selected' : '' ?>">_{Picture}</a></li> + </ul> + </div> +</div> Added: app/views/profile/basic.tpl =================================================================== --- app/views/profile/basic.tpl (rev 0) +++ app/views/profile/basic.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,38 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<form action="/profile/basic" method="post"> + <div class="editform"> + <div class="formrow"> + <label>_{Sex}:</label> + <?= $form_options_helper->select('basic', 'sex_id', $Sex->collect($Sex->find(), 'name', 'id'), array(), array('prompt' => $controller->t('Select Sex:')) )?> + </div> + <div class="formrow"> + <label>_{Birthday}:</label> + <?= $date_helper->date_select('basic', 'birthdate', array('start_year' => 1940) )?> + </div> + <div class="formrow"> + <label>_{Country}:</label> + <?= $form_options_helper->select('basic', 'country_id', $Country->collect($Country->find(), 'name', 'id'), array(), array('prompt' => $controller->t('Select Country:')) )?> + </div> + <div class="formrow"> + <label>_{Hometown}:</label> + <?= $form_helper->text_field('basic', '', array('class' => 'shorttextinput') )?> + </div> + <div class="formrow"> + <label>_{Political views}:</label> + <?= $form_options_helper->select('basic', 'political_view_id', $PoliticalView->collect($PoliticalView->find(), 'name', 'id'), array(), array('prompt' => $controller->t('Select Political Views:')) )?> + </div> + <div class="formrow"> + <label>_{Religious views}:</label> + <?= $form_helper->text_field('basic', 'religious_views', array('class' => 'shorttextinput') ) ?> + </div> + <div class="formrow"> + <label></label> + <input class="submitinput" type="submit" value="_{Save Changes}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + </div> +</form> + Added: app/views/profile/contact.tpl =================================================================== --- app/views/profile/contact.tpl (rev 0) +++ app/views/profile/contact.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,135 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<form action="/profile/contact" method="post"> + <div class="editform"> + <div class="formrow"> + <label>_{Emails}:</label> + <div class="formcol"> + <div class="middle"> + <?= $current_user->email ?> + </div> + <a href="#" class="lock">_{Only my friends}</a> + </div> + </div> + <div class="formrow"> + <label></label> + <div class="formcol"> + <div class="middle"> + <a href="#">Add / Remove Emails</a> + </div> + </div> + </div> + <div class="formrow"> + <label></label> + <div class="formcol"><div class="divider"></div></div> + </div> + <div class="formrow"> + <label>_{IM Screen Name(s)}:</label> + <div class="formcol"> + <div class="middle"> + <?= $form_helper->text_field('contact', 'im', array('class' => 'shorttextinput') )?> + </div> + <select class="imselect"> + <option>AIM</option> + <option>Google talk</option> + <option>Skype</option> + <option>Windows Live</option> + <option>Yahoo</option> + <option>Gadu-Gadu</option> + <option>ICQ</option> + </select> + </div> + </div> + <div class="formrow"> + <label></label> + <div class="formcol"> + <div class="middle"> + <a href="#">Add another screen name</a> + </div> + <a href="#" class="lock">_{Only my friends}</a> + </div> + </div> + <div class="formrow"> + <label></label> + <div class="formcol"><div class="divider"></div></div> + </div> + + <div class="formrow"> + <label>_{Mobile phone}:</label> + <div class="formcol"> + <div class="middle"> + <?= $form_helper->text_field('contact', 'mobile', array('class' => 'shorttextinput') )?> + </div> + <a href="#" class="lock">_{Only my friends}</a> + </div> + </div> + <div class="formrow"> + <label>_{Land phone}:</label> + <div class="formcol"> + <div class="middle"> + <?= $form_helper->text_field('contact', 'land', array('class' => 'shorttextinput') )?> + </div> + <a href="#" class="lock">_{Only my friends}</a> + </div> + </div> + <div class="formrow"> + <label></label> + <div class="formcol"><div class="divider"></div></div> + </div> + + <div class="formrow"> + <label>_{Country}:</label> + <div class="formcol"> + <div class="middle"> + <?= $form_options_helper->select('basic', 'country_id', $Country->collect($Country->find(), 'name', 'id'), array(), array('prompt' => $controller->t('Select Country:')) )?> + </div> + </div> + </div> + <div class="formrow"> + <label>_{City}:</label> + <div class="formcol"> + <div class="middle"> + <?= $form_helper->text_field('address', 'city', array('class' => 'textinput') )?> + </div> + </div> + </div> + <div class="formrow"> + <label>_{Address}:</label> + <div class="formcol"> + <div class="middle"> + <?= $form_helper->text_field('address', 'mobile', array('class' => 'textinput') )?> + </div> + </div> + </div> + <div class="formrow"> + <label></label> + <div class="formcol"> + <div class="middle"></div> + <a href="#" class="lock">_{Only my friends}</a> + </div> + </div> + <div class="formrow"> + <label></label> + <div class="formcol"><div class="divider"></div></div> + </div> + + <div class="formrow"> + <label>_{Website}:</label> + <div class="formcol"> + <div class="middle"> + <?= $form_helper->text_area('address', 'website' )?> + </div> + <a href="#" class="lock">_{Only my friends}</a> + </div> + </div> + + <div class="formrow"> + <label></label> + <input class="submitinput" type="submit" value="_{Save Changes}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + </div> +</form> + Added: app/views/profile/groups.tpl =================================================================== --- app/views/profile/groups.tpl (rev 0) +++ app/views/profile/groups.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,5 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<p>Coming soon</p> \ No newline at end of file Added: app/views/profile/index.tpl =================================================================== --- app/views/profile/index.tpl (rev 0) +++ app/views/profile/index.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1 @@ +Profile \ No newline at end of file Added: app/views/profile/personal.tpl =================================================================== --- app/views/profile/personal.tpl (rev 0) +++ app/views/profile/personal.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,34 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<form action="/profile/personal" method="post"> + <div class="editform"> + <div class="formrow"> + <label>_{Activities}:</label> + <?= $form_helper->text_area('personal', 'activities')?> + </div> + + <div class="formrow"> + <label>_{Interests}:</label> + <?= $form_helper->text_area('personal', 'interests')?> + </div> + + <div class="formrow"> + <label>_{Favorite Music}:</label> + <?= $form_helper->text_area('personal', 'music')?> + </div> + + <div class="formrow"> + <label>_{Favorite TV Shows}:</label> + <?= $form_helper->text_area('personal', 'tv_shows')?> + </div> + + <div class="formrow"> + <label></label> + <input class="submitinput" type="submit" value="_{Save Changes}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + </div> +</form> + Added: app/views/profile/picture.tpl =================================================================== --- app/views/profile/picture.tpl (rev 0) +++ app/views/profile/picture.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,5 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<p>Coming soon</p> \ No newline at end of file Added: app/views/profile/relationships.tpl =================================================================== --- app/views/profile/relationships.tpl (rev 0) +++ app/views/profile/relationships.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,55 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<form action="/profile/relationships" method="post"> + <div class="editform"> + <div class="formrow"> + <label>_{Relationship Status}:</label> + <div class="formcol"> + <?= $form_options_helper->select('relationship', 'status', array('Single', 'In a relationship', 'Engaged', 'Married', 'It\'s complicated', 'In an open relationship'), array(), array('prompt' => $controller->t('Select Status:')) )?> + </div> + </div> + + <div class="formrow"> + <label>_{Former Name}:</label> + <div class="formcol"> + <?= $form_helper->text_field('relationship', 'former_name', array('class' => 'textinput') )?> + </div> + </div> + <div class="formrow"> + <label></label> + <div class="formcol"> + <div class="note"> + _{<strong>Note</strong>: Please enter a full name. Former Name is only used to help people find you in search and will not show up in your profile.} + </div> + </div> + </div> + + <div class="formrow"> + <label>_{Interested In}:</label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('relationship', 'interested_in_men', array('class' => 'checkboxinput')) ?> Men</label> + <label class="checkbox"><?= $form_helper->check_box('relationship', 'interested_in_women', array('class' => 'checkboxinput')) ?> Women</label> + </div> + </div> + + <div class="formrow"> + <label>_{Looking for}:</label> + <div class="formcol"> + <label class="checkbox"><?= $form_helper->check_box('relationship', 'looking_for_friendship', array('class' => 'checkboxinput')) ?> Friendship</label> + <label class="checkbox"><?= $form_helper->check_box('relationship', 'looking_for_dating', array('class' => 'checkboxinput')) ?> Dating</label> + <label class="checkbox"><?= $form_helper->check_box('relationship', 'looking_for_relationship', array('class' => 'checkboxinput')) ?> A Relationship</label> + <label class="checkbox"><?= $form_helper->check_box('relationship', 'looking_for_networking', array('class' => 'checkboxinput')) ?> Networking</label> + </div> + </div> + + + <div class="formrow"> + <label></label> + <input class="submitinput" type="submit" value="_{Save Changes}"> + <input class="cancelinput" type="button" value="_{Cancel}"> + </div> + </div> +</form> + Modified: app/views/shared/loggedin/compiled/sidebar.tpl.php =================================================================== --- app/views/shared/loggedin/compiled/sidebar.tpl.php 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/shared/loggedin/compiled/sidebar.tpl.php 2008-03-03 18:02:41 UTC (rev 37) @@ -7,12 +7,11 @@ <div id="qsearchfield"> <input id="query" name="query" type="text" class="textinput"> </div> - <div id="qsearchimage">a - </div> + <div id="qsearchimage"></div> </div> </form> </div> <div id="applications"> - <div>Photos</div> - <div>Groups</div> + <a href="/photo" class="photoapp"><?php echo $text_helper->translate('PhotoApp', array()); ?></a> + <a href="/groups" class="groupsapp"><?php echo $text_helper->translate('GroupApp', array()); ?></a> </div> \ No newline at end of file Modified: app/views/shared/loggedin/pageheader.tpl =================================================================== --- app/views/shared/loggedin/pageheader.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/shared/loggedin/pageheader.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -1,5 +1,5 @@ <ul id="headermenuleft"> - <li><a class="globallink" href="/profile/">_{Profile}</a> <a href="/profile/edit">_{edit}</a></li> + <li><a class="globallink" href="/profile/">_{Profile}</a> <a href="/profile/basic">_{edit}</a></li> <li><a class="globallink" href="/friend/">_{Friends}</a></li> <li><a class="globallink" href="/message/">_{Messages} (0)</a></li> </ul> Modified: app/views/shared/loggedin/sidebar.tpl =================================================================== --- app/views/shared/loggedin/sidebar.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/shared/loggedin/sidebar.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -7,12 +7,11 @@ <div id="qsearchfield"> <input id="query" name="query" type="text" class="textinput"> </div> - <div id="qsearchimage">a - </div> + <div id="qsearchimage"></div> </div> </form> </div> <div id="applications"> - <div>Photos</div> - <div>Groups</div> + <a href="/photo" class="photoapp">_{PhotoApp}</a> + <a href="/groups" class="groupsapp">_{GroupApp}</a> </div> \ No newline at end of file Modified: app/views/user/forgot_password.tpl =================================================================== --- app/views/user/forgot_password.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/user/forgot_password.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -6,7 +6,7 @@ _{We will send you an email with a link to reset your password}.</p> <form action="/user/forgot_password" method="post"> - <div class="loginform"> + <div class="editform"> <div class="formrow"> <label>_{Email}:</label> <input class="textinput" type="text" name="email"> Modified: app/views/user/laststep.tpl =================================================================== --- app/views/user/laststep.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/user/laststep.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -1,2 +1,2 @@ <div class="title">_{Last step}</div> -<div>_{Check please your email and click on confirmation link}.</div> +<p>_{Check please your email and click on confirmation link}.</p> Modified: app/views/user/login.tpl =================================================================== --- app/views/user/login.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/user/login.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -3,7 +3,7 @@ <?= $controller->renderErrors() ?> <form action="/user/login" method="post"> - <div class="loginform"> + <div class="editform"> <div class="formrow"> <label>_{Email}:</label> <input class="textinput" type="text" name="email"> @@ -14,8 +14,9 @@ </div> <div class="formrow"> <label></label> - <input class="checkboxinput" type="checkbox" name="remember_me"> - <span>_{Remember me}</span> + <label class="checkbox"> + <input class="checkboxinput" type="checkbox" name="remember_me"> _{Remember me} + </label> </div> <div class="formrow"> <label></label> Modified: app/views/user/register.tpl =================================================================== --- app/views/user/register.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/user/register.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -3,7 +3,7 @@ <?= $controller->renderErrors() ?> <form action="/user/register" method="post"> - <div class="loginform"> + <div class="editform"> <div class="formrow"> <label>_{Name}:</label> <?= $form_helper->text_field('user', 'name', array('class' => 'textinput') )?> Modified: app/views/user/reset_password.tpl =================================================================== --- app/views/user/reset_password.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/user/reset_password.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -1,12 +1,10 @@ <div class="title">_{Reset Password}</div> -<? -if ($controller->getErrors()) { - echo $controller->renderErrors(); -} else { ?> -<div align="center">_{Please enter a new password}.</div> +<?= $controller->renderErrors(); ?> + +<p>_{Please enter a new password}.</p> <form action="/user/reset_password" method="post"> - <div class="loginform"> + <div class="editform"> <div class="formrow"> <label>_{New Password}:</label> <input class="textinput" type="password" name="user[password]"> Modified: app/views/user/thankyou.tpl =================================================================== --- app/views/user/thankyou.tpl 2008-02-29 16:43:08 UTC (rev 36) +++ app/views/user/thankyou.tpl 2008-03-03 18:02:41 UTC (rev 37) @@ -1,2 +1,2 @@ <div class="title">_{Thank you for registration}</div> - +<p>_{Registration complete}</p> Added: public/images/group.png =================================================================== (Binary files differ) Property changes on: public/images/group.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/lock.png =================================================================== (Binary files differ) Property changes on: public/images/lock.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/magnifier.png =================================================================== (Binary files differ) Property changes on: public/images/magnifier.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/photo.png =================================================================== (Binary files differ) Property changes on: public/images/photo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-02-29 16:43:08 UTC (rev 36) +++ public/stylesheets/Application.css 2008-03-03 18:02:41 UTC (rev 37) @@ -10,14 +10,22 @@ font-size: 11px; } +select{ + border:1px solid #BDC7D8; + font-family:verdana,arial,sans-serif; + font-size:11px; + padding:2px; +} + label { - clear: left; + color: #666666; display: block; cursor: pointer; - font-weight: bolder; + font-weight: bold; } label.persistent { + display: block; line-height: 16px; font: 11px normal; padding: 1px 0px 3px 0px; @@ -27,13 +35,6 @@ font-weight: normal; } -select{ - border:1px solid #BDC7D8; - font-family:verdana,arial,sans-serif; - font-size:11px; - padding:2px; -} - a { color: #3b5998; text-decoration: none; @@ -124,8 +125,8 @@ #pageheader { color: white; background-color: #3b5998; - line-height: 28px; - height: 28px; + line-height: 2em; + height: 2em; padding: 9px 0px 4px 0px; } @@ -192,6 +193,11 @@ padding: 0; } +#content p { + margin: 0px; + padding: 30px; +} + #pagefooter { clear: both; height: 50px; @@ -243,11 +249,35 @@ } #qsearchimage { - width: 21px; - background-color: blue; - height: 21px; + float: left; + background: url('/images/magnifier.png') no-repeat 0px; + width: 16px; + height: 16px; + margin: 3px; + cursor: pointer; } +#applications { + clear: both; + font-size: 11px; + margin: 10px; + padding: 10px 0px 0px 0px; +} + +#applications a { + display: block; + line-height: 16px; + padding-left: 20px; +} + +.photoapp { + background: url('/images/photo.png') no-repeat 0px; +} + +.groupsapp { + background: url('/images/group.png') no-repeat 0px; +} + .linksarea a { padding: 2px 5px 2px 5px; } @@ -277,15 +307,19 @@ } .textinput, .passwordinput { - width: 123px; + width: 200px; margin: 0px 0px 5px 0px; padding: 3px; font-size: 11px; } +.shorttextinput { + width: 80px; +} + .checkboxinput { border: 0px; - margin: 0px 0px 4px 0px; + margin: 4px 0px 0px 0px; } .error { @@ -312,3 +346,159 @@ border-bottom: 1px solid #dddddd; margin-bottom: 10px; } + +#content .tabs { + display:block; + padding: 20px 0px 15px 0px; + border-bottom: 1px solid #898989; +} + +.tabs .left { + float: left; + padding-left: 10px; +} + +.tabs .right { + float: right; + padding-right: 10px; +} + +.toggle_tabs { + display: block; + margin: 0px; + padding: 0px; + list-style: none; + text-align: center; +} + +.toggle_tabs li { + display: inline; + padding: 2px 0px 3px 0px; + background: #f1f1f1; +} + +.toggle_tabs li a { + border: 1px solid #898989; + border-left: 0px; + color: #333; + font-weight: bold; + padding:2px 8px 3px 9px; +} + +.toggle_tabs li a small { + font-size: 11px; + font-weight:normal; +} + +.toggle_tabs li a:focus { + outline: 0px; +} + +.toggle_tabs li.first a { + border: 1px solid #898989; +} + +.toggle_tabs li a.selected { + margin-left: -1px; + background: #6d84b4; + border: 1px solid #3b5998; + border-left: 1px solid #5973a9; + border-right: 1px solid #5973a9; + color:#fff; +} + +.toggle_tabs li.last a.selected { + margin-left: -1px; + border-left: 1px solid #5973a9; + border-right: 1px solid #36538f; +} + +.toggle_tabs li.first a.selected { + margin: 0px; + border-left: 1px solid #36538f; + border-right: 1px solid #5973a9; +} + +.toggle_tabs li.first.last a.selected { + border: 1px solid #36538f; +} + +.toggle_tabs li a.selected:hover { + text-decoration: none; +} + +.toggle_tabs li a.disabled { + color: #999; + cursor: default; +} + +.toggle_tabs li a.disabled:hover { + text-decoration:none; +} + +.divider { + margin: 5px 0px 5px 0px; + border-bottom: 1px solid #cccccc; +} + +#content .editform { + margin: 20px auto 20px auto; + width: 600px; +} + +.editform .formrow { + clear: both; + vertical-align: top; + padding: 0px 0px 3px 0px; + line-height: 16px; +} + +.formrow label { + display: block; + width: 150px; + float: left; + text-align: right; + padding: 3px 10px 3px; +} + +.formrow label.checkbox { + font-weight: normal; + color: #000; + text-align: left; + padding: 3px 0px 3px; +} + +.formrow .formcol { + float: left; + width: 360px; + padding: 3px 0px 3px 0px; + margin: 0px; +} + +.formrow .formcol .middle { + float: left; +} + +.formrow .formcol .lock { + display: block; + float: right; + padding-left: 20px; + background: url('/images/lock.png') no-repeat 0px; +} + +.formrow textarea { + width: 200px; + height: 100px; +} + +.formrow .textinput { + margin: 0px; +} + +.formrow .shorttextinput { + width: 200px; +} + +.formrow .note { + font-size: 10px; +} Modified: public/stylesheets/Default.css =================================================================== --- public/stylesheets/Default.css 2008-02-29 16:43:08 UTC (rev 36) +++ public/stylesheets/Default.css 2008-03-03 18:02:41 UTC (rev 37) @@ -1,3 +1,6 @@ -#pagecontent #content { - padding: 30px; +.sidetextinput { + width: 120px; + margin: 0px 0px 5px 0px; + padding: 3px; + font-size: 11px; } \ No newline at end of file Modified: public/stylesheets/Message.css =================================================================== --- public/stylesheets/Message.css 2008-02-29 16:43:08 UTC (rev 36) +++ public/stylesheets/Message.css 2008-03-03 18:02:41 UTC (rev 37) @@ -1,21 +1,3 @@ -#content .tabs { padding: 20px 0 15px; border-bottom:1px solid #898989; display:block; } -.tabs .left { padding-left: 10px; float: left; } -.tabs .right { padding-right:10px;float:right; } - -.toggle_tabs { margin:0; padding:0; list-style:none; text-align:center; display: block;} -.toggle_tabs li { display: block; float:left; padding:2px 0px 3px; background:#f1f1f1; } -.toggle_tabs li a { border:1px solid #898989; border-left:0; color:#333; font-weight:bold; padding:2px 8px 3px 9px; } -.toggle_tabs li a small { font-size:11px; font-weight:normal; } -.toggle_tabs li a:focus { outline:0px; } -.toggle_tabs li.first a { border:1px solid #898989; } -.toggle_tabs li a.selected { margin-left:-1px; background:#6d84b4; border:1px solid #3b5998; border-left:1px solid #5973a9; border-right:1px solid #5973a9; color:#fff; } -.toggle_tabs li.last a.selected { margin-left:-1px; border-left:1px solid #5973a9; border-right:1px solid #36538f; } -.toggle_tabs li.first a.selected { margin:0; border-left:1px solid #36538f; border-right:1px solid #5973a9; } -.toggle_tabs li.first.last a.selected { border:1px solid #36538f; } -.toggle_tabs li a.selected:hover { text-decoration:none; } -.toggle_tabs li a.disabled { color:#999;cursor:default; } -.toggle_tabs li a.disabled:hover { text-decoration:none; } - #content .inbox_submenu { background:#f7f7f7; border-bottom:1px solid #ccc; padding: 8px 20px 28px; } .inbox_submenu .menu_block { float:left; } .inbox_submenu .menu_block.selector { padding-right:5px; } @@ -28,30 +10,3 @@ .no_messages { color:#666; font-size:13px; padding:100px 0px 110px 0px; text-align:center; } .no_messages strong { color:#333; font-weight:bold; } - -#content .messageform { - margin: 20px auto 20px auto; - width: 510px; -} - -.messageform .formrow { - vertical-align: top; - padding: 0px 0px 3px 0px; -} - -.formrow label { - display: block; - width: 90px; - float: left; - text-align: right; - padding: 3px 10px 3px; -} - -.formrow textarea { - height: 150px; -} - -.formrow .textinput { - width: 350px; -} - Added: public/stylesheets/Profile.css =================================================================== --- public/stylesheets/Profile.css (rev 0) +++ public/stylesheets/Profile.css 2008-03-03 18:02:41 UTC (rev 37) @@ -0,0 +1,3 @@ +.imselect { + margin-left: 10px; +} \ No newline at end of file Modified: public/stylesheets/User.css =================================================================== --- public/stylesheets/User.css 2008-02-29 16:43:08 UTC (rev 36) +++ public/stylesheets/User.css 2008-03-03 18:02:41 UTC (rev 37) @@ -1,25 +1,3 @@ -#content .loginform { - margin: 20px auto 20px auto; - width: 310px; +#content editform { + padding: 30px; } - -.loginform .formrow { - vertical-align: top; - padding: 0px 0px 3px 0px; -} - -.formrow label { - display: block; - width: 110px; - float: left; - padding: 3px 0px 3px 0px; -} - -.formrow .textinput { - width: 175px; -} - -.formrow .forgotpassword { - line-height: 16px; - margin: 10px 0px 10px 0px; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-03-05 18:37:33
|
Revision: 39 http://isocial.svn.sourceforge.net/isocial/?rev=39&view=rev Author: dim0s77 Date: 2008-03-05 10:37:38 -0800 (Wed, 05 Mar 2008) Log Message: ----------- added messaging basis Modified Paths: -------------- app/application_controller.php app/controllers/message_controller.php app/installers/message_installer.php app/locales/message/ru.php app/models/user.php app/views/message/inbox.tpl app/views/message/outbox.tpl app/views/message/send.tpl public/stylesheets/Message.css Added Paths: ----------- app/controllers/friend_controller.php app/installers/friend_installer.php app/models/friend.php app/models/message.php app/views/friend/ app/views/friend/show.tpl app/views/message/_rows.tpl app/views/message/send_successfully.tpl app/views/message/show.tpl public/images/new_message.gif public/images/nophoto_men_b.gif public/images/nophoto_men_sm.gif public/images/nophoto_women_b.gif public/images/nophoto_women_sm.gif public/images/x_to_hide.gif public/images/x_to_hide_hover.gif Modified: app/application_controller.php =================================================================== --- app/application_controller.php 2008-03-04 16:29:23 UTC (rev 38) +++ app/application_controller.php 2008-03-05 18:37:38 UTC (rev 39) @@ -3,15 +3,15 @@ require_once(AK_LIB_DIR.DS.'AkActionController.php'); /** -* This file is application-wide controller file. You can put all -* application-wide controller-related methods here. -* -* Add your application-wide methods in the class below, your controllers -* will inherit them. -* -* @package ActionController -* @subpackage Base -*/ + * This file is application-wide controller file. You can put all + * application-wide controller-related methods here. + * + * Add your application-wide methods in the class below, your controllers + * will inherit them. + * + * @package ActionController + * @subpackage Base + */ class ApplicationController extends AkActionController { @@ -66,9 +66,9 @@ function clearErrors ($field) { if ($field) { $this->_errors[$field] = array(); - } else { - $this->_errors = array(); - } + } else { + $this->_errors = array(); + } } function addError($field, $message, $comment) { @@ -78,15 +78,15 @@ } $this->_errors[$field][] = array( - $this->t($message), - $this->t($comment) - ); + $this->t($message), + $this->t($comment) + ); } // before ActionMailer gets imported this function will be used function sendMail ( $to, $template = '', $locals = array() ) { if (!$template) { - // http://trac.akelos.org/ticket/122 + // http://trac.akelos.org/ticket/122 // $template = strtolower($this->getControllerName()) . DS . "email" . DS . strtolower($this->getActionName()); $template = "email" . DS . strtolower($this->getActionName()); } @@ -160,11 +160,11 @@ function _fix_email ($value) { // eats last space !!! - if (preg_match('/(.*?)\s+(<?\S+@\S+>?)/', $value, $matches)) { - $name = $this->_to_base64_utf8($matches[1]); - $value = $name . " " . $matches[2]; - } - return $value; + if (preg_match('/(.*?)\s+(<?\S+@\S+>?)/', $value, $matches)) { + $name = $this->_to_base64_utf8($matches[1]); + $value = $name . " " . $matches[2]; + } + return $value; } function _to_base64_utf8 ($value) { @@ -172,17 +172,16 @@ } function _auto_complete_result ($items, $field, $phrase = '') { - // converting to an array $entries = array(); foreach ($items as $item) { - $entry = array(); - foreach ($item->getColumns() as $column => $details) { - $entry[$column] = $item->get($column); - } - $entries[] = $entry; - } - + $entry = array(); + foreach ($item->getColumns() as $column => $details) { + $entry[$column] = $item->get($column); + } + $entries[] = $entry; + } + return $this->javascript_macros_helper->auto_complete_result($entries, $field, $phrase); } Added: app/controllers/friend_controller.php =================================================================== --- app/controllers/friend_controller.php (rev 0) +++ app/controllers/friend_controller.php 2008-03-05 18:37:38 UTC (rev 39) @@ -0,0 +1,24 @@ +<?php + +class FriendController extends ApplicationController +{ + var $models = 'user, message'; + + function index () { + $this->redirectTo(array('action' => 'show')); + } + + function show () { + } + + function search () { + } + + function add () { + } + + function delete () { + } + +} +?> \ No newline at end of file Modified: app/controllers/message_controller.php =================================================================== --- app/controllers/message_controller.php 2008-03-04 16:29:23 UTC (rev 38) +++ app/controllers/message_controller.php 2008-03-05 18:37:38 UTC (rev 39) @@ -2,20 +2,87 @@ class MessageController extends ApplicationController { - //var $models = 'user, message'; + var $models = 'user'; function index () { $this->redirectTo(array('action' => 'inbox')); } function inbox () { + $messages = $this->current_user->inbox_message->load(); + $inbox_messages = array(); + if(!empty($messages)) { + foreach ($messages as $message_loop_key => $message) { + if (isset($inbox_messages[$message->thread_id])) { + if ($inbox_messages[$message->thread_id]->id < $message->id) { + $inbox_messages[$message->thread_id] = $message; + } + } else { + $inbox_messages[$message->thread_id] = $message; + } + } + } + $this->inbox_messages = $inbox_messages; } function outbox () { + $messages = $this->current_user->outbox_message->load(); + $outbox_messages = array(); + if(!empty($messages)) { + foreach ($messages as $message_loop_key => $message) { + if (isset($outbox_messages[$message->thread_id])) { + if ($outbox_messages[$message->thread_id]->id < $message->id) { + $outbox_messages[$message->thread_id] = $message; + } + } else { + $outbox_messages[$message->thread_id] = $message; + } + } + } + $this->outbox_messages = $outbox_messages; } function send () { + if (!empty($this->params['message'])){ + $recipient = $this->User->findFirst(array( 'id' => $this->params['message']['recipient'] )); + if ($recipient) { + $message = $this->current_user->outbox_message->build(); + $message->recipient->assign($recipient); + $message->setAttributes($this->params['message']); + if ($message->save()) { + if (!$message->thread_id) { + $message->thread_id = $message->getId(); + if ($message->save()) { + $this->redirectTo(array('action' => 'send_successfully')); + return; + } + } + $this->redirectTo(array('action' => 'send_successfully')); + return; + } + } + $this->addError('_common', 'Sending message error', 'please, try again'); + } } + + function send_successfully () { + } + function show () { + if (!empty($this->params['t'])){ + $thread = $this->Message->FindFirst(array( 'thread_id' => $this->params['t'] )); + $user_id = $this->current_user->getId(); + if ($thread->sender_id == $user_id || $thread->recipient_id == $user_id ) { + $this->recipient_id = $thread->sender_id == $user_id ? $thread->recipient_id : $thread->sender_id; + $this->messages = $this->Message->find('all', array('conditions' => array('thread_id' => $thread->getId()), + 'order' => 'created_at')); + $this->interlocutors[$user_id] = $this->current_user; + $this->interlocutors[$this->recipient_id] = $this->User->findFirst(array( 'id' => $this->recipient_id)); + return; + } + } + $this->addError('_common', 'Thread unavailable', 'Sorry, the contents of this thread are temporarily unavailable. Please check back later.'); + } + } ?> \ No newline at end of file Added: app/installers/friend_installer.php =================================================================== --- app/installers/friend_installer.php (rev 0) +++ app/installers/friend_installer.php 2008-03-05 18:37:38 UTC (rev 39) @@ -0,0 +1,27 @@ +<?php +class FriendInstaller extends AkInstaller +{ + function up_1() + { + $this->execute( + "CREATE TABLE `friends` ( + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT 0, + `friend_id` int(11) NOT NULL DEFAULT 0, + FOREIGN KEY (user_id) REFERENCES users(id), + FOREIGN KEY (friend_id) REFERENCES users(id), + UNIQUE forward_key (user_id, friend_id), + UNIQUE reverse_key (friend_id, user_id) + ) ENGINE=InnoDB"); + + } + + function down_1() + { + /**/ + $this->dropTable('friends'); + /**/ + } +} + +?> Modified: app/installers/message_installer.php =================================================================== --- app/installers/message_installer.php 2008-03-04 16:29:23 UTC (rev 38) +++ app/installers/message_installer.php 2008-03-05 18:37:38 UTC (rev 39) @@ -8,11 +8,13 @@ `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `sender_id` int(11) NOT NULL DEFAULT 0, `recipient_id` int(11) NOT NULL DEFAULT 0, + `thread_id` int(11) NOT NULL DEFAULT 0, `subject` char(255) NOT NULL DEFAULT '', `body` text NOT NULL DEFAULT '', `created_at` datetime NOT NULL, - `updated_at` datetime NOT NULL, - `read` tinyint(1) NOT NULL DEFAULT '0' + `is_read` tinyint(1) NOT NULL DEFAULT '0', + FOREIGN KEY (sender_id) REFERENCES users(id), + FOREIGN KEY (recipient_id) REFERENCES users(id) ) ENGINE=InnoDB"); } Modified: app/locales/message/ru.php =================================================================== --- app/locales/message/ru.php 2008-03-04 16:29:23 UTC (rev 38) +++ app/locales/message/ru.php 2008-03-05 18:37:38 UTC (rev 39) @@ -13,13 +13,19 @@ $dictionary['Send'] = 'Послать'; $dictionary['Cancel'] = 'Отмена'; $dictionary['Select'] = 'Выбрать'; -$dictionary['None'] = 'Ничего'; -$dictionary['Read'] = 'Прочтенные'; -$dictionary['Unread'] = 'Непрочтенные'; -$dictionary['All'] = 'Все'; -$dictionary['Mark as Unread'] = 'Отметить как непрочтенные'; -$dictionary['Mark as Read'] = 'Отметить как прочтенные'; +$dictionary['None'] = 'ничего'; +$dictionary['Read'] = 'прочтенные'; +$dictionary['Unread'] = 'непрочтенные'; +$dictionary['All'] = 'все'; +$dictionary['Mark as'] = 'Отметить как'; $dictionary['Delete'] = 'Удалить'; +$dictionary['Message successfully sended'] = 'Сообщение отправлено'; +$dictionary['Thread unavailable'] = 'Нить сообщений недоступна'; +$dictionary['Sorry, the contents of this thread are temporarily unavailable. Please check back later.'] = 'К сожалению, содержание этой нити сообщений временно недоступно. Повторите попытку позже.'; +$dictionary['Between'] = 'в беседе участвуют:'; +$dictionary['You'] = 'Вы'; +$dictionary['and'] = 'и'; +$dictionary['Reply'] = 'Ответ'; +$dictionary['Back to'] = 'Обратно во'; - ?> Added: app/models/friend.php =================================================================== --- app/models/friend.php (rev 0) +++ app/models/friend.php 2008-03-05 18:37:38 UTC (rev 39) @@ -0,0 +1,7 @@ +<?php + +class Friend extends ActiveRecord +{ +} + +?> \ No newline at end of file Added: app/models/message.php =================================================================== --- app/models/message.php (rev 0) +++ app/models/message.php 2008-03-05 18:37:38 UTC (rev 39) @@ -0,0 +1,10 @@ +<?php + +class Message extends ActiveRecord +{ + var $belongs_to = array('sender' => array('class_name' => 'User', 'primary_key_name' => 'sender_id'), + 'recipient' => array('class_name' => 'User', 'primary_key_name' => 'recipient_id')); + +} + +?> Modified: app/models/user.php =================================================================== --- app/models/user.php 2008-03-04 16:29:23 UTC (rev 38) +++ app/models/user.php 2008-03-05 18:37:38 UTC (rev 39) @@ -2,6 +2,10 @@ class User extends ActiveRecord { + var $has_many = array('outbox_messages' => array('class_name' => 'Message', 'order' => 'created_at desc', 'foreign_key' => 'sender_id'), + 'inbox_messages' => array('class_name' => 'Message', 'order' => 'created_at desc', 'foreign_key' => 'recipient_id'), + ); + function login($email, $password) { return $this->findFirst(array( 'email' => $email, 'password' => md5($password) )); } @@ -43,6 +47,21 @@ unset($this->password_confirmation); } + function getFriends () + { + return $this->findBySql(array( + "SELECT users.* FROM users + INNER JOIN friends + ON friends.user_id = ? AND + friends.friend_id = users.id + UNION + SELECT users.* FROM users + INNER JOIN friends + ON friends.friend_id = ? AND + friends.user_id = users.id", + $this->getId(), $this->getId())); + } + } ?> Added: app/views/friend/show.tpl =================================================================== --- app/views/friend/show.tpl (rev 0) +++ app/views/friend/show.tpl 2008-03-05 18:37:38 UTC (rev 39) @@ -0,0 +1,3 @@ +show all friends +<? $friends = $current_user->getFriends() ?> +{friends} \ No newline at end of file Added: app/views/message/_rows.tpl =================================================================== --- app/views/message/_rows.tpl (rev 0) +++ app/views/message/_rows.tpl 2008-03-05 18:37:38 UTC (rev 39) @@ -0,0 +1,33 @@ +<table class="message_row"> +<tbody> +{loop messages} +<tr><? $sender = $message->$target->load() ?> + <td class="msg_icon"> </td> + <td class="checkbox"><input onclick="" type="checkbox"></td> + <td class="profile_photo"><a href=""><img src="/images/nophoto_men_sm.gif" alt="" class=""></a></td> + <td class="name_and_datetime"> + <span class="name"><a href="">{sender.name?}</a></span> + <span class="datetime">{message.created_at?}</span> + </td> + <td class="msg"> + <div class="wrapper"> + <a href="/message/show?t={message.thread_id?}" class="subject">{message.subject?}</a> + <div class="body_wrap"> + <? (utf8_strlen($message->body) > 50) ? $msg_body = utf8_substr($message->body, 0, 50) . " [..]" : $msg_body = $message->body; ?> + <a href="/message/show?t={message.thread_id?}" class="body">{msg_body?}</a> + </div> + </div> + </td> + <td class="delete_msg"> + <a href="#" onclick=""> </a> + </td> +</tr> +{else} +<div class="no_messages">_{You currently don't have any messages}.<br><br> + <img src="/images/icons/message.gif" alt="" class=""> <a href="/message/send">_{Send Message}.</a> +</div> +{end} +</tbody> +</table> + +<div class="inbox_footer"><div class="mailbox_size">1 Message Threads</div></div> Modified: app/views/message/inbox.tpl =================================================================== --- app/views/message/inbox.tpl 2008-03-04 16:29:23 UTC (rev 38) +++ app/views/message/inbox.tpl 2008-03-05 18:37:38 UTC (rev 39) @@ -14,12 +14,15 @@ </div> <div class="menu_block"> <ul id="inbox_action" class="buttons"> - <li class="disabled"><a href="#" onclick="" id="unread">_{Mark as Unread}</a></li> - <li class="disabled"><a href="#" onclick="" id="read">_{Mark as Read}</a></li> + <li class="disabled"><a>_{Mark as}:</a></li> + <li class="disabled"><a href="#" onclick="" id="unread">_{Unread},</a></li> + <li class="disabled"><a href="#" onclick="" id="read">_{Read};</a></li> <li class="disabled"><a href="#" onclick="" id="delete">_{Delete}</a></li> </ul> </div> </div> -<div class="no_messages">_{You currently don't have any messages}.<br><br> - <img src="/images/icons/message.gif" alt="" class=""> <a href="/message/send">_{Send Message}.</a> -</div> + +<?= $controller->render(array('partial' => 'rows', + 'locals' => array('messages' => $inbox_messages, + 'target' => 'sender'))) ?> + Modified: app/views/message/outbox.tpl =================================================================== --- app/views/message/outbox.tpl 2008-03-04 16:29:23 UTC (rev 38) +++ app/views/message/outbox.tpl 2008-03-05 18:37:38 UTC (rev 39) @@ -4,7 +4,7 @@ <div class="menu_block selector"> <label for="action_select">_{Select}: <select class="" onchange="" id="action_select" name="action_selector"> - <option selected="selected" value="_">---</option> + <option selected="selected" value="_">---------</option> <option value="">_{None}</option> <option value="read">_{Read}</option> <option value="unread">_{Unread}</option> @@ -18,6 +18,8 @@ </ul> </div> </div> -<div class="no_messages">_{You currently don't have any messages}.<br><br> - <img src="/images/icons/message.gif" alt="" class=""> <a href="/message/send">_{Send Message}.</a> -</div> + +<?= $controller->render(array('partial' => 'rows', + 'locals' => array('messages' => $outbox_messages, + 'target' => 'recipient'))) ?> + Modified: app/views/message/send.tpl =================================================================== --- app/views/message/send.tpl 2008-03-04 16:29:23 UTC (rev 38) +++ app/views/message/send.tpl 2008-03-05 18:37:38 UTC (rev 39) @@ -6,7 +6,10 @@ <div class="editform"> <div class="formrow"> <label>_{To}:</label> - <?= $form_helper->text_field('message', '', array('class' => 'textinput') )?> + <?= $form_options_helper->select('message', + 'recipient', + $User->collect($current_user->getFriends(), 'name', 'id'), + array('class' => 'textinput') ); ?> </div> <div class="formrow"> <label>_{Subject}:</label> @@ -14,10 +17,10 @@ </div> <div class="formrow"> <label>_{Message}:</label> - <textarea id="message" name="message" class="textinput"></textarea> + <?= $form_helper->text_area('message', 'body', array('class' => 'textinput'))?> </div> <div class="formrow"> - <label></label> + <label><?= $form_helper->hidden_field('message', 'thread_id') ?></label> <input class="submitinput" type="submit" value="_{Send}"> <input class="cancelinput" type="button" value="_{Cancel}"> </div> Added: app/views/message/send_successfully.tpl =================================================================== --- app/views/message/send_successfully.tpl (rev 0) +++ app/views/message/send_successfully.tpl 2008-03-05 18:37:38 UTC (rev 39) @@ -0,0 +1,3 @@ +<?= $controller->renderPartial("menu") ?> + +<p>_{Message successfully sended}</p> \ No newline at end of file Added: app/views/message/show.tpl =================================================================== --- app/views/message/show.tpl (rev 0) +++ app/views/message/show.tpl 2008-03-05 18:37:38 UTC (rev 39) @@ -0,0 +1,47 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<div class="messages_thread"> + <div class="thread_head"> + <h2 class="subject">{messages-0.subject} + <div class="interlocutors">_{Between} + <a href="">_{You}</a> _{and} + <a href=""><? $recipient = $interlocutors[$recipient_id] ?>{recipient.name}</a></div> + </h2> + </div> + <hr width="600px"> +{loop messages} + <? $interlocutor = $interlocutors[$message->sender_id] ?> + <div class="message" id="msg{message_loop_counter}"> + <div class="column author_picture"><a href=""><img src="/images/nophoto_men_sm.gif" alt="" class=""></a></div> + <div class="column author_info"> + <div class="name"><a href="">{interlocutor.name?}</a></div> + <div class="date">{message.created_at?}</div> + <div class="extras"></div> + </div> + <div class="column body"> + <div class="text">{message.body?}</div> + </div> + </div> + <div class="msg_divide_btm"> </div> +{end} + + <div class="reply_container"> + <form action="/message/send" method="post"> + <div class="row"><label>_{Reply}:</label></div> + <div class="row"><?= $form_helper->text_area('message', 'body', array('class' => 'textinput'))?></div> + <input id="message_recipient" name="message[recipient]" type="hidden" value="{recipient_id}" /> + <input id="message_thread_id" name="message[thread_id]" type="hidden" value="{message.thread_id}" /> + <input id="message_subject" name="message[subject]" type="hidden" value="re: {message.subject}" /> + <div class="msg_divide_btm"> </div> + <div class="row"> + <div class="submits"> + <input class="submitinput" type="submit" value="_{Send}"> + <input class="cancelinput" type="button" value="_{Back to} _{Inbox}" onclick=""> + </div> + <div class="sub_controls"><a href="#" onclick="">_{Delete}</a></div> + </form> + </div> + +</div> Added: public/images/new_message.gif =================================================================== (Binary files differ) Property changes on: public/images/new_message.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/nophoto_men_b.gif =================================================================== (Binary files differ) Property changes on: public/images/nophoto_men_b.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/nophoto_men_sm.gif =================================================================== (Binary files differ) Property changes on: public/images/nophoto_men_sm.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/nophoto_women_b.gif =================================================================== (Binary files differ) Property changes on: public/images/nophoto_women_b.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/nophoto_women_sm.gif =================================================================== (Binary files differ) Property changes on: public/images/nophoto_women_sm.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/x_to_hide.gif =================================================================== (Binary files differ) Property changes on: public/images/x_to_hide.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/x_to_hide_hover.gif =================================================================== (Binary files differ) Property changes on: public/images/x_to_hide_hover.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: public/stylesheets/Message.css =================================================================== --- public/stylesheets/Message.css 2008-03-04 16:29:23 UTC (rev 38) +++ public/stylesheets/Message.css 2008-03-05 18:37:38 UTC (rev 39) @@ -1,12 +1,294 @@ -#content .inbox_submenu { background:#f7f7f7; border-bottom:1px solid #ccc; padding: 8px 20px 28px; } -.inbox_submenu .menu_block { float:left; } -.inbox_submenu .menu_block.selector { padding-right:5px; } -.inbox_submenu .menu_block.selector select { margin-left:5px; } -.inbox_submenu .buttons { list-style:none; margin:0px; padding:0px; } -.inbox_submenu .buttons li { float:left; } -.inbox_submenu .buttons li a { padding:4px 5px 4px 5px; display:block; } -.inbox_submenu .disabled a { color:#aaa; } -.inbox_submenu .disabled a:hover { cursor:default; text-decoration:none; } +#content .inbox_submenu { + background: #f7f7f7; + border-bottom: 1px solid #ccc; + padding: 8px 20px 28px 20px; +} -.no_messages { color:#666; font-size:13px; padding:100px 0px 110px 0px; text-align:center; } -.no_messages strong { color:#333; font-weight:bold; } +.inbox_submenu .menu_block { + float: left; +} + +.inbox_submenu .menu_block.selector { + padding-right: 5px; +} + +.inbox_submenu .menu_block.selector select { + margin-left: 5px; +} + +.inbox_submenu .buttons { + list-style: none; + margin: 0px; + padding: 0px; +} + +.inbox_submenu .buttons li { + float: left; +} + +.inbox_submenu .buttons li a { + padding: 4px 5px 4px 5px; + display: block; +} + +.inbox_submenu .disabled a { + color: #aaaaaa; +} + +.inbox_submenu .disabled a:hover { + cursor: default; + text-decoration: none; +} + +.no_messages { + color: #666666; + font-size: 13px; + padding: 100px 0px 110px 0px; + text-align: center; +} + +.no_messages strong { + color: #333333; + font-weight: bold; +} + +.message_row { + border-collapse: collapse; + width: 100%; +} + +.message_row tr td { + border-bottom: 1px solid #e1e1e1; + padding: 5px 0px 5px 0px; + vertical-align: middle; +} + +.message_row .msg_icon a, .message_row .msg_icon span { + display: block; + margin-top: 1px; + width: 17px; + height: 14px; + padding-left: 10px; + text-decoration: none; +} + +.message_row .checkbox { + width: 25px; +} + +.message_row .profile_photo { + width: 60px; + line-height: 1px; +} + +.message_row .name_and_datetime .name { + display: block; + width: 130px; + margin-right: 20px; + word-wrap: break-word; + text-overflow: ellipsis; +} + +.name_and_datetime .datetime { + display: block; + padding: 1px 0px 0px 0px; + font-size: 9px; + color: #777777; +} + +.name_and_datetime .unread_name { + font-weight: bold; +} + +.message_row .msg { + margin-right: 10px; + line-height: 14px; +} + +.message_row .msg .wrapper { + width: 350px; + padding: 2px 0px 2px 0px; + display: block; + text-overflow: ellipsis; +} + +.message_row .msg a { + margin-right: 5px; +} + +.message_row .msg .subject { + padding: 2px 0px 3px 22px; + background-position: 0px 1px 0px 1px; + background-repeat: no-repeat; +} + +.message_row .msg .body_wrap { + padding-left: 22px; +} + +.body_wrap .body { + font-weight: normal; + color: #8d9ccf; +} + +.message_row .delete_msg { + width: 24px; + padding-left: 10px; +} + +.message_row .delete_msg a { + display: block; + margin-top: 1px; + width: 13px; + height: 14px; + background: transparent url(/images/x_to_hide.gif) no-repeat; +} + +.message_row .delete_msg a:hover { + background: #3B5998 url(/images/x_to_hide_hover.gif) no-repeat; +} + +.inbox_footer { + display: block; + margin-top: -1px; + padding: 0px 10px 8px 13px; + border-top: 1px solid #cccccc; + background: #f7f7f7; + overflow: auto; +} + +.inbox_footer .mailbox_size { + float: left; + padding: 7px 0px 0px 0px; + color: #999999; +} + +.messages_thread { + padding: 20px 30px 0px 30px; +} + +.thread_head { + margin: 0px 0px 0px 10px; +} + +.thread_head h2 { + margin: 0px 20px 1px 153px; + padding: 0px 0px 0px 22px; + font-size: 15px; + color: #333333; +} + +.thread_head h2 .interlocutors { + font-size: 11px; + font-weight: normal; +} + +.message { + display: block; + margin-top: 10px; + overflow: hidden; +} + +.message .column { + float: left; + padding: 0px 0px 10px 0px; +} + +.message .author_picture { + width: 50px; + padding-bottom: 0px; +} + +.message .author_picture img { + display: block; +} + +.message .author_info { + width: 120px; + padding: 0px 10px 0px 0px; + font-weight: normal; + font-size: 9px; + text-align: right; +} + +.message .author_info .name { + padding: 3px 5px 0px 5px; + font-size: 11px; + font-weight: bold; + overflow: hidden; +} + +.message.unread .author_info .name { + padding: 3px 5px 4px 20px; + background: #eff2f7 url('/inbox/images/new_message.gif') no-repeat 7px 5px; + border-top: 1px solid #d8dfea; + overflow: hidden; +} + +.message .author_info .date { + display: block; + padding: 2px 5px 2px 0px; + color: #777777; +} + +.message .author_info .extras a { + float: right; + padding-right: 5px; + margin-bottom: 1px; +} + +.message .body { + padding: 3px 0px 14px 5px; +} + +.message.unread .body { + padding-top: 4px; +} + +.message .body .text { + width: 300px; + word-wrap: break-word; +} + +.message .body .text.no_body { + color: #777777; +} + +.msg_divide_btm { + height: 1px; + margin: 1px 0px 0px 185px; + background: #dddddd; + overflow: hidden; +} + +.reply_container { + margin: 10px 0px 15px 0px; + border: 0px; + background: #ffffff; + overflow: auto; +} + +.reply_container .row { + display: block; + padding: 5px 0px 0px 185px; + margin-right: 20px; + clear: both; +} + +.row textarea { + height: 100px; + width: 355px; + padding: 5px 0px 15px 3px; + font-size: 11px; + overflow: hidden; +} + +.row .submits { + float: left; +} + +.row .sub_controls { + padding-top: 11px; + font-size: 9px; + float: right; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-09 17:38:29
|
Revision: 54 http://isocial.svn.sourceforge.net/isocial/?rev=54&view=rev Author: aguidrevitch Date: 2008-03-09 10:38:17 -0700 (Sun, 09 Mar 2008) Log Message: ----------- link to events application added Modified Paths: -------------- app/locales/layout/en.php app/locales/layout/ru.php app/views/shared/loggedin/compiled/sidebar.tpl.php app/views/shared/loggedin/sidebar.tpl public/stylesheets/Application.css Added Paths: ----------- public/images/calendar.png Modified: app/locales/layout/en.php =================================================================== --- app/locales/layout/en.php 2008-03-09 16:40:08 UTC (rev 53) +++ app/locales/layout/en.php 2008-03-09 17:38:17 UTC (rev 54) @@ -19,5 +19,6 @@ $dictionary['PhotoApp'] = 'Photos'; $dictionary['GroupApp'] = 'Groups'; +$dictionary['EventApp'] = 'Events'; ?> Modified: app/locales/layout/ru.php =================================================================== --- app/locales/layout/ru.php 2008-03-09 16:40:08 UTC (rev 53) +++ app/locales/layout/ru.php 2008-03-09 17:38:17 UTC (rev 54) @@ -26,5 +26,6 @@ $dictionary['PhotoApp'] = 'Фото'; $dictionary['GroupApp'] = 'Группы'; +$dictionary['EventApp'] = 'События'; ?> Modified: app/views/shared/loggedin/compiled/sidebar.tpl.php =================================================================== --- app/views/shared/loggedin/compiled/sidebar.tpl.php 2008-03-09 16:40:08 UTC (rev 53) +++ app/views/shared/loggedin/compiled/sidebar.tpl.php 2008-03-09 17:38:17 UTC (rev 54) @@ -13,5 +13,6 @@ </div> <div id="applications"> <a href="/photo" class="photoapp"><?php echo $text_helper->translate('PhotoApp', array()); ?></a> - <a href="/groups" class="groupsapp"><?php echo $text_helper->translate('GroupApp', array()); ?></a> + <a href="/group" class="groupapp"><?php echo $text_helper->translate('GroupApp', array()); ?></a> + <a href="/event" class="eventapp"><?php echo $text_helper->translate('EventApp', array()); ?></a> </div> \ No newline at end of file Modified: app/views/shared/loggedin/sidebar.tpl =================================================================== --- app/views/shared/loggedin/sidebar.tpl 2008-03-09 16:40:08 UTC (rev 53) +++ app/views/shared/loggedin/sidebar.tpl 2008-03-09 17:38:17 UTC (rev 54) @@ -13,5 +13,6 @@ </div> <div id="applications"> <a href="/photo" class="photoapp">_{PhotoApp}</a> - <a href="/groups" class="groupsapp">_{GroupApp}</a> + <a href="/group" class="groupapp">_{GroupApp}</a> + <a href="/event" class="eventapp">_{EventApp}</a> </div> \ No newline at end of file Added: public/images/calendar.png =================================================================== (Binary files differ) Property changes on: public/images/calendar.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-03-09 16:40:08 UTC (rev 53) +++ public/stylesheets/Application.css 2008-03-09 17:38:17 UTC (rev 54) @@ -273,10 +273,14 @@ background: url('/images/photo.png') no-repeat 0px; } -.groupsapp { +.groupapp { background: url('/images/group.png') no-repeat 0px; } +.eventapp { + background: url('/images/calendar.png') no-repeat 0px; +} + .linksarea a { padding: 2px 5px 2px 5px; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-03-20 17:56:55
|
Revision: 107 http://isocial.svn.sourceforge.net/isocial/?rev=107&view=rev Author: dim0s77 Date: 2008-03-20 10:57:00 -0700 (Thu, 20 Mar 2008) Log Message: ----------- added application groupapp with view 'my groups' Modified Paths: -------------- app/installers/russian_installer.php app/installers/user_installer.php app/views/layouts/application.tpl app/views/shared/loggedin/sidebar.tpl config/routes.php Added Paths: ----------- app/controllers/groupapp/ app/controllers/groupapp/group_controller.php app/installers/groupapp/ app/installers/groupapp/group_installer.php app/installers/groupapp/russian_installer.php app/locales/groupapp/ app/locales/groupapp/group/ app/locales/groupapp/group/en.php app/locales/groupapp/group/ru.php app/models/groupapp_group.php app/models/groupapp_group_type.php app/views/groupapp/ public/stylesheets/groupapp/ public/stylesheets/groupapp/Group.css Added: app/controllers/groupapp/group_controller.php =================================================================== --- app/controllers/groupapp/group_controller.php (rev 0) +++ app/controllers/groupapp/group_controller.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,25 @@ +<?php + +class Groupapp_GroupController extends ApplicationController +{ + var $models = array('GroupappGroup', 'GroupappGroupType'); + + function index () { + $this->group_types = $this->GroupappGroupType->find('all', array('conditions' => array("parent_id = 0"))); + } + + function create () { + } + + function browse () { + } + + function popular () { + } + + function help () { + } + +} + +?> Added: app/installers/groupapp/group_installer.php =================================================================== --- app/installers/groupapp/group_installer.php (rev 0) +++ app/installers/groupapp/group_installer.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,46 @@ +<?php +class GroupInstaller extends AkInstaller +{ + var $module = 'groupapp'; + + function up_1() + { + $this->execute( + "CREATE TABLE `groupapp_group_types` ( + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `parent_id` int(11) NOT NULL DEFAULT '0', + `en_name` char(100) NOT NULL DEFAULT '' + ) ENGINE=InnoDB"); + + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (1, 0, 'Business')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (2, 0, 'Common Interest')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (3, 0, 'Entertainment & Arts')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (4, 0, 'Geography')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (5, 0, 'Internet & Technology')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (6, 0, 'Just for Fun')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (7, 0, 'Music')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (8, 0, 'Organizations')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (9, 0, 'Sponsored')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (10, 0, 'Sports & Recreation')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (11, 0, 'Student Group')"); + + $this->execute( + "CREATE TABLE `groupapp_groups` ( + `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, + `group_id` int(11) NOT NULL DEFAULT '0', + `en_name` char(100) NOT NULL DEFAULT '', + `en_desc` char(255) NOT NULL DEFAULT '', + FOREIGN KEY (group_id) REFERENCES groupapp_group_types(id), + INDEX group_idx (group_id) + ) ENGINE=InnoDB"); + + } + + function down_1() + { + $this->dropTable('groupapp_groups'); + $this->dropTable('groupapp_group_types'); + } +} + +?> Added: app/installers/groupapp/russian_installer.php =================================================================== --- app/installers/groupapp/russian_installer.php (rev 0) +++ app/installers/groupapp/russian_installer.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,28 @@ +<?php +class RussianInstaller extends AkInstaller +{ + + function up_1() + { + $locale = 'ru'; + $this->execute("ALTER TABLE groupapp_group_types ADD COLUMN {$locale}_name char(100) NOT NULL AFTER en_name"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Бизнес' WHERE id = 1"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Клубы по интересам' WHERE id = 2"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Искусство' WHERE id = 3"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='География' WHERE id = 4"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Интернет' WHERE id = 5"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Развлечения' WHERE id = 6"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Музыка' WHERE id = 7"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Организации' WHERE id = 8"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Спонсорство' WHERE id = 9"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Отдых и Спорт' WHERE id = 10"); + $this->execute("UPDATE groupapp_group_types set {$locale}_name ='Студенческие группы' WHERE id = 11"); + + } + + function down_1() + { + } +} + +?> Modified: app/installers/russian_installer.php =================================================================== --- app/installers/russian_installer.php 2008-03-20 17:14:10 UTC (rev 106) +++ app/installers/russian_installer.php 2008-03-20 17:57:00 UTC (rev 107) @@ -18,18 +18,6 @@ $this->execute("UPDATE political_views set {$locale}_name ='Безразличные' WHERE id = 6"); $this->execute("UPDATE political_views set {$locale}_name ='Философские' WHERE id = 7"); - $this->execute("ALTER TABLE group_types ADD COLUMN {$locale}_name char(22) NOT NULL AFTER en_name"); - $this->execute("UPDATE group_types set {$locale}_name ='Бизнес' WHERE id = 1"); - $this->execute("UPDATE group_types set {$locale}_name ='Клубы по интересам' WHERE id = 2"); - $this->execute("UPDATE group_types set {$locale}_name ='Искусство' WHERE id = 3"); - $this->execute("UPDATE group_types set {$locale}_name ='География' WHERE id = 4"); - $this->execute("UPDATE group_types set {$locale}_name ='Интернет' WHERE id = 5"); - $this->execute("UPDATE group_types set {$locale}_name ='Развлечения' WHERE id = 6"); - $this->execute("UPDATE group_types set {$locale}_name ='Музыка' WHERE id = 7"); - $this->execute("UPDATE group_types set {$locale}_name ='Организации' WHERE id = 8"); - $this->execute("UPDATE group_types set {$locale}_name ='Отдых и Спорт' WHERE id = 9"); - $this->execute("UPDATE group_types set {$locale}_name ='Студенческие группы' WHERE id = 10"); - } function down_1() Modified: app/installers/user_installer.php =================================================================== --- app/installers/user_installer.php 2008-03-20 17:14:10 UTC (rev 106) +++ app/installers/user_installer.php 2008-03-20 17:57:00 UTC (rev 107) @@ -225,7 +225,7 @@ ) ENGINE=InnoDB"); $this->execute( - "CREATE TABLE `group_types` ( + "CREATE TABLE `groupapp_group_types` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT '0', `en_name` char(100) NOT NULL DEFAULT '' @@ -243,7 +243,7 @@ $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (10, 0, 'Student Group')"); $this->execute( - "CREATE TABLE `groups` ( + "CREATE TABLE `groupapp_groups` `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `group_id` int(11) NOT NULL DEFAULT '0', `en_name` char(100) NOT NULL DEFAULT '', @@ -256,8 +256,8 @@ function down_1() { - $this->dropTable('group_types'); - $this->dropTable('groups'); + $this->dropTable('groupapp_group_types'); + $this->dropTable('groupapp_groups'); $this->dropTable('contact_profiles'); $this->dropTable('im_profiles'); $this->dropTable('ims'); Added: app/locales/groupapp/group/en.php =================================================================== --- app/locales/groupapp/group/en.php (rev 0) +++ app/locales/groupapp/group/en.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,7 @@ +<?php + +// File created on: 2008-03-20 10:58:51 + +$dictionary = array(); + +?> Added: app/locales/groupapp/group/ru.php =================================================================== --- app/locales/groupapp/group/ru.php (rev 0) +++ app/locales/groupapp/group/ru.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,20 @@ +<?php + +// File created on: 2008-03-20 10:58:51 + +$dictionary = array(); +$dictionary['Groups'] = 'Группы'; +$dictionary['My Groups'] = 'Мои группы'; +$dictionary['Browse Groups'] = 'Поиск групп'; +$dictionary['Popular Groups'] = 'Популярные группы'; +$dictionary['Try'] = 'Попробуйте'; +$dictionary['You have not joined any groups'] = 'Вы не присоединены ни к каким группам'; +$dictionary['browsing groups'] = 'поискать группы'; +$dictionary['Create a New Group'] = 'Создать новую группу'; +$dictionary['Create Group'] = 'Создать группу'; +$dictionary['Start a New Group'] = 'Начать новую группу'; +$dictionary['Find a Group'] = 'Найти группу'; +$dictionary['Search Groups'] = 'Поиск групп'; +$dictionary['Can\'t find the Group you\'re looking for? Start your own...'] = 'Не можете найти группу, которая вам нужна? Начните свою собственную...'; + +?> Added: app/models/groupapp_group.php =================================================================== --- app/models/groupapp_group.php (rev 0) +++ app/models/groupapp_group.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,7 @@ +<?php + +class GroupappGroup extends ActiveRecord +{ +} + +?> Added: app/models/groupapp_group_type.php =================================================================== --- app/models/groupapp_group_type.php (rev 0) +++ app/models/groupapp_group_type.php 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,7 @@ +<?php + +class GroupappGroupType extends ActiveRecord +{ +} + +?> Modified: app/views/layouts/application.tpl =================================================================== --- app/views/layouts/application.tpl 2008-03-20 17:14:10 UTC (rev 106) +++ app/views/layouts/application.tpl 2008-03-20 17:57:00 UTC (rev 107) @@ -6,7 +6,7 @@ <link href="/stylesheets/autocomplete.css" rel="stylesheet" type="text/css"> <link href="/stylesheets/dialog.css" rel="stylesheet" type="text/css"> <link href="/stylesheets/Application.css" rel="stylesheet" type="text/css"> -<link href="/stylesheets/<?= $controller->getControllerName() ?>.css" rel="stylesheet" type="text/css"> +<link href="/stylesheets/<?= $controller->getModuleName() ? $controller->getModuleName() . '/' . $controller->getControllerName() : $controller->getControllerName() ?>.css" rel="stylesheet" type="text/css"> <script src="/javascripts/prototype.js" type="text/javascript"></script> <script src="/javascripts/scriptaculous.js?load=effects,controls,autocomplete" type="text/javascript"></script> <script src="/javascripts/autocomplete.js" type="text/javascript"></script> Modified: app/views/shared/loggedin/sidebar.tpl =================================================================== --- app/views/shared/loggedin/sidebar.tpl 2008-03-20 17:14:10 UTC (rev 106) +++ app/views/shared/loggedin/sidebar.tpl 2008-03-20 17:57:00 UTC (rev 107) @@ -13,6 +13,6 @@ </div> <div id="applications"> <a href="/photo" class="photoapp">_{PhotoApp}</a> - <a href="/group" class="groupapp">_{GroupApp}</a> + <a href="/groupapp" class="groupapp">_{GroupApp}</a> <a href="/event" class="eventapp">_{EventApp}</a> </div> \ No newline at end of file Modified: config/routes.php =================================================================== --- config/routes.php 2008-03-20 17:14:10 UTC (rev 106) +++ config/routes.php 2008-03-20 17:57:00 UTC (rev 107) @@ -1,8 +1,9 @@ -<?php - +<?php + // 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('/:controller/:action/:id', array('controller' => 'default', 'action' => 'index')); $Map->connect('/:controller/:action/:from/:id', array('controller' => 'message', 'action' => 'show')); Added: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css (rev 0) +++ public/stylesheets/groupapp/Group.css 2008-03-20 17:57:00 UTC (rev 107) @@ -0,0 +1,100 @@ +.title_bar { + padding: 0px 12px 5px 20px; + background-color: #ffffff; + float: left; +} + +.title_bar .avatar { + float: left; + margin: 10px 10px 0px 0px; + overflow: hidden; + z-index: 1; + height: 50px; + width: 50px; + position: relative; +} + +.title_bar .avatar img{ + display: block; +} + +.title_bar .info { + float: left; + padding: 10px 0px 0px 0px; + width: 550px; +} + +.title_bar .info .header { + float: left; + background: #f7f7f7; + z-index: 0; + border-bottom: solid 1px #cccccc; + margin: -10px 0px 7px -80px; + padding: 10px 0px 0px 80px; + width: 565px; +} + +.title_bar .info .header .name { + float: left; + font-weight: bold; + font-size: 14px; + padding: 7px 0px 7px 22px; +} + +.title_bar .info .subheader { +} + +.nogroups { + font-size: 12px; + text-align: center; + margin: 10px 20px 10px 20px; + padding: 50px 10px 50px 10px; + color: gray; + background: #f7f7f7; + border: solid 1px #dddddd; +} + +.actions { + float: left; +} + +.actions #group_start { + float: left; + width: 200px; + padding: 10px 20px 10px 20px; + text-align: left; +} + +#group_start p { + padding: 11px 0px 11px 0px; + font-size: 11px; +} + +.actions #group_find { + float: left; + width: 360px; + padding: 10px 0px 10px 20px; + text-align: center; +} + +#group_start h4, #group_find h4 { + font-size: 11px; +} + +#group_type { + margin: 10px 0px 10px 0px; +} + +#group_type td { + padding: 4px 16px 4px 0px; + text-align: left; +} + +.query_field { + float: left; +} + +.query_button { + margin: 4px 0px 0px 5px; + float: left; +} \ 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: <agu...@us...> - 2008-03-27 07:36:57
|
Revision: 114 http://isocial.svn.sourceforge.net/isocial/?rev=114&view=rev Author: aguidrevitch Date: 2008-03-27 00:37:01 -0700 (Thu, 27 Mar 2008) Log Message: ----------- new city javascript dialog added Modified Paths: -------------- app/application_controller.php app/controllers/profile_controller.php app/helpers/city_helper.php app/installers/user_installer.php app/models/city.php app/shared_model.php app/views/message/inbox.tpl app/views/message/outbox.tpl app/views/message/show.tpl app/views/profile/basic.tpl public/javascripts/dialog.js public/stylesheets/Application.css public/stylesheets/dialog.css Added Paths: ----------- app/controllers/city_controller.php app/locales/city/ app/locales/city/en.php app/locales/city/ru.php app/models/region.php app/views/city/ app/views/city/_regions.tpl app/views/city/add.tpl app/views/shared/new_city_dialog.tpl Modified: app/application_controller.php =================================================================== --- app/application_controller.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/application_controller.php 2008-03-27 07:37:01 UTC (rev 114) @@ -20,7 +20,7 @@ var $_errors = array(); - var $app_models = array('User', 'Message'); + var $app_models = array('User', 'Message', 'Country', 'Region', 'City'); var $app_helpers = array('AutoComplete', 'City'); var $current_user; @@ -32,6 +32,12 @@ $controller->Response->body = str_replace('PROJECT_NAME', PROJECT_NAME, $controller->Response->body); } + /* disabling object auto-loading */ + function instantiateModelClass($model_class_name, $finder_options = array()) { + $finder_options = empty($finder_options) ? false : $finder_options; + return parent::instantiateModelClass($model_class_name, $finder_options); + } + function beforeAction ( $method = '' ) { $this->_validateLoginStatus(); } @@ -70,7 +76,7 @@ foreach ($errors as $field => $messages) { $this->clearErrors($field); foreach ($messages as $message) { - list($message, $comment) = explode("|", $message); + @list($message, $comment) = explode("|", $message); $this->addError($field, $message, $comment); } } @@ -184,52 +190,6 @@ return "=?utf-8?B?" . base64_encode($value) . "?="; } - function _get_conditions_for_city( $to_ascii = true) { - $query = $this->params['city']; - $aquery = utf8_to_ascii($query); - if ($to_ascii && $aquery != $query) { - $conditions = array( - 'name LIKE ? OR name LIKE ?', $query . '%', $aquery . '%' - ); - } else { - $conditions = array( - 'name LIKE ?', $query . '%' - ); - } - return $conditions; - } - - function auto_complete_for_city () { - if (empty($this->params['city'])) { - $this->renderNothing(); - } else { - $entries = $this->City->find('all', - array( - 'conditions' => $this->_get_conditions_for_city(), - 'include' => 'country', - 'limit' => 10, - 'order' => 'name' - ) - ); - - $this->renderText(empty($entries) ? ' ' : $this->city_helper->auto_complete_result($entries, $this->params['city'])); - } - } - - function get_id_for_city () { - if (empty($this->params['city'])) { - $this->renderNothing(); - } else { - $entry = $this->City->findFirst( - array( - 'conditions' => $this->_get_conditions_for_city(false), - ) - ); - - $this->renderText(empty($entry) ? ' ' : $entry->toJson()); - } - } - function unread_messages_count () { return $this->current_user ? $this->Message->unread_messages_count($this->current_user->getId()) : 0; } Added: app/controllers/city_controller.php =================================================================== --- app/controllers/city_controller.php (rev 0) +++ app/controllers/city_controller.php 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,72 @@ +<?php + +class CityController extends ApplicationController +{ + var $layout = 'empty'; + + function add () { + if ($this->Request->isPost() && !empty($this->params['city'])) { + $this->City->setAttributes($this->params['city']); + if ($this->City->voteOrCreate($this->current_user)) { + $this->renderText( $this->City->toJSON() ); + return; + } + } + $this->importErrors( $this->City->getErrors() ); + } + + function get_regions () { + if (!empty($this->params['city']['country_id'])) { + $this->regions = $this->Region->findBy('country_id', $this->params['city']['country_id']); + } + empty($this->regions) ? $this->renderNothing() : $this->renderPartial('regions'); + } + + function _get_conditions_for_city( $to_ascii = true) { + $query = $this->params['city']; + $aquery = utf8_to_ascii($query); + if ($to_ascii && $aquery != $query) { + $conditions = array( + 'name LIKE ? OR name LIKE ?', $query . '%', $aquery . '%' + ); + } else { + $conditions = array( + 'name LIKE ?', $query . '%' + ); + } + return $conditions; + } + + function auto_complete_for_city () { + if (empty($this->params['city'])) { + $this->renderNothing(); + } else { + $entries = $this->City->find('all', + array( + 'conditions' => $this->_get_conditions_for_city(), + 'include' => 'country', + 'limit' => 10, + 'order' => 'name' + ) + ); + + $this->renderText(empty($entries) ? ' ' : $this->city_helper->auto_complete_result($entries, $this->params['city'])); + } + } + + function get_id_for_city () { + if (empty($this->params['city'])) { + $this->renderNothing(); + } else { + $entry = $this->City->findFirst( + array( + 'conditions' => $this->_get_conditions_for_city(false), + ) + ); + + $this->renderText(empty($entry) ? ' ' : $entry->toJson()); + } + } +} + +?> \ No newline at end of file Modified: app/controllers/profile_controller.php =================================================================== --- app/controllers/profile_controller.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/controllers/profile_controller.php 2008-03-27 07:37:01 UTC (rev 114) @@ -17,17 +17,17 @@ $this->basic_profile = $this->current_user->basic_profile->load(); if ($this->Request->isPost() && !empty($this->params['basic_profile'])) { - $this->basic_profile->setAttributes($this->params['basic_profile']); - if (!empty($this->params['basic_profile']['religious_view_id'])) { - $religious_view = $this->ReligiousView->voteOrCreate($this->params['basic_profile']['religious_view_id'], - $this->current_user); - $this->basic_profile->religious_view->assign($religious_view); - } + $this->basic_profile->setAttributes($this->params['basic_profile']); + 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); + } if ($this->basic_profile->save()) { - $this->redirectTo(array('action' => 'basic')); + $this->redirectTo(array('action' => 'basic')); + } } - } } function auto_complete_for_basic_profile_religious_view_id () { Modified: app/helpers/city_helper.php =================================================================== --- app/helpers/city_helper.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/helpers/city_helper.php 2008-03-27 07:37:01 UTC (rev 114) @@ -42,7 +42,7 @@ ), $tag_options); $completion_options = array_merge(array( 'skip_style' => true, - 'url' => array('action' => 'auto_complete_for_city'), + 'url' => array('controller' => 'city', 'action' => 'auto_complete_for_city'), 'frequency' => 0.4, 'indicator' => "'auto_{$object}_{$method}'", 'afterUpdateElement' => "function (text, li) { \$('{$object}_{$method}').value = li.id; \$('{$object}_{$method}_prev').value = text.value; }" Modified: app/installers/user_installer.php =================================================================== --- app/installers/user_installer.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/installers/user_installer.php 2008-03-27 07:37:01 UTC (rev 114) @@ -96,6 +96,20 @@ ) ENGINE=InnoDB"); $this->execute( + "CREATE TRIGGER c_insert AFTER INSERT ON city_votes + FOR EACH ROW BEGIN + UPDATE `cities` SET votes = votes + 1 WHERE id = NEW.city_id; + END; + "); + + $this->execute( + "CREATE TRIGGER c_delete AFTER DELETE ON city_votes + FOR EACH ROW BEGIN + UPDATE `cities` SET votes = votes - 1 WHERE id = NEW.city_id; + END; + "); + + $this->execute( "CREATE TABLE `sexes` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `en_name` char(6) @@ -231,19 +245,19 @@ `en_name` char(100) NOT NULL DEFAULT '' ) ENGINE=InnoDB"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (1, 0, 'Business')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (2, 0, 'Common Interest')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (3, 0, 'Entertainment & Arts')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (4, 0, 'Geography')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (5, 0, 'Internet & Technology')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (6, 0, 'Just for Fun')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (7, 0, 'Music')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (8, 0, 'Organizations')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (9, 0, 'Sports & Recreation')"); - $this->execute("INSERT INTO `group_types` (id, parent_id, en_name) VALUES (10, 0, 'Student Group')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (1, 0, 'Business')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (2, 0, 'Common Interest')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (3, 0, 'Entertainment & Arts')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (4, 0, 'Geography')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (5, 0, 'Internet & Technology')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (6, 0, 'Just for Fun')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (7, 0, 'Music')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (8, 0, 'Organizations')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (9, 0, 'Sports & Recreation')"); + $this->execute("INSERT INTO `groupapp_group_types` (id, parent_id, en_name) VALUES (10, 0, 'Student Group')"); $this->execute( - "CREATE TABLE `groupapp_groups` + "CREATE TABLE `groupapp_groups` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `group_id` int(11) NOT NULL DEFAULT '0', `en_name` char(100) NOT NULL DEFAULT '', Added: app/locales/city/en.php =================================================================== --- app/locales/city/en.php (rev 0) +++ app/locales/city/en.php 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,7 @@ +<?php + +// File created on: 2008-02-16 20:34:04 + +$dictionary = array(); + +?> Added: app/locales/city/ru.php =================================================================== --- app/locales/city/ru.php (rev 0) +++ app/locales/city/ru.php 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,17 @@ +<?php + +// File created on: 2008-02-16 20:34:04 + +$dictionary = array(); + +$dictionary['City Name'] = 'Название'; +$dictionary['Country'] = 'Страна'; +$dictionary['Region'] = 'Область'; +$dictionary['country can\'t be blank'] = 'поле не может быть пустым'; +$dictionary['region can\'t be blank'] = 'поле не может быть пустым'; +$dictionary['country does not exist'] = 'такой страны не существует'; +$dictionary['region does not exist'] = 'такого региона не существует'; +$dictionary['Country: hack attempt detected'] = 'Страна: обнаружена попытка взлома'; +$dictionary['Region: hack attempt detected'] = 'Region: обнаружена попытка взлома'; + +?> Modified: app/models/city.php =================================================================== --- app/models/city.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/models/city.php 2008-03-27 07:37:01 UTC (rev 114) @@ -2,8 +2,29 @@ class City extends VotableActiveRecord { - var $belongs_to = array('Country'); - var $votes_model = 'CityViewVote'; + var $belongs_to = array('Country', 'Region'); + var $votes_model = 'CityVote'; + + function findConditions () { + return array('conditions' => array("country_id = ? AND region_id = ? AND name LIKE ?", $this->country_id, $this->region_id, $this->name)); + } + + function validateOnCreate () { + $this->validatesPresenceOf('country_id', "Country|country can't be blank"); + $this->validatesPresenceOf('region_id', "Region|region can't be blank"); + if (!$this->getErrors()) { + $this->validatesNumericalityOf('country_id', "Country: hack attempt detected|country does not exist"); + $this->validatesNumericalityOf('region_id', "Region: hack attempt detected|region does not exist"); + if (!$this->getErrors()) { + $Region = new Region(); + $region = $Region->find( $this->region_id ); + if (empty($region) || $region->country_id != $this->country_id) { + $this->addError('region_id', "Region: hack attempt detected|region does not exist"); + } + } + } + } + } class CityVote extends ActiveRecord Added: app/models/region.php =================================================================== --- app/models/region.php (rev 0) +++ app/models/region.php 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,7 @@ +<?php + +class Region extends ActiveRecord +{ +} + +?> Modified: app/shared_model.php =================================================================== --- app/shared_model.php 2008-03-26 18:20:31 UTC (rev 113) +++ app/shared_model.php 2008-03-27 07:37:01 UTC (rev 114) @@ -14,6 +14,16 @@ */ class ActiveRecord extends AkActiveRecord { + function collect(&$source_array, $key_index, $value_index) + { + $resulting_array = array(); + if(!empty($source_array) && is_array($source_array)) { + foreach ($source_array as $source_item){ + $resulting_array[$source_item->get($key_index, false)] = $source_item->get($value_index, false); + } + } + return $resulting_array; + } function _make_in_statement_from_array ($column_name, $values) { $options = array(); @@ -31,60 +41,72 @@ var $min_votes_to_appear = 2; var $strtolower = true; var $ucfirst = true; + + function findConditions () { + return array('conditions' => array("name LIKE ?", $this->name)); + } - function &voteOrCreate ($value, $user) { - + function voteOrCreate ($user) { if ($this->votes_model) { @include_once(AkInflector::toModelFilename($this->votes_model)); - } + } - $this->votes_object = new $this->votes_model(); + $this->votes_object = new $this->votes_model(); - $record = $this->findFirst(array('conditions' => array("name LIKE ?", $value))); - if (empty($record)) { + if ($this->isValid()) { - if ($this->strtolower) { - $value = utf8_strtolower($value); - } + $object = $this->find('first', $this->findConditions() ); + if (empty($object)) { + + if ($this->strtolower) { + $this->name = utf8_strtolower($this->name); + } - if ($this->ucfirst) { - $value = utf8_ucfirst($value); - } - - $this->name = $value; - $this->save(); - $record =& $this; - } + if ($this->ucfirst) { + $this->name = utf8_ucfirst($this->name); + } - if ($record->votes < $this->min_votes_to_appear) { + if(!$this->isValid()){ + $this->transactionFail(); + return false; + } + $this->save(); + } else { + $this->setAttributes($object->getAttributes(), true); + } - $vote = $this->votes_object->findFirst( - array('conditions' => - array('user_id = ? and ' . $this->votes_object->primary_key_name . ' = ?', $user->getId(), $record->getId()) - ) - ); + if ($this->votes < $this->min_votes_to_appear) { + + $vote = $this->votes_object->findFirst( + array('conditions' => + array('user_id = ? and ' . $this->votes_object->primary_key_name . ' = ?', $user->getId(), $this->getId()) + ) + ); - if (empty($vote)) { - $this->votes_object->setAttributes(array( - 'user_id' => $user->getId(), - $this->votes_object->primary_key_name => $record->getId() - )); + if (empty($vote)) { + $this->votes_object->setAttributes(array( + 'user_id' => $user->getId(), + $this->votes_object->primary_key_name => $this->getId() + )); - if ($this->votes_object->save()) { - $record->reload(); - } - } - } - return $record; + if ($this->votes_object->save()) { + $this->reload(); + } + } + } + return $this; + } else { + return false; + } } - + function &findVoted ($value) { - $records = $this->find('all', - array('conditions' => - array('name LIKE ? AND votes >= ' . $this->min_votes_to_appear, '%'. $value . '%') - ) - ); - return $records; + $objects = $this->find('all', + array('conditions' => + array('name LIKE ? AND votes >= ' . $this->min_votes_to_appear, '%'. $value . '%') + ) + ); + return $objects; } } Added: app/views/city/_regions.tpl =================================================================== --- app/views/city/_regions.tpl (rev 0) +++ app/views/city/_regions.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,2 @@ +<label class="shortlabel">_{Region}</label> +<?= $form_options_helper->select('city', 'region_id', $Region->collect($regions, 'name', 'id')) ?> Added: app/views/city/add.tpl =================================================================== --- app/views/city/add.tpl (rev 0) +++ app/views/city/add.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1 @@ +<?= $controller->renderErrors() ?> Modified: app/views/message/inbox.tpl =================================================================== --- app/views/message/inbox.tpl 2008-03-26 18:20:31 UTC (rev 113) +++ app/views/message/inbox.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -90,12 +90,12 @@ } function delete_threads (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: element, - title: '_{Delete Threads}', - body: '_{Are you sure you want to delete selected threads}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + 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', @@ -113,12 +113,12 @@ } function delete_single_thread (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: element, - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + 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', Modified: app/views/message/outbox.tpl =================================================================== --- app/views/message/outbox.tpl 2008-03-26 18:20:31 UTC (rev 113) +++ app/views/message/outbox.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -57,12 +57,12 @@ }; function delete_threads (element) { - new Dialog.Box({ + 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}', + 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', @@ -80,11 +80,11 @@ } function delete_single_thread (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: Element.extend(element), - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', + title: '_{Delete Thread}', + body: '_{Are you sure you want to delete this thread}?', + yes: '_{Delete}', cancel: '_{Cancel}', onYes : function () { new Ajax.Updater('messages', Modified: app/views/message/show.tpl =================================================================== --- app/views/message/show.tpl 2008-03-26 18:20:31 UTC (rev 113) +++ app/views/message/show.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -28,12 +28,12 @@ <script> function delete_single_thread (element) { - new Dialog.Box({ + new Dialog.Box('dlg', { reference: element, - title: '_{Delete Thread}', - body: '_{Are you sure you want to delete this thread}?', - yes: '_{Delete}', - cancel: '_{Cancel}', + 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', Modified: app/views/profile/basic.tpl =================================================================== --- app/views/profile/basic.tpl 2008-03-26 18:20:31 UTC (rev 113) +++ app/views/profile/basic.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -16,6 +16,7 @@ <div class="formrow"> <label>_{Hometown}:</label> <?= $city_helper->city_field('basic_profile', 'city_id', array('class' => 'textinput autocomplete')); ?> + <input class="submitinput" style="margin: 0px;" type="button" value="_{Not Listed}?" onclick="new_city_dialog(this, 'basic_profile_city_id', 'auto_basic_profile_city_id')"> </div> <div class="formrow"> <label>_{Political views}:</label> @@ -33,3 +34,5 @@ </div> </div> </form> + +<?= $controller->renderShared('new_city_dialog') ?> \ No newline at end of file Added: app/views/shared/new_city_dialog.tpl =================================================================== --- app/views/shared/new_city_dialog.tpl (rev 0) +++ app/views/shared/new_city_dialog.tpl 2008-03-27 07:37:01 UTC (rev 114) @@ -0,0 +1,87 @@ +<script type="text/javascript"> + + function reset_new_city_form () { + // resetting the form + $('ncdlg_errors').update(); + $('ncdlg_regions_list').update(); + $('city_country_id').selectedIndex = 0; + } + + function new_city_dialog(element, hidden, input) { + + new Dialog.Box('ncdlg', { + reference: element, + hide: false, + clone: false, + yes: '_{Save}', + cancel: '_{Cancel}', + onYes: function (event, element) { + new Ajax.Request('/city/add', { + postBody: $('city_addition_form').serialize(), + onSuccess: function (response) { + if (response.responseText.isJSON()) { + var data = response.responseText.evalJSON(true); + if (data.id) { + $(hidden).value = data.id; + $(input).value = data.name; + reset_new_city_form(); + Effect.Fade(element, {duration: 0.3}); + //element.hide(); + } + } else { + $('ncdlg_errors').update(response.responseText); + } + } + }); + }, + onCancel: function (event, element) { + reset_new_city_form(); + // hiding the dialog + //element.hide(); + Effect.Fade(element, {duration: 0.3}); + } + }); + $('city_name').value = $F(input); + return false; + } + + function country_changed(element) { + if ($F(element)) { + new Ajax.Updater('ncdlg_regions_list', '/city/get_regions', { + method: 'post', + postBody: $('city_addition_form').serialize() + }); + } + } +</script> +<div id="ncdlg" class="action_dialog" style="display: none"> + <div id="dlgheader">_{Add New City}</div> + <div id="dlgbody"> +<form id="city_addition_form"> + <div class="editform"> + <div id="ncdlg_errors"></div> + <div class="formrow"> + <label class="shortlabel">_{City Name}</label><?= $form_helper->text_field('city', 'name', array('class' => 'textinput')) ?> + </div> + <div class="formrow"> + <label class="shortlabel">_{Country}</label> + <?= $form_options_helper->select('city', 'country_id', + $Country->collect($Country->find(), 'name', 'id'), + array(), + array('onchange' => "country_changed(this);", + 'prompt' => $controller->t('Select Country:'))) ?> + </div> + <div id="ncdlg_regions_list" class="formrow"> + </div> + </div> +</form> + </div> + <div id="dlgfooter"> + <div id="dlgbuttons" class="buttons"> + <input id="dlgyes" class="submitinput" type="button" value="_{Yes}"> + <input id="dlgno" class="submitinput" type="button" value="_{No}"> + <input id="dlgcancel" class="cancelinput" type="button" value="_{Cancel}"> + </div> + </div> + <div class="clearfix"></div> +</div> Modified: public/javascripts/dialog.js =================================================================== --- public/javascripts/dialog.js 2008-03-26 18:20:31 UTC (rev 113) +++ public/javascripts/dialog.js 2008-03-27 07:37:01 UTC (rev 114) @@ -1,11 +1,13 @@ var Dialog = {}; Dialog.Box = Class.create(); Object.extend(Dialog.Box.prototype, { - initialize: function(options) { + initialize: function(element, options) { this.options = Object.extend({ hfloat: 'right', - vfloat: 'bottom' + vfloat: 'bottom', + hide: true, + clone: true }, options || {}); if (! this.options['reference']) { @@ -18,13 +20,13 @@ alert('Reference element is not specified'); return; } - - this.dialog = Element.extend($('dlg').cloneNode(true)); + + this.dialog = this.options.clone ? Element.extend($(element).cloneNode(true)) : $(element); document.body.appendChild(this.dialog); Object.extend(this.dialog.style, { position: 'absolute', - zIndex: 9999 + zIndex: 9999 }); var offset = this.reference.viewportOffset(); @@ -49,8 +51,8 @@ this.noButton = this._getDescendant('dlgno'); this.cancelButton = this._getDescendant('dlgcancel'); - this.title.innerHTML = this.options.title; - this.body.innerHTML = this.options.body; + if (this.options.title) this.title.innerHTML = this.options.title; + if (this.options.body) this.body.innerHTML = this.options.body; switch (this.options.yes) { case 0, false, undefined: this.yesButton.hide(); break; @@ -73,7 +75,7 @@ this.cancelButton.observe('click', this.onCancel.bind(this)); }; - this.dialog.show(); + Effect.Appear(this.dialog, { duration: 0.3 }); }, @@ -83,21 +85,21 @@ }, onYes: function (event) { - this.dialog.hide(); + if (this.options.hide) Effect.Fade(this.dialog, { duration: 0.3 }); if (this.options.onYes) { - this.options.onYes(event) + this.options.onYes(event, this.dialog); } }, onNo: function (event) { - this.dialog.hide(); + if (this.options.hide) Effect.Fade(this.dialog, { duration: 0.3 }); if (this.options.onNo) { - this.options.onNo(event) + this.options.onNo(event, this.dialog); } }, onCancel: function (event) { - this.dialog.hide(); + if (this.options.hide) Effect.Fade(this.dialog, { duration: 0.3 }); if (this.options.onCancel) { - this.options.onCancel(event) + this.options.onCancel(event, this.dialog); } } Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-03-26 18:20:31 UTC (rev 113) +++ public/stylesheets/Application.css 2008-03-27 07:37:01 UTC (rev 114) @@ -524,6 +524,13 @@ padding: 3px 10px 3px; } +.formrow label.shortlabel { + width: 80px; + float: left; + text-align: right; + padding: 3px 10px 3px; +} + .formrow label.checkbox { font-weight: normal; color: #000; Modified: public/stylesheets/dialog.css =================================================================== --- public/stylesheets/dialog.css 2008-03-26 18:20:31 UTC (rev 113) +++ public/stylesheets/dialog.css 2008-03-27 07:37:01 UTC (rev 114) @@ -1,4 +1,4 @@ -#dlg { +.action_dialog { border: 6px solid #999999; width: 465px; overflow: auto; @@ -7,7 +7,7 @@ z-index: 100; } -#dlgheader { +.action_dialog #dlgheader { background-color: #6d84b4; border: 1px solid #3b5998; color: #ffffff; @@ -16,21 +16,21 @@ padding: 6px 0px 6px 10px; } -#dlgbody { +.action_dialog #dlgbody { background-color: #ffffff; color: #000000; font-size: 11px; padding: 15px; } -#dlgfooter { +.action_dialog #dlgfooter { background-color: #f2f2f2; border: 1px solid #a6a6a6; float: left; width: 463px; } -#dlgfooter .buttons { +.action_dialog #dlgfooter .buttons { margin: 0px 6px 0px 0px; float: right; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-04-30 14:16:14
|
Revision: 136 http://isocial.svn.sourceforge.net/isocial/?rev=136&view=rev Author: fsnobody Date: 2008-04-30 07:16:21 -0700 (Wed, 30 Apr 2008) Log Message: ----------- photoapp added Added Paths: ----------- app/views/photoapp/ app/views/photoapp/album/ app/views/photoapp/album/_menu.tpl app/views/photoapp/album/create.tpl app/views/photoapp/album/help.tpl app/views/photoapp/album/my_photos.tpl app/views/photoapp/album/photos_of_you.tpl app/views/photoapp/album/show.tpl public/images/question.gif public/stylesheets/photoapp/ public/stylesheets/photoapp/Album.css Added: app/views/photoapp/album/_menu.tpl =================================================================== --- app/views/photoapp/album/_menu.tpl (rev 0) +++ app/views/photoapp/album/_menu.tpl 2008-04-30 14:16:21 UTC (rev 136) @@ -0,0 +1,14 @@ +<div class="tabs"> + <div class="left"> + <ul class="toggle_tabs"> + <li class="first"><a href="/photoapp/album/my_photos" class="<?= $controller->getActionName() == 'my_photos' ? 'selected' : '' ?>">_{My Photos}</a></li><? + ?><li><a href="/photoapp/album/photos_of_you" class="last <?= $controller->getActionName() == 'photos_of_you' ? 'selected' : '' ?>">_{Photos of You}</a></li> + </ul> + </div> + <div class="right"> + <ul class="toggle_tabs"> + <li class="first last"><a href="/photoapp/album/help" class="<?= $controller->getActionName() == 'help' ? 'selected' : '' ?>">_{Help}</a></li> + </ul> + </div> +</div> +<div class="clearfix"> </div> Added: app/views/photoapp/album/create.tpl =================================================================== --- app/views/photoapp/album/create.tpl (rev 0) +++ app/views/photoapp/album/create.tpl 2008-04-30 14:16:21 UTC (rev 136) @@ -0,0 +1,59 @@ + +<?= $controller->renderErrors() ?> + +<div class="title_bar"> + <div class="info"> + <div class="header"> + <div class="name">_{Create Album}</div> + </div> + <div class="clearfix"></div> + </div> +</div> +<div class="clearfix"></div> + + +<div class="album_step"> + <form action="/photoapp/album/create" method="post"> + <div class="form_create_clear"> + + <div class="form_create_row"> + <label >_{Name}:</label> + <div class="form_create_col"> + <?= $form_helper->text_field('album', 'name', array('class' => 'text_input w200')) ?> + </div> + </div> + <div class="clearfix"></div> + + <div class="form_create_row"> + <label >_{Description}:</label> + <div class="form_create_col"> + <?= $form_helper->text_area('album', 'description', array('rows' => '5', 'class' => 'w200')) ?> + </div> + </div> + <div class="clearfix"></div> + + <div class="form_create_row"> + <label >_{Privacy}:</label> + <div class="form_create_col"> + <select> + <option>Everyone</option> + <option>Friends of Friends</option> + <option>Only Friends</option> + <option>Customize...</option> + </select> + </div> + </div> + <div class="clearfix"></div> + + <div class="form_create_row"> + <label > </label> + <div class="form_create_col"> + <input class="submitinput" type="submit" value="_{Create Album}"/> + </div> + </div> + <div class="clearfix"></div> + + </div> + </form> +</div> +<div class="clearfix"></div> \ No newline at end of file Added: app/views/photoapp/album/help.tpl =================================================================== --- app/views/photoapp/album/help.tpl (rev 0) +++ app/views/photoapp/album/help.tpl 2008-04-30 14:16:21 UTC (rev 136) @@ -0,0 +1 @@ +Group Help \ No newline at end of file Added: app/views/photoapp/album/my_photos.tpl =================================================================== --- app/views/photoapp/album/my_photos.tpl (rev 0) +++ app/views/photoapp/album/my_photos.tpl 2008-04-30 14:16:21 UTC (rev 136) @@ -0,0 +1,5 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +My photos \ No newline at end of file Added: app/views/photoapp/album/photos_of_you.tpl =================================================================== --- app/views/photoapp/album/photos_of_you.tpl (rev 0) +++ app/views/photoapp/album/photos_of_you.tpl 2008-04-30 14:16:21 UTC (rev 136) @@ -0,0 +1,5 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +Photos of You \ No newline at end of file Added: app/views/photoapp/album/show.tpl =================================================================== --- app/views/photoapp/album/show.tpl (rev 0) +++ app/views/photoapp/album/show.tpl 2008-04-30 14:16:21 UTC (rev 136) @@ -0,0 +1,85 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<div class="title_bar"> + <div class="info"> + <div class="header"> + <div class="name">_{Photos}</div> + <div class="create"><a href="/photoapp/album/create">_{Create a Photo Album}</a></div> + </div> + <div class="clearfix"></div> + </div> +</div> +<div class="clearfix"></div> + + +<div class="title_bar"> + <div class="info_title">_{Welcome to PROJECT_NAME Photos}</div> + <div class="clearfix"></div> + <div class="info_blocks"> + <div class="info_albums"> + <div class="sub_title">Interactive Albums</div> + <div class="sub_text">Comments and photo-tagging mean you can share photos with friends and family — no matter where they are.</div> + </div> + <div class="info_storage"> + <div class="sub_title">Unlimited Storage</div> + <div class="sub_text">Facebook users have uploaded over 5 billion photos that they share with friends all over the world.</div> + </div> + </div> +</div> +<div class="clearfix"></div> + +<div class="get_started"> + <form action="/photoapp/album/create" method="post"> + <div class="form_create"> + <div class="form_create_title"> + _{Create a Photo Album} + </div> + + <div class="form_create_row"> + <label >_{Name}:</label> + <div class="form_create_col"> + <?= $form_helper->text_field('album', 'name', array('class' => 'text_input w200')) ?> + </div> + </div> + <div class="clearfix"></div> + + <div class="form_create_row"> + <label >_{Description}:</label> + <div class="form_create_col"> + <?= $form_helper->text_area('album', 'description', array('rows' => '5', 'class' => 'w200')) ?> + </div> + </div> + <div class="clearfix"></div> + + <div class="form_create_row"> + <label >_{Privacy}:</label> + <div class="form_create_col"> + <select> + <option>Everyone</option> + <option>Friends of Friends</option> + <option>Only Friends</option> + <option>Customize...</option> + </select> + </div> + </div> + <div class="clearfix"></div> + + <div class="form_create_row"> + <label > </label> + <div class="form_create_col"> + <input class="submitinput" type="submit" value="_{Create Album}"/> + </div> + </div> + <div class="clearfix"></div> + + </div> + </form> +</div> +<div class="clearfix"></div> + +<div class="friends_album"> + Once you add friends on PROJECT_NAME, their albums will appear here. +</div> +<div class="clearfix"></div> Added: public/images/question.gif =================================================================== (Binary files differ) Property changes on: public/images/question.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/stylesheets/photoapp/Album.css =================================================================== --- public/stylesheets/photoapp/Album.css (rev 0) +++ public/stylesheets/photoapp/Album.css 2008-04-30 14:16:21 UTC (rev 136) @@ -0,0 +1,136 @@ +.red {border: 1px solid red;} +.photo_top_menu { + padding: 10px; +} + +.title_bar .info { + left: 0px; + margin: 0px; + padding: 0px 0px 0px 40px; + border-bottom: 1px solid #cccccc; +} + +.name { + height: 40px; + line-height: 40px; + font-weight: bold; + font-size: 14px; + padding: 0px 0px 0px 22px; + float: left; + margin: 0px 200px 0px 0px; + +} +.create { + height: 40px; + line-height: 40px; + padding: 0px 0px 0px 0px; + width: 200px; + float: right; +} + +.info_title { + height: 40px; + line-height: 40px; + font-weight: bold; + font-size: 16px; + padding: 0px 0px 0px 22px; +} + +.info_blocks { + width: 100%; + padding: 0px; + margin: 0px; +} + +.info_albums { + width: 49%; + float: left; + height: 100px; + background: url('/images/question.gif') 5px 5px no-repeat; +} +.sub_title { + height: 20px; + line-height: 20px; + padding-left: 70px; + font-size: 11px; + font-weight: bold; +} +.sub_text { + line-height: 16px; + padding: 0px 10px 5px 70px; + font-size: 11px; + font-weight: none; +} + +.info_storage { + width: 49%; + float: left; + height: 100px; + background: url('/images/question.gif') 5px 5px no-repeat; +} + +.get_started { + border-top: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; + background: #dddddd; + padding: 50px 130px; +} +.form_create { + background: #ffffff; + border-top: 1px solid #cccccc; + border-left: 1px solid #cccccc; + border-bottom: 1px solid #aaaaaa; + border-right: 1px solid #aaaaaa; + padding: 20px; +} +.form_create_title { + height: 20px; + line-height: 20px; + font-size: 11px; + font-weight: bold; + border-bottom: 1px solid #dddddd; +} +.form_create_row { + float: left; + padding-top: 2px; +} + +.form_create_row label { + font-size: 10px; + display: block; + width: 80px; + float: left; + margin: 0px; + height: 30px; + line-height: 30px; + +} + +.form_create_col { + float: left; + width: 200px; + margin: 0px; + padding: 5px 0px; +} + +.friends_album { + padding: 20px 130px; + color: #888888; +} + +.w200 { + width: 200px; +} +/* create */ +.album_step { + background: #ffffff; + padding: 20px 130px 50px 130px; +} + +.form_create_clear { + background: #ffffff; + border: 0px; + padding: 20px; +} + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-01 19:04:08
|
Revision: 148 http://isocial.svn.sourceforge.net/isocial/?rev=148&view=rev Author: aguidrevitch Date: 2008-05-01 12:04:14 -0700 (Thu, 01 May 2008) Log Message: ----------- CSS refactoring Modified Paths: -------------- public/stylesheets/Application.css Added Paths: ----------- public/stylesheets/common/ public/stylesheets/common/Application.css public/stylesheets/common/Error.css public/stylesheets/common/Form.css public/stylesheets/common/Input.css public/stylesheets/common/Layout.css public/stylesheets/common/MiniTab.css public/stylesheets/common/Submenu.css public/stylesheets/common/Tab.css Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-05-01 13:55:54 UTC (rev 147) +++ public/stylesheets/Application.css 2008-05-01 19:04:14 UTC (rev 148) @@ -1,829 +1,9 @@ -body { - font-family: verdana, arial, sans-serif; - font-size: 11px; -} +@import url("common/Application.css"); +@import url("common/Error.css"); +@import url("common/Form.css"); +@import url("common/Input.css"); +@import url("common/Layout.css"); +@import url("common/MiniTab.css"); +@import url("common/Tab.css"); +@import url("common/Submenu.css"); -select { - border:1px solid #BDC7D8; - font-family:verdana,arial,sans-serif; - font-size:11px; - padding: 3px; - line-height: 22px; -} - -label { - color: #666666; - display: block; - cursor: pointer; - font-weight: bold; -} - -label.persistent { - display: block; - line-height: 16px; - font: 11px normal; - padding: 1px 0px 3px 0px; -} - -label input, label select { - font-weight: normal; -} - -a { - color: #3b5998; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -a.logo { - position: absolute; - display: block; - width: 151px; - height: 55px; - background-image: url(/images/logo.gif); -} - -a.linkbutton { - color: white; - font-size: 13px; - outline-color: invert; - outline-style: none; - outline-width: medium; - display: block; - height: 23px; - margin: 5px 0px 8px 0px; -} - -a:hover.linkbutton { - text-decoration: none; -} - -a.linkbutton div { - float: left; - cursor: pointer; - background-color: #67a54b; - padding: 4px 15px 5px 15px; - border-top: 1px solid #97f26e; - border-left: 1px solid #97f26e; - border-bottom: 1px solid #385929; - border-right: 1px solid #385929; -} - -h1, h2, h3, h4, h5 { - color: #333333; - font-size: 13px; - margin: 0px; - padding: 0px; -} - -p { - font-size: 11px; - text-align: left; -} - -#application { - padding: 0px; - margin: 0px; -} - -#main { - width: 799px; - padding: 0px; - margin: 0px auto 0px auto; -} - -#sidebar { - margin-top: 0px; - width: 150px; - float: left; -} - -#sidebar_content { - margin: 55px 0px 10px 0px; - background-color: #f7f7f7; - border-bottom: 1px solid #dddddd; -} - -#quicklogin { - padding: 8px 10px 10px 9px; -} - -#widebar { - width: 647px; - float: left; -} - -#pageheader { - color: white; - background-color: #3b5998; - line-height: 2em; - height: 2em; - padding: 9px 0px 4px 0px; -} - -#pageheader a { - color: white; -} - -#headermenuleft { - font-size: 13px; - float: left; - display: block; - list-style-type: none; - list-style-image: none; - list-style-position: outside; - padding: 0px; - margin: 0px; -} - -#headermenuleft li { - float: left; - display: block; - margin-right: 10px; -} - -#headermenuright { - float: right; - display: block; - list-style-type: none; - list-style-image: none; - list-style-position: outside; - padding-right: 17px; - padding: 0px 17px 0px 0px; - margin: 0px; -} - -#headermenuright li { - float: left; - display: block; - margin-right: 10px; -} - -a.globallink { - text-decoration: none; - padding: 3px 5px; - margin: 0px; - white-space: nowrap; - font-weight: bold; -} - -a.globallink:hover { - text-decoration: none; - background-color: #7086b4; -} - -#pagecontent { -} - -#pagecontent #contentshadow { - /* enabling hasLayout for ie */ - width: 647px; - border: 1px solid #dddddd; -} - -#pagecontent #content { - /* enabling hasLayout for ie */ - width: 647px; - clear: both; - padding: 0; -} - -#pagecontent #content p.indent { - padding: 30px; -} - -#pagefooter { - clear: both; - height: 50px; - line-height: 16px; -} - -#pagefooter .copyright { - color: #777777; - float: left; - width: 180px; - padding: 8px 10px 0px 10px; -} - -#pagefooter .linksarea { - width: 446px; - float: right; -} - -#pagefooter ul { - float: right; - display: block; - list-style-type: none; - list-style-image: none; - list-style-position: outside; - padding: 8px 2px 4px 2px; - margin: 0px; -} - -#pagefooter li { - float: left; -} - -#qsearch { - padding: 8px 4px 2px 10px; -} - -#qsearchwrapper { - clear: both; - margin: 0px; -} - -#qsearchfield { - float: left; -} - -#qsearchfield input { - width: 100px; - margin: 0px; -} - -#qsearchimage { - float: left; - background: url('/images/magnifier.png') no-repeat 0px; - width: 16px; - height: 16px; - margin: 3px; - cursor: pointer; -} - -#applications { - clear: both; - font-size: 11px; - margin: 10px; - padding: 10px 0px 0px 0px; -} - -#applications a { - display: block; - line-height: 16px; - padding-left: 20px; -} - -.clearfix { - clear: both; - height: 0px; - width: 0px; - line-height: 0px; - overflow: hidden; -} - -.photoapp { - background: url('/images/photo.png') no-repeat 0px; -} - -.groupapp { - background: url('/images/group.png') no-repeat 0px; -} - -.eventapp { - background: url('/images/calendar.png') no-repeat 0px; -} - -.linksarea a { - padding: 2px 5px 2px 5px; -} - -.submitinput, .buttoninput { - padding: 3px; - font-size: 11px; - cursor: pointer; - color: white; - background-color: #3b5998; - padding: 2px 15px 3px 15px; - margin: 5px 0px 5px 0px; - border-top: 1px solid #d9dfea; - border-left: 1px solid #d9dfea; - border-bottom: 1px solid #0e1f5b; - border-right: 1px solid #0e1f5b; -} - -.cancelinput { - padding: 3px; - font-size: 11px; - cursor: pointer; - color: black; - background-color: lightgray; - padding: 2px 15px 3px 15px; - margin: 5px 0px 5px 0px; - border-top: 1px solid #d9dfea; - border-left: 1px solid #d9dfea; - border-bottom: 1px solid #0e1f5b; - border-right: 1px solid #0e1f5b; -} - -textarea, .textinput, .passwordinput { - border: 1px solid #bdc7d8; - font-family: verdana, arial, sans-serif; - font-size: 11px; - width: 300px; - margin: 0px 0px 5px 0px; -} - -.shorttextinput { - width: 80px; - padding: 3px; - border: 1px solid #bdc7d8; - font-family: verdana, arial, sans-serif; - font-size: 11px; - margin: 0px 0px 5px 0px; -} - -.mediumtextinput { - width: 130px; - padding: 4px 3px 4px 3px; - border: 1px solid #bdc7d8; - font-family: verdana, arial, sans-serif; - font-size: 11px; - margin: 0px 0px 0px 10px; -} - -.mediumtextinput.search { - color: #777777; - padding: 4px 3px 4px 20px; - background: url('/images/magnifier.png') no-repeat 2px; - background-color: #ffffff; -} - -.mediumtextinput.search.right { - float: right; -} - -.checkboxinput { - border: 0px; - margin: 4px 0px 0px 0px; -} - -.error { - margin: 0px 10px 10px 10px; - padding: 10px; - border: 1px solid #dd3c10; - background-color: #ffebe8; -} - -.error h1 { - font-size: 14px; -} - -.error p { - margin: 4px 0px 0px 0px; - line-height: 14px; -} - -#content .title { - font-weight: bold; - font-size: 13px; - padding: 10px 20px; - border-bottom: 1px solid #dddddd; - margin-bottom: 10px; -} - -#content .tabs { - display:block; - padding: 20px 0px 0px 0px; - border-bottom: 1px solid #898989; - float: left; - width: 647px; -} - -.tabs .left { - float: left; - padding-left: 10px; - margin-bottom: -1px; -} - -.tabs .right { - float: right; - padding-right: 10px; - margin-bottom: -1px; -} - -.toggle_tabs { - display: block; - list-style: none; - text-align: center; -} - -.toggle_tabs li { - display: block; - float: left; - margin: 0px; -} - -.toggle_tabs li a { - display: block; - border: 1px solid #898989; - border-left: 0px; - color: #333; - font-weight: bold; - padding :4px 8px 6px 9px; - background: #f1f1f1; -} - -.toggle_tabs li a:focus { - outline: 0px; -} - -.toggle_tabs li.first a { - border: 1px solid #898989; -} - -.toggle_tabs li a.selected { - margin-left: -1px; - background: #6d84b4; - border: 1px solid #3b5998; - border-left: 1px solid #5973a9; - border-right: 1px solid #5973a9; - color: #ffffff; -} - -.toggle_tabs li.last a.selected { - margin-left: -1px; - border-left: 1px solid #5973a9; - border-right: 1px solid #36538f; -} - -.toggle_tabs li.first a.selected { - margin: 0px; - border-left: 1px solid #36538f; - border-right: 1px solid #5973a9; -} - -.toggle_tabs li.first.last a.selected { - border: 1px solid #36538f; -} - -.toggle_tabs li a.selected:hover { - text-decoration: none; -} - -.toggle_tabs li a.disabled { - color: #999999; - cursor: default; -} - -.toggle_tabs li a.disabled:hover { - text-decoration:none; -} - -#content .submenu { - background: #f7f7f7; - border-bottom: 1px solid #cccccc; - padding: 8px 10px 8px 10px; - float: left; - width: 627px; -} - -#content .submenushort { - background: #f7f7f7; - border-bottom: 1px solid #cccccc; - padding: 5px 0px 5px 15px; -} - -.submenu .menu_block { - float: left; -} - -.submenu .menu_block.selector { - padding-right: 10px; -} - -.submenu .menu_block.selector select { - margin-left: 5px; -} - -.submenu .buttons { - list-style: none; - margin: 0px; - padding: 0px; -} - -.submenu .buttons li { - float: left; -} - -.submenu .buttons li a { - padding: 4px 5px 4px 5px; - display: block; -} - -.submenu .disabled { - color: #aaaaaa; - cursor: default; - text-decoration: none; -} - -.divider { - margin: 5px 0px 5px 0px; - border-bottom: 1px solid #cccccc; -} - -#content .editform { - padding: 20px 0px 20px 0px; - background: #f7f7f7; -} - -#content .formwrapper { - background: #f7f7f7; -} - -#content .two_column { - background: #ffffff; -} - -#content .two_column .left_small { - width: 220px; - float: left; -} - -#content .two_column .left_big { - margin: 0px 220px 0px 0px; -} - -#content .two_column .right_small { - width: 220px; - float: right; -} - -#content .two_column .right_big { - margin: 0px 0px 0px 220px; -} - -.left_content { - padding: 10px 5px 10px 20px; -} - -.right_content { - padding: 10px 20px 10px 5px; -} - -.box { - float: left; - background: #ffffff; - border-top: 1px solid #3b5998; - margin-bottom: 10px; - width: 100%; -} - -.box .header { - color: #3b5998; - background: #d8dfea; - padding: 3px 0px 3px 0px; -} - -.box .header .box_title { - font-weight: bold; - margin-left: 10px; -} - -.box .header .edit { - float: right; - margin-right: 10px; -} - -.box .menu { - background: #eeeeee; - border-top: 1px solid #aaaaaa; - color: #000000; - padding: 3px 0px 3px 0px; -} - -.box .menu .info { - margin-left: 10px; -} - -.box .menu .action { - float: right; - margin-right: 10px; -} - -.box .body { - padding: 10px; -} - -.box .emptyblock { - border-top: 1px solid #aaaaaa; - border-bottom: 1px solid #aaaaaa; - color: #777777; - padding: 10px 0px 10px 0px; - text-align: center; - background: #f7f7f7; -} - -.actions_list { - list-style: none; - margin: 0px 0px 10px 0px; - padding: 0px; -} - -.actions_list li { - border-bottom: 1px solid #d8dfea; -} - -.actions_list a { - background: transparent; - display: block; - margin: 0px; - padding: 4px 3px 4px 3px; - text-decoration: none; -} - -.actions_list a:hover { - background: #3b5998; - color: white; - text-decoration: none; -} - -.actions_list .inactive { - padding: 2px 3px 2px 3px; - color: #777777; -} - -.editform .formrow { - clear: both; - vertical-align: top; - padding: 0px 0px 3px 0px; - line-height: 16px; -} - -.formrow label { - display: block; - width: 150px; - float: left; - text-align: right; - padding: 3px 10px 3px 0px; -} - -.formrow label.shortlabel { - width: 80px; - float: left; - text-align: right; - padding: 3px 10px 3px; -} - -.formrow label.checkbox { - font-weight: normal; - color: #000000; - text-align: left; - padding: 3px 0px 3px 0px; - width: 400px; -} - -.formrow label.radiobutton { - font-weight: normal; - color: #000000; - text-align: left; - padding: 3px 0px 3px 0px; - width: 400px; -} - -.formrow label.required { - line-height: 10px; -} - -.formrow label.required small { - color: #999999; - font-size: smaller; - line-height: 10px; -} - -.formrow .formcol { - float: left; - width: 360px; - padding: 0px 0px 5px 0px; - margin: 0px; -} - -.formrow .formcol .middle { - float: left; -} - -.formrow .formcol .lock { - display: block; - float: right; - padding-left: 20px; - background: url('/images/lock.png') no-repeat 0px; -} - -.formrow .formcol .tnote { - border-top: solid 1px #cccccc; - padding: 10px 0px 0px 0px; - width: 300px; - color: #777777; -} - -.formrow .formblock { - width: 235px; - margin: 3px 0px 3px 10px; -} - -.formrow .formblock.border { - border-top: 1px solid #aaaaaa; - border-bottom: 1px solid #aaaaaa; -} - -.formrow .formblock.gray { - color: #777777; - margin: 0px 0px 0px 25px; -} - -.formrow textarea { - width: 200px; - height: 100px; -} - -.formrow .textinput { - margin: 0px; -} - -.formrow .shorttextinput { - width: 200px; -} - -.formrow .note { - font-size: 10px; -} - -.footer { - float: left; - display: block; - padding: 0px 10px 8px 13px; - background: #f7f7f7; - width: 622px; -} - -#content .minitabs { - display:block; - padding: 5px 0px 0px 0px; - border-bottom: 1px solid #3b5998; - float: left; - width: 647px; -} - -.minitabs .left { - float: left; - padding-left: 8px; - margin-bottom: -1px; -} - -.minitabs .right { - float: right; - padding-right: 10px; - margin-bottom: -1px; -} - -.toggle_minitabs { - display: block; - list-style: none; - padding: 4px 8px 6px 9px; - text-align: center; -} - -.toggle_minitabs li { - display: block; - float: left; - margin: 0px; -} - -.toggle_minitabs li a { - display: block; - color: #3b5998; - padding: 5px 4px 5px 4px; - margin: 0px 4px 1px 4px; -} - -.toggle_minitabs li a:focus { - outline: 0px; -} - -.toggle_minitabs li a:hover { - background: #c5cee1; - text-decoration: none; -} - -.toggle_minitabs li a.selected { - background: #3b5998; - color: #ffffff; -} - -.toggle_minitabs li a.selected:hover { - text-decoration: none; -} - -.toggle_minitabs li a.disabled { - background: #ffffff; - color: #999999; - cursor: default; -} - -.toggle_minitabs li a.disabled:hover { - text-decoration: none; -} - Added: public/stylesheets/common/Application.css =================================================================== --- public/stylesheets/common/Application.css (rev 0) +++ public/stylesheets/common/Application.css 2008-05-01 19:04:14 UTC (rev 148) @@ -0,0 +1,377 @@ +body { + font-family: verdana, arial, sans-serif; + font-size: 11px; +} + +a { + color: #3b5998; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +a.logo { + position: absolute; + display: block; + width: 151px; + height: 55px; + background-image: url(/images/logo.gif); +} + +a.linkbutton { + color: white; + font-size: 13px; + outline-color: invert; + outline-style: none; + outline-width: medium; + display: block; + height: 23px; + margin: 5px 0px 8px 0px; +} + +a:hover.linkbutton { + text-decoration: none; +} + +a.linkbutton div { + float: left; + cursor: pointer; + background-color: #67a54b; + padding: 4px 15px 5px 15px; + border-top: 1px solid #97f26e; + border-left: 1px solid #97f26e; + border-bottom: 1px solid #385929; + border-right: 1px solid #385929; +} + +h1, h2, h3, h4, h5 { + color: #333333; + font-size: 13px; + margin: 0px; + padding: 0px; +} + +p { + font-size: 11px; + text-align: left; +} + +#application { + padding: 0px; + margin: 0px; +} + +#main { + width: 799px; + padding: 0px; + margin: 0px auto 0px auto; +} + +#sidebar { + margin-top: 0px; + width: 150px; + float: left; +} + +#sidebar_content { + margin: 55px 0px 10px 0px; + background-color: #f7f7f7; + border-bottom: 1px solid #dddddd; +} + +#quicklogin { + padding: 8px 10px 10px 9px; +} + +#widebar { + width: 647px; + float: left; +} + +#pageheader { + color: white; + background-color: #3b5998; + line-height: 2em; + height: 2em; + padding: 9px 0px 4px 0px; +} + +#pageheader a { + color: white; +} + +#headermenuleft { + font-size: 13px; + float: left; + display: block; + list-style-type: none; + list-style-image: none; + list-style-position: outside; + padding: 0px; + margin: 0px; +} + +#headermenuleft li { + float: left; + display: block; + margin-right: 10px; +} + +#headermenuright { + float: right; + display: block; + list-style-type: none; + list-style-image: none; + list-style-position: outside; + padding-right: 17px; + padding: 0px 17px 0px 0px; + margin: 0px; +} + +#headermenuright li { + float: left; + display: block; + margin-right: 10px; +} + +a.globallink { + text-decoration: none; + padding: 3px 5px; + margin: 0px; + white-space: nowrap; + font-weight: bold; +} + +a.globallink:hover { + text-decoration: none; + background-color: #7086b4; +} + +#pagecontent { +} + +#pagecontent #contentshadow { + /* enabling hasLayout for ie */ + width: 647px; + border: 1px solid #dddddd; +} + +#pagecontent #content { + /* enabling hasLayout for ie */ + width: 647px; + clear: both; + padding: 0; +} + +#pagecontent #content p.indent { + padding: 30px; +} + +#pagefooter { + clear: both; + height: 50px; + line-height: 16px; +} + +#pagefooter .copyright { + color: #777777; + float: left; + width: 180px; + padding: 8px 10px 0px 10px; +} + +#pagefooter .linksarea { + width: 446px; + float: right; +} + +#pagefooter ul { + float: right; + display: block; + list-style-type: none; + list-style-image: none; + list-style-position: outside; + padding: 8px 2px 4px 2px; + margin: 0px; +} + +#pagefooter li { + float: left; +} + +#qsearch { + padding: 8px 4px 2px 10px; +} + +#qsearchwrapper { + clear: both; + margin: 0px; +} + +#qsearchfield { + float: left; +} + +#qsearchfield input { + width: 100px; + margin: 0px; +} + +#applications { + clear: both; + font-size: 11px; + font-weight: bold; + margin: 10px; + padding: 10px 0px 0px 0px; +} + +#applications a { + display: block; + line-height: 16px; + padding-left: 20px; +} + +.clearfix { + clear: both; + height: 0px; + width: 0px; + line-height: 0px; + overflow: hidden; +} + +.photoapp { + background: url('/images/photo.png') no-repeat 0px; +} + +.groupapp { + background: url('/images/group.png') no-repeat 0px; +} + +.eventapp { + background: url('/images/calendar.png') no-repeat 0px; +} + +.linksarea a { + padding: 2px 5px 2px 5px; +} + +#content .title { + font-weight: bold; + font-size: 13px; + padding: 10px 20px; + border-bottom: 1px solid #dddddd; + margin-bottom: 10px; +} + +.divider { + margin: 5px 0px 5px 0px; + border-bottom: 1px solid #cccccc; +} + +.box { + float: left; + background: #ffffff; + border-top: 1px solid #3b5998; + margin-bottom: 10px; + width: 100%; +} + +.box .header { + color: #3b5998; + background: #d8dfea; + padding: 3px 0px 3px 0px; +} + +.box .header .box_title { + font-weight: bold; + margin-left: 10px; +} + +.box .header .edit { + float: right; + margin-right: 10px; +} + +.box .menu { + background: #eeeeee; + border-top: 1px solid #aaaaaa; + color: #000000; + padding: 3px 0px 3px 0px; +} + +.box .menu .info { + margin-left: 10px; +} + +.box .menu .action { + float: right; + margin-right: 10px; +} + +.box .body { + padding: 10px; +} + +.box .emptyblock { + border-top: 1px solid #aaaaaa; + border-bottom: 1px solid #aaaaaa; + color: #777777; + padding: 10px 0px 10px 0px; + text-align: center; + background: #f7f7f7; +} + +.actions_list { + list-style: none; + margin: 0px 0px 10px 0px; + padding: 0px; +} + +.actions_list li { + border-bottom: 1px solid #d8dfea; +} + +.actions_list a { + background: transparent; + display: block; + margin: 0px; + padding: 4px 3px 4px 3px; + text-decoration: none; +} + +.actions_list a:hover { + background: #3b5998; + color: white; + text-decoration: none; +} + +.actions_list .inactive { + padding: 2px 3px 2px 3px; + color: #777777; +} + +.footer { + float: left; + display: block; + padding: 0px 10px 8px 13px; + background: #f7f7f7; + width: 622px; +} + +.lock { + cursor: pointer; + cursor: hand; + display: block; + padding-left: 20px; + background: url('/images/lock_inactive.png') no-repeat 2px; +} + +.lock:hover { + background: url('/images/lock.png') no-repeat 2px; +} + +.lock.short { + height: 20px; +} Added: public/stylesheets/common/Error.css =================================================================== --- public/stylesheets/common/Error.css (rev 0) +++ public/stylesheets/common/Error.css 2008-05-01 19:04:14 UTC (rev 148) @@ -0,0 +1,16 @@ +.error { + margin: 0px 10px 10px 10px; + padding: 10px; + border: 1px solid #dd3c10; + background-color: #ffebe8; +} + +.error h1 { + font-size: 14px; +} + +.error p { + margin: 4px 0px 0px 0px; + line-height: 14px; +} + Added: public/stylesheets/common/Form.css =================================================================== --- public/stylesheets/common/Form.css (rev 0) +++ public/stylesheets/common/Form.css 2008-05-01 19:04:14 UTC (rev 148) @@ -0,0 +1,106 @@ +#content .editform { + padding: 20px 0px 20px 10px; + margin: auto; +} + +#content .formwrapper { + background: #f7f7f7; +} + +.editform .formrow { + clear: both; + vertical-align: top; + padding: 0px 0px 3px 0px; + line-height: 16px; +} + +.formrow label { + font-weight: bold; + color: #666666; + display: block; + width: 150px; + float: left; + text-align: right; + padding: 3px 10px 3px 0px; +} + +.formrow label.shortlabel { + width: 90px; + float: left; + text-align: right; + padding: 3px 10px 3px; +} + +.formrow label.checkbox { + font-weight: normal; + color: #000000; + text-align: left; + padding: 3px 0px 3px 0px; + width: 400px; +} + +.formrow label.radiobutton { + font-weight: normal; + color: #000000; + text-align: left; + padding: 3px 0px 3px 0px; + width: 400px; +} + +.formrow label.required { + line-height: 10px; +} + +.formrow label.required small { + color: #999999; + font-size: smaller; + line-height: 10px; +} + +.formrow .formcol { + float: left; + padding: 0px 0px 5px 0px; + margin: 0px; +} + +.formrow .formcol .middle { + float: left; +} + +.formrow .formcol .third { + float: right; +} + +.formrow .formcol .tnote { + border-top: solid 1px #cccccc; + padding: 10px 0px 0px 0px; + width: 300px; + color: #777777; +} + +.formrow .formblock { + width: 235px; + margin: 3px 0px 3px 10px; +} + +.formrow .formblock.border { + border-top: 1px solid #aaaaaa; + border-bottom: 1px solid #aaaaaa; +} + +.formrow .formblock.gray { + color: #777777; + margin: 0px 0px 0px 25px; +} + +.formrow textarea { + height: 100px; +} + +.formrow .textinput { + margin: 0px; +} + +.formrow .note { + font-size: 10px; +} Added: public/stylesheets/common/Input.css =================================================================== --- public/stylesheets/common/Input.css (rev 0) +++ public/stylesheets/common/Input.css 2008-05-01 19:04:14 UTC (rev 148) @@ -0,0 +1,45 @@ +select, textarea, .textinput, .passwordinput, .cityinput, .shorttextinput, .mediumtextinput, .submitinput, .buttoninput, .cancelinput { + padding: 4px 3px 4px 3px; + border: 1px solid #bdc7d8; + font-family: verdana, arial, sans-serif; + font-size: 11px; + margin: 0px; +} + +.submitinput, .buttoninput, .cancelinput { + cursor: pointer; + cursor: hand; + color: white; + background-color: #3b5998; + padding-right: 15px; + padding-left: 15px; +} + +.cancelinput { + color: black; + background-color: lightgray; +} + +.shorttextinput { + width: 60px; +} + +.mediumtextinput, .cityinput { + width: 120px; +} + +.mediumtextinput.search { + color: #777777; + padding-left: 20px; + background: url('/images/magnifier.png') no-repeat 2px; + background-color: #ffffff; +} + +.mediumtextinput.search.right { + float: right; +} + +.checkboxinput { + border: 0px; + margin: 4px 0px 0px 0px; +} Added: public/stylesheets/common/Layout.css =================================================================== --- public/stylesheets/common/Layout.css (rev 0) +++ public/stylesheets/common/Layout.css 2008-05-01 19:04:14 UTC (rev 148) @@ -0,0 +1,29 @@ +#content .two_column { + background: #ffffff; +} + +#content .two_column .left_small { + width: 220px; + float: left; +} + +#content .two_column .left_big { + margin: 0px 220px 0px 0px; +} + +#content .two_column .right_small { + width: 220px; + float: right; +} + +#content .two_column .right_big { + margin: 0px 0px 0px 220px; +} + +.left_content { + padding: 10px 5px 10px 20px; +} + +.right_content { + padding: 10px 20px 10px 5px; +} Added: public/stylesheets/common/MiniTab.css =================================================================== --- public/stylesheets/common/MiniTab.css (rev 0) +++ public/stylesheets/common/MiniTab.css 2008-05-01 19:04:14 UTC (rev 148) @@ -0,0 +1,67 @@ +#content .minitabs { + display:block; + padding: 5px 0px 0px 0px; + border-bottom: 1px solid #3b5998; + float: left; + width: 647px; +} + +.minitabs .left { + float: left; + padding-left: 8px; + margin-bottom: -1px; +} + +.minitabs .right { + float: right; + padding-right: 10px; + margin-bottom: -1px; +} + +.toggle_minitabs { + display: block; + list-style: none; + padding: 4px 8px 6px 9px; + text-align: center; +} + +.toggle_minitabs li { + display: block; + float: left; + margin: 0px; +} + +.toggle_minitabs li a { + display: block; + color: #3b5998; + padding: 5px 4px 5px 4px; + margin: 0px 4px 1px 4px; +} + +.toggle_minitabs li a:focus { + outline: 0px; +} + +.toggle_minitabs li a:hover { + background: #c5cee1; + text-decoration: none; +} + +.toggle_minitabs li a.selected { + background: #3b5998; + color: #ffffff; +} + +.toggle_minitabs li a.selected:hover { + text-decoration: none; +} + +.toggle_minitabs li a.disabled { + background: #ffffff; + color: #999999; + cursor: default; +} + +.toggle_minitabs li a.disabled:hover { + text-decoration: none; +} Added: public/stylesheets/common/Submenu.css =================================================================== --- public/stylesheets/common/Submenu.css (rev 0) +++ public/stylesheets/common/Submenu.css 2008-05-01 19:04:14 UTC (rev 148) @@ -0,0 +1,46 @@ +#content .submenu { + background: #f7f7f7; + border-bottom: 1px solid #cccccc; + padding: 8px 10px 8px 10px; + float: left; + width: 627px; +} + +#content .submenushort { + background: #f7f7f7; + border-bottom: 1px solid #cccccc; + padding: 5px 0px 5px 15px; +} + +.submenu .menu_block { + float: left; +} + +.submenu .menu_block.selector { + padding-right: 10px; +} + +.submenu .menu_block.selector select { + margin-left: 5px; +} + +.submenu .buttons { + list-style: none; + margin: 0px; + padding: 0px; +} + +.submenu .buttons li { + float: left; +} + +.submenu .buttons li a { + padding: 4px 5px 4px 5px; + display: block; +} + +.submenu .disabled { + color: #aaaaaa; + cursor: default; + text-decoration: none; +} Added: public/stylesheets/common/Tab.css =================================================================== --- public/stylesheets/common/Tab.css (rev 0) +++ public/stylesheets/common/Tab.css 2008-05-01 19:04:14 UTC (rev 148) @@ -0,0 +1,87 @@ +#content .tabs { + display:block; + padding: 20px 0px 0px 0px; + border-bottom: 1px solid #898989; + float: left; + width: 647px; +} + +.tabs .left { + float: left; + padding-left: 10px; + margin-bottom: -1px; +} + +.tabs .right { + float: right; + padding-right: 10px; + margin-bottom: -1px; +} + +.toggle_tabs { + display: block; + list-style: none; + text-align: center; +} + +.toggle_tabs li { + display: block; + float: left; + margin: 0px; +} + +.toggle_tabs li a { + display: block; + border: 1px solid #898989; + border-left: 0px; + color: #333; + font-weight: bold; + padding :4px 8px 6px 9px; + background: #f1f1f1; +} + +.toggle_tabs li a:focus { + outline: 0px; +} + +.toggle_tabs li.first a { + border: 1px solid #898989; +} + +.toggle_tabs li a.selected { + margin-left: -1px; + background: #6d84b4; + border: 1px solid #3b5998; + border-left: 1px solid #5973a9; + border-right: 1px solid #5973a9; + color: #ffffff; +} + +.toggle_tabs li.last a.selected { + margin-left: -1px; + border-left: 1px solid #5973a9; + border-right: 1px solid #36538f; +} + +.toggle_tabs li.first a.selected { + margin: 0px; + border-left: 1px solid #36538f; + border-right: 1px solid #5973a9; +} + +.toggle_tabs li.first.last a.selected { + border: 1px solid #36538f; +} + +.toggle_tabs li a.selected:hover { + text-decoration: none; +} + +.toggle_tabs li a.disabled { + color: #999999; + cursor: default; +} + +.toggle_tabs li a.disabled:hover { + text-decoration:none; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-03 12:06:03
|
Revision: 157 http://isocial.svn.sourceforge.net/isocial/?rev=157&view=rev Author: aguidrevitch Date: 2008-05-03 05:06:09 -0700 (Sat, 03 May 2008) Log Message: ----------- IE6 dialog fixes Modified Paths: -------------- app/views/dialog/_access.tpl app/views/dialog/_new_city.tpl public/javascripts/dialog.js public/stylesheets/dialog.css Modified: app/views/dialog/_access.tpl =================================================================== --- app/views/dialog/_access.tpl 2008-05-02 19:38:21 UTC (rev 156) +++ app/views/dialog/_access.tpl 2008-05-03 12:06:09 UTC (rev 157) @@ -1,4 +1,5 @@ <div id="access_dialog_<?= @$params['reference_element'] ?>" class="action_dialog access_dialog"> + <div id="dlgborder"> <div id="dlgheader">_{Who can see this?}</div> <div id="dlgbody"> <div class="field"><?= $text_helper->translate(@$params['title']) ?></div> @@ -29,5 +30,6 @@ } }).show(); </script> + </div> </div> Modified: app/views/dialog/_new_city.tpl =================================================================== --- app/views/dialog/_new_city.tpl 2008-05-02 19:38:21 UTC (rev 156) +++ app/views/dialog/_new_city.tpl 2008-05-03 12:06:09 UTC (rev 157) @@ -1,4 +1,5 @@ <div id="ncdlg" class="action_dialog city_dialog"> + <div id="dlgborder"> <div id="dlgheader">_{Add New City}</div> <div id="dlgbody"> <form id="city_addition_form"> @@ -78,5 +79,5 @@ }).show(); </script> - + </div> </div> Modified: public/javascripts/dialog.js =================================================================== --- public/javascripts/dialog.js 2008-05-02 19:38:21 UTC (rev 156) +++ public/javascripts/dialog.js 2008-05-03 12:06:09 UTC (rev 157) @@ -22,7 +22,7 @@ Object.extend(this.dialog.style, { position: 'absolute', - zIndex: 9999 + xzIndex: 9999 }); var offset = this.reference.viewportOffset(); @@ -66,26 +66,21 @@ show: function (event) { Element.insert(document.body, this.dialog); - if (!this.dialog.firstDescendant().hasClassName('select-free') ) { - //this.dialog.insert({top: '<iframe class="select-free" xsrc="about:blank"></iframe>'}); - this.dialog.insert('<!--[if lte IE 6.5]><iframe></iframe><![endif]-->'); + + if (Prototype.Browser.IE && !this.ieHack) { + var version = parseFloat(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE") + 5)); + if (version < 7.0) { + this.ieHack = new Element('iframe', { src: 'about:blank' }); + this.ieHack.setStyle({ + top: "0px", + left: "0px", + height: this.dialog.offsetHeight + "px", + width: this.dialog.offsetWidth + "px", + backgroundColor: 'red' + }); + this.dialog.insert(this.ieHack); + } } - - /* - if (!this.dialog.firstDescendant().hasClassName('select-free') ) { - this.dialog.insert({ top: this.ieHack }); - } - - ieHack.setStyle({ - position: 'absolute', - left: this.dialog.offsetLeft + "px", - top: this.dialog.offsetTop + "px", - height: this.dialog.offsetHeight + "px", - width: this.dialog.offsetWidth + "px", - zIndex: this.dialog.zIndex - 10, - border: '1px solid red'}); - */ - Effect.Appear(this.dialog, { duration: 0.3 }); if (this.options.onShow) { Modified: public/stylesheets/dialog.css =================================================================== --- public/stylesheets/dialog.css 2008-05-02 19:38:21 UTC (rev 156) +++ public/stylesheets/dialog.css 2008-05-03 12:06:09 UTC (rev 157) @@ -1,24 +1,22 @@ - .action_dialog { - border: 6px solid #999999; - overflow: auto; - position: relative; - background-color: white; - overflow: hidden; + position: absolute; } +/* IE6 hack start */ .action_dialog iframe { display:none;/*sorry for IE5*/ display/**/:block;/*sorry for IE5*/ position:absolute;/*must have*/ - top:0;/*must have*/ - left:0;/*must have*/ z-index:-1;/*must have*/ filter:mask();/*must have*/ - width:100%;/* must have for any big value*/ - height:100%/* must have for any big value*/; } +.action_dialog #dlgborder { + background-color: #999999; + padding: 6px; +} +/* IE6 hack end */ + .action_dialog #dlgheader { background-color: #6d84b4; border: 1px solid #3b5998; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-05-03 14:18:39
|
Revision: 160 http://isocial.svn.sourceforge.net/isocial/?rev=160&view=rev Author: aguidrevitch Date: 2008-05-03 07:18:47 -0700 (Sat, 03 May 2008) Log Message: ----------- dialogs fixed as prototypejs suggests Modified Paths: -------------- app/views/dialog/_access.tpl app/views/dialog/_new_city.tpl app/views/profile/contact.tpl public/javascripts/dialog.js public/stylesheets/common/Application.css public/stylesheets/common/Form.css public/stylesheets/common/Input.css public/stylesheets/dialog.css Modified: app/views/dialog/_access.tpl =================================================================== --- app/views/dialog/_access.tpl 2008-05-03 13:43:35 UTC (rev 159) +++ app/views/dialog/_access.tpl 2008-05-03 14:18:47 UTC (rev 160) @@ -1,5 +1,4 @@ <div id="access_dialog_<?= @$params['reference_element'] ?>" class="action_dialog access_dialog"> - <div id="dlgborder"> <div id="dlgheader">_{Who can see this?}</div> <div id="dlgbody"> <div class="field"><?= $text_helper->translate(@$params['title']) ?></div> @@ -30,6 +29,5 @@ } }).show(); </script> - </div> </div> Modified: app/views/dialog/_new_city.tpl =================================================================== --- app/views/dialog/_new_city.tpl 2008-05-03 13:43:35 UTC (rev 159) +++ app/views/dialog/_new_city.tpl 2008-05-03 14:18:47 UTC (rev 160) @@ -1,15 +1,14 @@ <div id="ncdlg" class="action_dialog city_dialog"> - <div id="dlgborder"> <div id="dlgheader">_{Add New City}</div> <div id="dlgbody"> <form id="city_addition_form"> <div class="editform"> <div id="ncdlg_errors"></div> <div class="formrow"> - <label class="xshortlabel">_{City Name}</label><?= $form_helper->text_field('city', 'name', array('class' => 'mediumtextinput')) ?> + <label>_{City Name}</label><?= $form_helper->text_field('city', 'name', array('class' => 'mediumtextinput')) ?> </div> <div class="formrow"> - <label class="xshortlabel">_{Country}</label> + <label>_{Country}</label> <?= $form_options_helper->select('city', 'country_id', $Country->collect($Country->find(), 'name', 'id'), array(), @@ -48,7 +47,7 @@ yes: '_{Save}', cancel: '_{Cancel}', - onShow: function (event, element) { + onShow: function () { $('ncdlg_errors').update(); $('ncdlg_regions_list').update(); @@ -56,7 +55,7 @@ $('city_name').setValue($F(input)); }, - onYes: function (event, element) { + onYes: function (object) { new Ajax.Request('/city/add', { postBody: $('city_addition_form').serialize(), onSuccess: function (response) { @@ -65,7 +64,7 @@ if (data.id) { $(hidden).setValue(data.id); $(input).setValue(data.name); - Effect.Fade(element, {duration: 0.3}); + object.hide(); } } else { $('ncdlg_errors').update(response.responseText); @@ -73,11 +72,10 @@ } }); }, - onCancel: function (event, element) { - Effect.Fade(element, { duration: 0.3 }); + onCancel: function (object, event) { + object.hide(); } }).show(); </script> - </div> </div> Modified: app/views/profile/contact.tpl =================================================================== --- app/views/profile/contact.tpl 2008-05-03 13:43:35 UTC (rev 159) +++ app/views/profile/contact.tpl 2008-05-03 14:18:47 UTC (rev 160) @@ -25,8 +25,6 @@ <div class="formcol"> <div class="middle"> <?= $form_helper->text_field('contact_profile', 'im', array('class' => 'mediumtextinput') )?> - </div> - <div class="third"> <select class="imselect"> <option>AIM</option> <option>Google talk</option> @@ -36,6 +34,9 @@ <option>Gadu-Gadu</option> <option>ICQ</option> </select> + </div> + <div class="third"> + <?= $access_field_helper->access_field('contact_profile', 'im_access', array('title' => 'Instant Messenger')); ?> </div> </div> </div> Modified: public/javascripts/dialog.js =================================================================== --- public/javascripts/dialog.js 2008-05-03 13:43:35 UTC (rev 159) +++ public/javascripts/dialog.js 2008-05-03 14:18:47 UTC (rev 160) @@ -17,23 +17,13 @@ return; } - //this.dialog = this.options.clone ? Element.extend($(element).cloneNode(true)) : $(element); this.dialog = $(element); - - Object.extend(this.dialog.style, { - position: 'absolute', - xzIndex: 9999 - }); - var offset = this.reference.viewportOffset(); - var dimensions = this.reference.getDimensions(); - var vdimensions = document.viewport.getDimensions(); + var offset = this.reference.viewportOffset(); + var dimensions = this.reference.getDimensions(); + var vdimensions = document.viewport.getDimensions(); var vscrolloffset = document.viewport.getScrollOffsets(); - - if (this.options['width']) { - var width = new String(this.options['width']); - this.dialog.style.width = width.endsWith('px') ? width : width + 'px'; - } + //alert(vdimensions.width + " : " + offset.left + " : " + dimensions.width); if (this.options['hfloat'] == 'right') { this.dialog.style.right = vdimensions.width - offset.left - dimensions.width + "px"; @@ -42,7 +32,7 @@ } if (this.options['vfloat'] == 'bottom') { - this.dialog.style.top = offset.top + dimensions.height + vscrolloffset.top + "px"; + this.dialog.style.top = vscrolloffset.top + offset.top + dimensions.height + "px"; } else { this.dialog.style.bottom = offset.top + "px"; } @@ -64,35 +54,39 @@ }, + fixIEOverlapping: function () { + Element.clonePosition(this.iefix, this.dialog); + 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 (Prototype.Browser.IE && !this.ieHack) { - var version = parseFloat(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE") + 5)); - if (version < 7.0) { - this.ieHack = new Element('iframe', { src: 'about:blank' }); - this.ieHack.setStyle({ - top: "0px", - left: "0px", - height: this.dialog.offsetHeight + "px", - width: this.dialog.offsetWidth + "px", - backgroundColor: 'red' - }); - this.dialog.insert(this.ieHack); - } + if(!this.iefix && Prototype.Browser.IE && Element.getStyle(this.dialog, 'position')=='absolute') { + new Insertion.After(this.dialog, + '<iframe id="' + this.dialog.id + '_iefix" '+ + 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' + + 'src="javascript:false" frameborder="0" scrolling="no"></iframe>'); + this.iefix = $(this.dialog.id+'_iefix'); } - Effect.Appear(this.dialog, { duration: 0.3 }); + this.dialog.show(); + if (this.iefix) this.fixIEOverlapping(); + if (this.options.onShow) { - this.options.onShow(event, this.dialog); + this.options.onShow(this, event); } }, hide: function (event) { - - Effect.Fade(this.dialog, { duration: 0.3 }); + if(this.iefix) + this.iefix.hide(); + this.dialog.hide(); if (this.options.onHide) { - this.options.onHide(event, this.dialog); + this.options.onHide(this, event); } }, @@ -104,19 +98,19 @@ onYes: function (event) { if (this.options.hide) this.hide(); if (this.options.onYes) { - this.options.onYes(event, this.dialog); + this.options.onYes(this, event); } }, onNo: function (event) { if (this.options.hide) this.hide(); if (this.options.onNo) { - this.options.onNo(event, this.dialog); + this.options.onNo(this, event); } }, onCancel: function (event) { if (this.options.hide) this.hide(); if (this.options.onCancel) { - this.options.onCancel(event, this.dialog); + this.options.onCancel(this, event); } } }); Modified: public/stylesheets/common/Application.css =================================================================== --- public/stylesheets/common/Application.css 2008-05-03 13:43:35 UTC (rev 159) +++ public/stylesheets/common/Application.css 2008-05-03 14:18:47 UTC (rev 160) @@ -374,4 +374,5 @@ .lock.short { height: 20px; + width: 0px; } Modified: public/stylesheets/common/Form.css =================================================================== --- public/stylesheets/common/Form.css 2008-05-03 13:43:35 UTC (rev 159) +++ public/stylesheets/common/Form.css 2008-05-03 14:18:47 UTC (rev 160) @@ -10,7 +10,7 @@ .editform .formrow { clear: both; vertical-align: top; - padding: 0px 0px 3px 0px; + margin: 0px 0px 5px 0px; line-height: 16px; } @@ -68,7 +68,7 @@ } .formrow .formcol .third { - float: right; + float: left; } .formrow .formcol .tnote { Modified: public/stylesheets/common/Input.css =================================================================== --- public/stylesheets/common/Input.css 2008-05-03 13:43:35 UTC (rev 159) +++ public/stylesheets/common/Input.css 2008-05-03 14:18:47 UTC (rev 160) @@ -3,7 +3,7 @@ border: 1px solid #bdc7d8; font-family: verdana, arial, sans-serif; font-size: 11px; - margin: 0px; + margin: 0px 2px 0px 0px; } .submitinput, .buttoninput, .cancelinput { Modified: public/stylesheets/dialog.css =================================================================== --- public/stylesheets/dialog.css 2008-05-03 13:43:35 UTC (rev 159) +++ public/stylesheets/dialog.css 2008-05-03 14:18:47 UTC (rev 160) @@ -1,22 +1,8 @@ .action_dialog { position: absolute; + border: 6px solid #999999; } -/* IE6 hack start */ -.action_dialog iframe { - display:none;/*sorry for IE5*/ - display/**/:block;/*sorry for IE5*/ - position:absolute;/*must have*/ - z-index:-1;/*must have*/ - filter:mask();/*must have*/ -} - -.action_dialog #dlgborder { - background-color: #999999; - padding: 6px; -} -/* IE6 hack end */ - .action_dialog #dlgheader { background-color: #6d84b4; border: 1px solid #3b5998; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2008-06-27 14:58:48
|
Revision: 255 http://isocial.svn.sourceforge.net/isocial/?rev=255&view=rev Author: dim0s77 Date: 2008-06-27 07:58:57 -0700 (Fri, 27 Jun 2008) Log Message: ----------- added search field with submit button. more beautifuling Modified Paths: -------------- app/views/groupapp/board/index.tpl app/views/groupapp/group/browse.tpl public/stylesheets/common/Application.css public/stylesheets/common/Input.css public/stylesheets/groupapp/Board.css public/stylesheets/groupapp/Group.css Added Paths: ----------- public/images/search_btn.gif public/images/search_btnov.gif Modified: app/views/groupapp/board/index.tpl =================================================================== --- app/views/groupapp/board/index.tpl 2008-06-26 17:36:48 UTC (rev 254) +++ app/views/groupapp/board/index.tpl 2008-06-27 14:58:57 UTC (rev 255) @@ -43,10 +43,14 @@ {?topics} <div class="messages_list"> <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 class="left"> + _{The total number of discussion topics}: <?= count($topics) ?> + </div> + <div class="right"> + <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> - <div class="clearfix"></div> <div class="container"> {loop topics} Modified: app/views/groupapp/group/browse.tpl =================================================================== --- app/views/groupapp/group/browse.tpl 2008-06-26 17:36:48 UTC (rev 254) +++ app/views/groupapp/group/browse.tpl 2008-06-27 14:58:57 UTC (rev 255) @@ -24,8 +24,9 @@ <div class="title_text">_{Search groups}:</div> <form> - <input class="mediumtextinput search" id="searchfield" name="" type="text" value="_{Search by name}" onclick="on_search_group_click(this)" onblur="on_search_group_blur(this)" /> + <input class="mediumtextinput search" id="searchfield" name="" type="text" value="_{Search by name}" onclick="on_search_group_click(this)" onblur="on_search_group_blur(this)" /><a class="submitsearchbtn">_{Search}</a> </form> + <div class="clearfix"></div> <div class="or_text">_{or}</div> @@ -61,16 +62,16 @@ {loop groups} <div class="group_row"> + <div class="avatar"> + <a href="/groupapp/group/show_group/{group.id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> + </div> + <div class="actions"> <ul class="actions_list"> <li><a href="#">_{Join Group}</a></li> </ul> </div> - <div class="avatar"> - <a href="/groupapp/group/show_group/{group.id?}"><img src="/images/nophoto_men_sm.gif" alt="" class=""></a> - </div> - <div class="info"> <div class="name"><a href="/groupapp/group/show_group/{group.id?}">{group.name}</a></div> <div class="other"><span class="param">_{Members count}:</span> {group.members_count}</div> Added: public/images/search_btn.gif =================================================================== (Binary files differ) Property changes on: public/images/search_btn.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: public/images/search_btnov.gif =================================================================== (Binary files differ) Property changes on: public/images/search_btnov.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: public/stylesheets/common/Application.css =================================================================== --- public/stylesheets/common/Application.css 2008-06-26 17:36:48 UTC (rev 254) +++ public/stylesheets/common/Application.css 2008-06-27 14:58:57 UTC (rev 255) @@ -397,3 +397,4 @@ height: 20px; width: 0px; } + Modified: public/stylesheets/common/Input.css =================================================================== --- public/stylesheets/common/Input.css 2008-06-26 17:36:48 UTC (rev 254) +++ public/stylesheets/common/Input.css 2008-06-27 14:58:57 UTC (rev 255) @@ -3,7 +3,7 @@ border: 1px solid #bdc7d8; font-family: verdana, arial, sans-serif; font-size: 11px; - margin: 0px 2px 0px 0px; + margin: 0px 0px 0px 0px; } .submitinput, .buttoninput, .cancelinput { @@ -40,6 +40,7 @@ padding-left: 20px; background: url('/images/magnifier.png') no-repeat 2px; background-color: #ffffff; + float: left; } .mediumtextinput.search.right { @@ -50,3 +51,18 @@ border: 0px; margin: 4px 0px 0px 0px; } + +a.submitsearchbtn { + float: left; + display: block; + width: 16px; + height: 25px; + background-image: url(/images/search_btn.gif); + text-indent: -999em; + text-decoration: none; + cursor: pointer; +} + +a.submitsearchbtn:hover { + background-position: bottom; +} Modified: public/stylesheets/groupapp/Board.css =================================================================== --- public/stylesheets/groupapp/Board.css 2008-06-26 17:36:48 UTC (rev 254) +++ public/stylesheets/groupapp/Board.css 2008-06-27 14:58:57 UTC (rev 255) @@ -20,7 +20,6 @@ .messages_list .info { padding: 5px 10px 5px 20px; - text-align: right; border-bottom: solid 1px #dddddd; } @@ -29,6 +28,10 @@ padding-top: 5px; } +.messages_list .info .right { + float: right; +} + .messages_list .container { background: #f7f7f7; padding: 10px; Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-06-26 17:36:48 UTC (rev 254) +++ public/stylesheets/groupapp/Group.css 2008-06-27 14:58:57 UTC (rev 255) @@ -166,16 +166,16 @@ } .group_row .avatar { - position: absolute; + float: left; width: 100px; padding: 10px 5px 10px 5px; text-align: center; } .group_row .info { - padding: 10px 5px 10px 5px; - margin-left: 110px; - position: relative; + padding: 10px 0px 10px 0px; + margin-left: 115px; + margin-right: 130px; } .group_row .info .name { @@ -223,12 +223,12 @@ color: #333333; font-weight: bold; font-size: 12px; - padding: 5px 0px 0px 0px; + margin: 0px 0px 3px 0px; } .or_text { color: #777777; - padding: 5px 0px 5px 0px; + margin: 10px 0px 10px 0px; } .filter_name { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-14 20:16:11
|
Revision: 82 http://isocial.svn.sourceforge.net/isocial/?rev=82&view=rev Author: aguidrevitch Date: 2008-03-14 13:16:11 -0700 (Fri, 14 Mar 2008) Log Message: ----------- multiple cross-browser css/html/javascript fixes Modified Paths: -------------- app/views/default/_sidebar.tpl app/views/layouts/application.tpl app/views/message/_rows.tpl app/views/message/_thread.tpl app/views/message/inbox.tpl app/views/message/outbox.tpl app/views/message/send.tpl app/views/message/show.tpl app/views/profile/basic.tpl app/views/shared/dialog.tpl public/javascripts/autocomplete.js public/stylesheets/Application.css public/stylesheets/Default.css public/stylesheets/Message.css public/stylesheets/autocomplete.css Added Paths: ----------- public/stylesheets/dialog.css Modified: app/views/default/_sidebar.tpl =================================================================== --- app/views/default/_sidebar.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/default/_sidebar.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -2,11 +2,11 @@ <form action="/user/login" method="post"> <label> <span>_{Email}:</span> - <input class="sidetextinput" type="text" name="email"> + <input class="textinput sidetextinput" type="text" name="email"> </label> <label> <span>_{Password}:</span> - <input class="sidetextinput" type="password" name="password"> + <input class="textinput sidetextinput" type="password" name="password"> </label> <label class="persistent"> <input class="checkboxinput" type="checkbox" name="remember_me"> Modified: app/views/layouts/application.tpl =================================================================== --- app/views/layouts/application.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/layouts/application.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -4,6 +4,7 @@ <title><?= @$title ?></title> <link href="/stylesheets/reset.css" rel="stylesheet" type="text/css"> <link href="/stylesheets/autocomplete.css" rel="stylesheet" type="text/css"> +<link href="/stylesheets/dialog.css" rel="stylesheet" type="text/css"> <link href="/stylesheets/Application.css" rel="stylesheet" type="text/css"> <link href="/stylesheets/<?= $controller->getControllerName() ?>.css" rel="stylesheet" type="text/css"> <script src="/javascripts/prototype.js" type="text/javascript"></script> Modified: app/views/message/_rows.tpl =================================================================== --- app/views/message/_rows.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/message/_rows.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -33,7 +33,7 @@ </div> </td> <td class="delete_msg"> - <a href="#" onclick="delete_single_thread(this)" name="{message.id}"> </a> + <a href="#" onclick="delete_single_thread(this); return false;" name="{message.id}"> </a> </td> </tr> {else} @@ -43,5 +43,5 @@ {end} </tbody> </table> - -<div class="inbox_footer"><div class="mailbox_size">{message_threads} _{Message Threads}</div></div> +<div class="footer"><div class="mailbox_size">{message_threads} _{Message Threads}</div></div> +<div class="clearfix"></div> Modified: app/views/message/_thread.tpl =================================================================== --- app/views/message/_thread.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/message/_thread.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -17,5 +17,6 @@ </div> <div class="message_body">{message.body?}</div> </div> +<div class="clearfix"></div> <div class="divide_line"> </div> {end} Modified: app/views/message/inbox.tpl =================================================================== --- app/views/message/inbox.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/message/inbox.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -1,9 +1,9 @@ <?= $controller->renderPartial("menu") ?> -<div class="inbox_submenu"> +<div class="submenu"> <div class="menu_block selector"> <label for="action_select">_{Select}: - <select class="" onchange="onselect(this)" id="action_select" name="action_selector"> + <select onchange="doselect(this)" id="action_select" name="action_selector"> <option selected="selected" value="_">---------</option> <option value="none">_{None}</option> <option value="read">_{Read}</option> @@ -16,11 +16,12 @@ <ul id="inbox_action" class="buttons"> <li><a class="disabled">_{Mark as}:</a></li> <li><a href="#" onclick="mark_as_unread(this)" id="unread_link" class="disabled">_{Unread},</a></li> - <li><a href="#" onclick="mark_as_read(this)" id="read_link" class="disabled">_{Read};</a></li> - <li><a href="#" onclick="delete_threads(this)" id="delete_link" class="disabled">_{Delete}</a></li> + <li><a href="#" onclick="mark_as_read(this);" id="read_link" class="disabled">_{Read};</a></li> + <li><a href="#" onclick="delete_threads(this);" id="delete_link" class="disabled">_{Delete}</a></li> </ul> </div> </div> +<div class="clearfix"></div> <form id="messages_form" action="/message/inbox" method="post" onsubmit="return false;"> <div id="messages"> @@ -46,7 +47,7 @@ checkunread.length || checkread.length ? $("delete_link").removeClassName('disabled') : $("delete_link").addClassName('disabled'); }; -function onselect (element) { +function doselect (element) { var checkboxes; switch (element.getValue()) { case "none": @@ -65,7 +66,10 @@ break; } if (checkboxes) { - checkboxes.invoke('click'); + /* bug , see http://dev.rubyonrails.org/ticket/9976 + checkboxes.invoke('click'); + */ + checkboxes.each( function(el) { el.click(); }); } }; Modified: app/views/message/outbox.tpl =================================================================== --- app/views/message/outbox.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/message/outbox.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -1,9 +1,9 @@ <?= $controller->renderPartial("menu") ?> -<div class="inbox_submenu"> +<div class="submenu"> <div class="menu_block selector"> <label for="action_select">_{Select}: - <select class="" onchange="onselect(this)" id="action_select" name="action_selector"> + <select onchange="doselect(this)" id="action_select" name="action_selector"> <option selected="selected" value="_">---------</option> <option value="none">_{None}</option> <option value="all">_{All}</option> @@ -12,10 +12,11 @@ </div> <div class="menu_block"> <ul id="inbox_action" class="buttons"> - <li><a href="#" onclick="delete_threads(this)" id="delete_link" class="disabled">_{Delete}</a></li> + <li><a href="#" onclick="delete_threads(this); return false;" id="delete_link" class="disabled">_{Delete}</a></li> </ul> </div> </div> +<div class="clearfix"></div> <form id="messages_form" action="/message/outbox" method="post" onsubmit="return false;"> <div id="messages"> @@ -36,9 +37,9 @@ checked.length ? $("delete_link").removeClassName('disabled') : $("delete_link").addClassName('disabled'); }; -function onselect (element) { +function doselect (element) { var checkboxes; - switch (element.getValue()) { + switch (Form.Element.getValue(element)) { case "none": checkboxes = $$('input[type=checkbox]:checked'); break; @@ -46,14 +47,18 @@ checkboxes = $$('input[type=checkbox]:not(:checked)'); break; } - if (checkboxes) { - checkboxes.invoke('click'); + + 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({ - reference: element, + reference: Element.extend(element), title: '_{Delete Threads}', body: '_{Are you sure you want to delete selected threads}?', yes: '_{Delete}', @@ -72,12 +77,11 @@ ); } }); - return false; } function delete_single_thread (element) { new Dialog.Box({ - reference: element, + reference: Element.extend(element), title: '_{Delete Thread}', body: '_{Are you sure you want to delete this thread}?', yes: '_{Delete}', @@ -101,7 +105,6 @@ ); } }); - return false; } </script> Modified: app/views/message/send.tpl =================================================================== --- app/views/message/send.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/message/send.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -8,8 +8,7 @@ <label>_{To}:</label> <?= $form_options_helper->select('message', 'recipient', - $User->collect($current_user->getFriends(), 'name', 'id'), - array('class' => 'textinput') ); ?> + $User->collect($current_user->getFriends(), 'name', 'id'), array(), array('class' => 'textinput')); ?> </div> <div class="formrow"> <label>_{Subject}:</label> Modified: app/views/message/show.tpl =================================================================== --- app/views/message/show.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/message/show.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -23,6 +23,7 @@ <div class="sub_controls"><a href="#" onclick="delete_single_thread(this)" name="{messages-0.id}">_{Delete}</a></div> </form> </div> + <div class="clearfix"></div> </div> <script> Modified: app/views/profile/basic.tpl =================================================================== --- app/views/profile/basic.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/profile/basic.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -15,7 +15,7 @@ </div> <div class="formrow"> <label>_{Hometown}:</label> - <?= $city_helper->city_field('basic_profile', 'city_id', array('class' => 'autocomplete')); ?> + <?= $city_helper->city_field('basic_profile', 'city_id', array('class' => 'textinput autocomplete')); ?> </div> <div class="formrow"> <label>_{Political views}:</label> @@ -23,7 +23,7 @@ </div> <div class="formrow"> <label>_{Religious views}:</label> - <?= $auto_complete_helper->text_field_with_auto_complete('basic_profile', 'religious_view', array('autocomplete' => 'on', 'class' => 'autocomplete'), array('skip_style' => true) )?> + <?= $auto_complete_helper->text_field_with_auto_complete('basic_profile', 'religious_view', array('autocomplete' => 'on', 'class' => 'textinput autocomplete'), array('skip_style' => true) )?> </div> <div class="formrow"> <label></label> Modified: app/views/shared/dialog.tpl =================================================================== --- app/views/shared/dialog.tpl 2008-03-14 16:58:46 UTC (rev 81) +++ app/views/shared/dialog.tpl 2008-03-14 20:16:11 UTC (rev 82) @@ -1,12 +1,13 @@ <div id="dlg" class="action_dialog" style="display: none"> - <div id="dlgheader" class="header"> </div> - <div id="dlgbody" class="body"> </div> - <div id="dlgfooter" class="footer"> + <div id="dlgheader"> </div> + <div id="dlgbody"> </div> + <div id="dlgfooter"> <div id="dlgbuttons" class="buttons"> <input id="dlgyes" class="submitinput" type="button" value="_{Yes}"> <input id="dlgno" class="submitinput" type="button" value="_{No}"> <input id="dlgcancel" class="cancelinput" type="button" value="_{Cancel}"> </div> </div> + <div class="clearfix"></div> </div> Modified: public/javascripts/autocomplete.js =================================================================== --- public/javascripts/autocomplete.js 2008-03-14 16:58:46 UTC (rev 81) +++ public/javascripts/autocomplete.js 2008-03-14 20:16:11 UTC (rev 82) @@ -15,15 +15,15 @@ }); function city_updated (input, prev, hidden) { - if ($F(input)) { - if ($F(input) != $F(prev)) { - $(input).value = ''; - $(hidden).value = ''; - $(prev).value = ''; - new Effect.Highlight(input, { keepBackgroundImage: true, startcolor: '#ff0000', afterFinish: function (obj) { obj.element.setStyle('') } }); - } - } else { - $(hidden).value = ''; - } + if ($F(input) && (!$F(hidden) || $F(input) != $F(prev))) { + $(input).value = ''; + $(hidden).value = ''; + $(prev).value = ''; + new Effect.Highlight(input, { keepBackgroundImage: true, startcolor: '#ff0000', afterFinish: function (obj) { obj.element.setStyle('') } }); + } else if (!$F(input)) { + $(hidden).value = ''; + $(prev).value = ''; + } + } Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-03-14 16:58:46 UTC (rev 81) +++ public/stylesheets/Application.css 2008-03-14 20:16:11 UTC (rev 82) @@ -3,18 +3,12 @@ font-size: 11px; } -input, textarea { - padding: 3px; - border: 1px solid #bdc7d8; - font-family: verdana, arial, sans-serif; - font-size: 11px; -} - -select{ +select { border:1px solid #BDC7D8; font-family:verdana,arial,sans-serif; font-size:11px; - padding:2px; + padding: 3px; + line-height: 22px; } label { @@ -47,7 +41,7 @@ a.logo { position: absolute; display: block; - width: 150px; + width: 151px; height: 55px; background-image: url(/images/logo.gif); } @@ -273,7 +267,7 @@ clear: both; height: 0px; width: 0px; - line-heght: 0px; + line-height: 0px; overflow: hidden; } @@ -294,6 +288,8 @@ } .submitinput, .buttoninput { + padding: 3px; + font-size: 11px; cursor: pointer; color: white; background-color: #3b5998; @@ -306,6 +302,8 @@ } .cancelinput { + padding: 3px; + font-size: 11px; cursor: pointer; color: black; background-color: lightgray; @@ -317,7 +315,10 @@ border-right: 1px solid #0e1f5b; } -.textinput, .passwordinput { +textarea, .textinput, .passwordinput { + border: 1px solid #bdc7d8; + font-family: verdana, arial, sans-serif; + font-size: 11px; width: 200px; margin: 0px 0px 5px 0px; padding: 3px; @@ -326,6 +327,14 @@ .shorttextinput { width: 80px; + padding: 3px; + border: 1px solid #bdc7d8; + font-family: verdana, arial, sans-serif; + font-size: 11px; + width: 200px; + margin: 0px 0px 5px 0px; + padding: 3px; + font-size: 11px; } .checkboxinput { @@ -366,6 +375,7 @@ width: 645px; } + .tabs .left { float: left; padding-left: 10px; @@ -380,25 +390,25 @@ .toggle_tabs { display: block; - margin: 0px; - padding: 0px; list-style: none; text-align: center; } .toggle_tabs li { - display: inline; - padding: 2px 0px 3px 0px; - background: #f1f1f1; - line-height: 22px; + display: block; + float: left; + margin: 0px; } .toggle_tabs li a { + display: block; border: 1px solid #898989; border-left: 0px; color: #333; font-weight: bold; - padding:2px 8px 3px 9px; + margin-rigth: 10px; + padding :4px 8px 6px 9px; + background: #f1f1f1; } .toggle_tabs li a small { @@ -452,6 +462,47 @@ text-decoration:none; } +#content .submenu { + background: #f7f7f7; + border-bottom: 1px solid #ccc; + padding: 8px 20px 8px 20px; + float: left; + width: 605px; +} + +.submenu .menu_block { + float: left; +} + +.submenu .menu_block.selector { + padding-right: 5px; +} + +.submenu .menu_block.selector select { + margin-left: 5px; +} + +.submenu .buttons { + list-style: none; + margin: 0px; + padding: 0px; +} + +.submenu .buttons li { + float: left; +} + +.submenu .buttons li a { + padding: 4px 5px 4px 5px; + display: block; +} + +.submenu .disabled { + color: #aaaaaa; + cursor: default; + text-decoration: none; +} + .divider { margin: 5px 0px 5px 0px; border-bottom: 1px solid #cccccc; @@ -518,3 +569,11 @@ .formrow .note { font-size: 10px; } + +.footer { + float: left; + display: block; + padding: 0px 10px 8px 13px; + background: #f7f7f7; + width: 622px; +} Modified: public/stylesheets/Default.css =================================================================== --- public/stylesheets/Default.css 2008-03-14 16:58:46 UTC (rev 81) +++ public/stylesheets/Default.css 2008-03-14 20:16:11 UTC (rev 82) @@ -2,5 +2,4 @@ width: 120px; margin: 0px 0px 5px 0px; padding: 3px; - font-size: 11px; } \ No newline at end of file Modified: public/stylesheets/Message.css =================================================================== --- public/stylesheets/Message.css 2008-03-14 16:58:46 UTC (rev 81) +++ public/stylesheets/Message.css 2008-03-14 20:16:11 UTC (rev 82) @@ -1,42 +1,3 @@ -#content .inbox_submenu { - background: #f7f7f7; - border-bottom: 1px solid #ccc; - padding: 8px 20px 28px 20px; -} - -.inbox_submenu .menu_block { - float: left; -} - -.inbox_submenu .menu_block.selector { - padding-right: 5px; -} - -.inbox_submenu .menu_block.selector select { - margin-left: 5px; -} - -.inbox_submenu .buttons { - list-style: none; - margin: 0px; - padding: 0px; -} - -.inbox_submenu .buttons li { - float: left; -} - -.inbox_submenu .buttons li a { - padding: 4px 5px 4px 5px; - display: block; -} - -.inbox_submenu .disabled { - color: #aaaaaa; - cursor: default; - text-decoration: none; -} - .no_messages { color: #666666; font-size: 13px; @@ -119,8 +80,6 @@ .message_row .msg .subject { padding: 2px 0px 3px 22px; - background-position: 0px 1px 0px 1px; - background-repeat: no-repeat; } .message_row .msg .body_wrap { @@ -149,21 +108,7 @@ background: #3B5998 url(/images/x_to_hide_hover.gif) no-repeat; } -.inbox_footer { - display: block; - margin-top: -1px; - padding: 0px 10px 8px 13px; - border-top: 1px solid #cccccc; - background: #f7f7f7; - overflow: auto; -} -.inbox_footer .mailbox_size { - float: left; - padding: 7px 0px 0px 0px; - color: #999999; -} - .messages_thread { padding: 20px 30px 0px 30px; } @@ -184,18 +129,6 @@ font-weight: normal; } -.message { - //height: 1%; -} - -.message:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} - .message div { float: left; padding: 5px 0px 10px 0px; @@ -283,38 +216,8 @@ overflow: hidden; } -.action_dialog { - border: 6px solid #999999; - width: 465px; - overflow: auto; - top: 34px; - position: relative; - z-index: 100; +.footer .mailbox_size { + float: left; + padding: 7px 0px 0px 0px; + color: #999999; } - -.action_dialog .header { - background-color: #6d84b4; - border: 1px solid #3b5998; - color: #ffffff; - font-weight: bold; - font-size: 13px; - padding: 6px 0px 6px 10px; -} - -.action_dialog .body { - background-color: #ffffff; - color: #000000; - font-size: 11px; - padding: 15px; -} - -.action_dialog .footer { - background-color: #f2f2f2; - border: 1px solid #a6a6a6; - overflow: auto; -} - -.action_dialog .footer .buttons { - margin: 0px 6px 0px 0px; - float: right; -} Modified: public/stylesheets/autocomplete.css =================================================================== --- public/stylesheets/autocomplete.css 2008-03-14 16:58:46 UTC (rev 81) +++ public/stylesheets/autocomplete.css 2008-03-14 20:16:11 UTC (rev 82) @@ -1,8 +1,3 @@ -span.indicator { - display: none; - margin-left: 4px; -} - input.autocomplete { padding-right: 18px; background: url('/images/spinner-faded.gif') no-repeat right; Added: public/stylesheets/dialog.css =================================================================== --- public/stylesheets/dialog.css (rev 0) +++ public/stylesheets/dialog.css 2008-03-14 20:16:11 UTC (rev 82) @@ -0,0 +1,36 @@ +#dlg { + border: 6px solid #999999; + width: 465px; + overflow: auto; + top: 34px; + position: relative; + z-index: 100; +} + +#dlgheader { + background-color: #6d84b4; + border: 1px solid #3b5998; + color: #ffffff; + font-weight: bold; + font-size: 13px; + padding: 6px 0px 6px 10px; +} + +#dlgbody { + background-color: #ffffff; + color: #000000; + font-size: 11px; + padding: 15px; +} + +#dlgfooter { + background-color: #f2f2f2; + border: 1px solid #a6a6a6; + float: left; + width: 463px; +} + +#dlgfooter .buttons { + margin: 0px 6px 0px 0px; + float: right; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <agu...@us...> - 2008-03-20 20:03:09
|
Revision: 110 http://isocial.svn.sourceforge.net/isocial/?rev=110&view=rev Author: aguidrevitch Date: 2008-03-20 13:03:08 -0700 (Thu, 20 Mar 2008) Log Message: ----------- cross-browser layout updates Modified Paths: -------------- public/stylesheets/Application.css public/stylesheets/groupapp/Group.css Modified: public/stylesheets/Application.css =================================================================== --- public/stylesheets/Application.css 2008-03-20 19:40:18 UTC (rev 109) +++ public/stylesheets/Application.css 2008-03-20 20:03:08 UTC (rev 110) @@ -179,10 +179,14 @@ } #pagecontent #contentshadow { + /* enabling hasLayout for ie */ + width: 647px; border: 1px solid #dddddd; } #pagecontent #content { + /* enabling hasLayout for ie */ + width: 647px; clear: both; padding: 0; } @@ -372,7 +376,7 @@ padding: 20px 0px 0px 0px; border-bottom: 1px solid #898989; float: left; - width: 645px; + width: 647px; } .tabs .left { Modified: public/stylesheets/groupapp/Group.css =================================================================== --- public/stylesheets/groupapp/Group.css 2008-03-20 19:40:18 UTC (rev 109) +++ public/stylesheets/groupapp/Group.css 2008-03-20 20:03:08 UTC (rev 110) @@ -1,16 +1,13 @@ .title_bar { - padding: 0px 12px 5px 20px; background-color: #ffffff; - float: left; } .title_bar .avatar { - float: left; - margin: 10px 10px 0px 0px; + margin: 10px 10px 0px 20px; overflow: hidden; - z-index: 1; height: 50px; width: 50px; + z-index: 1; position: relative; } @@ -19,23 +16,22 @@ } .title_bar .info { - float: left; - padding: 10px 0px 0px 0px; - width: 550px; + position: relative; + top: -50px; + left: 0px; + margin: 0px 0px -50px 0px; + padding: 0px 0px 0px 80px; } .title_bar .info .header { - float: left; background: #f7f7f7; z-index: 0; border-bottom: solid 1px #cccccc; margin: -10px 0px 7px -80px; padding: 10px 0px 0px 80px; - width: 565px; } .title_bar .info .header .name { - float: left; font-weight: bold; font-size: 14px; padding: 7px 0px 7px 22px; @@ -55,7 +51,6 @@ } .actions { - float: left; } .actions #group_start { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |