summaryrefslogtreecommitdiff
path: root/public/javascripts/admin_interface.js
AgeCommit message (Collapse)Author
26 hoursFix autosave bug: sync tinymce's state back to textarea before serializingerdgeist
40 hoursAsset picker: attach/detach/reorder UI, read-only view, autosave fixerdgeist
Replaces nodes#edit's old Images section -- a hidden panel dumping every image asset in the system unfiltered (#image_browser) plus a raw drag-and-drop box (#image_box) -- with a small search-and-click picker built on the endpoint from the last two commits. Attaching posts immediately and appends the new thumbnail via a cloned <template> -- icons only render correctly through the Rails helper server-side, so the template holds real, pre-rendered markup for JS to clone rather than duplicating raw SVG in a JS string. Reordering is jQuery UI sortable on the small attached list only, with a dedicated drag handle rather than the whole thumbnail. Two bugs caught while click-testing, fixed here rather than shipped and patched after: the search panel never closed after attaching an image, since the success handler re-triggered focus to keep it open for attaching several in a row -- which meant it just re-populated itself forever instead of signaling "done." Fixed to close explicitly; a click-outside-closes handler was added alongside it, matching the affordance the top-bar search already has. A real, independent, pre-existing data bug surfaced during the same testing: Node#autosave!'s first-time-creation branch never carried related assets forward from whatever page was previously current -- attach an image, let autosave fire once, and it silently landed on a fresh, assetless Page row. Long-dormant, not introduced by this work, just finally exercised by something that made it visible. Fixed inside the `unless self.autosave` guard specifically -- running this on every call, not just creation, would overwrite anything attached directly to an existing autosave in between, a worse bug than the one being fixed. nodes#show gains a read-only Images section, rendered only when a page actually has attached images, so an attachment can be confirmed present without entering the edit/lock cycle -- useful on its own, and specifically useful the next time an asset bug needs investigating. Its thumbnail CSS is shared with the edit view's picker via a class (.thumbnail_list) rather than duplicated under a second name.
2 daysAdd a grouped tag+node search endpoint for the upcoming dashboarderdgeist
AdminController#dashboard_search returns tags and nodes as separate, labeled groups (via ActsAsTaggableOn::Tag.named_like and Node.editor_search) rather than the flat per-node list every existing picker returns. initSearchPicker gains a renderResults callback option that, when given, replaces the default per-node rendering entirely -- lets the dashboard render its two labeled groups without a second, parallel picker implementation. resultsHeaderHtml (the "Press Enter to see all results" hint) is now threaded through as a third argument to renderResults, so a picker with custom rendering can still show it -- previously only the default per-node branch ever did. Tags link straight to the existing /admin/nodes/tags/:tag view rather than becoming an in-place filter chip.
5 daysRework events#new with the new layout paradigmerdgeist
6 daysAutosave posts to its own endpoint surface lock loss immediatelyerdgeist
Previously piggybacked on the main form's action and relied on a .js.erb response to update #flash; now posts to the dedicated autosave route with an explicit _method=put override, and reacts to a 423 by stopping the timer and showing a persistent banner rather than letting the next Save discover the conflict on its own.
6 daysWhitespace fixeserdgeist
6 daysWIP: dynamic rrule builder, javascript sideerdgeist
6 daysLink new metadata behaviour and layout in css and javascripterdgeist
6 daysWhitespace fixeserdgeist
6 daysWIP: dynamic rrule buildererdgeist
7 daysAdd link and lists to tinymce, wash pasted blocks clean of classeserdgeist
2026-06-27Stage 7 click-testing fixeserdgeist
- aggregate: switch to shortcode syntax [aggregate ...]; fix paragraph wrapping by excising the shortcode and its surrounding <p> before sanitize, concatenating collection output outside sanitized content - page.rb: remove aggregate XML unwrapping from rewrite_links_in_body (no longer needed with shortcode approach) - rss builders: explicit CGI.escapeHTML on title/abstract; Builder 3.3.0 does not escape when target buffer is html_safe (ActionView default) - tinymce: disable menubar and promotion nag; add code plugin, remove paste plugin (built into TinyMCE 8 core); configure via admin_interface.js directly (config/tinymce.yml affects tinymce() helper only, not tinymce.init)
2026-06-27Stage 7: Rails 7.2 → 8.1 on Ruby 3.2.11erdgeist
- Bump Rails to 8.1.3 (Ruby unchanged at 3.2.11, new gemset rails8-upgrade) - config.load_defaults 8.1; merge app:update diffs for all environment files - Remove routing-filter 0.7.0; replace with native scope '(:locale)' in routes.rb and default_url_options in ApplicationController - Delete config/initializers/routing_filter_rails71_patch.rb - Replace vendored TinyMCE 3.x (~200 files) with tinymce-rails ~> 8.3; migrate admin_interface.js from jQuery .tinymce()/advanced theme to tinymce.init(); add config/tinymce.yml; note: TinyMCE 7+ is GPL - rails-i18n ~> 8.0 added explicitly (previously indirect dependency) - awesome_nested_set, acts-as-taggable-on pinned to git main/master (gemspec activerecord < 8.1 ceiling; no functional incompatibility; repin to version once upstream releases updated gemspecs) - globalize ~> 7.0, libxml-ruby ~> 5.0, nokogiri ~> 1.18, pg ~> 1.5 - sass-rails, coffee-rails, uglifier moved from :assets group to main (Sprockets 4 convention; :assets group no longer meaningful) - Node: head, draft, lock_owner marked belongs_to optional: true - Page: node, user, editor marked belongs_to optional: true - Static assets in public/images/ and public/javascripts/ referenced via plain HTML tags; Rails 8 load_defaults raises on pipeline helpers for undeclared assets - sessions_controller_test.rb: remove stale require and dead rescue_action - users_controller_test.rb: assert button[type=submit] not input[type=submit] (Rails 8 button_to renders <button> not <input>) - test_helper.rb: node.reload after children.create! (awesome_nested_set 3.9.0 does not refresh parent in memory after callback) - 129 runs, 339 assertions, 3 failures, 0 errors — identical baseline to 7.2
2025-02-06Improve worklflowerdgeist
2025-02-05Enhance admin view by sitemaperdgeist
2009-11-16tinymce update. activated safari and paste plugin to prevent messy markup after copy and paste. hope that helps *sigh*hukl
2009-10-19page editor is initialized firsthukl
2009-10-18re-activated admin overview screen - listing 20 recent changes and 20 current drafts. more to comehukl
2009-09-13the sorter needed a seperate initializerhukl
2009-09-13conditional initializers - not sure if this actually improves anything but it seems better this wayhukl
Closes #18
2009-09-12re-enabled autosave. reduced timeout to 7 seconds which triggers only if something has actually changedhukl
2009-09-09added editing of slugs and moving of nodes. to edit a slug or move a node you edit that node, make your changes and save. the slug and parent node changes ↵hukl
get staged and are applied once that revision is published
2009-09-09huge tiny_mce update - now using the tiny_mce jquery build which allows tiny_mce to be initialized via jquery - great!hukl
2009-09-08new interface for adding nodes. still needs a bit radio button magickhukl
2009-09-05fixed two js lint warningshukl
2009-09-02final clean uphukl
2009-09-02even betterhukl
2009-09-02more refactoring - self.bite(table)hukl
2009-09-02wow - jquery sucks from time to time. it works now entirely as expected but I don't know why it didn't before *sigh*hukl
2009-09-02corresponding css and js changeshukl
2009-09-02further interface improvementshukl
2009-09-02some drag and drop refinementshukl
2009-09-02only sort images if something has actually changedhukl
2009-09-02drag out and drag back over the droppable now workshukl
2009-09-02formattinghukl
2009-09-01Added javascript goodness to add and sort and drag and drop images on pageshukl
2009-09-01slight interface changeshukl
2009-08-15made the sorting a bit smoother by adding a placeholderhukl
2009-08-09added sorting (via drag and drop) and deleting of menu items. Its not perfect though and needs more styling. I'm unsure about the proper route for the sort ↵hukl
action. Will investigate.
2009-08-08lots of new code to manage menu items - harder than expected :/hukl
2009-08-08encapsulated javascript magic into objectshukl
2009-06-13added js search widget with clickable results that will take the user to the brand new "show" version of the page. so the user doesn't create new revisions ↵hukl
and locks all the time when he / she only wants to take a look at it.
2009-06-10added basic ajax search interface. lots of css / js improvements needed but it seems to work quite okay for now. more on that tomorrowhukl
2009-05-08comparing content instead of string length to track changeshukl
2009-05-08put the whole autosave stuff into admin_interface.jshukl
2009-05-07autosave only when something has actually changed. this was hard. i don't like javascripthukl
2009-04-16added autosave to node edit view. saves every 15 secondshukl
2009-04-13rebuilding the admin interfacehukl