Commit 1417de50 authored by ZeMKI's avatar ZeMKI

Network sorting update

* now every section has a label inside.
* option to have labels on hover (commented).
* values are saved correctly.
* now when creating a new study you can preview the sorting.
parent b3446ebc
This diff is collapsed.
......@@ -13,14 +13,27 @@ class Sorting extends Model
*/
public static function store($request, $study)
{
if (!$request->has('details')) {
if (!$request->has('details'))
{
$study->sortings()->detach();
// insert in details something according to the sorting
$circles = 'circles|' . $request->input('sorting.numberofcircles');
$description = '||description|' . $request->input('sorting.description');
$classifiers = $request->input('sorting.classifier') && $request->input('sorting.classifier')['name'] != 'none' ? '||classifier|' . $request->input('sorting.classifier')['name'] : '';
$study->sortings()->attach($request->get('sorting')['id'], ['details' => $circles . $description . $classifiers]);
} else {
if ($request->input('sorting.id') == 2)
{
$sections = '||divisions|' . $request->input('sorting.sectionNumber');
$sectionNames = '||names|' . join("|",$request->input('sorting.sections'));
$sectionCenter = '||center|' . $request->input('sorting.centerLabel')."||";
} else
{
$sections = "";
$sectionNames = "";
$sectionCenter = "";
}
$study->sortings()->attach($request->get('sorting')['id'], ['details' => $circles . $description . $classifiers . $sections . $sectionNames . $sectionCenter]);
} else
{
$study->sortings()->attach($request->get('sortingid'), ['details' => $request->get('details')]);
}
}
......
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/
/******/ return result;
/******/ }
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "/js/manifest": 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // run deferred modules from other chunks
/******/ checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ([]);
\ No newline at end of file
......@@ -51,6 +51,7 @@ Vue.component('new-token', require('./components/Interview/newtokenmodal.vue').d
Vue.component('interview-list', require('./components/Interview/interviewlist.vue').default);
Vue.component('q-sort', require('./components/Interview/q-sort.vue').default);
Vue.component('network-sorting', require('./components/Interview/network-sorting.vue').default);
Vue.component('sorting-preview', require('./components/Interview/sorting_preview.vue').default);
Vue.component('userpart', require('./components/userpart.vue').default);
Vue.component('url-list', require('./components/publicurllist').default);
......
This diff is collapsed.
This diff is collapsed.
{
"E-Mail Address": "E-Mail Address",
"New Study": "New Studyyyy",
"Language": "Language",
"Create Study": "funzia?",
"To create a new study, you should provide some general information, choose a sorting scheme you wish to use and can add additional questions for your interviewees. To navigate between these options please use the three tabs provided below.": "To create a new study, you should provide some general information, choose a sorting scheme you wish to use and can add additional questions for your interviewees. To navigate between these options please use the three tabs provided below.",
"Please give your study a name, assign one or more responsible researchers and add a short description. All information is mandatory to successful save the study.": "sì",
"Choose Sorting Scheme": "Choose sorting scheme",
"Create new study": "Crea uno studio nuovo."
}
\ No newline at end of file
<?php
return array (
'E-Mail Address' => 'E-Mail Address',
'New Study' => 'New Study',
'Language' => 'Language',
'Create Study' => 'DaI!',
'To create a new study, you should provide some general information, choose a sorting scheme you wish to use and can add additional questions for your interviewees' =>
array (
' To navigate between these options please use the three tabs provided below' =>
array (
'' => 'To create a new study, you should provide some general information, choose a sorting scheme you wish to use and can add additional questions for your interviewees. To navigate between these options please use the three tabs provided below.',
),
),
);
/** Interview - view part */
.chosen-answer{
margin:10px 10px 10px 0;
}
.tag:not(body).is-primary {
background-color: $primary !important;
}
.chosen-answer-type{
margin:5px 5px 5px 0;
background-color:rgba(255, 255, 255, 0.2);
font-size:12px;
padding:3px;
text-transform: capitalize;
}
.available-answer{
margin:5px 5px 5px 0;
}
.question{
color: $red !important;
padding: 5px;
background-color:rgba(255, 255, 255, 0.2);
text-transform: uppercase;
}
/** Interview - create part */
.buttons-interview{
margin: 0 0 5px 0;
}
#style-1::-webkit-scrollbar {
top: 0;
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment