Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ember:install #435

Open
jakobzeitler opened this issue Jan 23, 2015 · 0 comments
Open

ember:install #435

jakobzeitler opened this issue Jan 23, 2015 · 0 comments

Comments

@jakobzeitler
Copy link

Hi guys,

the "ember:install" generator seems to get confused with some application.js and injects the Ember hooks multiple times:

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require jquery.tablesorter
//= require jquery.tablesorter
//= require jquery.mousewheel-3.0.6.pack
//= require jquery.lazy-images
//= require fullcalendar
//= require underscore-min
//= require backbone
//= require bootstrap
//= require bootstrap-datetimepicker
//= require expand
//= require jquery-fileupload
//= require panorama_positioning.js
//= require gmaps/google
//= require best_in_place
//= require raty.js
//= require letsrate.js
//= require gmaps-auto-complete.js
//= require filter.js
//= require history.js
//= require jquery
//= require handlebars
//= require ember
//= require ember-data
//= require_self
//= require ./railsapp

// for more details see: http://emberjs.com/guides/application/
Railsapp = Ember.Application.create();


$(function () {
    $('.datetimepicker').datetimepicker({
        language: 'en',
        pickSeconds: false
    });
    $('.datepicker').datetimepicker({
        language: 'en',
        pickTime: false
    });
});
//= require jquery
//= require handlebars
//= require ember
//= require ember-data
//= require_self
//= require ./railsapp

// for more details see: http://emberjs.com/guides/application/
Railsapp = Ember.Application.create();


$(document).ready(function () {
    $(".maxLength").keyup(function () {
//= require jquery
//= require handlebars
//= require ember
//= require ember-data
//= require_self
//= require ./railsapp

// for more details see: http://emberjs.com/guides/application/
Railsapp = Ember.Application.create();


            //var counter = $(".message_counter");
            var id = "#counter_" + $(this).attr("id");
            var counter = $(id);
            var charsRemaining = $(this).attr("maxlength") - $(this).val().length;
//= require jquery
//= require handlebars
//= require ember
//= require ember-data
//= require_self
//= require ./railsapp

// for more details see: http://emberjs.com/guides/application/
Railsapp = Ember.Application.create();


            counter.text(charsRemaining);
            // Falls es mal negativ werden kann
            counter.css('color', (charsRemaining < 0) ? 'red' : 'black');
        }
    );
});
//= require jquery
//= require handlebars
//= require ember
//= require ember-data
//= require_self
//= require ./railsapp

// for more details see: http://emberjs.com/guides/application/
Railsapp = Ember.Application.create();


$(document).ready(function() {
    /* Activating Best In Place */
    jQuery(".best_in_place").best_in_place();
});
//= require jquery
//= require handlebars
//= require ember
//= require ember-data
//= require_self
//= require ./railsapp

// for more details see: http://emberjs.com/guides/application/
Railsapp = Ember.Application.create();


$(document).ready(function() {
    $(".tt").tooltip({
        placement: "right"
    });
});

Anyone got the same?

I'd be happy to test and fix the generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant