Up to [LON-CAPA] / loncom / interface
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Current tag: bz6209
Work-in-progress commit on bug 6209. --> New (still non-functional) contextual section bar and section title bar --> Disable "Enable/Disable WYSIWYG" link --> Hide unnecessary fields in .LC_Box'es temporarily for display purposes --> No longer preview content above edit box --> This will eventually be replaced by a "Preview" button which will generate a processed copy of the field via an AJAX request. --> No longer print "Save all", "Delete", etc. fields beneath edit box, because I am masochistic and wanted to get rid of the only part of the interface that actually works as advertised right now. STILL NOT TOUCHED: -- same as last commit New pretty screenshot attached on Bugzilla.
Work-in-progress commit for bug 6209. Continuing work on jQuery based interface. At this point, none of the buttons actually function, but the following changes are notable: SECTIONS/FIELDS LIST: -- Reorder now only is allowed along the y-axis, and the "up-down arrow" icon serves as the handle by which sections can be dragged. -- The list is now as long as the number of sections, as opposed to using 'overflow-y: scroll'. -- Hovering over a section name shows a "Delete" icon. -- New non-functional buttons to "Add Section" and "Revert Order" ACTIVITY BAR: -- Activity bar (whose major purpose here is to save) has been put in. -- The "Save" button becomes highlighted once a change has been made. --NOT YET DONE-- These are things that I need to do, or have been told about, but have not yet been touched. -- Letting lonnet::put manage the freezing of nested data structures. -- Removing 2.x pseudo-compatibility. Screenshot attached to bug 6209 on Bugzilla.
Work-in-progress commit for bug 6209. Features the beginnings of a jQuery-based interface that meshes with the old interface for the time being. There are a lot of things to be prettied and improved, but this is a good stopping place for now.
Work-in-progress commit for bug 6209. --> Adds capability to delete fields from display for lonsyllabus. --> Allows basic field title renaming capability.
Work-in-progress commit for bug 6209. --> Adds capability for arbitrary fields in the data structures for lonsyllabus. DESCRIPTION: Existing 2.x fields are converted to new 'data.fields.TIME_PROCESS_INT' DB entries, and a 'data.old_new_map' entry maps old 2.x field names to their new 3.x equivalents to preserve backwards compatibility. Field order and display is maintained by a 'data.fields' DB entry, which is a frozen array of 3.x field entry IDs. When encountering a document with no 'data.fields' entry, the 2.x structure is converted to a new 3.x data structure as above. This indicates a document never touched by 3.x. Saves of 3.x documents are maintained by updating both the existing 'uploaded.lastmodified' DB entry as well as a new 'properties.last_modified' entry which is exclusive to 3.x. Mismatched timestamps indicate that a 3.x document has been further changed in 2.x -- in that event, if an existing field (ex. 'aaa_instructorinfo') has an equivalent, the corresponding 3.x field is updated; else the field is appended to the 3.x document and a conflict fail flag is enabled. Each new 3.x field DB entry is a frozen hash with structure as follows: $field{title} = Name of field $field{content} = Content of field $field{type} = Type of field, to determine parsing/saving attitude - TYPE_TEXT_HTML -- HTML content - TYPE_TEXT_PLAIN -- plain content - TYPE_URL_INCLUDE -- URLs to be included the course NOTES: --> There is still a lot of DEBUG code and output in here. --> To reset a syllabus from 3.x to a 2.x document, add "&forceflush=1" to the edit syllabus page. --> While "Delete" links appear with individual fields once saved in 3.x format, these links do not function yet. --> A temporary function, &print_template_new_fields(), takes the place of &Apache::lontemplate::print_template_fields(). --> Documentation will get better over time. --> Happy belated Valentine's Day.
Refactors nearly-common code located in the templated pages, into a new routine &print_template_fields() which controls printing LC_Boxes for fields, and <textarea>s as necessary. Custom fields (links to be included, for example), are processed using handler routines in closures, which are passed in a hash to the routine. Saves about 140 lines of code are so?