Skip to content

Instantly share code, notes, and snippets.

@jerome-diver
Last active July 12, 2017 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerome-diver/d6c52c19c7ec3f9e2889d88202acd235 to your computer and use it in GitHub Desktop.
Save jerome-diver/d6c52c19c7ec3f9e2889d88202acd235 to your computer and use it in GitHub Desktop.
try to make running unitegallery.js code in rails-4 application
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery2
//= require jquery.turbolinks
//= require jquery_ujs
//= require ckeditor/init
//= require jquery-ui
//= require jquery.remotipart
//= require bootstrap
//= require jstree
//= require cocoon
//= require the_comments
$(document).ready(function () {
CKEDITOR.replace('recipe_steps');
});
function readURL(input, selector) {
var input_id = $(input).attr("id");
var regex = /.*_(\d+)_.*/;
var match = input_id.match(regex);
var photo_id = "";
if (match == null) {
photo_id = selector;
} else {
photo_id = "photo_" + match[1];
$(input).parent().next().attr("id", photo_id);
photo_id = "#" + photo_id;
}
console.log(photo_id);
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$(photo_id).attr('src',e.target.result)
.width(140)
.height(140);
};
reader.readAsDataURL(input.files[0]);
}
}
# i can not see the log output from firebug console viewer, but i can see mouse hover with timeout is running well.. that is strange
gallery = undefined
$(document).ready ->
console.log("OK")
$("#gallery").unitegallery()
$ ->
setTimeoutConst = undefined
$('.ligne').mouseover ->
data = $(this).attr("data")
id = parseInt(data)
ligne_id = $(this).attr("id")
setTimeoutConst = setTimeout(( ->
$(".ligne").css "background-color", "rgba(0,0,0,1)"
$("#" + ligne_id).css "background-color", "rgba(198, 236, 198, 0.3)"
gallery.selectItem(id)
gallery.stop()
return), 250)
return
$('.ligne').mouseout ->
clearTimeout setTimeoutConst
gallery.play()
return
return
╭─http@antergos-jerome /srv/http/mon_site ‹ruby-2.4.1@rails-4.2.8› ‹devel*›
╰─➤ cat app/controllers/photos_controller.rb
class PhotosController < ApplicationController
before_action :set_photo, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!, only: [:edit, :update, :destroy, :create, :new]
before_action :role_required, except: [ :index, :show ]
add_breadcrumb("home", "/")
def index
add_breadcrumb "Photos", photos_path
@photos = Photo.all.page params[:page]
end
def show
add_breadcrumb @photo.title, photo_path(@photo)
end
def new
@photo = Photo.new
end
def create
@photo = Photo.new(photo_params)
respond_to do |format|
if @photo.save
format.html { redirect_to @photo, notice: 'Photo was successfully created.' }
format.json { render :show, status: :created, location: @photo }
else
format.html { render :new }
format.json { render json: @photo.errors, status: :unprocessable_entity }
end
end
end
def update
respond_to do |format|
if @photo.update(photo_params)
format.html { redirect_to @photo, notice: 'Photo was successfully updated.' }
format.json { render :show, status: :ok, location: @photo }
format.js
else
format.html { render :edit }
format.json { render json: @photo.errors, status: :unprocessable_entity }
end
end
end
def destroy
@article = Article.find(params[:photo_id])
@photo.destroy
respond_to do |format|
# format.html { redirect_to photos_url, notice: 'Photo was successfully destroyed.' }
format.json { head :no_content }
format.js
end
end
private
def set_photo
@photo = Photo.find(params[:id])
end
def photo_params
params.require(:photo).permit(:title, :description, :photo,
articles_attributes: [:id, :title, :content, :description, :_destroy])
end
end
#this is the concerned part of the haml file from first line
%p#notice= notice
= content_for :title_page do
%h2.title Liste complète
.badge Photos
.row
#gallery{style: "display: none;"}
- @photos.each do |p|
= image_tag(p.photo.thumb('300x300^').url, alt: p.title, 'data-image': p.photo.url, 'data-description': p.description.html_safe)
!!!
%html
%head>
%title om mani padme hum
= stylesheet_link_tag 'application', params[:controller], media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', params[:controller], 'data-turbolinks-track' => true
- if ( current_page?(:controller => "photos") && current_page?(:action => "index") ) then
= javascript_include_tag "unitegallery.js", 'data-turbolinks-track' => true
= javascript_include_tag "ug-theme-default.js", 'data-turbolinks-track' => true
= stylesheet_link_tag "unite-gallery.css", media: 'all', 'data-turbolinks-track' => true
= stylesheet_link_tag "ug-theme-default.css", media: 'all', 'data-turbolinks-track' => true
= stylesheet_link_tag "http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css"
= csrf_meta_tags
= yield :css
= yield :js
%body
.header
.top_header.container-fuild
.row_1
.admin_manager
= render partial: 'layouts/manage_bar'
.site_title
%h1 om mani padme hum
Le bonheur est un art altruiste et subtile
.title_head= yield :title_page
.current_user_h= render :partial => 'layouts/current_user_h_info'
.nav_header
= render partial: "layouts/menu_bar"
%ol.breadcrumb
.breadcrumbs= render_breadcrumbs
.container-fluid.main_content
.notice{ :style => "color:green;"}
- flash.each do |name, msg|
= content_tag :div, msg, id: "flash_#{name}"
= notice
= yield
#dialog
 antergos-jerome  jerome  /  srv  http  mon_site    ST 1   devel la vendor/assets/javascripts
total 1,2M
drwxrwsr-- 2 http http 4,0K 6 jun 10:40 blueimp/
drwxrwsr-- 2 http http 4,0K 12 jui 09:02 ckeditor/
-rwxrwxr-x 1 http http 460K 6 jun 10:40 jquery-ui.js*
drwxrwsr-- 6 http http 4,0K 4 jui 2016 jstree/
-rwxrwxr-x 1 http http 130K 6 jun 10:40 jstree.min.js*
-rwxrwxr-- 1 http http 0 26 jun 2016 .keep*
-rw-rw-r-- 1 http http 284 11 jui 11:00 .metadata.json
-rwxr-xr-x 1 http http 8,8K 27 fév 21:39 ug-theme-carousel.js*
-rw-rw-r-- 1 http http 17K 27 fév 21:39 ug-theme-default.js
-rwxr-xr-x 1 http http 575K 11 jui 15:17 unitegallery.js*
drwxrwxr-x 5 http http 4,0K 11 jui 21:57 unitegallery-master/
 antergos-jerome  jerome  /  srv  http  mon_site    ST 1   devel la vendor/assets/stylesheets
total 128K
drwxrwsr-- 2 http http 4,0K 6 jun 10:40 blueimp/
drwxrwsr-- 3 http http 4,0K 11 jui 15:45 images/
drwxrwsr-- 2 http http 4,0K 6 jun 10:40 img/
-rwxrwxr-- 1 http http 4,0K 26 jun 2016 jqtree.css*
drwxrwsr-- 2 http http 4,0K 6 jun 10:40 jquery-ui/
-rwxrwxr-x 1 http http 35K 6 jun 10:40 jquery-ui.css*
-rwxrwxr-- 1 http http 0 26 jun 2016 .keep*
-rwxrwxr-x 1 http http 29K 6 jun 10:40 style.min.css*
-rw-rw-r-- 1 http users 3,4K 27 fév 21:39 ug-theme-default.css
-rwxr-xr-x 1 http http 31K 27 fév 21:39 unite-gallery.css*
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
Rails.application.config.assets.precompile += %w( ckeditor/* )
Rails.application.config.assets.precompile += %w( unitegallery.js )
Rails.application.config.assets.precompile += %w( ug-theme-default.js )
Rails.application.config.assets.precompile += %w( unite-gallery.css )
Rails.application.config.assets.precompile += %w( ug-theme-default.css )
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )
%w( travails home voyages photos wconcerns articles subjects categories ).each do |controller|
Rails.application.config.assets.precompile += ["#{controller}.css", "#{controller}.js"]
end
gallery doesn't appear as running on page loaded
but firebug show header file has javascript files requiered
it shows a good model of html div and img tags entries and these entries has to be modified by unitegallery.js
( i can see the exemples from unitegallery-master exemples for that... it works from exemple and show well how to make it running)
firebug show that unitegallery.js and other add css files are loaded well without error...
what's wrong ? what i'm forgeting ?
(function() {
var gallery;
gallery = void 0;
$(document).ready(function() {
console.log("OK");
$("#gallery").unitegallery();
$(function() {
var setTimeoutConst;
setTimeoutConst = void 0;
$('.ligne').mouseover(function() {
var data, id, ligne_id;
data = $(this).attr("data");
id = parseInt(data);
ligne_id = $(this).attr("id");
setTimeoutConst = setTimeout((function() {
$(".ligne").css("background-color", "rgba(0,0,0,1)");
$("#" + ligne_id).css("background-color", "rgba(198, 236, 198, 0.3)");
gallery.selectItem(id);
gallery.stop();
}), 250);
});
return $('.ligne').mouseout(function() {
clearTimeout(setTimeoutConst);
gallery.play();
});
});
});
}).call(this);
# login as http user
# cd in the repo
# rails s
# and load the concerned page show on web browser show:
  antergos-jerome  jerome  /  srv  http  mon_site    1  ST 1   devel su http --login
Mot de passe :
╭─http@antergos-jerome ~ ‹ruby-2.4.1@rails-4.2.8›
╰─➤ cd /srv/http/mon_site 1 ↵
╭─http@antergos-jerome /srv/http/mon_site ‹ruby-2.4.1@rails-4.2.8› ‹devel*›
╰─➤ rails s
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TheComments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING!
StateMachine patch for Rails4 will be applied
> private method *around_validation* from StateMachine::Integrations::ActiveModel will be public
https://github.com/pluginaweek/state_machine/issues/295
https://github.com/pluginaweek/state_machine/issues/251
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=> Booting Puma
=> Rails 4.2.8 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Puma starting in single mode...
* Version 3.8.2 (ruby 2.4.1-p111), codename: Sassy Salamander
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
Started GET "/photos" for ::1 at 2017-07-12 10:15:52 +0700
ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by PhotosController#index as HTML
Photo Load (1.0ms) SELECT "photos".* FROM "photos" LIMIT 10 OFFSET 0
Rendered photos/index.haml within layouts/application (30.4ms)
Rendered layouts/_manage_bar.haml (2.2ms)
Rendered layouts/_current_user_h_info.haml (3.0ms)
Category Load (0.3ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" ASC LIMIT 1000
/home/http/.rvm/gems/ruby-2.4.1@global/gems/closure_tree-6.5.0/lib/closure_tree/support.rb:34: warning: already initialized constant SubjectHierarchy
/home/http/.rvm/gems/ruby-2.4.1@global/gems/closure_tree-6.5.0/lib/closure_tree/support.rb:34: warning: previous definition of SubjectHierarchy was here
Subject Load (0.6ms) SELECT "subjects".* FROM "subjects" INNER JOIN (
SELECT id as root_id
FROM "subjects"
WHERE "parent_id" IS NULL
) AS roots ON (1 = 1)
INNER JOIN (
SELECT ancestor_id, descendant_id
FROM "subject_hierarchies"
GROUP BY ancestor_id, descendant_id
HAVING MAX(generations) = 0
) AS descendants ON (
"subjects".id = descendants.descendant_id
AND roots.root_id = descendants.ancestor_id
) WHERE "subjects"."category_id" = $1 ORDER BY title [["category_id", 1]]
Subject Load (0.4ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 1]]
Subject Load (0.7ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 4]]
Subject Load (0.2ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 5]]
Subject Load (0.2ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 9]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 6]]
Subject Load (0.5ms) SELECT "subjects".* FROM "subjects" INNER JOIN (
SELECT id as root_id
FROM "subjects"
WHERE "parent_id" IS NULL
) AS roots ON (1 = 1)
INNER JOIN (
SELECT ancestor_id, descendant_id
FROM "subject_hierarchies"
GROUP BY ancestor_id, descendant_id
HAVING MAX(generations) = 0
) AS descendants ON (
"subjects".id = descendants.descendant_id
AND roots.root_id = descendants.ancestor_id
) WHERE "subjects"."category_id" = $1 ORDER BY title [["category_id", 2]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 2]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 8]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 7]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 10]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 11]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 12]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 13]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 14]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 15]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 16]]
Subject Load (0.2ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 3]]
Subject Load (0.1ms) SELECT "subjects".* FROM "subjects" WHERE "subjects"."parent_id" = $1 [["parent_id", 17]]
Subject Load (0.5ms) SELECT "subjects".* FROM "subjects" INNER JOIN (
SELECT id as root_id
FROM "subjects"
WHERE "parent_id" IS NULL
) AS roots ON (1 = 1)
INNER JOIN (
SELECT ancestor_id, descendant_id
FROM "subject_hierarchies"
GROUP BY ancestor_id, descendant_id
HAVING MAX(generations) = 0
) AS descendants ON (
"subjects".id = descendants.descendant_id
AND roots.root_id = descendants.ancestor_id
) WHERE "subjects"."category_id" = $1 ORDER BY title [["category_id", 3]]
Rendered layouts/_menu_bar.haml (81.2ms)
Rendered breadcrumble/_breadcrumb.html.erb (1.0ms)
Completed 200 OK in 870ms (Views: 843.1ms | ActiveRecord: 9.8ms)
Started GET "/stylesheets/photos.css" for ::1 at 2017-07-12 10:15:54 +0700
ActionController::RoutingError (No route matches [GET] "/stylesheets/photos.css"):
actionpack (4.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (4.2.8) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.8) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.8) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.8) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.8) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.8) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.8) lib/rails/rack/logger.rb:20:in `call'
quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
request_store (1.3.2) lib/request_store/middleware.rb:9:in `call'
actionpack (4.2.8) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.8) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.8) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.8) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
dragonfly (1.1.2) lib/dragonfly/cookie_monster.rb:9:in `call'
rack (1.6.8) lib/rack/lock.rb:17:in `call'
actionpack (4.2.8) lib/action_dispatch/middleware/static.rb:120:in `call'
rack (1.6.8) lib/rack/sendfile.rb:113:in `call'
railties (4.2.8) lib/rails/engine.rb:518:in `call'
railties (4.2.8) lib/rails/application.rb:165:in `call'
rack (1.6.8) lib/rack/content_length.rb:15:in `call'
puma (3.8.2) lib/puma/configuration.rb:224:in `call'
puma (3.8.2) lib/puma/server.rb:600:in `handle_request'
puma (3.8.2) lib/puma/server.rb:435:in `process_client'
puma (3.8.2) lib/puma/server.rb:299:in `block in run'
puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.5ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/routes/_route.html.erb (17.3ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/routes/_route.html.erb (0.2ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/routes/_table.html.erb (7.6ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (4.5ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/actionpack-4.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (90.7ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/web-console-2.3.0/lib/web_console/templates/_markup.html.erb (0.6ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (1.6ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.5ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string (2.7ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript (294.2ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript (0.3ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.5ms)
Rendered /home/http/.rvm/gems/ruby-2.4.1@global/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb (314.0ms)
Started GET "/media/W1siZiIsIjIwMTYvMDYvMjkvNDBraTZpMzE4OF9Xb3JsZF9FeHBsb3Npb24uZ2lmIl0sWyJwIiwidGh1bWIiLCIzMDB4MzAwXiJdXQ/World-Explosion.gif?sha=86411a1490b55f6f" for ::1 at 2017-07-12 10:15:57 +0700
DRAGONFLY: GET /media/W1siZiIsIjIwMTYvMDYvMjkvNDBraTZpMzE4OF9Xb3JsZF9FeHBsb3Npb24uZ2lmIl0sWyJwIiwidGh1bWIiLCIzMDB4MzAwXiJdXQ/World-Explosion.gif?sha=86411a1490b55f6f 304
Started GET "/media/W1siZiIsIjIwMTYvMDcvMDYvNmxscmVtdXlqal9hbmFyY2hpZV8xLmpwZyJdLFsicCIsInRodW1iIiwiMzAweDMwMF4iXV0/anarchie-1.jpg?sha=ad0abde242125a4c" for ::1 at 2017-07-12 10:15:57 +0700
DRAGONFLY: GET /media/W1siZiIsIjIwMTYvMDcvMDYvNmxscmVtdXlqal9hbmFyY2hpZV8xLmpwZyJdLFsicCIsInRodW1iIiwiMzAweDMwMF4iXV0/anarchie-1.jpg?sha=ad0abde242125a4c 304
Started GET "/media/W1siZiIsIjIwMTYvMDcvMDkvOHVsODlxd2l5Z19wcm9ncmFtYXRpb25fMS5qcGciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/programation_1.jpg?sha=644c9e3e0a6b64c4" for ::1 at 2017-07-12 10:15:57 +0700
DRAGONFLY: GET /media/W1siZiIsIjIwMTYvMDcvMDkvOHVsODlxd2l5Z19wcm9ncmFtYXRpb25fMS5qcGciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/programation_1.jpg?sha=644c9e3e0a6b64c4 304
Started GET "/media/W1siZiIsIjIwMTYvMDcvMDkvNWtqYmpicWRnNl9zZXJ2ZXVyc19sb2dvXzEuZ2lmIl0sWyJwIiwidGh1bWIiLCIzMDB4MzAwXiJdXQ/serveurs_logo_1.gif?sha=696c9069f3f048f8" for ::1 at 2017-07-12 10:15:57 +0700
DRAGONFLY: GET /media/W1siZiIsIjIwMTYvMDcvMDkvNWtqYmpicWRnNl9zZXJ2ZXVyc19sb2dvXzEuZ2lmIl0sWyJwIiwidGh1bWIiLCIzMDB4MzAwXiJdXQ/serveurs_logo_1.gif?sha=696c9069f3f048f8 304
Started GET "/media/W1siZiIsIjIwMTYvMDcvMjAvbmkzNzV3MWhhX19MVEk4NDU2X3YxLkpQRyJdLFsicCIsInRodW1iIiwiMzAweDMwMF4iXV0/_LTI8456_v1.JPG?sha=0c97a8a07fbb719a" for ::1 at 2017-07-12 10:15:57 +0700
DRAGONFLY: GET /media/W1siZiIsIjIwMTYvMDcvMjAvbmkzNzV3MWhhX19MVEk4NDU2X3YxLkpQRyJdLFsicCIsInRodW1iIiwiMzAweDMwMF4iXV0/_LTI8456_v1.JPG?sha=0c97a8a07fbb719a 304
Started GET "/media/W1siZiIsIjIwMTYvMDcvMDYvNm5zMTB5bHU5NV9kaXZpbmdfd29ya3NfMS5qcGciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/diving_works_1.jpg?sha=bce8f3483c119765" for ::1 at 2017-07-12 10:15:57 +0700
DRAGONFLY: GET /media/W1siZiIsIjIwMTYvMDcvMDYvNm5zMTB5bHU5NV9kaXZpbmdfd29ya3NfMS5qcGciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/diving_works_1.jpg?sha=bce8f3483c119765 304
Started GET "/media/W1siZiIsIjIwMTYvMDcvMjAvOXE4NHVvOXV4aV9fTFRJODQ1Nl92MS5KUEciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/_LTI8456_v1.JPG?sha=0b86f90e2b07838d" for ::1 at 2017-07-12 10:15:57 +0700
DRAGONFLY: GET /media/W1siZiIsIjIwMTYvMDcvMjAvOXE4NHVvOXV4aV9fTFRJODQ1Nl92MS5KUEciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/_LTI8456_v1.JPG?sha=0b86f90e2b07838d 304
Started GET "/media/W1siZiIsIjIwMTYvMDkvMTEvODdqcWtocHhnMF9jZXJ0aWZpY2F0cy5wbmciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/certificats.png?sha=bf4c8e4dabe2d8b8" for ::1 at 2017-07-12 10:15:57 +0700
DRAGONFLY: GET /media/W1siZiIsIjIwMTYvMDkvMTEvODdqcWtocHhnMF9jZXJ0aWZpY2F0cy5wbmciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/certificats.png?sha=bf4c8e4dabe2d8b8 304
<!DOCTYPE html>
<html><head>
<title>om mani padme hum</title>
<link rel="stylesheet" media="all" href="/assets/application.self-f7ec4b66570b19919c31181b11e123a3e89a3d4821aca4000268184c5eb67237.css?body=1" data-turbolinks-track="true" />
<link rel="stylesheet" media="all" href="/stylesheets/photos.css" data-turbolinks-track="true" />
<script src="/assets/jquery2.self-25ca496239ae8641a09627c8aace5863e7676e465fbb4ce81bc7eb78c4d15627.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/jquery.turbolinks.self-176b9819f30444d441e820bbccd3264fe57753aeafd54dec732b0dbc77129a2a.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/jquery_ujs.self-784a997f6726036b1993eb2217c9cb558e1cbb801c6da88105588c56f13b466a.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/ckeditor/init.self-2f3e80b764bc18c9362e6f3326e1f32d4a8bdceff67345a3453a93b111626ff3.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/ckeditor/ckeditor.self-b59d434de8c0b99847b58080cd63169e76f1416e329073826bc999905bf922fa.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/jquery-ui.self-d02fb65bcf5d6c4f7bfc04996e525dcb7440338e6082bb91f72e4e6f6a3b09f6.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/jquery.iframe-transport.self-b58640d2146e10a028d4aec4f1c6e624305f8b5edd02cbb5ca77f7fb56b4d976.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/jquery.remotipart.self-1660679e325ee534ce863e680eb6ad0bc9739d262594dc1337a2171e5c19c939.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/bootstrap.self-b38817c3e3a3049abb1fc08dd6ae448b23330f8453226efdb074710209474f75.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/jstree/dist/jstree.self-0043a6b7495645aa019e3d6bd308afd89b10e5b41c7deb6d88114094ff4750ed.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/cocoon.self-f11c624796ad1beb726336f108d6e098a14ec5fe3f621f6b2fd2e53b2502b63b.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/the_comments.self-e71cbd1f3bbc12fb572bb84d2030ac6af9e862b1c7e531daecac8282d85644a9.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/application.self-ce7c5c072056c759a576376b16165757f6c398bb4da4e91cef10b48c63cc9aac.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/photos.self-df462751f5b6b9ef6dcab2ed090a044afd26d19c728c2083830a698b90689ba7.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/unitegallery.self-a9de13c1c3cb1f89ccb6dbde6db31c2bc3bfbc28867585107a8452e5764c1b61.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/ug-theme-default.self-0b8fd9475a62a659f033c571bf44f7bc1ea29dc70aa3ff61574429e455ac066f.js?body=1" data-turbolinks-track="true"></script>
<link rel="stylesheet" media="all" href="/assets/unite-gallery.self-a9f465fedd634f932d892a7a4faa1cc18bd2c2c2e9b460e9f52bb070f7d7d4ee.css?body=1" data-turbolinks-track="true" />
<link rel="stylesheet" media="all" href="/assets/ug-theme-default.self-9b098d515feb946c945a8617eedc121c830b701c95f155f20565e6ad26ed63c1.css?body=1" data-turbolinks-track="true" />
<link rel="stylesheet" media="screen" href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" />
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="zJ1vb3dunQBo6/5jxIxc67K8f/nR6ppOpxICv5PJ++3V9ZHWtYAbkJDP6L6Gzd9M+ZWYp+e3F3Df+gbDGBQ0aA==" />
</head></html>
<body>
<div class='header'>
<div class='top_header container-fuild'>
<div class='row_1'>
<div class='admin_manager'>
</div>
<div class='site_title'>
<h1>om mani padme hum</h1>
Le bonheur est un art altruiste et subtile
<div class='title_head'><h2 class='title'>Liste complète</h2>
<div class='badge'>Photos</div>
</div>
<div class='current_user_h'><table>
<thead>
<tr>
<th class='label_login'>Utilisateur</th>
<th class='label_login'>Droit</th>
<th class='label_login'>email</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td class='aucun'>
<strong>Visiteur</strong>
</td>
<td class='aucun'>
<strong>aucun</strong>
</td>
<td class='email_login'></td>
<td>
<a data-remote="true" href="/users/sign_up">Sign up</a>
</td>
<td>
<a data-remote="true" href="/users/sign_in">Sign in</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class='nav_header'>
<nav class='navbar-inverse' data-offset-top='215' data-spy='affix'>
<ul class='nav navbar-nav'>
<li><a href="/">Home</a></li>
<li class='dropdown'>
<a aria-expanded='false' aria-haspopup='true' class='dropdown-toggle' data-toggle='dropdown' href='#' role='button'>
Travaux
</a>
<ul class='dropdown-menu'>
<li class='dropdown-submenu'>
<a class='menu_navigator' tab-index='0' href='/subjects/1'>Travaux sous-marins</a>
<ul class='dropdown-menu'><li>
<a class='menu_navigator' tab-index='0' href='/subjects/4'>Les prérequis</a>
</li>
<li class='dropdown-submenu'>
<a class='menu_navigator' tab-index='0' href='/subjects/5'>En France</a>
<ul class='dropdown-menu'><li>
<a class='menu_navigator' tab-index='0' href='/subjects/9'>Interrim</a>
</li>
</ul>
</li>
<li>
<a class='menu_navigator' tab-index='0' href='/subjects/6'>Off-shore</a>
</li>
</ul>
</li>
</ul>
</li>
<li class='dropdown'>
<a aria-expanded='false' aria-haspopup='true' class='dropdown-toggle' data-toggle='dropdown' href='#' role='button'>
Informatique
</a>
<ul class='dropdown-menu'>
<li class='dropdown-submenu'>
<a class='menu_navigator' tab-index='0' href='/subjects/2'>Linux</a>
<ul class='dropdown-menu'><li>
<a class='menu_navigator' tab-index='0' href='/subjects/8'>Les commandes de base</a>
</li>
</ul>
</li>
<li class='dropdown-submenu'>
<a class='menu_navigator' tab-index='0' href='/subjects/7'>Programation</a>
<ul class='dropdown-menu'><li class='dropdown-submenu'>
<a class='menu_navigator' tab-index='0' href='/subjects/10'>Framework pour sItes Web</a>
<ul class='dropdown-menu'><li>
<a class='menu_navigator' tab-index='0' href='/subjects/11'>Rails</a>
</li>
<li>
<a class='menu_navigator' tab-index='0' href='/subjects/12'>Django</a>
</li>
<li>
<a class='menu_navigator' tab-index='0' href='/subjects/13'>Yesod</a>
</li>
</ul>
</li>
<li>
<a class='menu_navigator' tab-index='0' href='/subjects/14'>Langages à compiler</a>
</li>
<li>
<a class='menu_navigator' tab-index='0' href='/subjects/15'>Langages script / non compilés</a>
</li>
<li>
<a class='menu_navigator' tab-index='0' href='/subjects/16'>Pseudo langages orienté Web</a>
</li>
</ul>
</li>
<li class='dropdown-submenu'>
<a class='menu_navigator' tab-index='0' href='/subjects/3'>World Wide Web</a>
<ul class='dropdown-menu'><li>
<a class='menu_navigator' tab-index='0' href='/subjects/17'>Serveurs</a>
</li>
</ul>
</li>
</ul>
</li>
<li class='dropdown'>
<a aria-expanded='false' aria-haspopup='true' class='dropdown-toggle' data-toggle='dropdown' href='#' role='button'>
Jardin
</a>
<ul class='dropdown-menu'>
</ul>
</li>
<li><a href="/photos">Photos</a></li>
</ul>
</nav>
</div>
<ol class='breadcrumb'>
<div class='breadcrumbs'><div itemscope itemtype="http://schema.org/BreadcrumbList">
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/"><span itemprop="name">home</span></a>
<meta itemprop="position" content="1" />
</span>
&gt;
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<span itemprop="name">Photos</span>
<meta itemprop="position" content="2" />
</span>
</div>
</div>
</ol>
<div class='container-fluid main_content'>
<div class='notice' style='color:green;'>
</div>
<p id='notice'></p>
<div class='row'>
<div id='gallery' style='display: none;'>
<img alt="word explosion" data-image="/media/W1siZiIsIjIwMTYvMDYvMjkvNDBraTZpMzE4OF9Xb3JsZF9FeHBsb3Npb24uZ2lmIl1d/World-Explosion.gif?sha=c97fff8d771fef50" data-description="Image GIF animée " src="/media/W1siZiIsIjIwMTYvMDYvMjkvNDBraTZpMzE4OF9Xb3JsZF9FeHBsb3Npb24uZ2lmIl0sWyJwIiwidGh1bWIiLCIzMDB4MzAwXiJdXQ/World-Explosion.gif?sha=86411a1490b55f6f" />
<img alt="logo de casque" data-image="/media/W1siZiIsIjIwMTYvMDcvMDYvNm5zMTB5bHU5NV9kaXZpbmdfd29ya3NfMS5qcGciXV0/diving_works_1.jpg?sha=f69a103064e314f7" data-description="test" src="/media/W1siZiIsIjIwMTYvMDcvMDYvNm5zMTB5bHU5NV9kaXZpbmdfd29ya3NfMS5qcGciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/diving_works_1.jpg?sha=bce8f3483c119765" />
<img alt="anarchie" data-image="/media/W1siZiIsIjIwMTYvMDcvMDYvNmxscmVtdXlqal9hbmFyY2hpZV8xLmpwZyJdXQ/anarchie-1.jpg?sha=5bab59e34dca5e50" data-description="test" src="/media/W1siZiIsIjIwMTYvMDcvMDYvNmxscmVtdXlqal9hbmFyY2hpZV8xLmpwZyJdLFsicCIsInRodW1iIiwiMzAweDMwMF4iXV0/anarchie-1.jpg?sha=ad0abde242125a4c" />
<img alt="tunneling data" data-image="/media/W1siZiIsIjIwMTYvMDcvMDkvOHVsODlxd2l5Z19wcm9ncmFtYXRpb25fMS5qcGciXV0/programation_1.jpg?sha=1105110c6964bee2" data-description="<p>test de plus</p>
" src="/media/W1siZiIsIjIwMTYvMDcvMDkvOHVsODlxd2l5Z19wcm9ncmFtYXRpb25fMS5qcGciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/programation_1.jpg?sha=644c9e3e0a6b64c4" />
<img alt="serveurs" data-image="/media/W1siZiIsIjIwMTYvMDcvMDkvNWtqYmpicWRnNl9zZXJ2ZXVyc19sb2dvXzEuZ2lmIl1d/serveurs_logo_1.gif?sha=d9cac1ab897173e8" data-description="test d'ajout de photo à un article (Médecine (sujet: &quot;travaux sous-marins&quot;=>&quot;les prérequis&quot;)" src="/media/W1siZiIsIjIwMTYvMDcvMDkvNWtqYmpicWRnNl9zZXJ2ZXVyc19sb2dvXzEuZ2lmIl0sWyJwIiwidGh1bWIiLCIzMDB4MzAwXiJdXQ/serveurs_logo_1.gif?sha=696c9069f3f048f8" />
<img alt="Sauterelle" data-image="/media/W1siZiIsIjIwMTYvMDcvMjAvbmkzNzV3MWhhX19MVEk4NDU2X3YxLkpQRyJdXQ/_LTI8456_v1.JPG?sha=2e51f2a9da920d1e" data-description="<p>sdcdscd</p>
" src="/media/W1siZiIsIjIwMTYvMDcvMjAvbmkzNzV3MWhhX19MVEk4NDU2X3YxLkpQRyJdLFsicCIsInRodW1iIiwiMzAweDMwMF4iXV0/_LTI8456_v1.JPG?sha=0c97a8a07fbb719a" />
<img alt="razeffefz" data-image="/media/W1siZiIsIjIwMTYvMDcvMjAvOXE4NHVvOXV4aV9fTFRJODQ1Nl92MS5KUEciXV0/_LTI8456_v1.JPG?sha=d04ff28afc0afa25" data-description="<p>fezfgzehgerhreh</p>
" src="/media/W1siZiIsIjIwMTYvMDcvMjAvOXE4NHVvOXV4aV9fTFRJODQ1Nl92MS5KUEciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/_LTI8456_v1.JPG?sha=0b86f90e2b07838d" />
<img alt="médaillon" data-image="/media/W1siZiIsIjIwMTYvMDkvMTEvODdqcWtocHhnMF9jZXJ0aWZpY2F0cy5wbmciXV0/certificats.png?sha=f6df3795fde85b1e" data-description="<p>la m&eacute;daille du&nbsp; bon gros <strong>connard de base</strong></p>
" src="/media/W1siZiIsIjIwMTYvMDkvMTEvODdqcWtocHhnMF9jZXJ0aWZpY2F0cy5wbmciXSxbInAiLCJ0aHVtYiIsIjMwMHgzMDBeIl1d/certificats.png?sha=bf4c8e4dabe2d8b8" />
</div>
</div>
<div class='row'>
<div class='col-sm-4'>
<div class='pagination'></div>
<div>
<a href="/photos/new">Ajouter une photo</a>
</div>
</div>
<div class='col-sm-8'>
<table class='table table-hover'>
<thead>
<tr>
<th>Titres</th>
<th>Desciptions</th>
</tr>
</thead>
<tbody>
<tr class='ligne' data='0' id='ligne_11'>
<td class='photo_field'><a href="/photos/11">word explosion</a></td>
<td class='photo_field'>Image GIF animée </td>
</tr>
<tr class='ligne' data='1' id='ligne_13'>
<td class='photo_field'><a href="/photos/13">logo de casque</a></td>
<td class='photo_field'>test</td>
</tr>
<tr class='ligne' data='2' id='ligne_14'>
<td class='photo_field'><a href="/photos/14">anarchie</a></td>
<td class='photo_field'>test</td>
</tr>
<tr class='ligne' data='3' id='ligne_18'>
<td class='photo_field'><a href="/photos/18">tunneling data</a></td>
<td class='photo_field'><p>test de plus</p>
</td>
</tr>
<tr class='ligne' data='4' id='ligne_19'>
<td class='photo_field'><a href="/photos/19">serveurs</a></td>
<td class='photo_field'>test d'ajout de photo à un article (Médecine (sujet: "travaux sous-marins"=>"les prérequis")</td>
</tr>
<tr class='ligne' data='5' id='ligne_5'>
<td class='photo_field'><a href="/photos/5">Sauterelle</a></td>
<td class='photo_field'><p>sdcdscd</p>
</td>
</tr>
<tr class='ligne' data='6' id='ligne_6'>
<td class='photo_field'><a href="/photos/6">razeffefz</a></td>
<td class='photo_field'><p>fezfgzehgerhreh</p>
</td>
</tr>
<tr class='ligne' data='7' id='ligne_24'>
<td class='photo_field'><a href="/photos/24">médaillon</a></td>
<td class='photo_field'><p>la m&eacute;daille du&nbsp; bon gros <strong>connard de base</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
<div id='dialog_edit'></div>
<div id='dialog'></div>
</div>
</body>
@jerome-diver
Copy link
Author

jerome-diver commented Jul 12, 2017

i realize that the problem should be that this javascript code as many js file and not use all of them depend of the gallery type. I realize that rails maybe want devs that they copy files js and images and css files inside vendor/app/assets/ concerned directories (all of them like that or can be nicely sorted inside sub-directories ? i don't know and no one tell me. Also, maybe the gallery code go for search in precise position other linked files, i can not read any use-full information about that, nor on rails guide or other google link i find.
please... help...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment