Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: cimav/somos
base: 79e1e58a12
...
head fork: cimav/somos
compare: 74e358417a
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 16, 2012
@ionmx ionmx Fix nav 0a973d8
Commits on Mar 17, 2012
@ionmx ionmx Share form WIP 74e3584
View
1  app/assets/javascripts/application.js
@@ -5,6 +5,7 @@
// the compiled file.
//
//= require jquery
+//= require jquery-ui
//= require jquery_ujs
//= require tinymce-jquery
//= require_tree .
View
11 app/assets/javascripts/home.js.coffee
@@ -2,16 +2,15 @@ currentGroup = 0
currentPost = 0
currentUser = 0
-$('#nav-title').live('click', (e) ->
+$('#nav-title-span').live('click', (e) ->
$('#groups-area').toggle()
)
$('html').click( (e) ->
- if e.target.id != 'nav-title'
+ if e.target.id != 'nav-title-span'
$('#groups-area').hide()
)
-
$('#post_post_type_id')
.live('change', () ->
if $(this).val() > 1
@@ -83,7 +82,9 @@ getShareForm = () ->
url = '/posts/share_form'
$.get(url, {}, (html) ->
$('<div id="share-area"></div>').prependTo("#container")
- $('#share-area').prepend(html)
+ $('#share-area').append(html)
+ $("#share-form").dialog({ autoOpen: false, width: 640, height: 450, modal:true })
+ $("#share-form").dialog('open')
)
getGroupList = () ->
@@ -313,5 +314,3 @@ $ ->
getHome(false)
recentTimer = setInterval(getRecentPostsCounter, 10000)
-
-
View
1  app/assets/stylesheets/application.css.scss
@@ -12,3 +12,4 @@
@import "groups";
@import "pages";
@import "lightbox";
+@import "dialogs";
View
20 app/assets/stylesheets/dialogs.css.scss
@@ -0,0 +1,20 @@
+.ui-dialog { position: relative; padding: 2px; width: 300px; background: #f9f9f9; text-align: left; }
+.ui-dialog .ui-dialog-titlebar { height: 28px; position: relative; background: transparent; }
+.ui-dialog .ui-dialog-title { float: left; margin: 6px 0 0 8px; font-size: 16px; font-weight: bold; color: #fff; text-shadow: #00122e 0px 1px 0px; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: 8px; top: 6px; background: transparent url(/assets/close.png) no-repeat; text-indent: -99999px; overflow: hidden; width: 14px;}
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { border: 0; padding: 16px; background: #fff; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background: #fff; padding: 16px; border-top: 1px solid #cde; }
+.ui-dialog .ui-dialog-buttonpane button { float: right; margin-left: 8px; cursor: pointer; width:auto; overflow:visible; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+.ui-dialog.ui-corner-all { -moz-border-radius: 8px; -webkit-border-radius: 8px; }
+.ui-dialog .button { float: right; }
+.ui-dialog .propstable { width: 100%; }
+.ui-dialog p { margin: 0.5em 0 1em 0; }
+
+#dialog-submit-button-area {
+ text-align: center;
+ margin-top: 20px;
+}
View
4 app/assets/stylesheets/groups.css.scss
@@ -3,11 +3,11 @@
// You can use Sass (SCSS) here: http://sass-lang.com/
#groups-area {
- z-index: 999999;
display: none;
background-color: $bg-color;
border: 1px solid $line-color;
- margin-top: 16px;
+ position: absolute;
+ top: 46px;
padding: 10px;
ul.group-types {
li {
View
2  app/assets/stylesheets/layout.css.scss
@@ -64,7 +64,6 @@
color: $strong-color;
font-weight: bold;
font-size: 22px;
- cursor: pointer;
img {
margin-bottom: 3px;
@include opacity(0.5);
@@ -74,6 +73,7 @@
}
#nav-title-span {
white-space: nowrap;
+ cursor: pointer;
}
}
}
View
7 app/assets/stylesheets/post_files.css.scss
@@ -2,19 +2,14 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.post-files {
- margin-top: 5px;
+ margin: 10px;
.file-entry {
height: 30px;
- float: left;
- width: 40%;
padding-left: 35px;
padding-top: 5px;
background: transparent url(/assets/mime/unknown.png) no-repeat;
white-space: pre;
overflow: hidden;
margin-right: 5px;
- &:hover {
- background-color: $nav-hover-color;
- }
}
}
View
53 app/views/posts/share_form.html.haml
@@ -1,28 +1,29 @@
-= form_for(@post, :remote => true, :html => {:multipart => true}) do |f|
- - user = User.find(session[:user].id)
- #share-message= t :share_to_the_community
- #share-active
- #share-header
- #share-type
- = t :share
- = f.select :post_type_id, options_from_collection_for_select(@post_types, "id", "share_title")
- #share-close
- = image_tag("close.png")
- #share-content
- = f.text_area :content, :placeholder => (t :what_do_you_want_to_share)
- #share-add-ui
- #share-footer
- #share-as
- = t :share_as
- - share_as_options = "<option value=\"0\">#{User.find(session[:user].id).display_name}</option>"
- - user.memberships.where(:can_publish => 1).each do |membership|
- - share_as_options += "<option value=\"#{membership.group.id}\">#{membership.group.name}</option>"
- = f.select :group_id, share_as_options.html_safe
- #share-to
- = t :share_to
- = text_field_tag :to_groups
+#share-form
+ = form_for(@post, :remote => true, :html => {:multipart => true}) do |f|
+ - user = User.find(session[:user].id)
+ #share-message= t :share_to_the_community
+ #share-active
+ #share-header
+ #share-type
+ = t :share
+ = f.select :post_type_id, options_from_collection_for_select(@post_types, "id", "share_title")
+ #share-close
+ = image_tag("close.png")
+ #share-content
+ = f.text_area :content, :placeholder => (t :what_do_you_want_to_share)
+ #share-add-ui
+ #share-footer
+ #share-as
+ = t :share_as
+ - share_as_options = "<option value=\"0\">#{User.find(session[:user].id).display_name}</option>"
+ - user.memberships.where(:can_publish => 1).each do |membership|
+ - share_as_options += "<option value=\"#{membership.group.id}\">#{membership.group.name}</option>"
+ = f.select :group_id, share_as_options.html_safe
+ #share-to
+ = t :share_to
+ = text_field_tag :to_groups
- #share-button
- = submit_tag (t :share), :disable_with => (t :share_wait), :id => "share-submit"
- .clearfix
+ #share-button
+ = submit_tag (t :share), :disable_with => (t :share_wait), :id => "share-submit"
+ .clearfix

No commit comments for this range

Something went wrong with that request. Please try again.