Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

That should do it?

  • Loading branch information...
commit aa4503f40c2aa05766315b2cca7f6eff468ddd27 1 parent 28b7740
@bernardo bernardo authored
View
105 .idea/workspace.xml
@@ -2,10 +2,12 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="188ad806-9dbe-4371-8574-0b8a662aa667" name="Default" comment="">
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/assets/javascripts/application.js" afterPath="$PROJECT_DIR$/app/assets/javascripts/application.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/assets/stylesheets/application.css.scss" afterPath="$PROJECT_DIR$/app/assets/stylesheets/application.css.scss" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/assets/stylesheets/general.css.scss" afterPath="$PROJECT_DIR$/app/assets/stylesheets/general.css.scss" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/punches_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/punches_controller.rb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/layouts/application.html.erb" afterPath="$PROJECT_DIR$/app/views/layouts/application.html.erb" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/punches/index.html.erb" afterPath="$PROJECT_DIR$/app/views/punches/index.html.erb" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/layouts/stats.html.erb" afterPath="$PROJECT_DIR$/app/views/layouts/stats.html.erb" />
</list>
<ignored path="ponto_ra.iws" />
<ignored path=".idea/workspace.xml" />
@@ -35,7 +37,7 @@
<file leaf-file-name="general.css.scss" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/general.css.scss">
<provider selected="true" editor-type-id="text-editor">
- <state line="108" column="0" selection-start="1475" selection-end="1475" vertical-scroll-proportion="0.0">
+ <state line="7" column="0" selection-start="58" selection-end="58" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
@@ -44,7 +46,7 @@
<file leaf-file-name="application.css.scss" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/application.css.scss">
<provider selected="true" editor-type-id="text-editor">
- <state line="18" column="0" selection-start="582" selection-end="582" vertical-scroll-proportion="0.0">
+ <state line="26" column="0" selection-start="590" selection-end="590" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
@@ -59,37 +61,55 @@
</provider>
</entry>
</file>
- <file leaf-file-name="application.html.erb" pinned="false" current="true" current-in-tab="true">
+ <file leaf-file-name="application.html.erb" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/layouts/application.html.erb">
<provider selected="true" editor-type-id="text-editor">
- <state line="5" column="0" selection-start="165" selection-end="165" vertical-scroll-proportion="0.12944984">
+ <state line="19" column="32" selection-start="568" selection-end="568" vertical-scroll-proportion="-12.16">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="index.html.erb" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/app/views/punches/index.html.erb">
+ <file leaf-file-name="punches_controller.rb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/controllers/punches_controller.rb">
<provider selected="true" editor-type-id="text-editor">
- <state line="46" column="31" selection-start="1738" selection-end="1738" vertical-scroll-proportion="-18.96">
+ <state line="73" column="82" selection-start="2380" selection-end="2380" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="_user_stats.html.erb" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/app/views/application/_user_stats.html.erb">
+ <file leaf-file-name="stats.html.erb" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/app/views/layouts/stats.html.erb">
<provider selected="true" editor-type-id="text-editor">
- <state line="2" column="40" selection-start="163" selection-end="163" vertical-scroll-proportion="-1.28">
+ <state line="4" column="0" selection-start="66" selection-end="66" vertical-scroll-proportion="0.10142631">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="punches.js.coffee" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/app/assets/javascripts/punches.js.coffee">
+ <file leaf-file-name="application.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/assets/javascripts/application.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="16" selection-start="728" selection-end="728" vertical-scroll-proportion="0.0">
+ <state line="10" column="12" selection-start="508" selection-end="508" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="index.html.erb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/views/punches/index.html.erb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="46" column="31" selection-start="1738" selection-end="1738" vertical-scroll-proportion="-18.96">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="_user_stats.html.erb" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/app/views/application/_user_stats.html.erb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="2" column="40" selection-start="163" selection-end="163" vertical-scroll-proportion="-1.28">
<folding />
</state>
</provider>
@@ -118,17 +138,19 @@
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
- <option value="$PROJECT_DIR$/app/controllers/punches_controller.rb" />
<option value="$PROJECT_DIR$/app/models/user.rb" />
<option value="$PROJECT_DIR$/app/controllers/sessions_controller.rb" />
<option value="$PROJECT_DIR$/app/controllers/application_controller.rb" />
<option value="$PROJECT_DIR$/app/views/punches/_form.html.erb" />
<option value="$PROJECT_DIR$/app/assets/javascripts/punches.js.coffee" />
<option value="$PROJECT_DIR$/app/views/application/_user_stats.html.erb" />
- <option value="$PROJECT_DIR$/app/assets/stylesheets/application.css.scss" />
- <option value="$PROJECT_DIR$/app/assets/stylesheets/general.css.scss" />
<option value="$PROJECT_DIR$/app/views/punches/index.html.erb" />
+ <option value="$PROJECT_DIR$/app/assets/javascripts/application.js" />
+ <option value="$PROJECT_DIR$/app/assets/stylesheets/general.css.scss" />
+ <option value="$PROJECT_DIR$/app/assets/stylesheets/application.css.scss" />
<option value="$PROJECT_DIR$/app/views/layouts/application.html.erb" />
+ <option value="$PROJECT_DIR$/app/controllers/punches_controller.rb" />
+ <option value="$PROJECT_DIR$/app/views/layouts/stats.html.erb" />
</list>
</option>
</component>
@@ -665,7 +687,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="34" y="22" width="1654" height="799" extended-state="0" />
+ <frame x="88" y="156" width="1654" height="799" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@@ -756,20 +778,6 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/app/controllers/punches_controller.rb">
- <provider selected="true" editor-type-id="text-editor">
- <state line="7" column="6" selection-start="177" selection-end="177" vertical-scroll-proportion="0.16568047">
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/assets/javascripts/application.js">
- <provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
- <folding />
- </state>
- </provider>
- </entry>
<entry file="file://$PROJECT_DIR$/app/assets/javascripts/users.js.coffee">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
@@ -805,30 +813,51 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/app/assets/stylesheets/application.css.scss">
+ <entry file="file://$PROJECT_DIR$/app/views/punches/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
- <state line="18" column="0" selection-start="582" selection-end="582" vertical-scroll-proportion="0.0">
+ <state line="46" column="31" selection-start="1738" selection-end="1738" vertical-scroll-proportion="-18.96">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/assets/javascripts/application.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="10" column="12" selection-start="508" selection-end="508" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/general.css.scss">
<provider selected="true" editor-type-id="text-editor">
- <state line="108" column="0" selection-start="1475" selection-end="1475" vertical-scroll-proportion="0.0">
+ <state line="7" column="0" selection-start="58" selection-end="58" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/app/views/punches/index.html.erb">
+ <entry file="file://$PROJECT_DIR$/app/assets/stylesheets/application.css.scss">
<provider selected="true" editor-type-id="text-editor">
- <state line="46" column="31" selection-start="1738" selection-end="1738" vertical-scroll-proportion="-18.96">
+ <state line="26" column="0" selection-start="590" selection-end="590" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/application.html.erb">
<provider selected="true" editor-type-id="text-editor">
- <state line="5" column="0" selection-start="165" selection-end="165" vertical-scroll-proportion="0.12944984">
+ <state line="19" column="32" selection-start="568" selection-end="568" vertical-scroll-proportion="-12.16">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/controllers/punches_controller.rb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="73" column="82" selection-start="2380" selection-end="2380" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/app/views/layouts/stats.html.erb">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="4" column="0" selection-start="66" selection-end="66" vertical-scroll-proportion="0.10142631">
<folding />
</state>
</provider>
View
1  app/assets/javascripts/application.js
@@ -8,4 +8,5 @@
//= require jquery_ujs
//= require highcharts
//= require highcharts-theme
+//= require css_browser_selector
//= require_tree .
View
8 app/assets/stylesheets/application.css.scss
@@ -29,3 +29,11 @@ p {margin: 0 0 1em; font-size: 14px;}
+
+
+
+
+
+
+
+
View
24 app/assets/stylesheets/general.css.scss
@@ -1,3 +1,27 @@
+body {
+ zoom: 200%;
+}
+
+.mobile body{
+ zoom: 100%;
+}
+
+.flash{
+ &.error{
+ background-color: #FFA6A6;
+ border: 1px solid #FF8181;
+ color: #9C5252;
+ padding: 10px;
+ }
+ &.notice{
+ background-color: #FFFE9C;
+ border: 1px solid #CFCE7C;
+ color: #929257;
+ padding: 10px;
+ }
+ @include border-radius(5px);
+}
+
h1{
text-align: center;
margin-bottom: 10px;
View
2  app/controllers/punches_controller.rb
@@ -71,7 +71,7 @@ def destroy
@punch.destroy
respond_to do |format|
- format.html { redirect_to punches_url }
+ format.html { redirect_to punches_url, :notice => 'Batida de ponto removida.' }
format.json { head :ok }
end
end
View
19 app/views/layouts/application.html.erb
@@ -3,15 +3,26 @@
<head>
<title>PontoRa</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0, width=device-width;">
- <%= stylesheet_link_tag "application" %>
+ <%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<div class="container_8 clearfix">
-<div class="grid_8">
- <%= yield %>
-</div>
+ <div class="grid_8">
+ <% if flash[:notice] %>
+ <div class="flash notice">
+ <%= flash[:notice] %>
+ </div>
+ <% end %>
+ <% if flash[:error] %>
+ <div class="flash error">
+ <%= flash[:error] %>
+ </div>
+ <% end %>
+
+ <%= yield %>
+ </div>
</div>
</body>
View
1  app/views/layouts/stats.html.erb
@@ -2,7 +2,6 @@
<html>
<head>
<title>Estatísticas Ponto</title>
- <%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
View
8 vendor/assets/javascripts/css_browser_selector.js
@@ -0,0 +1,8 @@
+/*
+CSS Browser Selector v0.4.0 (Nov 02, 2010)
+Rafael Lima (http://rafael.adm.br)
+http://rafael.adm.br/css_browser_selector
+License: http://creativecommons.org/licenses/by/2.5/
+Contributors: http://rafael.adm.br/css_browser_selector#contributors
+*/
+function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);
Please sign in to comment.
Something went wrong with that request. Please try again.