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

Support a context option to be posted back by browse-everything #68

Merged
merged 12 commits into from Jul 29, 2014

Conversation

mbklein
Copy link
Member

@mbklein mbklein commented Jun 23, 2014

Allows a data-context option to be added to the trigger button (or a context key added to the options passed to $().browseEverything()) that will be passed back to the server whenever the user navigates to a new provider or folder, or when the submit button is clicked. This will allow an application-supplied before_filter to alter the server-side, request-specific browse configuration before the request is handled (e.g., to allow the file_system handler to point to a different location).

<button class="btn btn-large btn-success" data-context="my-context" 
  data-route="/browse/" data-target="#main_form" 
  data-toggle="browse-everything" id="browse-btn" 
  name="button" type="button">Browse</button>

@mbklein
Copy link
Member Author

mbklein commented Jul 28, 2014

This probably should have been a separate PR, and I'll cherry-pick it out if someone really wants me to, but I also made the browser pretty.
firefoxscreensnapz007

@mbklein
Copy link
Member Author

mbklein commented Jul 29, 2014

@jkeck @Cam156 I know there's a lot going on in this PR, but I've been working in tandem with Avalon and it got too intertwined to break it all up. I've been hammering on it for several weeks now, and I'd love to see it merged.

@jkeck
Copy link
Member

jkeck commented Jul 29, 2014

@mbklein should jquery.treetable.js be in vendor/assets?

@@ -8,4 +8,11 @@ def array_to_hidden_fields(array,key)
fields.join("\n").html_safe
end

def is_acceptable?(file)
file_type = file.type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally pedantic but what's the purpose of this variable? It seems like file_type is only used once below, and isn't conveying any information that isn't in the method name on the object (file.type).

@mbklein
Copy link
Member Author

mbklein commented Jul 29, 2014

Self-merging to save anyone else the shame and disappointment if anything breaks. :)

mbklein added a commit that referenced this pull request Jul 29, 2014
Support a context option to be posted back by browse-everything
@mbklein mbklein merged commit 3f423d8 into master Jul 29, 2014
@@ -0,0 +1,18 @@
<% unless file.name =~ /^\.+$/ %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the file object in this context? I wonder if there isn't some sort of method on the file object (or one we can add) that can tell us this information. (which I think is to not do this for the parent/self directory pointers?)

@jkeck
Copy link
Member

jkeck commented Jul 29, 2014

but...but

@mbklein
Copy link
Member Author

mbklein commented Jul 29, 2014

Sorry. Yes, you're right about the purpose of that kludge. I'll add that before the release.

@mbklein
Copy link
Member Author

mbklein commented Jul 29, 2014

@jkeck I owe you a beer for the unreviewed merge. :)

@jkeck
Copy link
Member

jkeck commented Jul 29, 2014

@mbklein no worries. Sorry I dragged my feed so long on actually getting around to looking at it.

mbklein added a commit that referenced this pull request Jul 29, 2014
@mbklein mbklein mentioned this pull request Jul 29, 2014
@awead awead deleted the feature/postback-context branch August 5, 2016 19:11
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

Successfully merging this pull request may close these issues.

None yet

2 participants