Code Monkey home page Code Monkey logo

bootstrap's Introduction

trophy

stackoverflow

bootstrap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap's Issues

Multiple fileuploads on a single page

Thanks for the plugin. If I have multiple fileupload divs on a single page, only the first one works for me somehow. Here's the html snippet

<label class="label-attach">Attach files or photos</label>

<div class="fields">
<div class="fileupload fileupload-exists" data-fileupload="file">
<input name="" value="" type="hidden">
<div style="line-height: 18px;" class="fileupload-preview uneditable-input">Admin.png</div>
<span class="btn btn-file">
    <span class="fileupload-new">Select file</span>
    <span class="fileupload-exists">Change</span>
<input id="feed_attachments_attributes_0_attachment" name="feed[attachments_attributes][0][attachment]" type="file">
</span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
</div>
</div>
<div class="fields">
<div class="fileupload fileupload-new" data-fileupload="file">
<div style="line-height: 18px;" class="fileupload-preview uneditable-input"></div>
<span class="btn btn-file">
        <span class="fileupload-new">Select file</span>
    <span class="fileupload-exists">Change</span>
    <input id="feed_attachments_attributes_new_1339310815960_attachment" name="feed[attachments_attributes][new_1339310815960][attachment]" type="file">
</span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
</div>
</div>

I am using it in my rails project if that helps.

file upload update

Updating an image attachment , I am using an edit form w fileupload-exists and the current existing image

%div.fileupload.fileupload-exists{:'data-provides' => "fileupload"}
     %div.fileupload-preview.
            = image_tag @craftwork.image_url
    %span.btn.btn-file
    %span.fileupload-exists= "Change"

I can select a new image to replace the current one ... but what if I want to cancel this selection and reset back to the current image
Currently, I guess it's not possible to display a 'reset' button.... and rest on the client ,would it be a nice feature ?

I hacked it, adding myself a 'reset button' with an Ajax call to the server to reset the fiel upload widget ..

btw : I there a way to detect when the fileupload-preview image changed ( when upload is completed) to display the 'reset' button when upload is completed . I currently display it when user click on 'change' button ...

File Uploader doesn't work inside of a bootstrap modal

The file uploader doesn't seem to work inside the bootstrap modal. Instead it doesn't submit the file in POST.

  1. It works fine when I just use a regular inside the modal.
  2. It works fine when I put the file uploader code outside the modal.
  3. It doesn't work when I put the file uploader inside of a modal.

File upload inline-block

Need to apply this to allow for error messages to be rendered on the right hand side:

.fileupload {
    display: inline-block;
}

Website Shows iFrame Error

Not an issue with the project itself, per se, but whenever I try to visit jasny.github.com/bootstrap, I get an error from markdotto.github.com stating that For security reasons, framing is not allowed. It looks like the Github buttons are causing the problem - a quick look at github.com/markdotto/github-buttons seems to indicate that the buttons should be from http://ghbtns.com as opposed to http://markdotto.github.com/github-buttons.

Span containing file upload name is not position correctly

The span is located to the right and below the text box where the text should be shown, which makes it invisible (FireBug to the rescue). Below is the code for the form, which looks OK, so I'm assuming some of my css is interfering with the span position, but I don't know how to fix it.

  <form action="/ldap_app_three/carpictures/add/1" id="CarpictureAddForm" enctype="multipart/form-data" method="post" accept-charset="utf-8">
<div style="display:none;"><input type="hidden" name="_method" value="POST"/>
</div>  
<fieldset>
    <legend>Add Carpicture</legend>
    <input type="hidden" name="data[Carpicture][carmodel_id]" value="1" id="CarpictureCarmodelId"/> <div class="fileupload fileupload-new" data-provides="fileupload">
      <div class="input-append">
        <div class="uneditable-input span3"><i class="icon-file fileupload-exists"></i> 
          <span class="fileupload-preview"></span>
        </div>
        <span class="btn btn-file">
          <span class="fileupload-new">Select File</span>
          <span class="fileupload-exists">Change</span>
          <input type="file" name="data[Carpicture][fileName]"  id="CarpictureFileName"/>       </span>
        <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
      </div>
    </div>
    <div class="submit"><input  class="btn" type="submit" value="Upload"/></div>  </fieldset>
  </form>

cannot customize plugin

in the customize page when selecting on jasny extension, the downloaded zip file would be corrupted

Input mask for IP

Add something like this:
<input type="text" data-mask="255.255.255.255" />
in bootstrap-inputmask.js.
So you can`t enter in input numbers bigger then "255"

Browser autocomplete fields with multiple input masks cause freezing issue

If I have more than one field using the input mask plugin, and I autofill the form, the form field focus starts rapidly and endlessly jumping between all of the masked fields on the form, selecting the full text in the input once focused. Attempting to focus another field while this happens does not break the loop, and it continues to change focus between fields. The only way to break the loop is to reload the page.

So far I have only been able to reproduce this in Chrome and Safari.

A temporary work around for the issue is to disable browser autocompletion on the data-mask fields to prevent the autocompletion from happening.

$('input[data-mask]').prop('autocomplete', 'off')

file upload button is not aligned

I have copied and pasted the example code as follows.

<div class="fileupload fileupload-new" data-provides="fileupload">
        <div class="input-append">
            <div class="uneditable-input span3"></div>
            <span class="btn btn-file">
                <span class="fileupload-new">Select file</span>
                <span class="fileupload-exists">Change</span>
                <input type="file">
            </span>
            <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>
        </div>
    </div>

the result is that button is extra wide and extra high then what's represented on the website. If I remove

 <div class="input-append">  

then it works fine.

fileupload used in edit operations

Hello,

am trying to use fileupload for edit operations whereby am retrieving images from backend to be displayed in edit mode.

I tried to follow instructions on manual, it says i must replace fileupload-new class with fileupload-exists which I did.

I do get the edit mode UI, with Change and Remove buttons. but the image from server is not rendered, actually am not sure where should I have it render the url of the current image?

Input Mask Error

When using Bootstrap 2.1.1 in conjunction with the bootstrap-inputmask plugin (ver j1), data-masks that contain numbers fail.

For example, if you are trying to format a zip-code field, this command will fail...
input type="text" placeholder="Zip" name="zip" data-mask="99999"

However, this command will not fail (inserted random space at end):
input type="text" placeholder="Zip" name="zip" data-mask="99999 "

These commands, curiously, will not fail either:
input type="text" placeholder="Zip" name="zip" data-mask="(99999)"
input type="text" placeholder="Zip" name="zip" data-mask="aaaaa"

Error border in file chooser

On a typical bootstrap submit, if an error occurs, the borders of whatever field is in red. This does not apply to the custom file uploader which makes it look out of place.

Problem with tr comparison in jasny rowlink

In bootstrap-rowlink.js it has a function whose definition begins like this:

var Rowlink = function (element, options) {
    options = $.extend({}, $.fn.rowlink.defaults, options)
    var tr = element.nodeName == 'tr' ? $(element) : $(element).find('tr:has(td)')

It does not work on a Mac with Safari or Firefox because the element.nodeName is returned in upper case ('TR' instead of 'tr'). I hacked it to accept either, and it was fine. I have not checked any other browsers on a Mac.

bootstrap-fileupload.js > Cancel in upload dialog (windows 7) clears previous file pointer

After having selected a file in the upload dialog, the "Select file" button changes to read "Change". So, user clicks "Change", but then decides the original is fine, and clicks "cancel" in the dialog window. The text for the original selection remains in the input area. User clicks "Upload", thinking the original selection remains intact, but in-fact it has been cleared.

  1. Click "Select File"
  2. Choose a file and click OK
  3. Click "Change"
  4. Click "Cancel"
  5. Click "Upload"

The "file" var is defined in the scope of the change event (line 59). There should probably be another variable that acts as a cache for this one, so that the old pointer can be retrieved in this case.

Cannot make (error found)

$ git clone git://github.com/jasny/bootstrap.git
Cloning into 'bootstrap'...
remote: Counting objects: 27194, done.
remote: Compressing objects: 100% (9689/9689), done.
remote: Total 27194 (delta 19032), reused 25184 (delta 17319)
Receiving objects: 100% (27194/27194), 17.61 MiB | 595 KiB/s, done.
Resolving deltas: 100% (19032/19032), done.

$ cd bootstrap/
$ make

Building Bootstrap...

Running JSHint on javascript... ✔ Done
Compiling LESS with Recess... ✔ Done
Compiling documentation... ✔ Done
Binary
Error parsing arguments in: docs/assets/js/bootstrap.js
make: *** [build] Error 1

Fileupload via javscript doesn't work

When i call the fileupload plugin nothing change. The element is not altered and there isn't new elements.

The plugin only works if i use the complete html.

Remove button in FileUpload does not work with jQuery 1.9.0

Looks like Remove button functionality requires $.browser support, which was dropped in jQuery 1.9.0, that is why javascript error $.browser is not supported is thrown.
Here it is written, that it is removed from 1.9.0
http://api.jquery.com/jQuery.browser/

line 103 in fileupload.js

    //ie8+ doesn't support changing the value of input with type=file so clone instead
      if($.browser.msie){

jQuery is offering to replace $.browser with $.support, but at least here there's nothing about file upload value change support.

file-preview and file icon do not show

This may not a bug, but you may help me with it a little bit.

I am using the example code of file upload and after uploading a file, I couldn't see the file icon and the file name in the uneditable-input area.

Any suggestions?

jasny rowlink support for dynamically drawn tables

I am trying to combine using the DataTables jQuery plugin with the jasny rowlink extension to Boostrap. The fastest way is to, after the table is drawn, use the rowlink method:

$('#tableid').rowlink();

It works well for the first page. However, when you page to the next set of rows, rowlink no longer works. I was able to work around it by using an callback DataTables provides on every redraw of a table:

DataTableData.fnDrawCallback = function(oSettings){
    // these next two do rowlink stuff...
    $('#example').removeData('rowlink');
    $('#example').rowlink();
    };

But I recognize it is a kludge that is trusting that the rowlink functionality will continue to execute the if clause this code:

$.fn.rowlink = function (options) {
    return this.each(function () {
    var $this = $(this)
    , data = $this.data('rowlink')
    if (!data) $this.data('rowlink', (data = new Rowlink(this, options)))
    })
}

Perhaps an option can be added to rowlink() to tell it to ignore if the previous data exists or not (overwriting it)?

I imagine a lot of people would like to use this with dynamically produced tables...even DataTables specifically...and they may run into the same issue. I know there may be a better solution than what I have suggested.

Javascript errors after minification due to missing semicolons

Using the engine in http://code.google.com/p/minify/, if you try to compress the Javascript in bootstrap.js you'll get "Uncaught SyntaxError: Unexpected token !" in 3 places. This is because the syntax

[...]}(window.jQuery)!function[...]

will fail to parse. Simple solution, add semicolons before the "!". Patch is at http://blog.echothis.com/wp-content/uploads/2012/12/0001-Patch-bootstrap.js-so-it-doesn-t-break-when-minified.patch_.txt

File upload works by double clicking IE +10

I am developing a project using Bootstrap in which I use file upload, all very well, but I have seen using IE10 not working properly, to load a file you have to double click.

File Upload on IE9

Browser: IE9
OS: Windows 7

  1. Pick a File (Selected File Name in input text)
  2. Remove (get removed)

so far so good

  1. Pick file again

Expected:

New file should be in input text

Actual

Nothing happens

Fileupload

Is the Fileupload not working in Safari?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.