How to set active class on all previous bullet than the current one? - swiper.js

the class swiper-pagination-bullet-active is only on the current slide, but how to apply this on each previous bullets?
Thank you

Related

Active CustomLayout slide

How can I get the index number of the active/current CustomLayout that is being displayed in the Slide Master view?
I want to be able to have the user change the current CustomLayout's name.
Thanks!
The solution provided by #steveRindsberg in the comments worked great:
ActiveWindow.View.Slide.Name

How to ask user to snap on a vertex of a line element (in the ILocateCommandEvents_Accept handler) of Microstation VBA

I know how to write a VBA macro in Microstation that will ask the user to select an element:
Sub Create2DCrossLines()
' Set error handler
On Error GoTo ErrorHandler
' Let the user select the bank elements himself
Call CommandState.StartLocate(New clsSelectBanksLCE)
Exit Sub
ErrorHandler:
Call ReportError("Create2dCrossLines")
End Sub
clsSelectBanksLCE uses ILocateCommandEvents for managing that part of the logic. So the user can select a LineElement for example and when the Accept event is fired it runs an action:
Private Sub ILocateCommandEvents_Accept(ByVal Element As Element, _
Point As Point3d, _
ByVal View As View)
In my particular case we track selecting element 1 and then element 2 and once both elements are selected it proceeds. This is all fine.
My problem is this: after I accept the first element, and before proceeding to select the next (ie: in the Accept handler) I want to get the user to snap on to two vertices of the line element.
I need to know which part of the line element they want to process. I can't work out how to do this. In AutoCAD you can use GetPoint.
So I want to ask them to snap on to the first vertex on this line element, then snap onto the end vertex. After this can we move on to select the second element.
Update
I have just stumbled over this article. I notice it says:
Once the user has accepted an element, we should start another class that implements IPrimitiveCommandEvents to obtain a target datapoint. Finally, compute the offset from the supplied locate datapoint to the target datapoint and move the element.
It seems what I want but I just am not clear on the right order. At the moment I have:
ILocateCommandEvents_Start This begins the location process.
ILocateCommandEvents_LocateFilter. If the element is a LineElement, then it
assigns m_Element1 and the second event fired assigns m_Element2.
ILocateCommandEvents_Accept If both the variables are not nothing it runs the main process.
See my dilemma? It sounds like I need to:
Run one instance of ILocateCommandEvents to select one element only.
Then run one instance of IPrimitiveCommandEvents to get the first snap point.
Then run another instance of IPrimitiveCommandEvents to get the second snap point.
Then run another instance of ILocateCommandEvents to get the second element.
Finally, once the second element is accepted, perform my processing.
That is how I understand I need to do it. Or, can I use my one ILocateCommandEvents class that currently gets the user to choose two elements?
Guidance appreciated.
Update
I got it to work by following the above logic. That article really helped. The only issue I have now is that I need to draw a rubber band. But that is a separate question.
As mentioned in this article:
Once the user has accepted an element, we should start another class that implements IPrimitiveCommandEvents to obtain a target datapoint. Finally, compute the offset from the supplied locate datapoint to the target datapoint and move the element.
The link also provides example code on how to use the IPrimitiveCommandEvents event class.

PowerPoint 2010 - VBA to replace figures

I have a slide that we use in my department to provide an overview of the progress regarding project document deliverables. It is shown in a graphic manner, and therefore a simple table view or similar cannot be used. Each of the document deliverables mentioned on the slide can have 3 different legends (figures), a square, triangle and arrow. These are color coded according to stakeholder responsibility of the deliverable. Right now we are changing each one of them manually during the project
What I am looking for:
Is there a VBA code that can easily be used to replace these figures according to project status?
I imagine each Project deliverable needs to be tagged with a position on the slide, and then a userform can be used to select which type of figure there should be assigned?
Anyone who can help me or point me in a direction to something that might help me is highly appreciated!
Thank you
Peter
Here's one approach in rough outline ...
Instead of individual shapes, use a square, triangle and arrow grouped. The user selects the group they want to work with then launches your dialog box where they choose the project status for that item. Your dialog box assigns a value from 1 to 3 to the status then calls SetVisibility like so:
Sub MakeItSo()
Call SetVisibility(2)
End Sub
SetVisibility first makes all of the shapes in the group invisible, then sets the appropriate shape to be visible:
Sub SetVisibility(lStatus As Long)
Dim x As Long
With ActiveWindow.Selection.ShapeRange(1)
For x = 1 To .GroupItems.Count
.GroupItems(x).Visible = False
Next
.GroupItems(lStatus).Visible = True
End With
End Sub

Handling tableview cell selection from other view controllers

I have a tableView with custom table cells which displays a list of sayings. While selecting a cell (say "saying1") from the tableView, the cell will get selected and will moves to next view controller for showing an explanation of selected saying. In that view controller two buttons "Previous" and "Next" are there for navigating to previous and next saying. So user may select next button for seeing next saying (say "saying2"). But the problem here is, In this stage when i navigate back to my tableview, the cell selected will be "saying1" not "saying2".
In order to solve this problem, i collected the currently selected sayings ("saying2's") index from array (ie,index will be 1) and passed it to the previous tableView through segue and converted that value into NSIndexpath. After this step i don't know what to do. Please help me in solving this.
You can specifically select a cell by calling following method present in UITableView class :
selectRowAtIndexPath:animated:scrollPosition:
refere to following link : https://developer.apple.com/library/ios/documentation/uikit/reference/UITableView_Class/Reference/Reference.html#//apple_ref/occ/instm/UITableView/selectRowAtIndexPath:animated:scrollPosition:

Custom coloring a gridcell in dijit.calendar and keeping it persistent

I am using dojo 1.6 and using dijit.calendar in a project and it's working great except for the goal of colorizing a selected grid cell. I have three innerHTMLs that are being manipulated by the calendar clicks. No problem there.
dijit.calendar's behavior is to highlight a gridcell (calendar day) as blue when clicked and when another gridcell is clicked, it then turns that blue.
What I'd like to do is colorize the cell a custom color when it's clicked and have it persistent.
Specifically the calendar is for a project that has an official date (blue), start date (green) and an end date (red).
I'm not even aware that there is a way to colorize a specific gridcell in dijit.calendar. Has anyone successfully done this or have a pointer to send me in the right direction?
Edit below:..
OK folks, I have a pretty good lead on where to go with this thanks to Philippe below. Philippe's solution will color the cell EXACTLY as intended (so he's got the answer karma). Turns out that if a selected grid cell is red and I switch to the month to pick a subsequent date, the cell stays red.
I have most of it figured out. I can get, say, the first couple of dates successfully colored but if I have to do something like put in a third date in the next month and change the calendar, the cells stay colored. So there's going to have to be a way to change my color change to a distinct value that corresponds with the actual date.
I know that onChange that the only argument returned is the Date itself like this (using debug.console in Firebug).....
[Date {Wed Jan 18 2012 00:00:00 GMT-0500 (EST)}]
I inspected the code through Firebug and noticed in that same cell that the code looks like this....
<td role="gridcell" class="dijitCalendarSelectedDate dijitCalendarCurrentMonth dijitCalendarDateTemplate" dijitdatevalue="1326866400000" style="background-color: green;" tabindex="0"><span class="dijitCalendarDateLabel">18</span></td>
That distinct value seems to be "dijitdatevalue".
I suppose I could follow a chain of ......
on click, store the "dijitdatevalue" of the first date in a hidden field (as well as the second and third dates)
Then go back and set the background-color of the corresponding dijitdatevalue to blue, green or red.
Question now is how to return the dijitdatevalue string to a hidden field. I'll update this post again as I figure out the answer.
Janie
If you look at the widget code you'll see a private method called _onDayMouseDown which is responsible for turning the cell blue...
You can add your custom code to that function through dojo.connect, like this :
dojo.connect(dijit.byId('calendar1'), "_onDayMouseDown", function(/*Event*/ evt){
var node = evt.target.parentNode;
dojo.style(node, "backgroundColor", "green");
});
Otherwise, if you use dojo 1.7, you may give a try to the MultiSelectCalendar