1. Juan Carlos Picado Herrera
  2. encuestame

Commits

dianmora  committed feffc29 Merge

Merge branch 'development' of github.com:encuestame/encuestame into development

  • Participants
  • Parent commits 8bda91e, a133bc3
  • Branches master

Comments (0)

Files changed (57)

File .gitmodules

View file
-[submodule "enme-doc"]
-	path = enme-doc
-	url = git://github.com/encuestame/doc.git
 [submodule "enme-war/src/main/webapp/resource/js/chart/eve"]
 	path = enme-war/src/main/webapp/resource/js/chart/eve
 	url = git://github.com/encuestame/eve.git
 [submodule "enme-js/resources-enme-war/src/main/resources/js/util"]
 	path = enme-js/resources-enme-war/src/main/resources/js/util
 	url = https://github.com/dojo/util.git
+[submodule "enme-doc"]
+	path = enme-doc
+	url = git@github.com:encuestame/doc.git

File README.markdown

View file
-encuestame open source social survey
-====================
+![Example](http://api.encuestame.org/mail.png)
 
-For information on how to build check out [documentation](http://wiki.encuestame.org/display/DOC/How+to+build+Encuestame).
+Encuestame Open Source Social Survey
+=====================================
 
-[![Build Status](https://secure.travis-ci.org/encuestame/encuestame.png)](http://travis-ci.org/encuestame/encuestame)
+For information on how to **build** check out [documentation](http://wiki.encuestame.org/display/DOC/How+to+build+Encuestame).
 
 ## Current Version Info
 
-The last release versions are defined [here](http://wiki.encuestame.org/display/RELEASE/Home).
+The **last release versions** are defined [here](http://wiki.encuestame.org/display/~juanpicado/About+Encuestame+1.146-M2), if you are interested in the **Roadmap** click [here](http://issues.encuestame.org/browse/ENCUESTAME#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel)
 
 If you want to download a build version of encuestame, they're hosted on the [Sourceforce.net](http://sourceforge.net/projects/encuestame/files/).
 
 ## Maintainers
 * [Diana Paola Morales](http://about.me/dianmorales)
 * [Juan Carlos Picado](http://about.me/jotadeveloper)
+* [All Contributors](http://www.encuestame.org/contributors)
 
-## Direct Download Last Releases
+## Where is the most stable code?
+If you are looking for the most stable code, please clone **stable** branch
+[![Build Status](https://secure.travis-ci.org/encuestame/encuestame.png)](http://travis-ci.org/encuestame/encuestame)
 
+
+## Direct Download Last Releases
 * [1.146.RC1](http://downloads.sourceforge.net/project/encuestame/encuestame_beta/1.146/encuestame-1.146.RC1-release.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fencuestame%2F%3Fsource%3Ddirectory&ts=1350930525&use_mirror=freefr)
 * [1.145](http://code.google.com/p/encuestame/downloads/detail?name=encuestame-1.145-release.zip&can=2&q=)
 * [1.144](http://sourceforge.net/projects/encuestame/files/encuestame_beta/1.144/encuestame-1.144-release.zip/download)
 Pull requests are, of course, very welcome! A few "todos", if anyone is [interested](http://wiki.encuestame.org/display/DEVELOPMENT/Commiters+Guidelines).
 
 ## Acknowledgments
-* Thanks to [Atlassian Open Source Program](http://www.atlassian.com/software/views/opensource-license-request.jsp).
-* Thanks to you, for spent your time reviewing our job.
-* All our friends.
+* Thanks to [Atlassian Open Source Program](http://www.atlassian.com/)
+* Thanks to you, for spent your time reviewing our job
+* All our friends
 
 ## Related Sites
 
 * [JIRA](http://issues.encuestame.org)
-* [Encuestame Wiki](http://wiki.encuestame.org)
+* [Wiki](http://wiki.encuestame.org)
 * [Metrics](http://metrics.encuestame.org)
+* [API Javadoc](http://api.encuestame.org)
 * [Demo Site](http://demo.encuestame.org)
-* [GitHub Repo](http://github.com/encuestame)
+* [GitHub](http://github.com/encuestame)
 * [Twitter](http://www.twitter.com/encuestame)
-* [Facebook Page](https://www.facebook.com/pages/encuestame/80467777529)
+* [Facebook](https://www.facebook.com/pages/encuestame/80467777529)
 
 
 Copyright and license
 ---------------------
 
-Copyright 2012 Encuestame Team
+Copyright 2013 encuestame
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.

Submodule enme-doc

+Subproject commit 3950fc4c25c1b4eebd1958d5b215ec10d6228309

File enme-mvc/src/main/java/org/encuestame/comet/services/TweetPollCometService.java

View file
     @PreAuthorize("hasRole('ENCUESTAME_USER')")
     @Listener("/service/tweetpoll/autosave")
     @SuppressWarnings("unchecked")
+    @Deprecated
     public void processAutoSave(final ServerSession remote, final ServerMessage.Mutable message) {;
         log.debug("--------- TweetPoll COMMET AUTOSAVE ----------");
         final Map<String, Object> inputMessage = message.getDataAsMap();

File enme-mvc/src/main/java/org/encuestame/mvc/controller/json/survey/TweetPollJsonController.java

View file
 package org.encuestame.mvc.controller.json.survey;
 
 import java.io.IOException;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.collections.map.HashedMap;
 import org.apache.log4j.Logger;
 import org.codehaus.jackson.JsonGenerationException;
 import org.codehaus.jackson.map.JsonMappingException;
 import org.encuestame.persistence.exception.EnMeExpcetion;
 import org.encuestame.persistence.exception.EnMeNoResultsFoundException;
 import org.encuestame.persistence.exception.EnmeFailOperation;
+import org.encuestame.utils.DateUtil;
 import org.encuestame.utils.ShortUrlProvider;
 import org.encuestame.utils.enums.TypeSearch;
 import org.encuestame.utils.enums.TypeSearchResult;
+import org.encuestame.utils.json.QuestionBean;
 import org.encuestame.utils.json.SocialAccountBean;
 import org.encuestame.utils.json.TweetPollBean;
 import org.encuestame.utils.web.QuestionAnswerBean;
     }
 
     /**
+     *
+     * @param tweetPollId
+     * @param request
+     * @param response
+     * @return
+     * @throws JsonGenerationException
+     * @throws JsonMappingException
+     * @throws IOException
+     */
+    @PreAuthorize("hasRole('ENCUESTAME_USER')")
+    @RequestMapping(value = "/api/survey/tweetpoll/autosave.json", method = RequestMethod.POST)
+    public ModelMap create(
+            @RequestParam(value = "tweetPollId", required = false) final Long tweetPollId,
+            @RequestParam(value = "question", required = false) final String question,
+            @RequestParam(value = "scheduled", required = false) final Boolean isScheduled,
+            @RequestParam(value = "liveResults", required = false) final Boolean liveResults,
+            @RequestParam(value = "scheduledTime", required = false) final String scheduldedTime,
+            @RequestParam(value = "scheduledDate", required = false) final String scheduledDate,
+            @RequestParam(value = "captcha", required = false) final Boolean captcha,
+            @RequestParam(value = "limitVotes", required = false) final Boolean limitVotes,
+            @RequestParam(value = "followDashBoard", required = false) final Boolean onDashboard,
+            @RequestParam(value = "repeatedVotes", required = false) final Boolean repeatedVotes,
+            @RequestParam(value = "maxLimitVotes", required = false) final Integer repeatedVotesNum,
+            @RequestParam(value = "maxRepeatedVotes", required = false) final Integer votesToLimit,
+            @RequestParam(value = "resumeLiveResults", required = false) final Boolean resumeLiveResults,
+            //@PathVariable final String type,
+            HttpServletRequest request,
+            HttpServletResponse response)
+            throws JsonGenerationException, JsonMappingException, IOException {
+        try {
+            final UserAccount user = getUserAccount();
+            final Options options = new Options();
+            log.debug("Autosave TweetPoll Id --> " + tweetPollId);
+            log.debug("Autosave Question --> " + question);
+            final Map<String, Object> jsonResponse = new HashMap<String, Object>();
+            if (tweetPollId == null && question != null && !question.isEmpty()) {
+                  final TweetPollBean tweetPollBean = this.fillTweetPoll(
+                          options, question, user, null);
+                  //new tweetpoll domain.
+                  final TweetPoll tp = createTweetPoll(tweetPollBean);
+                  //retrieve answers stored.
+                  final TweetPollBean tpB = ConvertDomainBean.convertTweetPollToBean(tp);
+                  log.debug("Tweetpoll Created --->" + tpB.toString());
+                  jsonResponse.put("tweetPoll", tpB);
+             } else if (tweetPollId != null && question != null) {
+                 options.setCaptcha(captcha);
+                 options.setFollowDashBoard(onDashboard);
+                 options.setLimitVotes(limitVotes);
+                 options.setLiveResults(liveResults);
+                 options.setScheduled(isScheduled);
+                 options.setScheduledDate(filterValue(scheduledDate));
+                 options.setScheduledTime(scheduldedTime);
+                 options.setMaxLimitVotes(votesToLimit);
+                 options.setFollowDashBoard(onDashboard);
+                 options.setRepeatedVotes(repeatedVotes);
+                 options.setMaxRepeatedVotes(repeatedVotesNum);
+                 options.setResumeLiveResults(resumeLiveResults);
+                  //update tweetPoll
+                 final TweetPollBean tweetPollBean = this.fillTweetPoll(options, question, user, tweetPollId);
+                 ConvertDomainBean.convertTweetPollToBean(updateTweetPoll(tweetPollBean));
+                 log.debug("Tweetpoll Updated --->" + tweetPollBean.toString());
+                 jsonResponse.put("tweetPoll", tweetPollBean);
+             } else {
+                 setError("create tweetpoll bad request", response);
+             }
+            setItemResponse(jsonResponse);
+        } catch (Exception e) {
+            log.fatal(e);
+            e.printStackTrace();
+            setError(e.getMessage(), response);
+        }
+        return returnData();
+    }
+
+
+    /**
+     *
+     * @param options
+     * @param question
+     * @param user
+     * @param hastagsArray
+     * @param tweetPollId
+     * @return
+     * @throws ParseException
+     */
+    private TweetPollBean fillTweetPoll(
+            final Options options,
+            final String question,
+            final UserAccount user,
+            final Long tweetPollId) throws ParseException{
+        final TweetPollBean tweetPollBean = new TweetPollBean();
+        log.debug("fillTweetPoll options" + options.toString());
+        log.debug("fillTweetPoll user" +user.toString());
+        log.debug("fillTweetPoll question" + question.toString());
+        log.debug("fillTweetPoll tweetPollId" + tweetPollId);
+        if (tweetPollId != null) {
+            tweetPollBean.setId(tweetPollId);
+        }
+        // save create tweet poll
+        tweetPollBean.setUserId(user.getAccount().getUid());
+        //defined values.
+        tweetPollBean.setCloseNotification(Boolean.TRUE); //TOOD: ????
+        tweetPollBean.setResultNotification(Boolean.TRUE);
+        //resume live results.
+        tweetPollBean.setResumeLiveResults(options.getResumeLiveResults());
+        //follow on dashboard.
+        tweetPollBean.setResumeTweetPollDashBoard(options.getFollowDashBoard());
+        //captcha.
+        tweetPollBean.setCaptcha(options.getCaptcha());
+        //live results
+        tweetPollBean.setAllowLiveResults(options.getLiveResults());
+        //repeated votes
+        tweetPollBean.setAllowRepeatedVotes(options.getRepeatedVotes());
+        if (options.getRepeatedVotes()) {
+            tweetPollBean.setMaxRepeatedVotes(options.getMaxRepeatedVotes());
+        }
+        //scheduled
+        tweetPollBean.setSchedule(options.getScheduled());
+        if (options.getScheduled()) {
+            //eg. format 5/25/11 10:45:00
+            final StringBuilder builder = new StringBuilder(options.getScheduledDate());
+            builder.append(" ");
+            builder.append(options.getScheduledTime());
+            tweetPollBean.setScheduleDate(DateUtil.parseDate(builder.toString(), DateUtil.COMPLETE_FORMAT_TIME));
+        }
+        //limit votes
+        tweetPollBean.setLimitVotesEnabled(options.getLimitVotes());
+        if (options.getLimitVotes()) {
+            tweetPollBean.setLimitVotes(options.getMaxLimitVotes());
+        }
+        //question
+        tweetPollBean.setQuestionBean(new QuestionBean(question));
+        log.debug("fillTweetPoll: "+tweetPollBean);
+        return tweetPollBean;
+    }
+
+    /**
      * Publish tweetPoll.
      * @param tweetPollId
      * @param twitterAccountsId
         }
         return returnData();
     }
+}
+
+/**
+ *
+ * @author jpicado
+ *
+ */
+class Options {
+    private Boolean repeatedVotes = false;
+    private Boolean resumeLiveResults = false;
+    private Boolean scheduled  = false;
+    private Boolean limitVotes  = false;
+    private Boolean followDashBoard  = true;
+    private Boolean captcha  = false;
+    private Boolean liveResults  = true;
+
+    private Integer maxRepeatedVotes;
+    private Integer maxLimitVotes;
+    private String scheduledDate;
+    private String scheduledTime;
+
+    /**
+     *
+     */
+    public Options() {}
+
+    /**
+     * @return the repeatedVotes
+     */
+    public Boolean getRepeatedVotes() {
+        return repeatedVotes;
+    }
+
+    /**
+     * @return the resumeLiveResults
+     */
+    public Boolean getResumeLiveResults() {
+        return resumeLiveResults;
+    }
+
+    /**
+     * @return the scheduled
+     */
+    public Boolean getScheduled() {
+        return scheduled;
+    }
+
+    /**
+     * @return the limitVotes
+     */
+    public Boolean getLimitVotes() {
+        return limitVotes;
+    }
+
+    /**
+     * @return the followDashBoard
+     */
+    public Boolean getFollowDashBoard() {
+        return followDashBoard;
+    }
+
+    /**
+     * @return the captcha
+     */
+    public Boolean getCaptcha() {
+        return captcha;
+    }
+
+    /**
+     * @return the liveResults
+     */
+    public Boolean getLiveResults() {
+        return liveResults;
+    }
+
+    /**
+     * @return the maxRepeatedVotes
+     */
+    public Integer getMaxRepeatedVotes() {
+        return maxRepeatedVotes;
+    }
+
+    /**
+     * @return the maxLimitVotes
+     */
+    public Integer getMaxLimitVotes() {
+        return maxLimitVotes;
+    }
+
+    /**
+     * @return the scheduledDate
+     */
+    public String getScheduledDate() {
+        return scheduledDate;
+    }
+
+    /**
+     * @return the scheduledTime
+     */
+    public String getScheduledTime() {
+        return scheduledTime;
+    }
+
+    /**
+     * @param repeatedVotes the repeatedVotes to set
+     */
+    public void setRepeatedVotes(Boolean repeatedVotes) {
+        this.repeatedVotes = repeatedVotes;
+    }
+
+    /**
+     * @param resumeLiveResults the resumeLiveResults to set
+     */
+    public void setResumeLiveResults(Boolean resumeLiveResults) {
+        this.resumeLiveResults = resumeLiveResults;
+    }
+
+    /**
+     * @param scheduled the scheduled to set
+     */
+    public void setScheduled(Boolean scheduled) {
+        this.scheduled = scheduled;
+    }
+
+    /**
+     * @param limitVotes the limitVotes to set
+     */
+    public void setLimitVotes(Boolean limitVotes) {
+        this.limitVotes = limitVotes;
+    }
+
+    /**
+     * @param followDashBoard the followDashBoard to set
+     */
+    public void setFollowDashBoard(Boolean followDashBoard) {
+        this.followDashBoard = followDashBoard;
+    }
+
+    /**
+     * @param captcha the captcha to set
+     */
+    public void setCaptcha(Boolean captcha) {
+        this.captcha = captcha;
+    }
+
+    /**
+     * @param liveResults the liveResults to set
+     */
+    public void setLiveResults(Boolean liveResults) {
+        this.liveResults = liveResults;
+    }
+
+    /**
+     * @param maxRepeatedVotes the maxRepeatedVotes to set
+     */
+    public void setMaxRepeatedVotes(Integer maxRepeatedVotes) {
+        this.maxRepeatedVotes = maxRepeatedVotes;
+    }
+
+    /**
+     * @param maxLimitVotes the maxLimitVotes to set
+     */
+    public void setMaxLimitVotes(Integer maxLimitVotes) {
+        this.maxLimitVotes = maxLimitVotes;
+    }
+
+    /**
+     * @param scheduledDate the scheduledDate to set
+     */
+    public void setScheduledDate(String scheduledDate) {
+        this.scheduledDate = scheduledDate;
+    }
+
+    /**
+     * @param scheduledTime the scheduledTime to set
+     */
+    public void setScheduledTime(String scheduledTime) {
+        this.scheduledTime = scheduledTime;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return "Options [repeatedVotes=" + repeatedVotes
+                + ", resumeLiveResults=" + resumeLiveResults
+                + ", scheduled=" + scheduled + ", limitVotes=" + limitVotes
+                + ", followDashBoard=" + followDashBoard + ", captcha="
+                + captcha + ", liveResults=" + liveResults
+                + ", maxRepeatedVotes=" + maxRepeatedVotes
+                + ", maxLimitVotes=" + maxLimitVotes + ", scheduledDate="
+                + scheduledDate + ", scheduledTime=" + scheduledTime + "]";
+    }
 }

File enme-war/src/main/resources/encuestame-config-sample.xml

View file
     </install>
     <information>
         <metatags>
-            <keywords>survey, twitter, social, open source, etc, etc</keywords>
-            <description>encuestame survey system</description>
-        </metatags>
-    </information>
-    <administration>
-        <users>
-            <user>admin</user>
-        </users>
-    </administration>
-    <social>
-        <accounts>
-        </accounts>
-    </social>
+        <keywords>survey, twitter, social, open source, etc, etc</keywords>
+        <description>encuestame survey system</description>
+    </metatags>
+</information>
+<administration>
+    <users>
+        <user>admin</user>
+    </users>
+</administration>
+<social>
+    <accounts></accounts>
+</social>
 </encuestame-configuration>

File enme-war/src/main/webapp/WEB-INF/jsp/includes/web/css.jsp

View file
 <%@ include file="/WEB-INF/jsp/includes/taglibs.jsp"%>
+<!-- dojo css to override easily -->
+<link rel="stylesheet"  href="<c:url value="/resources/js/dijit/themes/claro/claro.css"/>" />
 <c:if test="${development}">
-    <link rel="stylesheet"  href="<c:url value="/resources/css-compile/development.css" />" />    	
+    <link rel="stylesheet"  href="<c:url value="/resources/css-compile/development.css" />" />
 </c:if>
 <link rel="stylesheet"  href="<c:url value="/resources/css/resources.css" />" />
 <c:if test="${!development}">
 	<link rel="stylesheet"  href="<c:url value="/resources/static/web.css" />" />
 </c:if>
-<link rel="stylesheet"  href="<c:url value="/resources/js/dijit/themes/claro/claro.css"/>" />
 <link rel="stylesheet"  href="<c:url value="/resources/js/dojox/form/resources/Rating.css"/>" />
 <link rel="stylesheet"  href="<c:url value="/resources/js/dojo/resources/dojo.css" />" />
-<link rel="stylesheet"  href="<c:url value="/resources/js/dojox/widget/Toaster/Toaster.css" />" />
+<link rel="stylesheet"  href="<c:url value="/resources/js/dojox/widget/Toaster/Toaster.css" />" />

File enme-war/src/main/webapp/WEB-INF/layouts/standard/page.jsp

View file
      <div id="modal-box"></div>
      <div id="loading"></div>
   </c:if>
+  <script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
 </body>
+
 </html>

File enme-war/src/main/webapp/WEB-INF/views/home/web/item.jsp

View file
 <section class="item">
     <div class="img">
     	<!--
-    		TODO: votes == relevance???    		
+    		TODO: votes == relevance???
     	  -->
-        <div data-dojo-type="me/web/widget/home/votes/ItemVote"  
+        <div data-dojo-type="me/web/widget/home/votes/ItemVote"
         	 voteMessage="<spring:message code="home.item.votes" />"
         	 viewMessage="<spring:message code="home.item.views" />"
-        	 votes="${item.totalVotes}" 
+        	 votes="${item.totalVotes}"
         	 hits="${item.hits}"
         	 itemType="${item.itemType}"
-        	 itemId="${item.id}"        	 
+        	 itemId="${item.id}"
        	></div>
     </div>
     <div class="content">

File enme-war/src/main/webapp/WEB-INF/views/tweetpoll/web/new.jsp

View file
-<div class="defaultMarginWrapper" id="defaultMarginWrapper">
-  <div id="tweetPollWrapper">
-    <div data-dojo-type="me/web/widget/tweetpoll/TweetPoll"></div>
-  </div>
+<div id="tweetPollWrapper">
+	<div data-dojo-type="me/web/widget/tweetpoll/TweetPoll"></div>
 </div>
+

File enme-war/src/main/webapp/resource/css-compile/development-mobile.css

View file
 @import url("shared-components/generic-results.css");
 @import url("shared-components/poll-vote.css");
 @import url("shared-components/publication-item.css");
-@import url("shared-components/rated-hashtag.css");
+@import url("shared-components/rated-hashtag.css");
+@import url("shared-components/suggest.css");

File enme-war/src/main/webapp/resource/css-compile/development.css

View file
 @import url("shared-components/detail-tp-hashtag.css");
 @import url("shared-components/tp-vote.css");
 @import url("shared-components/generic-results.css");
+@import url("shared-components/suggest.css");
 @import url("web/components/hashtag.css");
 @import url("web/components/hashtag-tweetpoll.css");
 @import url("web/components/header.css");

File enme-war/src/main/webapp/resource/css-compile/dojo-fixes.css

View file
     #enme-content .dijitTextBoxFocused .dijitButtonNode {
   border-color: #ffb23c;
   transition-duration: 0.1s;
-}
+}
+
+/** avoid shadows and other effects inside widgets text box **/
+#enme-content .dijitInputField > input{
+	box-shadow: none !important;
+}
+
+#enme-content .dijitButtonText {
+  font-weight: normal;
+}
+
+/** display the background black with diji dialogs **/
+
+.enme-web-context .dijitDialogUnderlay {
+  background: none repeat scroll 0 0 #444444 !important;
+}
+
+.enme-web-context  .dijitBackgroundIframe {
+  background-color: #000000 !important;
+}
+
+/** DND style **/
+
+.enme-web-context  .dojoDndItem {
+    border-color: transparent;
+    -webkit-transition-duration: 0.25s;
+    -moz-transition-duration: 0.25s;
+    transition-duration: 0.25s;
+    -webkit-transition-property: background-color, border-color;
+    -moz-transition-property: background-color, border-color;
+    transition-property: background-color, border-color;
+}
+
+.enme-web-context  .dojoDndItemOver {
+  background-image: none !important;
+
+}
+
+.enme-web-context .dojoDndItemAnchor,
+.enme-web-context .dojoDndItemSelected {
+   background-color: none !important;
+   background-image: none !important;
+}
+

File enme-war/src/main/webapp/resource/css-compile/layout.css

View file
 }
 
 
-
 /* Smartphones (portrait and landscape)  */
 @media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
 
 
     .mobile .mobile-main {
         min-height: 300px;
+        background-color: white;
     }
 
     .mobile-main-vote {
 }
 
 /* Desktops and laptops  */
-@media only screen and (min-width : 1224px) {
-
-       body {
+    body {
         height: 100%;
         word-wrap: break-word;
         margin: 0;
        height: 40px;
        position: relative;
        box-shadow : 2px 3px 4px #121212;
-       z-index: 9000;
+       z-index: 500;
     }
 
     .header {
     }
 
     div.web-header div.web-header-wrapper {
-      width: 1024px;
+      width: auto;
     }
 
     div.web-header span {
         text-align: right;
         white-space: nowrap;
     }
-}
 
 /* Large screens  */
 @media only screen and (min-width : 1824px) {

File enme-war/src/main/webapp/resource/css-compile/shared-components/suggest.css

View file
+.suggest {
+  width: 60%;
+}
+
+.suggest .wrapper-suggest {
+    max-width: 400px;
+    position: relative;
+}
+
+.suggest .wrapper-suggest input {
+
+}
+
+.suggest .wrapper-suggest .suggestBox {
+  border: 1px solid #E0D6D6;
+  left: 0;
+  position: absolute;
+  top: 30px;
+  width: 100%;
+  padding: 1px;
+}
+
+/** Suggest. **/
+
+.suggest .wrapper-suggest .suggestBox {
+  background-color: #FFFFFF;
+  border: 1px solid #CCC;
+  border-top-color: #D9D9D9;
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+  cursor: default;
+  position: absolute;
+}
+
+.suggest .wrapper-suggest .suggestBox .suggesItem {
+  cursor: pointer;
+  font-size: 12px;
+  font-weight: bold;
+}
+
+.suggest .wrapper-suggest .suggestBox .suggesItem > span {
+  display: inline-block;
+  font-size: 120%;
+  font-weight: normal;
+  padding: 2px;
+}
+
+.suggest .wrapper-suggest .suggestBox .suggesItem:hover{
+    background-color: #939397;
+    color: #FFF;
+}
+
+.suggest button {
+
+}

File enme-war/src/main/webapp/resource/css-compile/web/components/hashtag-tweetpoll.css

View file
-/** Hash Tags **/
-div.hashTagWrapper {
-    max-width: 90%;
+
+.hashTagWrapper {
+}
+
+.hashTagWrapper .suggest{
+
+}
+
+.hashTagWrapper .suggest .wrapper-suggest {
+  float: left;
+  margin-right: 15px;
+  width: 500px;
+}
+
+hashTagWrapper .suggest .wrapper-suggest .littleInputClass {
+    width: 100%;
 }
 
 .wrapperHashTagItems {
-    overflow: auto;
     padding: 10px 0 5px;
 }
 
 }
 
 div.hashTagWrapper .suggestBox {
-    max-width: 56%;
-    width: 56%;
-    position: absolute;
     border: 1px solid #E0D6D6;
 }
 

File enme-war/src/main/webapp/resource/css-compile/web/components/menu-logged.css

View file
   border-radius: 0px 0px 5px 5px;
 }
 
+@media only screen and (max-width : 980px) {
+
+  .menuWrapper {
+     border-radius: 0px;
+     -webkit-border-radius: 0px;
+     -moz-border-radius: 0px;width: 100%;
+     padding: 5px;
+  }
+
+  .menuWrapper div.rightSide {
+      float: right;
+      text-align: left;
+      width: 25%;
+  }
+
+  .menuWrapper div.leftSide {
+    float: left;
+    height: 33px;
+  }
+
+  .menuWrapper .item a {
+    float: left;
+    text-decoration: none;
+    color: white;
+    font-weight: normal;
+    font-size: 14px;
+  }
+
+}
+
 .menuWrapper > .clearfix {
     width: 100%;
     display: block;
 
 .menuWrapper div.rightSide div {
     float: left;
-    margin-right: -1px;
     position: relative;
 }
 

File enme-war/src/main/webapp/resource/css-compile/web/components/menu-profile.css

View file
     padding-right: 4px;
     text-align: center;
     vertical-align: middle;
-    width: auto;
 }

File enme-war/src/main/webapp/resource/css-compile/web/components/suggestion.css

View file
 
 .web-search-wrapper .suggest {
     position: relative;
+    width: auto;
 }
 
 .web-search-wrapper .suggestBox {

File enme-war/src/main/webapp/resource/css-compile/web/components/tweetpoll-admon.css

View file
 /** TweetPoll **/
 #web-tweetpoll-wrapper {
   border: 1px solid #BCBCBC;
-  border-radius: 3px 3px 3px 3px;  
+  border-radius: 3px 3px 3px 3px;
   margin-top: 2em;
   background-color: #F0F0F0;
 }
   font-size: 100%;
   padding: 10px;
   text-align: right;
+  background-color: #F0F0F0;
 }
 
 #web-tweetpoll-wrapper div.web-tweetpoll-menu  a {

File enme-war/src/main/webapp/resource/css-compile/web/components/tweetpoll-create.css

View file
 /** Create tweetpoll. **/
-.web-tweetpoll-wrapper {
 
+.web-create-tweetpoll {
+border: 1px solid #DAD8D8 !important;
+background-color: #F0F0F0;
+margin-top: 10px;
 }
 
-div.spaceBlock {
-    margin-bottom: 20px !important;
-}
-
-.web-tweetpoll-wrapper div.spaceBlockTop {
-    margin-top: 20px !important;
-}
+div.spaceBlock {}
 
 div.web-tweetpoll-section {
-    background-color: #F6F6F6;
+    background-color: white;
     border: 1px solid #E5E5E5;
     margin: 0 auto;
     width: auto;
     z-index: 5;
-    -webkit-border-radius: 10px 10px 10px 10px;
-    -moz-border-radius: 10px 10px 10px 10px;
-    border-radius: 10px 10px 10px 10px;
+}
+
+div.web-tweetpoll-section .left-button{
+
 }
 
 div.web-tweetpoll-section div.web-tweetpoll-section-title {
     /** #737373 D7D7D7 #8EA5B7  */
-    color: #FFFFFF;
-    font-size: 110%;
+    color: white;
+    font-size: 15px;
     padding: 10px;
-    font-weight: bold;
-    border-radius : 10px 10px 0 0;
-    -webkit-border-radius : 10px 10px 0 0;
-    -moz-border-radius : 10px 10px 0 0;
+    color: #9F9F9F;
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    border-bottom: 1px solid #888;
+    background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%);
+    /* FF3.6+ */
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff),
+        color-stop(100%, #e5e5e5) ); /* Chrome,Safari4+ */
+    background: -webkit-linear-gradient(top, #ffffff 0%, #e5e5e5 100%);
+    /* Chrome10+,Safari5.1+ */
+    background: -o-linear-gradient(top, #ffffff 0%, #e5e5e5 100%);
+    /* Opera 11.10+ */
+    background: -ms-linear-gradient(top, #ffffff 0%, #e5e5e5 100%);
+    /* IE10+ */
+    background: linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* W3C */
+    filter: progid : DXImageTransform.Microsoft.gradient (   startColorstr = '#ffffff', endColorstr = '#e5e5e5', GradientType = 0 ); /* IE6-9 */
 }
 
 .web-tweetpoll-section .space {
-    padding: 10px;
+    padding: 20px;
 }
 
 div.web-tweetpoll-section .info {
 div.web-tweetpoll-section .counterGlobal {
 	border-radius: 100px 100px 100px 100px;
     -webkit-border-radius: 100px 100px 100px 100px;
-    -moz-border-radius: 100px 100px 100px 100px;    
+    -moz-border-radius: 100px 100px 100px 100px;
     background-color: green;
     color: white;
     float: right;
     text-align: right;
 }
 
+div.tweetPollPublishButton .cancel-button {
+    font-size: 14px;
+    color: #222;
+    font-weight: bold;
+    cursor: pointer;
+}
+
 .tweetPollPublishButton {
     margin: auto 78px;
     padding: 10px;
     min-width: 90%;
 }
 
+.web-tweetpoll-wrapper .web-answer-form-wrapper .littleInputClass {
+  width: 85%;
+}
+
 .web-tweetpoll-wrapper .littleInputClass {
-    padding: 3px;
-    border: 1px solid #BCBCBC;
-    color: #808080;
-    font-size: 100%;
-    font-weight: bold;
-    width: 70%;
-    -webkit-border-radius: 5px;
-    -moz-border-radius: 5px;
-    border-radius: 5px;
+  border-radius: 2px 2px 2px 2px;
+  font-size: 100%;
+  padding: 3px 0 3px 3px;
+  width: 100%;
+  margin-right: 10px;
 }
 
 .web-tweetpoll-wrapper div.tweetPollOptions div.boxRight {
     margin-top: 10px;
 }
 
-.web-tweetpoll-wrapper div.tweetPollOptions div.question {
-
-}
-
 .web-tweetpoll-wrapper div.tweetPollOptions div.question .questionTextBox
     {
     float: left;
   max-width: 90%;
 }
 
+.answerAddForm  .web-answer-form-wrapper {
+  overflow:  auto;
+}
+
+.answerAddForm  .web-answer-form-wrapper > div {
+    float : left;
+}
+
 .answerAddForm div.labelQuestion .answer-loader {
   padding-left: 5px;
   position: absolute;
 
 .addAnswers .listAnswerWrapper {
     margin: 0;
-    max-width: 700px;
+    width: auto;
 }
 
 .addAnswers .answerItem {
-    background-color : #E4E4E4;
-    border : 1px solid #BFBFBF;
+    background-color : #E9E9E9;
+    border: 1px solid #C5C1C1;
     -moz-border-radius: 4px 4px 4px 4px;
     border-radius: 4px 4px 4px 4px;
     color: #FFFFFF;
     cursor: pointer;
     margin-top: 3px;
-    max-width: 86%;
+    max-width: 85%;
     min-height: 25px;
     overflow: auto;
-    padding: 0px;
+    padding: 3px;
     vertical-align: top;
 }
 
 .addAnswers .answerItem .title {
-    color: #FFFFFF;
+    color: #5A5A5A;
     float: left;
-    font-size: 100%;
     font-weight: bold;
-    overflow: auto;
-    padding: 0;
+    font-size: 12px;
 }
 
 .addAnswers .answerItem .title .answerItemTitle {
     color: white !important;
 }
 
-.addAnswers .answerItem .shortUrlEnter  a {
-    color: white;
-}
-
-.addAnswers .answerItem div.title .answerItemShortUrl a:link {
-    text-decoration: none;
-}
-
+.addAnswers .answerItem div.title .answerItemShortUrl a:link,
+.addAnswers .answerItem div.title .answerItemShortUrl a:visited,
 .addAnswers .answerItem div.title .answerItemShortUrl a:hover {
     text-decoration: none;
+    color: #222;
 }
 
 .addAnswers .answerItem div.options {
     min-width: 100px;
     padding: 4px;
 }
+
+/** TweetPoll HELP **/
+
+.tp-help {
+    padding: 10px;
+    position: relative;
+}
+
+.tp-help .help-option {
+    position: absolute;
+    right: 20px;
+    top: 5px;
+    font-size: 14px;
+    text-decoration: underline;
+    cursor: pointer;
+}
+
+.tp-help .help-title {
+    clear: both;
+}
+
+.tp-help h1 {
+    font-weight: bold;
+    font-size: 20px;
+    color: #222;
+    margin-left: 20px;
+    line-height: 32px;
+}
+
+.tp-help .help {
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAAEEfUpiAAAACXBIWXMAAFxGAABcRgEUlENBAAAACXRFWHRDb21tZW50AACJKo0GAAAEPElEQVR4nJVXz0tcdxBXERL0qJIU8xd4UDwEIgQScmiTQm4LJUVyWi9LBIN7SDzk5lFLm4JCD9JNaSjppdIEpE00ubY5hPyENnEjSEIQUXQPzarT+ayf2Z39vu/b3Tz4uO+978xn5s13Zr5jm4i0AdlsNo/fykPvtzKjkMoLXZnkg+C3zVSqEtTvtQU8PMIqoPc1cU8qTqLY5vx4I84IBE2jx2gevxe580rks++rDB11bgHb/4k3MVJHqRjk/ZRitfodTuhrxVn/zhZ2Yc8Jjioy5uR174Oz32kC6/pixwJqQVUc1bUyBHKmdeUPkb/fVQVmK6Fk5Obx8qvfaiboywr+dNGHsvNhQt/P+a8YVjwNw5yIgwuSEE8VS4pNPm+ZxQSBLpQUN+jOgOIgCM0i5dpJNuxdFCr2e6Wfn4u83a7/eEWJOguKCdxcUkzHNgPo++4w9id/rHufN8P4c0ZRiBFc/l3k5UaSVHG+SsCbbcVQSDL1sG7nDWPU2Vf0+SBmGJxuEp1Q/KC4qxh3cr8oDlK3kUJIhD23ncCyL9+GBCQ5i37BGkkoRgmQJEwWYfIsMZnMi6lUAheD0RSPOtA5UJyxih2mcjsDuBhEHlk5QNkbyNqQoFrBsWRymKH8I+sEFvEFKpdM+JSm1pMPIn8WEyT9Pv1xU8b36cIRL4hrZU1kT3d892MdwQ4J1tE0fSHlY24/XEtmIwmmUUeeYCZUxrWvHowUogQ5nB6e4HxIgEK6tpL0igQFFGKlsaGHx3agVBb58k6CYD4MYh8qiwRj4SfklqLWh1DBPg+K1kXRUVNyoOyyUqw3+lQ9QKnaM0qYpYySPkGZbipn0oppNVY0ONZcUQ03LGeULmvf9wL0homm5dygN/Qy5ZcjjSY0tEzZ1B7SkgOs8FVHjhDg0BpsoDNIGd+DVsOwNQthhhsq7L/dfp29etz1a9vocdtsx9VNDiFnJtUBdtMihecCo0jNckp6RlMWOoEzc+QuZt3xbos9bOU4qoac4bFPMJqGMefEEG3AVo93wLJ2xBmfjxF+oZX2cV+iV/5BqhPzzokR2loWtpIzfFFwxi/EiDBm3Hstcr94+GsD691/a06c/inViQvOiQJtVprhJB9yzoHZZqG9+KvI4j8i70s14y82Dp1M0Zl1DuRoc9KGKzxMOweih4sH5lm7vvmrpVzIOwemafOSJeAej7gOOoDjcacZ6fGbIsdutmQcXEdovIO29ipHKl9epUcLLgqYVUtppMgBu249a2gcHP3u6xdo62rYB2w0x8jR6RxJHNWGz7Uizt1uaHzG8XeSu+6wibXfEoUwQLU7RzD2Y+AKR3+PA8oMOM52cgm5G59mUmvHu1TCODiadf+rNQP3eZS6Qq5EG051wBF1cWts4DVsZmv/QdkAvBnIbFG3q5GNlr4ocApHM0Z3jO35bG2Ex7uWjmCP/wEgsCR0RVPw/gAAAABJRU5ErkJggg==);
+    background-repeat: no-repeat;
+    width: 40px;
+    height: 50px;
+    margin-left: 20px;
+    float: left;
+    opacity: 0.6;
+}
+.tp-help h2 {
+    font-weight: normal;
+    font-size: 18px;
+    color: #555;
+    margin: 20px 0;
+    text-shadow: 2px -1px 5px white;
+}
+
+.tp-help ul {
+    margin-left: 80px;
+    clear: both;
+}
+
+.tp-help ul > li {
+  list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDgtMDMtMjRUMTk6MDA6NDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUdUmQAAACdSURBVDiN1ZMxCgMhEEW/IV7NysYT6NGcMyS9hbV3EQSbEU0RNtVqdllSRBCE4X/enxnFGANXzu2S+mcGRPQgoiGEwHbPEmhjDLz3Xxu0jHDE5D4rMPMbRevNZDfHlCDnjFIKaq1QSoGIdkmmBK019N7Re8dqV6YGUsrPO4QAa+25CMwMZkaMEc656RyXTUwpLcUrgucRMQCI//9ML8fmSdbjt8/RAAAAAElFTkSuQmCC);
+}

File enme-war/src/main/webapp/resource/css-compile/web/components/tweetpoll-publish.css

View file
 }
 
 div.tweetPollPublishDialog div.info {
-    background-color: #F7F5C9;
-    border : 1px solid #E0E443;
-    padding: 10px;
-    font-weight: bold;
-    -webkit-border-radius: 3px;
-    -moz-border-radius: 3px;
-    border-radius: 3px;
+  font-size: 18px;
+  font-weight: normal;
+  line-height: 20px;
+  margin: 10px;
+  padding: 10px;
 }
 
 div.tweetPollPublishDialog div.items {
     float: left;
     margin-right: 5px;
     padding: 3px;
-    width: 30px;
+    width: 20px;
 }
 
 div.tweetPollPublishDialog div.items div.item div.detail {
 div.tweetPollPublishDialog div.items div.item div.detail .success-message
     {
     padding: 3px;
-    background-color: #B1ECB1;
     max-width: 50%;
     padding: 4px;
-    color: #358852;
+    color: #26A526;
     -webkit-border-radius: 2px;
     -moz-border-radius: 2px;
     border-radius: 2px;
 }
 
 div.tweetPollPublishDialog div.items div.item div.detail .success-url {
-    padding: 3px;
-    padding: 4px;
-    color: #358852;
-    font-weight: bold;
+  color: #444444;
+  font-weight: normal;
+  line-height: 25px;
+  padding: 4px;
+  text-decoration: underline;
 }
 
 div.tweetPollPublishDialog div.items div.item div.detail .success-url a:hover

File enme-war/src/main/webapp/resource/css-compile/web/default.css

View file
 }
 
 .default-background-dark-color {
-    background-color: #A6B4BF !important; /** #A6B4BF 8EA5B7 **/  /** #737373 D7D7D7 #8EA5B7  */
+    background-color: #555555 !important; /** #A6B4BF 8EA5B7 **/  /** #737373 D7D7D7 #8EA5B7  */
 }
 
 .default-dark-color {

File enme-war/src/main/webapp/resource/css-compile/web/public.css

View file
     background-color: #F9E5E5;
 }
 
+
+/** main public line **/
+
+@media only screen and (max-width : 980px) {
+    #web-main-public-line .web-item-wrapper {
+        width: 100% !important;
+    }
+
+    #web-main-public-line .web-left-wrapper {
+        width: 100% !important;
+    }
+}
+
 #web-main-public-line {
     margin: 0 auto;
     position: relative;

File enme-war/src/main/webapp/resource/js/me/core/URLServices.js

View file
       'dojo/_base/xhr',
       'dojo/request/xhr',
       "dojo/request",
+      "dojo/_base/lang",
       'dojo/_base/json',
       "dojo/request/notify",
       "dojo/_base/array" ],
-    function(dojo, _ENME, xhr, xhrRequest, request, _json, notify, _array) {
+    function(dojo, _ENME, xhr, xhrRequest, request, lang, _json, notify, _array) {
 
       // config context path
       var context_path = _ENME.config("contextPath"),
         "encuestame.service.list.hashtagsAction.getAction" : _appendContext("api/survey/hashtag/$0/$1.json"),
         "encuestame.service.list.cloud" : _appendContext("api/common/hashtags/cloud.json"),
         "encuestame.service.list.allSocialAccount" : _appendContext("api/common/social/accounts.json"),
-        "encuestame.service.list.publishTweetPoll" : _appendContext("api/admon/users.json"),
+        "encuestame.service.list.publishTweetPoll" : _appendContext("/api/survey/tweetpoll/publish.json"),
         "encuestame.service.list.listTweetPoll" : _appendContext("api/survey/tweetpoll/search.json"),
         "encuestame.service.list.changeTweetPollStatus" : _appendContext("api/survey/tweetpoll/change-open-status-tweetpoll.json"),
         "encuestame.service.list.resumeliveResultsTweetPoll" : _appendContext("api/survey/tweetpoll/resumeliveResults-tweetpoll.json"),
         "encuestame.service.gadget.move" : _appendContext("api/common/dashboard/move-gadget.json"),
         "encuestame.service.gadget.add" : _appendContext("api/common/gadgets/add.json"),
         "encuestame.service.gadget.load" : _appendContext("api/common/dashboard/gadget/load.json"),
-        "encuestame.service.gadget.remove" : _appendContext("api/common/dashboard/gadget/remove.json")
+        "encuestame.service.gadget.remove" : _appendContext("api/common/dashboard/gadget/remove.json"),
+        "encuestame.service.tweetpoll.autosave" : _appendContext("api/survey/tweetpoll/autosave.json")
       };
 
 
           var _load = response;
           var _error = error;
           if (loaderHandler != 'undefined' && typeof loaderHandler === 'function') {
-              console.log("loader handler viene y es una funcion");
               _load = function(r) {
                   try{
                       response(r);
                       loaderHandler();
                   } catch(error) {
-                      ENME.log(error);
+                      _ENME.log(error);
                   }
               };
               _error = function(e) {
                       error(e);
                       loaderHandler();
                   } catch(error) {
-                      ENME.log(error);
+                      _ENME.log(error);
                   }
               };
           }
-          request(_services.service(url), {
+
+          // defaultt params
+          var _params = {
              handleAs : _handleAs,
                failOk : _failOk,
                timeout : _timeout,
                method : method,
-               preventCache : _preventCache,
-               query : params,
-               data : params,
-           }).then(_load, _error,
-                   function(evt) {
-                   console.log("!!!!!!!!!!!!!!! progress", evt);
-           });
+               preventCache : _preventCache
+           };
+
+           // on dependes the method, the way to send the data it's different
+
+           if (method === 'POST' || method === 'PUT' || method === 'DELETE') {
+                _params = lang.mixin(_params, {
+                    data : params
+                });
+           } else if (method === 'GET') {
+                _params = lang.mixin(_params, {
+                    query : params
+                });
+           }
+
+           // resolve complex url
+           var _service_url = null;
+           if (typeof url === 'string') {
+               _service_url = _services.service(url);
+           } else if (lang.isArray(url) && url.length === 2) {
+               _service_url = _services.service(url[0], url[1]);
+           } else if (lang.isArray(url) && url.length === 1) {
+               _service_url = _services.service(url[0]);
+           }
+           console.log("url to call -->", _service_url);
+           if (_service_url !== null ) {
+                // make the request
+                request(_service_url, _params).then(_load, _error,
+                         function(evt) {});
+              }
      };
 
       return _services;

File enme-war/src/main/webapp/resource/js/me/core/enme.js

View file
       FATAL: "fatal"
     };
 
+    // default time / formats
+    var time = {
+        timeFormat : "hh:mm:ss",
+        dateFormat : "M/d/yy"
+    };
+
     /**
      *
      */
       MESSAGES_TYPE : messageTypes,
 
       /**
+       * default time / formats
+       */
+      TIME : time,
+
+      /**
        * @deprecated moved to constants.js
        */
       STATUS : ['SUCCESS','FAILED', 'STAND_BY', 'RE_SCHEDULED', 'RE_SEND'],
        */
       hashtagContext : function(hashtagName) {
          if (hashtagName) {
+                // http://jsperf.com/concat-test-jc
                 var url = this.config("contextPath");
-                url = url.concat("/tag/");
-                url = url.concat(hashtagName);
-                url = url.concat("/");
+                url = url + "/tag/";
+                url = url + hashtagName;
+                url = url + "/";
                 return url;
             } else {
                 throw new Error("hashtag name is required");
               if (quantity > 1000) {
                   var quantityReduced = Math.round(quantity / 100);
                   text = quantityReduced.toString();
-                  text = text.concat("K");
+                  text = text + "K";
               }
           return text;
           } else {
           return parent;
       },
 
+      /**
+       * Return the session id saved in cookie by spring security.
+       */
       getSession : function() {
           //JSESSIONID=dh3u2xvj7fwd1llbddl33dhcq; path=/encuestame; domain=demo2.encuestame.org
           var sessionCookie = cookie("JSESSIONID");
 
       /*
        * Store a item into session storage
+       * @method storeItem
        * @param key
        * @param value
+       * @param local
        */
-      storeItem : function (key, value) {
+      storeItem : function (key, value, local) {
+          local = local || false;
           if (typeof Modernizr != 'undefined' && Modernizr.sessionstorage) {
               sessionStorage.setItem(key, json.toJson(value));
           } else {
 
       /*
        * Remove a item from session storage
+       * @method removeItem
        * @param key the key item
-       */  
-      removeItem : function (key) {
+       * @param local define if the source is local
+       */
+      removeItem : function (key, local) {
+          local = local || false;
           if (typeof Modernizr != 'undefined' && Modernizr.sessionstorage) {
               sessionStorage.removeItem(key);
           } else {
               //TODO: remove on COOKIE
           }
-      },      
+      },
 
-      /*
+      /**
+       * @method restoreItem
        * @param key
-       * @param value
+       * @param local
        */
-      restoreItem : function (key) {
+      restoreItem : function (key, local) {
+          local = local || false;
           if (typeof Modernizr != 'undefined' && Modernizr.sessionstorage) {
               return sessionStorage.getItem(key);
           } else {

File enme-war/src/main/webapp/resource/js/me/core/main_widgets/EnmeMainLayoutWidget.js

View file
+/*
+ * Copyright 2013 encuestame
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/***
+ *  @author juanpicado19D0Tgm@ilDOTcom
+ *  @version 1.146
+ *  @module Services
+ *  @namespace Widget
+ *  @class EnmeMainLayoutWidget
+ *  @requires WidgetServices
+ */
+
 define([ "dojo/parser",
          "dojo/_base/declare",
      "me/core/URLServices",
 
   return declare([_WIDGET], {
 
-        /*
-         *
-         */
+      /**
+       *
+       * @property defaultNoResults
+       */
        defaultNoResults : "Nothing find with ",
 
-       /*
+       /**
         * default context path.
+        * @property contextDefaultPath
         */
        contextDefaultPath : _ENME.config('contextPath'),
 
-       /*
-        * add item on drop down menu.
-        */
+      /**
+       * add item on drop down menu.
+       * @property append
+       */
        append : function(node, place) {
          dojo.place(node, place);
        },
 
        /**
-        *
+        * Range Actions
+        * @property range_actions
         */
        range_actions : [ {
          period : "All",
          })
        }]
   });
-});
-
-//dojo.provide("encuestame.org.main.EnmeMainLayoutWidget");
-//
-//dojo.require("dojo.cache");
-//dojo.require("encuestame.org.main.WidgetServices");
-//dojo.require("dijit._Templated");
-//dojo.require("dijit._Widget");
-//
-//dojo.declare("encuestame.org.main.EnmeMainLayoutWidget", [ dijit._Widget,
-//		dijit._Templated, encuestame.org.main.WidgetServices ], {
-//
-//	/*
-//	 * enable widgets on html template.
-//	 */
-//	widgetsInTemplate : true,
-//
-//	/*
-//	 * default placeholder.
-//	 */
-//	placeholder : "Type something...",
-//
-//	/*
-//	 *
-//	 */
-//	channel : "encuestame/time/range/search/",
-//
-//	/*
-//	 *
-//	 */
-//	defaultNoResults : "Nothing find with ",
-//
-//	/*
-//	 * default context path.
-//	 */
-//	contextDefaultPath : ENME.config('contextPath'),
-//
-//	/*
-//	 * add item on drop down menu.
-//	 */
-//	append : function(node, place) {
-//		dojo.place(node, place);
-//	},
-//
-//	/**
-//	 *
-//	 */
-//	range_actions : [ {
-//		period : "All",
-//		value  : "all",
-//		action : dojo.hitch(this, function(channel) {
-//			dojo.publish(channel, [ "all" ]);
-//		})
-//	}, {
-//		period : "Last Year",
-//		value  :  "365",
-//		action : dojo.hitch(this, function(channel) {
-//			dojo.publish(channel, [ "365" ]);
-//		})
-//	}, {
-//		period : "Last Month",
-//		value  : "30",
-//		action : dojo.hitch(this, function(channel) {
-//			dojo.publish(channel, [ "30" ]);
-//		})
-//	}, {
-//		period : "Last Week",
-//		value  : "7",
-//		action : dojo.hitch(this, function(channel) {
-//			dojo.publish(channel, [ "7" ]);
-//		})
-//	}, {
-//		period : "Last Day",
-//		value  : "24",
-//		action : dojo.hitch(this, function(channel) {
-//			dojo.publish(channel, [ "24" ]);
-//		})
-//	}]
-//});
+});

File enme-war/src/main/webapp/resource/js/me/core/main_widgets/WidgetServices.js

View file
+/*
+ * Copyright 2013 encuestame
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/***
+ *  @author juanpicado19D0Tgm@il.com
+ *  @version 1.146
+ *  @module Services
+ *  @namespace Widget
+ *  @class WidgetServices
+ */
 define([ "dojo/_base/declare",
      "me/core/URLServices",
      "me/web/widget/dialog/ModalBox",
 
   return declare(null, {
 
-      /*
-       *
+      /**
+       * Return the url service
+       * @method getURLService
        */
       getURLService : function() {
         return _URL;
 
       /**
        * Create a modal box.
+       * @method _createModalBox
+       * @private
        */
       _createModalBox : function(type, handler) {
+        //FUTURE: replace by Dojo Dialog
         var modal = dojo.byId("modal-box");
         if (modal != null) {
           var modalBox = new ModalBox(dojo.byId("modal-box"), type, dojo.hitch(handler));
 
       /**
        * Display the loading process.
+       * @method loading_show
        */
       loading_show : function (message) {
         var loading = registry.byId("loading");
 
       /**
        * Hide the loading process.
+       * @method loading_hide
        */
       loading_hide : function () {
         var loading = registry.byId("loading");
 
       /**
        * Publish a message on the context
+       * @method publishMessage
        * @param message the message
        * @param type error, warning, info, success